@intlayer/backend 7.1.3 → 7.1.5

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 (854) hide show
  1. package/README.md +0 -3
  2. package/dist/assets/utils/AI/askDocQuestion/embeddings/docs/en/intlayer_with_tanstack.json +10242 -9216
  3. package/dist/types/controllers/dictionary.controller.d.ts.map +1 -1
  4. package/dist/types/controllers/organization.controller.d.ts.map +1 -1
  5. package/dist/types/controllers/projectAccessKey.controller.d.ts.map +1 -1
  6. package/dist/types/controllers/tag.controller.d.ts.map +1 -1
  7. package/dist/types/emails/InviteUserEmail.d.ts +4 -4
  8. package/dist/types/emails/InviteUserEmail.d.ts.map +1 -1
  9. package/dist/types/emails/MagicLinkEmail.d.ts +4 -4
  10. package/dist/types/emails/MagicLinkEmail.d.ts.map +1 -1
  11. package/dist/types/emails/OAuthTokenCreatedEmail.d.ts +4 -4
  12. package/dist/types/emails/OAuthTokenCreatedEmail.d.ts.map +1 -1
  13. package/dist/types/emails/PasswordChangeConfirmation.d.ts +4 -4
  14. package/dist/types/emails/ResetUserPassword.d.ts +4 -4
  15. package/dist/types/emails/ResetUserPassword.d.ts.map +1 -1
  16. package/dist/types/emails/SubscriptionPaymentCancellation.d.ts +4 -4
  17. package/dist/types/emails/SubscriptionPaymentCancellation.d.ts.map +1 -1
  18. package/dist/types/emails/SubscriptionPaymentError.d.ts +4 -4
  19. package/dist/types/emails/SubscriptionPaymentError.d.ts.map +1 -1
  20. package/dist/types/emails/SubscriptionPaymentSuccess.d.ts +4 -4
  21. package/dist/types/emails/ValidateUserEmail.d.ts +4 -4
  22. package/dist/types/emails/Welcome.d.ts +4 -4
  23. package/dist/types/models/dictionary.model.d.ts +4 -4
  24. package/dist/types/models/discussion.model.d.ts +2 -2
  25. package/dist/types/models/discussion.model.d.ts.map +1 -1
  26. package/dist/types/models/oAuth2.model.d.ts +3 -3
  27. package/dist/types/routes/search.routes.d.ts.map +1 -1
  28. package/dist/types/routes/tags.routes.d.ts.map +1 -1
  29. package/dist/types/routes/user.routes.d.ts.map +1 -1
  30. package/dist/types/schemas/dictionary.schema.d.ts +6 -6
  31. package/dist/types/schemas/dictionary.schema.d.ts.map +1 -1
  32. package/dist/types/schemas/discussion.schema.d.ts +6 -6
  33. package/dist/types/schemas/discussion.schema.d.ts.map +1 -1
  34. package/dist/types/schemas/oAuth2.schema.d.ts +5 -5
  35. package/dist/types/schemas/oAuth2.schema.d.ts.map +1 -1
  36. package/dist/types/schemas/organization.schema.d.ts +6 -6
  37. package/dist/types/schemas/project.schema.d.ts +6 -6
  38. package/dist/types/schemas/session.schema.d.ts +6 -6
  39. package/dist/types/schemas/tag.schema.d.ts +6 -6
  40. package/dist/types/schemas/user.schema.d.ts +6 -6
  41. package/dist/types/services/email.service.d.ts +11 -11
  42. package/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts +2 -2
  43. package/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts +2 -2
  44. package/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts +2 -2
  45. package/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts +2 -2
  46. package/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts +2 -2
  47. package/package.json +7 -7
  48. package/dist/cjs/controllers/audit.controller.cjs +0 -186
  49. package/dist/cjs/controllers/audit.controller.cjs.map +0 -1
  50. package/dist/cjs/models/audit.model.cjs +0 -10
  51. package/dist/cjs/models/audit.model.cjs.map +0 -1
  52. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/index.cjs +0 -16
  53. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/index.cjs.map +0 -1
  54. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.cjs +0 -25
  55. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.cjs.map +0 -1
  56. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.cjs +0 -31
  57. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.cjs.map +0 -1
  58. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/utils.cjs +0 -38
  59. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/utils.cjs.map +0 -1
  60. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/xmlenc.cjs +0 -231
  61. package/dist/cjs/node_modules/@authenio/xml-encryption/lib/xmlenc.cjs.map +0 -1
  62. package/dist/cjs/node_modules/@better-auth/sso/dist/index.cjs +0 -1210
  63. package/dist/cjs/node_modules/@better-auth/sso/dist/index.cjs.map +0 -1
  64. package/dist/cjs/node_modules/@better-fetch/fetch/dist/index.cjs +0 -362
  65. package/dist/cjs/node_modules/@better-fetch/fetch/dist/index.cjs.map +0 -1
  66. package/dist/cjs/node_modules/@xmldom/is-dom-node/dist/index.cjs +0 -89
  67. package/dist/cjs/node_modules/@xmldom/is-dom-node/dist/index.cjs.map +0 -1
  68. package/dist/cjs/node_modules/@xmldom/xmldom/lib/conventions.cjs +0 -110
  69. package/dist/cjs/node_modules/@xmldom/xmldom/lib/conventions.cjs.map +0 -1
  70. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom-parser.cjs +0 -248
  71. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom-parser.cjs.map +0 -1
  72. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom.cjs +0 -1309
  73. package/dist/cjs/node_modules/@xmldom/xmldom/lib/dom.cjs.map +0 -1
  74. package/dist/cjs/node_modules/@xmldom/xmldom/lib/entities.cjs +0 -2176
  75. package/dist/cjs/node_modules/@xmldom/xmldom/lib/entities.cjs.map +0 -1
  76. package/dist/cjs/node_modules/@xmldom/xmldom/lib/index.cjs +0 -20
  77. package/dist/cjs/node_modules/@xmldom/xmldom/lib/index.cjs.map +0 -1
  78. package/dist/cjs/node_modules/@xmldom/xmldom/lib/sax.cjs +0 -499
  79. package/dist/cjs/node_modules/@xmldom/xmldom/lib/sax.cjs.map +0 -1
  80. package/dist/cjs/node_modules/asn1/lib/ber/errors.cjs +0 -20
  81. package/dist/cjs/node_modules/asn1/lib/ber/errors.cjs.map +0 -1
  82. package/dist/cjs/node_modules/asn1/lib/ber/index.cjs +0 -28
  83. package/dist/cjs/node_modules/asn1/lib/ber/index.cjs.map +0 -1
  84. package/dist/cjs/node_modules/asn1/lib/ber/reader.cjs +0 -167
  85. package/dist/cjs/node_modules/asn1/lib/ber/reader.cjs.map +0 -1
  86. package/dist/cjs/node_modules/asn1/lib/ber/types.cjs +0 -47
  87. package/dist/cjs/node_modules/asn1/lib/ber/types.cjs.map +0 -1
  88. package/dist/cjs/node_modules/asn1/lib/ber/writer.cjs +0 -223
  89. package/dist/cjs/node_modules/asn1/lib/ber/writer.cjs.map +0 -1
  90. package/dist/cjs/node_modules/asn1/lib/index.cjs +0 -21
  91. package/dist/cjs/node_modules/asn1/lib/index.cjs.map +0 -1
  92. package/dist/cjs/node_modules/camelcase/index.cjs +0 -78
  93. package/dist/cjs/node_modules/camelcase/index.cjs.map +0 -1
  94. package/dist/cjs/node_modules/escape-html/index.cjs +0 -71
  95. package/dist/cjs/node_modules/escape-html/index.cjs.map +0 -1
  96. package/dist/cjs/node_modules/fast-xml-parser/src/fxp.cjs +0 -9
  97. package/dist/cjs/node_modules/fast-xml-parser/src/fxp.cjs.map +0 -1
  98. package/dist/cjs/node_modules/fast-xml-parser/src/util.cjs +0 -29
  99. package/dist/cjs/node_modules/fast-xml-parser/src/util.cjs.map +0 -1
  100. package/dist/cjs/node_modules/fast-xml-parser/src/validator.cjs +0 -244
  101. package/dist/cjs/node_modules/fast-xml-parser/src/validator.cjs.map +0 -1
  102. package/dist/cjs/node_modules/jose/dist/webapi/lib/base64.cjs +0 -14
  103. package/dist/cjs/node_modules/jose/dist/webapi/lib/base64.cjs.map +0 -1
  104. package/dist/cjs/node_modules/jose/dist/webapi/lib/buffer_utils.cjs +0 -10
  105. package/dist/cjs/node_modules/jose/dist/webapi/lib/buffer_utils.cjs.map +0 -1
  106. package/dist/cjs/node_modules/jose/dist/webapi/lib/is_object.cjs +0 -17
  107. package/dist/cjs/node_modules/jose/dist/webapi/lib/is_object.cjs.map +0 -1
  108. package/dist/cjs/node_modules/jose/dist/webapi/util/base64url.cjs +0 -20
  109. package/dist/cjs/node_modules/jose/dist/webapi/util/base64url.cjs.map +0 -1
  110. package/dist/cjs/node_modules/jose/dist/webapi/util/decode_jwt.cjs +0 -32
  111. package/dist/cjs/node_modules/jose/dist/webapi/util/decode_jwt.cjs.map +0 -1
  112. package/dist/cjs/node_modules/jose/dist/webapi/util/errors.cjs +0 -28
  113. package/dist/cjs/node_modules/jose/dist/webapi/util/errors.cjs.map +0 -1
  114. package/dist/cjs/node_modules/node-forge/lib/aes.cjs +0 -604
  115. package/dist/cjs/node_modules/node-forge/lib/aes.cjs.map +0 -1
  116. package/dist/cjs/node_modules/node-forge/lib/aesCipherSuites.cjs +0 -202
  117. package/dist/cjs/node_modules/node-forge/lib/aesCipherSuites.cjs.map +0 -1
  118. package/dist/cjs/node_modules/node-forge/lib/asn1-validator.cjs +0 -83
  119. package/dist/cjs/node_modules/node-forge/lib/asn1-validator.cjs.map +0 -1
  120. package/dist/cjs/node_modules/node-forge/lib/asn1.cjs +0 -945
  121. package/dist/cjs/node_modules/node-forge/lib/asn1.cjs.map +0 -1
  122. package/dist/cjs/node_modules/node-forge/lib/baseN.cjs +0 -144
  123. package/dist/cjs/node_modules/node-forge/lib/baseN.cjs.map +0 -1
  124. package/dist/cjs/node_modules/node-forge/lib/cipher.cjs +0 -193
  125. package/dist/cjs/node_modules/node-forge/lib/cipher.cjs.map +0 -1
  126. package/dist/cjs/node_modules/node-forge/lib/cipherModes.cjs +0 -604
  127. package/dist/cjs/node_modules/node-forge/lib/cipherModes.cjs.map +0 -1
  128. package/dist/cjs/node_modules/node-forge/lib/des.cjs +0 -1194
  129. package/dist/cjs/node_modules/node-forge/lib/des.cjs.map +0 -1
  130. package/dist/cjs/node_modules/node-forge/lib/ed25519.cjs +0 -1027
  131. package/dist/cjs/node_modules/node-forge/lib/ed25519.cjs.map +0 -1
  132. package/dist/cjs/node_modules/node-forge/lib/forge.cjs +0 -22
  133. package/dist/cjs/node_modules/node-forge/lib/forge.cjs.map +0 -1
  134. package/dist/cjs/node_modules/node-forge/lib/hmac.cjs +0 -114
  135. package/dist/cjs/node_modules/node-forge/lib/hmac.cjs.map +0 -1
  136. package/dist/cjs/node_modules/node-forge/lib/index.cjs +0 -73
  137. package/dist/cjs/node_modules/node-forge/lib/index.cjs.map +0 -1
  138. package/dist/cjs/node_modules/node-forge/lib/jsbn.cjs +0 -1263
  139. package/dist/cjs/node_modules/node-forge/lib/jsbn.cjs.map +0 -1
  140. package/dist/cjs/node_modules/node-forge/lib/kem.cjs +0 -153
  141. package/dist/cjs/node_modules/node-forge/lib/kem.cjs.map +0 -1
  142. package/dist/cjs/node_modules/node-forge/lib/log.cjs +0 -248
  143. package/dist/cjs/node_modules/node-forge/lib/log.cjs.map +0 -1
  144. package/dist/cjs/node_modules/node-forge/lib/md.all.cjs +0 -31
  145. package/dist/cjs/node_modules/node-forge/lib/md.all.cjs.map +0 -1
  146. package/dist/cjs/node_modules/node-forge/lib/md.cjs +0 -25
  147. package/dist/cjs/node_modules/node-forge/lib/md.cjs.map +0 -1
  148. package/dist/cjs/node_modules/node-forge/lib/md5.cjs +0 -331
  149. package/dist/cjs/node_modules/node-forge/lib/md5.cjs.map +0 -1
  150. package/dist/cjs/node_modules/node-forge/lib/mgf.cjs +0 -27
  151. package/dist/cjs/node_modules/node-forge/lib/mgf.cjs.map +0 -1
  152. package/dist/cjs/node_modules/node-forge/lib/mgf1.cjs +0 -51
  153. package/dist/cjs/node_modules/node-forge/lib/mgf1.cjs.map +0 -1
  154. package/dist/cjs/node_modules/node-forge/lib/oids.cjs +0 -160
  155. package/dist/cjs/node_modules/node-forge/lib/oids.cjs.map +0 -1
  156. package/dist/cjs/node_modules/node-forge/lib/pbe.cjs +0 -822
  157. package/dist/cjs/node_modules/node-forge/lib/pbe.cjs.map +0 -1
  158. package/dist/cjs/node_modules/node-forge/lib/pbkdf2.cjs +0 -132
  159. package/dist/cjs/node_modules/node-forge/lib/pbkdf2.cjs.map +0 -1
  160. package/dist/cjs/node_modules/node-forge/lib/pem.cjs +0 -182
  161. package/dist/cjs/node_modules/node-forge/lib/pem.cjs.map +0 -1
  162. package/dist/cjs/node_modules/node-forge/lib/pkcs1.cjs +0 -207
  163. package/dist/cjs/node_modules/node-forge/lib/pkcs1.cjs.map +0 -1
  164. package/dist/cjs/node_modules/node-forge/lib/pkcs12.cjs +0 -730
  165. package/dist/cjs/node_modules/node-forge/lib/pkcs12.cjs.map +0 -1
  166. package/dist/cjs/node_modules/node-forge/lib/pkcs7.cjs +0 -648
  167. package/dist/cjs/node_modules/node-forge/lib/pkcs7.cjs.map +0 -1
  168. package/dist/cjs/node_modules/node-forge/lib/pkcs7asn1.cjs +0 -412
  169. package/dist/cjs/node_modules/node-forge/lib/pkcs7asn1.cjs.map +0 -1
  170. package/dist/cjs/node_modules/node-forge/lib/pki.cjs +0 -108
  171. package/dist/cjs/node_modules/node-forge/lib/pki.cjs.map +0 -1
  172. package/dist/cjs/node_modules/node-forge/lib/prime.cjs +0 -200
  173. package/dist/cjs/node_modules/node-forge/lib/prime.cjs.map +0 -1
  174. package/dist/cjs/node_modules/node-forge/lib/prng.cjs +0 -297
  175. package/dist/cjs/node_modules/node-forge/lib/prng.cjs.map +0 -1
  176. package/dist/cjs/node_modules/node-forge/lib/pss.cjs +0 -148
  177. package/dist/cjs/node_modules/node-forge/lib/pss.cjs.map +0 -1
  178. package/dist/cjs/node_modules/node-forge/lib/random.cjs +0 -148
  179. package/dist/cjs/node_modules/node-forge/lib/random.cjs.map +0 -1
  180. package/dist/cjs/node_modules/node-forge/lib/rc2.cjs +0 -545
  181. package/dist/cjs/node_modules/node-forge/lib/rc2.cjs.map +0 -1
  182. package/dist/cjs/node_modules/node-forge/lib/rsa.cjs +0 -1306
  183. package/dist/cjs/node_modules/node-forge/lib/rsa.cjs.map +0 -1
  184. package/dist/cjs/node_modules/node-forge/lib/sha1.cjs +0 -237
  185. package/dist/cjs/node_modules/node-forge/lib/sha1.cjs.map +0 -1
  186. package/dist/cjs/node_modules/node-forge/lib/sha256.cjs +0 -274
  187. package/dist/cjs/node_modules/node-forge/lib/sha256.cjs.map +0 -1
  188. package/dist/cjs/node_modules/node-forge/lib/sha512.cjs +0 -420
  189. package/dist/cjs/node_modules/node-forge/lib/sha512.cjs.map +0 -1
  190. package/dist/cjs/node_modules/node-forge/lib/ssh.cjs +0 -201
  191. package/dist/cjs/node_modules/node-forge/lib/ssh.cjs.map +0 -1
  192. package/dist/cjs/node_modules/node-forge/lib/tls.cjs +0 -3662
  193. package/dist/cjs/node_modules/node-forge/lib/tls.cjs.map +0 -1
  194. package/dist/cjs/node_modules/node-forge/lib/util.cjs +0 -2124
  195. package/dist/cjs/node_modules/node-forge/lib/util.cjs.map +0 -1
  196. package/dist/cjs/node_modules/node-forge/lib/x509.cjs +0 -2171
  197. package/dist/cjs/node_modules/node-forge/lib/x509.cjs.map +0 -1
  198. package/dist/cjs/node_modules/node-rsa/src/NodeRSA.cjs +0 -341
  199. package/dist/cjs/node_modules/node-rsa/src/NodeRSA.cjs.map +0 -1
  200. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/encryptEngines.cjs +0 -26
  201. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/encryptEngines.cjs.map +0 -1
  202. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/io.cjs +0 -65
  203. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/io.cjs.map +0 -1
  204. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/js.cjs +0 -44
  205. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/js.cjs.map +0 -1
  206. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/node12.cjs +0 -49
  207. package/dist/cjs/node_modules/node-rsa/src/encryptEngines/node12.cjs.map +0 -1
  208. package/dist/cjs/node_modules/node-rsa/src/formats/components.cjs +0 -55
  209. package/dist/cjs/node_modules/node-rsa/src/formats/components.cjs.map +0 -1
  210. package/dist/cjs/node_modules/node-rsa/src/formats/formats.cjs +0 -86
  211. package/dist/cjs/node_modules/node-rsa/src/formats/formats.cjs.map +0 -1
  212. package/dist/cjs/node_modules/node-rsa/src/formats/openssh.cjs +0 -177
  213. package/dist/cjs/node_modules/node-rsa/src/formats/openssh.cjs.map +0 -1
  214. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs1.cjs +0 -104
  215. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs1.cjs.map +0 -1
  216. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs8.cjs +0 -131
  217. package/dist/cjs/node_modules/node-rsa/src/formats/pkcs8.cjs.map +0 -1
  218. package/dist/cjs/node_modules/node-rsa/src/libs/jsbn.cjs +0 -1347
  219. package/dist/cjs/node_modules/node-rsa/src/libs/jsbn.cjs.map +0 -1
  220. package/dist/cjs/node_modules/node-rsa/src/libs/rsa.cjs +0 -231
  221. package/dist/cjs/node_modules/node-rsa/src/libs/rsa.cjs.map +0 -1
  222. package/dist/cjs/node_modules/node-rsa/src/schemes/oaep.cjs +0 -123
  223. package/dist/cjs/node_modules/node-rsa/src/schemes/oaep.cjs.map +0 -1
  224. package/dist/cjs/node_modules/node-rsa/src/schemes/pkcs1.cjs +0 -175
  225. package/dist/cjs/node_modules/node-rsa/src/schemes/pkcs1.cjs.map +0 -1
  226. package/dist/cjs/node_modules/node-rsa/src/schemes/pss.cjs +0 -123
  227. package/dist/cjs/node_modules/node-rsa/src/schemes/pss.cjs.map +0 -1
  228. package/dist/cjs/node_modules/node-rsa/src/schemes/schemes.cjs +0 -28
  229. package/dist/cjs/node_modules/node-rsa/src/schemes/schemes.cjs.map +0 -1
  230. package/dist/cjs/node_modules/node-rsa/src/utils.cjs +0 -84
  231. package/dist/cjs/node_modules/node-rsa/src/utils.cjs.map +0 -1
  232. package/dist/cjs/node_modules/pako/index.cjs +0 -25
  233. package/dist/cjs/node_modules/pako/index.cjs.map +0 -1
  234. package/dist/cjs/node_modules/pako/lib/deflate.cjs +0 -311
  235. package/dist/cjs/node_modules/pako/lib/deflate.cjs.map +0 -1
  236. package/dist/cjs/node_modules/pako/lib/inflate.cjs +0 -317
  237. package/dist/cjs/node_modules/pako/lib/inflate.cjs.map +0 -1
  238. package/dist/cjs/node_modules/pako/lib/utils/common.cjs +0 -77
  239. package/dist/cjs/node_modules/pako/lib/utils/common.cjs.map +0 -1
  240. package/dist/cjs/node_modules/pako/lib/utils/strings.cjs +0 -131
  241. package/dist/cjs/node_modules/pako/lib/utils/strings.cjs.map +0 -1
  242. package/dist/cjs/node_modules/pako/lib/zlib/adler32.cjs +0 -29
  243. package/dist/cjs/node_modules/pako/lib/zlib/adler32.cjs.map +0 -1
  244. package/dist/cjs/node_modules/pako/lib/zlib/constants.cjs +0 -43
  245. package/dist/cjs/node_modules/pako/lib/zlib/constants.cjs.map +0 -1
  246. package/dist/cjs/node_modules/pako/lib/zlib/crc32.cjs +0 -31
  247. package/dist/cjs/node_modules/pako/lib/zlib/crc32.cjs.map +0 -1
  248. package/dist/cjs/node_modules/pako/lib/zlib/deflate.cjs +0 -889
  249. package/dist/cjs/node_modules/pako/lib/zlib/deflate.cjs.map +0 -1
  250. package/dist/cjs/node_modules/pako/lib/zlib/gzheader.cjs +0 -27
  251. package/dist/cjs/node_modules/pako/lib/zlib/gzheader.cjs.map +0 -1
  252. package/dist/cjs/node_modules/pako/lib/zlib/inffast.cjs +0 -227
  253. package/dist/cjs/node_modules/pako/lib/zlib/inffast.cjs.map +0 -1
  254. package/dist/cjs/node_modules/pako/lib/zlib/inflate.cjs +0 -1038
  255. package/dist/cjs/node_modules/pako/lib/zlib/inflate.cjs.map +0 -1
  256. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.cjs +0 -278
  257. package/dist/cjs/node_modules/pako/lib/zlib/inftrees.cjs.map +0 -1
  258. package/dist/cjs/node_modules/pako/lib/zlib/messages.cjs +0 -25
  259. package/dist/cjs/node_modules/pako/lib/zlib/messages.cjs.map +0 -1
  260. package/dist/cjs/node_modules/pako/lib/zlib/trees.cjs +0 -626
  261. package/dist/cjs/node_modules/pako/lib/zlib/trees.cjs.map +0 -1
  262. package/dist/cjs/node_modules/pako/lib/zlib/zstream.cjs +0 -29
  263. package/dist/cjs/node_modules/pako/lib/zlib/zstream.cjs.map +0 -1
  264. package/dist/cjs/node_modules/safer-buffer/safer.cjs +0 -52
  265. package/dist/cjs/node_modules/safer-buffer/safer.cjs.map +0 -1
  266. package/dist/cjs/node_modules/samlify/build/index.cjs +0 -120
  267. package/dist/cjs/node_modules/samlify/build/index.cjs.map +0 -1
  268. package/dist/cjs/node_modules/samlify/build/src/api.cjs +0 -36
  269. package/dist/cjs/node_modules/samlify/build/src/api.cjs.map +0 -1
  270. package/dist/cjs/node_modules/samlify/build/src/binding-post.cjs +0 -507
  271. package/dist/cjs/node_modules/samlify/build/src/binding-post.cjs.map +0 -1
  272. package/dist/cjs/node_modules/samlify/build/src/binding-redirect.cjs +0 -342
  273. package/dist/cjs/node_modules/samlify/build/src/binding-redirect.cjs.map +0 -1
  274. package/dist/cjs/node_modules/samlify/build/src/binding-simplesign.cjs +0 -361
  275. package/dist/cjs/node_modules/samlify/build/src/binding-simplesign.cjs.map +0 -1
  276. package/dist/cjs/node_modules/samlify/build/src/entity-idp.cjs +0 -282
  277. package/dist/cjs/node_modules/samlify/build/src/entity-idp.cjs.map +0 -1
  278. package/dist/cjs/node_modules/samlify/build/src/entity-sp.cjs +0 -145
  279. package/dist/cjs/node_modules/samlify/build/src/entity-sp.cjs.map +0 -1
  280. package/dist/cjs/node_modules/samlify/build/src/entity.cjs +0 -256
  281. package/dist/cjs/node_modules/samlify/build/src/entity.cjs.map +0 -1
  282. package/dist/cjs/node_modules/samlify/build/src/extractor.cjs +0 -355
  283. package/dist/cjs/node_modules/samlify/build/src/extractor.cjs.map +0 -1
  284. package/dist/cjs/node_modules/samlify/build/src/flow.cjs +0 -392
  285. package/dist/cjs/node_modules/samlify/build/src/flow.cjs.map +0 -1
  286. package/dist/cjs/node_modules/samlify/build/src/libsaml.cjs +0 -547
  287. package/dist/cjs/node_modules/samlify/build/src/libsaml.cjs.map +0 -1
  288. package/dist/cjs/node_modules/samlify/build/src/metadata-idp.cjs +0 -174
  289. package/dist/cjs/node_modules/samlify/build/src/metadata-idp.cjs.map +0 -1
  290. package/dist/cjs/node_modules/samlify/build/src/metadata-sp.cjs +0 -217
  291. package/dist/cjs/node_modules/samlify/build/src/metadata-sp.cjs.map +0 -1
  292. package/dist/cjs/node_modules/samlify/build/src/metadata.cjs +0 -203
  293. package/dist/cjs/node_modules/samlify/build/src/metadata.cjs.map +0 -1
  294. package/dist/cjs/node_modules/samlify/build/src/urn.cjs +0 -228
  295. package/dist/cjs/node_modules/samlify/build/src/urn.cjs.map +0 -1
  296. package/dist/cjs/node_modules/samlify/build/src/utility.cjs +0 -280
  297. package/dist/cjs/node_modules/samlify/build/src/utility.cjs.map +0 -1
  298. package/dist/cjs/node_modules/samlify/build/src/validator.cjs +0 -56
  299. package/dist/cjs/node_modules/samlify/build/src/validator.cjs.map +0 -1
  300. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/index.cjs +0 -50
  301. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/index.cjs.map +0 -1
  302. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/md5.cjs +0 -25
  303. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/md5.cjs.map +0 -1
  304. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/nil.cjs +0 -18
  305. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/nil.cjs.map +0 -1
  306. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/parse.cjs +0 -42
  307. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/parse.cjs.map +0 -1
  308. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/regex.cjs +0 -18
  309. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/regex.cjs.map +0 -1
  310. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/rng.cjs +0 -28
  311. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/rng.cjs.map +0 -1
  312. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/sha1.cjs +0 -25
  313. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/sha1.cjs.map +0 -1
  314. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/stringify.cjs +0 -27
  315. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/stringify.cjs.map +0 -1
  316. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v1.cjs +0 -69
  317. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v1.cjs.map +0 -1
  318. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v3.cjs +0 -23
  319. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v3.cjs.map +0 -1
  320. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v35.cjs +0 -54
  321. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v35.cjs.map +0 -1
  322. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v4.cjs +0 -34
  323. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v4.cjs.map +0 -1
  324. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v5.cjs +0 -23
  325. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/v5.cjs.map +0 -1
  326. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/validate.cjs +0 -23
  327. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/validate.cjs.map +0 -1
  328. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/version.cjs +0 -24
  329. package/dist/cjs/node_modules/samlify/node_modules/uuid/dist/esm-node/version.cjs.map +0 -1
  330. package/dist/cjs/node_modules/xml/lib/escapeForXML.cjs +0 -27
  331. package/dist/cjs/node_modules/xml/lib/escapeForXML.cjs.map +0 -1
  332. package/dist/cjs/node_modules/xml/lib/xml.cjs +0 -186
  333. package/dist/cjs/node_modules/xml/lib/xml.cjs.map +0 -1
  334. package/dist/cjs/node_modules/xml-crypto/lib/c14n-canonicalization.cjs +0 -202
  335. package/dist/cjs/node_modules/xml-crypto/lib/c14n-canonicalization.cjs.map +0 -1
  336. package/dist/cjs/node_modules/xml-crypto/lib/enveloped-signature.cjs +0 -52
  337. package/dist/cjs/node_modules/xml-crypto/lib/enveloped-signature.cjs.map +0 -1
  338. package/dist/cjs/node_modules/xml-crypto/lib/exclusive-canonicalization.cjs +0 -223
  339. package/dist/cjs/node_modules/xml-crypto/lib/exclusive-canonicalization.cjs.map +0 -1
  340. package/dist/cjs/node_modules/xml-crypto/lib/hash-algorithms.cjs +0 -56
  341. package/dist/cjs/node_modules/xml-crypto/lib/hash-algorithms.cjs.map +0 -1
  342. package/dist/cjs/node_modules/xml-crypto/lib/index.cjs +0 -73
  343. package/dist/cjs/node_modules/xml-crypto/lib/index.cjs.map +0 -1
  344. package/dist/cjs/node_modules/xml-crypto/lib/signature-algorithms.cjs +0 -91
  345. package/dist/cjs/node_modules/xml-crypto/lib/signature-algorithms.cjs.map +0 -1
  346. package/dist/cjs/node_modules/xml-crypto/lib/signed-xml.cjs +0 -695
  347. package/dist/cjs/node_modules/xml-crypto/lib/signed-xml.cjs.map +0 -1
  348. package/dist/cjs/node_modules/xml-crypto/lib/types.cjs +0 -58
  349. package/dist/cjs/node_modules/xml-crypto/lib/types.cjs.map +0 -1
  350. package/dist/cjs/node_modules/xml-crypto/lib/utils.cjs +0 -213
  351. package/dist/cjs/node_modules/xml-crypto/lib/utils.cjs.map +0 -1
  352. package/dist/cjs/node_modules/xml-crypto/node_modules/xpath/xpath.cjs +0 -3445
  353. package/dist/cjs/node_modules/xml-crypto/node_modules/xpath/xpath.cjs.map +0 -1
  354. package/dist/cjs/node_modules/xml-escape/index.cjs +0 -30
  355. package/dist/cjs/node_modules/xml-escape/index.cjs.map +0 -1
  356. package/dist/cjs/node_modules/xpath/xpath.cjs +0 -3410
  357. package/dist/cjs/node_modules/xpath/xpath.cjs.map +0 -1
  358. package/dist/cjs/node_modules/zod/v4/classic/errors.cjs +0 -31
  359. package/dist/cjs/node_modules/zod/v4/classic/errors.cjs.map +0 -1
  360. package/dist/cjs/node_modules/zod/v4/classic/iso.cjs +0 -42
  361. package/dist/cjs/node_modules/zod/v4/classic/iso.cjs.map +0 -1
  362. package/dist/cjs/node_modules/zod/v4/classic/parse.cjs +0 -32
  363. package/dist/cjs/node_modules/zod/v4/classic/parse.cjs.map +0 -1
  364. package/dist/cjs/node_modules/zod/v4/classic/schemas.cjs +0 -527
  365. package/dist/cjs/node_modules/zod/v4/classic/schemas.cjs.map +0 -1
  366. package/dist/cjs/node_modules/zod/v4/core/api.cjs +0 -443
  367. package/dist/cjs/node_modules/zod/v4/core/api.cjs.map +0 -1
  368. package/dist/cjs/node_modules/zod/v4/core/checks.cjs +0 -238
  369. package/dist/cjs/node_modules/zod/v4/core/checks.cjs.map +0 -1
  370. package/dist/cjs/node_modules/zod/v4/core/core.cjs +0 -63
  371. package/dist/cjs/node_modules/zod/v4/core/core.cjs.map +0 -1
  372. package/dist/cjs/node_modules/zod/v4/core/doc.cjs +0 -36
  373. package/dist/cjs/node_modules/zod/v4/core/doc.cjs.map +0 -1
  374. package/dist/cjs/node_modules/zod/v4/core/errors.cjs +0 -67
  375. package/dist/cjs/node_modules/zod/v4/core/errors.cjs.map +0 -1
  376. package/dist/cjs/node_modules/zod/v4/core/parse.cjs +0 -124
  377. package/dist/cjs/node_modules/zod/v4/core/parse.cjs.map +0 -1
  378. package/dist/cjs/node_modules/zod/v4/core/regexes.cjs +0 -87
  379. package/dist/cjs/node_modules/zod/v4/core/regexes.cjs.map +0 -1
  380. package/dist/cjs/node_modules/zod/v4/core/registries.cjs +0 -55
  381. package/dist/cjs/node_modules/zod/v4/core/registries.cjs.map +0 -1
  382. package/dist/cjs/node_modules/zod/v4/core/schemas.cjs +0 -1115
  383. package/dist/cjs/node_modules/zod/v4/core/schemas.cjs.map +0 -1
  384. package/dist/cjs/node_modules/zod/v4/core/util.cjs +0 -333
  385. package/dist/cjs/node_modules/zod/v4/core/util.cjs.map +0 -1
  386. package/dist/cjs/node_modules/zod/v4/core/versions.cjs +0 -12
  387. package/dist/cjs/node_modules/zod/v4/core/versions.cjs.map +0 -1
  388. package/dist/esm/_virtual/rolldown_runtime.mjs +0 -43
  389. package/dist/esm/controllers/audit.controller.mjs +0 -182
  390. package/dist/esm/controllers/audit.controller.mjs.map +0 -1
  391. package/dist/esm/models/audit.model.mjs +0 -9
  392. package/dist/esm/models/audit.model.mjs.map +0 -1
  393. package/dist/esm/node_modules/@authenio/xml-encryption/lib/index.mjs +0 -13
  394. package/dist/esm/node_modules/@authenio/xml-encryption/lib/index.mjs.map +0 -1
  395. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.mjs +0 -22
  396. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/encrypted-key.tpl.xml.mjs.map +0 -1
  397. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.mjs +0 -28
  398. package/dist/esm/node_modules/@authenio/xml-encryption/lib/templates/keyinfo.tpl.xml.mjs.map +0 -1
  399. package/dist/esm/node_modules/@authenio/xml-encryption/lib/utils.mjs +0 -35
  400. package/dist/esm/node_modules/@authenio/xml-encryption/lib/utils.mjs.map +0 -1
  401. package/dist/esm/node_modules/@authenio/xml-encryption/lib/xmlenc.mjs +0 -228
  402. package/dist/esm/node_modules/@authenio/xml-encryption/lib/xmlenc.mjs.map +0 -1
  403. package/dist/esm/node_modules/@better-auth/sso/dist/index.mjs +0 -1210
  404. package/dist/esm/node_modules/@better-auth/sso/dist/index.mjs.map +0 -1
  405. package/dist/esm/node_modules/@better-fetch/fetch/dist/index.mjs +0 -359
  406. package/dist/esm/node_modules/@better-fetch/fetch/dist/index.mjs.map +0 -1
  407. package/dist/esm/node_modules/@xmldom/is-dom-node/dist/index.mjs +0 -86
  408. package/dist/esm/node_modules/@xmldom/is-dom-node/dist/index.mjs.map +0 -1
  409. package/dist/esm/node_modules/@xmldom/xmldom/lib/conventions.mjs +0 -107
  410. package/dist/esm/node_modules/@xmldom/xmldom/lib/conventions.mjs.map +0 -1
  411. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom-parser.mjs +0 -245
  412. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom-parser.mjs.map +0 -1
  413. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom.mjs +0 -1306
  414. package/dist/esm/node_modules/@xmldom/xmldom/lib/dom.mjs.map +0 -1
  415. package/dist/esm/node_modules/@xmldom/xmldom/lib/entities.mjs +0 -2173
  416. package/dist/esm/node_modules/@xmldom/xmldom/lib/entities.mjs.map +0 -1
  417. package/dist/esm/node_modules/@xmldom/xmldom/lib/index.mjs +0 -17
  418. package/dist/esm/node_modules/@xmldom/xmldom/lib/index.mjs.map +0 -1
  419. package/dist/esm/node_modules/@xmldom/xmldom/lib/sax.mjs +0 -496
  420. package/dist/esm/node_modules/@xmldom/xmldom/lib/sax.mjs.map +0 -1
  421. package/dist/esm/node_modules/asn1/lib/ber/errors.mjs +0 -17
  422. package/dist/esm/node_modules/asn1/lib/ber/errors.mjs.map +0 -1
  423. package/dist/esm/node_modules/asn1/lib/ber/index.mjs +0 -25
  424. package/dist/esm/node_modules/asn1/lib/ber/index.mjs.map +0 -1
  425. package/dist/esm/node_modules/asn1/lib/ber/reader.mjs +0 -164
  426. package/dist/esm/node_modules/asn1/lib/ber/reader.mjs.map +0 -1
  427. package/dist/esm/node_modules/asn1/lib/ber/types.mjs +0 -44
  428. package/dist/esm/node_modules/asn1/lib/ber/types.mjs.map +0 -1
  429. package/dist/esm/node_modules/asn1/lib/ber/writer.mjs +0 -220
  430. package/dist/esm/node_modules/asn1/lib/ber/writer.mjs.map +0 -1
  431. package/dist/esm/node_modules/asn1/lib/index.mjs +0 -18
  432. package/dist/esm/node_modules/asn1/lib/index.mjs.map +0 -1
  433. package/dist/esm/node_modules/available-typed-arrays/index.mjs +0 -20
  434. package/dist/esm/node_modules/available-typed-arrays/index.mjs.map +0 -1
  435. package/dist/esm/node_modules/base64-js/index.mjs +0 -95
  436. package/dist/esm/node_modules/base64-js/index.mjs.map +0 -1
  437. package/dist/esm/node_modules/buffer/index.mjs +0 -1114
  438. package/dist/esm/node_modules/buffer/index.mjs.map +0 -1
  439. package/dist/esm/node_modules/call-bind/index.mjs +0 -26
  440. package/dist/esm/node_modules/call-bind/index.mjs.map +0 -1
  441. package/dist/esm/node_modules/call-bind-apply-helpers/actualApply.mjs +0 -21
  442. package/dist/esm/node_modules/call-bind-apply-helpers/actualApply.mjs.map +0 -1
  443. package/dist/esm/node_modules/call-bind-apply-helpers/applyBind.mjs +0 -21
  444. package/dist/esm/node_modules/call-bind-apply-helpers/applyBind.mjs.map +0 -1
  445. package/dist/esm/node_modules/call-bind-apply-helpers/functionApply.mjs +0 -13
  446. package/dist/esm/node_modules/call-bind-apply-helpers/functionApply.mjs.map +0 -1
  447. package/dist/esm/node_modules/call-bind-apply-helpers/functionCall.mjs +0 -13
  448. package/dist/esm/node_modules/call-bind-apply-helpers/functionCall.mjs.map +0 -1
  449. package/dist/esm/node_modules/call-bind-apply-helpers/index.mjs +0 -24
  450. package/dist/esm/node_modules/call-bind-apply-helpers/index.mjs.map +0 -1
  451. package/dist/esm/node_modules/call-bind-apply-helpers/reflectApply.mjs +0 -13
  452. package/dist/esm/node_modules/call-bind-apply-helpers/reflectApply.mjs.map +0 -1
  453. package/dist/esm/node_modules/call-bound/index.mjs +0 -23
  454. package/dist/esm/node_modules/call-bound/index.mjs.map +0 -1
  455. package/dist/esm/node_modules/camelcase/index.mjs +0 -75
  456. package/dist/esm/node_modules/camelcase/index.mjs.map +0 -1
  457. package/dist/esm/node_modules/define-data-property/index.mjs +0 -41
  458. package/dist/esm/node_modules/define-data-property/index.mjs.map +0 -1
  459. package/dist/esm/node_modules/dunder-proto/get.mjs +0 -28
  460. package/dist/esm/node_modules/dunder-proto/get.mjs.map +0 -1
  461. package/dist/esm/node_modules/es-define-property/index.mjs +0 -19
  462. package/dist/esm/node_modules/es-define-property/index.mjs.map +0 -1
  463. package/dist/esm/node_modules/es-errors/eval.mjs +0 -13
  464. package/dist/esm/node_modules/es-errors/eval.mjs.map +0 -1
  465. package/dist/esm/node_modules/es-errors/index.mjs +0 -13
  466. package/dist/esm/node_modules/es-errors/index.mjs.map +0 -1
  467. package/dist/esm/node_modules/es-errors/range.mjs +0 -13
  468. package/dist/esm/node_modules/es-errors/range.mjs.map +0 -1
  469. package/dist/esm/node_modules/es-errors/ref.mjs +0 -13
  470. package/dist/esm/node_modules/es-errors/ref.mjs.map +0 -1
  471. package/dist/esm/node_modules/es-errors/syntax.mjs +0 -13
  472. package/dist/esm/node_modules/es-errors/syntax.mjs.map +0 -1
  473. package/dist/esm/node_modules/es-errors/type.mjs +0 -13
  474. package/dist/esm/node_modules/es-errors/type.mjs.map +0 -1
  475. package/dist/esm/node_modules/es-errors/uri.mjs +0 -13
  476. package/dist/esm/node_modules/es-errors/uri.mjs.map +0 -1
  477. package/dist/esm/node_modules/es-object-atoms/index.mjs +0 -13
  478. package/dist/esm/node_modules/es-object-atoms/index.mjs.map +0 -1
  479. package/dist/esm/node_modules/escape-html/index.mjs +0 -68
  480. package/dist/esm/node_modules/escape-html/index.mjs.map +0 -1
  481. package/dist/esm/node_modules/fast-xml-parser/src/fxp.mjs +0 -8
  482. package/dist/esm/node_modules/fast-xml-parser/src/fxp.mjs.map +0 -1
  483. package/dist/esm/node_modules/fast-xml-parser/src/util.mjs +0 -26
  484. package/dist/esm/node_modules/fast-xml-parser/src/util.mjs.map +0 -1
  485. package/dist/esm/node_modules/fast-xml-parser/src/validator.mjs +0 -243
  486. package/dist/esm/node_modules/fast-xml-parser/src/validator.mjs.map +0 -1
  487. package/dist/esm/node_modules/for-each/index.mjs +0 -43
  488. package/dist/esm/node_modules/for-each/index.mjs.map +0 -1
  489. package/dist/esm/node_modules/function-bind/implementation.mjs +0 -59
  490. package/dist/esm/node_modules/function-bind/implementation.mjs.map +0 -1
  491. package/dist/esm/node_modules/function-bind/index.mjs +0 -14
  492. package/dist/esm/node_modules/function-bind/index.mjs.map +0 -1
  493. package/dist/esm/node_modules/generator-function/index.mjs +0 -14
  494. package/dist/esm/node_modules/generator-function/index.mjs.map +0 -1
  495. package/dist/esm/node_modules/get-intrinsic/index.mjs +0 -358
  496. package/dist/esm/node_modules/get-intrinsic/index.mjs.map +0 -1
  497. package/dist/esm/node_modules/get-proto/Object.getPrototypeOf.mjs +0 -15
  498. package/dist/esm/node_modules/get-proto/Object.getPrototypeOf.mjs.map +0 -1
  499. package/dist/esm/node_modules/get-proto/Reflect.getPrototypeOf.mjs +0 -13
  500. package/dist/esm/node_modules/get-proto/Reflect.getPrototypeOf.mjs.map +0 -1
  501. package/dist/esm/node_modules/get-proto/index.mjs +0 -26
  502. package/dist/esm/node_modules/get-proto/index.mjs.map +0 -1
  503. package/dist/esm/node_modules/gopd/gOPD.mjs +0 -13
  504. package/dist/esm/node_modules/gopd/gOPD.mjs.map +0 -1
  505. package/dist/esm/node_modules/gopd/index.mjs +0 -20
  506. package/dist/esm/node_modules/gopd/index.mjs.map +0 -1
  507. package/dist/esm/node_modules/has-property-descriptors/index.mjs +0 -25
  508. package/dist/esm/node_modules/has-property-descriptors/index.mjs.map +0 -1
  509. package/dist/esm/node_modules/has-symbols/index.mjs +0 -22
  510. package/dist/esm/node_modules/has-symbols/index.mjs.map +0 -1
  511. package/dist/esm/node_modules/has-symbols/shams.mjs +0 -36
  512. package/dist/esm/node_modules/has-symbols/shams.mjs.map +0 -1
  513. package/dist/esm/node_modules/has-tostringtag/shams.mjs +0 -17
  514. package/dist/esm/node_modules/has-tostringtag/shams.mjs.map +0 -1
  515. package/dist/esm/node_modules/hasown/index.mjs +0 -17
  516. package/dist/esm/node_modules/hasown/index.mjs.map +0 -1
  517. package/dist/esm/node_modules/ieee754/index.mjs +0 -80
  518. package/dist/esm/node_modules/ieee754/index.mjs.map +0 -1
  519. package/dist/esm/node_modules/inherits/inherits_browser.mjs +0 -31
  520. package/dist/esm/node_modules/inherits/inherits_browser.mjs.map +0 -1
  521. package/dist/esm/node_modules/is-arguments/index.mjs +0 -31
  522. package/dist/esm/node_modules/is-arguments/index.mjs.map +0 -1
  523. package/dist/esm/node_modules/is-callable/index.mjs +0 -87
  524. package/dist/esm/node_modules/is-callable/index.mjs.map +0 -1
  525. package/dist/esm/node_modules/is-generator-function/index.mjs +0 -32
  526. package/dist/esm/node_modules/is-generator-function/index.mjs.map +0 -1
  527. package/dist/esm/node_modules/is-regex/index.mjs +0 -58
  528. package/dist/esm/node_modules/is-regex/index.mjs.map +0 -1
  529. package/dist/esm/node_modules/is-typed-array/index.mjs +0 -17
  530. package/dist/esm/node_modules/is-typed-array/index.mjs.map +0 -1
  531. package/dist/esm/node_modules/jose/dist/webapi/lib/base64.mjs +0 -12
  532. package/dist/esm/node_modules/jose/dist/webapi/lib/base64.mjs.map +0 -1
  533. package/dist/esm/node_modules/jose/dist/webapi/lib/buffer_utils.mjs +0 -8
  534. package/dist/esm/node_modules/jose/dist/webapi/lib/buffer_utils.mjs.map +0 -1
  535. package/dist/esm/node_modules/jose/dist/webapi/lib/is_object.mjs +0 -15
  536. package/dist/esm/node_modules/jose/dist/webapi/lib/is_object.mjs.map +0 -1
  537. package/dist/esm/node_modules/jose/dist/webapi/util/base64url.mjs +0 -19
  538. package/dist/esm/node_modules/jose/dist/webapi/util/base64url.mjs.map +0 -1
  539. package/dist/esm/node_modules/jose/dist/webapi/util/decode_jwt.mjs +0 -31
  540. package/dist/esm/node_modules/jose/dist/webapi/util/decode_jwt.mjs.map +0 -1
  541. package/dist/esm/node_modules/jose/dist/webapi/util/errors.mjs +0 -26
  542. package/dist/esm/node_modules/jose/dist/webapi/util/errors.mjs.map +0 -1
  543. package/dist/esm/node_modules/math-intrinsics/abs.mjs +0 -13
  544. package/dist/esm/node_modules/math-intrinsics/abs.mjs.map +0 -1
  545. package/dist/esm/node_modules/math-intrinsics/floor.mjs +0 -13
  546. package/dist/esm/node_modules/math-intrinsics/floor.mjs.map +0 -1
  547. package/dist/esm/node_modules/math-intrinsics/isNaN.mjs +0 -15
  548. package/dist/esm/node_modules/math-intrinsics/isNaN.mjs.map +0 -1
  549. package/dist/esm/node_modules/math-intrinsics/max.mjs +0 -13
  550. package/dist/esm/node_modules/math-intrinsics/max.mjs.map +0 -1
  551. package/dist/esm/node_modules/math-intrinsics/min.mjs +0 -13
  552. package/dist/esm/node_modules/math-intrinsics/min.mjs.map +0 -1
  553. package/dist/esm/node_modules/math-intrinsics/pow.mjs +0 -13
  554. package/dist/esm/node_modules/math-intrinsics/pow.mjs.map +0 -1
  555. package/dist/esm/node_modules/math-intrinsics/round.mjs +0 -13
  556. package/dist/esm/node_modules/math-intrinsics/round.mjs.map +0 -1
  557. package/dist/esm/node_modules/math-intrinsics/sign.mjs +0 -18
  558. package/dist/esm/node_modules/math-intrinsics/sign.mjs.map +0 -1
  559. package/dist/esm/node_modules/node-forge/lib/aes.mjs +0 -601
  560. package/dist/esm/node_modules/node-forge/lib/aes.mjs.map +0 -1
  561. package/dist/esm/node_modules/node-forge/lib/aesCipherSuites.mjs +0 -199
  562. package/dist/esm/node_modules/node-forge/lib/aesCipherSuites.mjs.map +0 -1
  563. package/dist/esm/node_modules/node-forge/lib/asn1-validator.mjs +0 -80
  564. package/dist/esm/node_modules/node-forge/lib/asn1-validator.mjs.map +0 -1
  565. package/dist/esm/node_modules/node-forge/lib/asn1.mjs +0 -942
  566. package/dist/esm/node_modules/node-forge/lib/asn1.mjs.map +0 -1
  567. package/dist/esm/node_modules/node-forge/lib/baseN.mjs +0 -141
  568. package/dist/esm/node_modules/node-forge/lib/baseN.mjs.map +0 -1
  569. package/dist/esm/node_modules/node-forge/lib/cipher.mjs +0 -190
  570. package/dist/esm/node_modules/node-forge/lib/cipher.mjs.map +0 -1
  571. package/dist/esm/node_modules/node-forge/lib/cipherModes.mjs +0 -601
  572. package/dist/esm/node_modules/node-forge/lib/cipherModes.mjs.map +0 -1
  573. package/dist/esm/node_modules/node-forge/lib/des.mjs +0 -1191
  574. package/dist/esm/node_modules/node-forge/lib/des.mjs.map +0 -1
  575. package/dist/esm/node_modules/node-forge/lib/ed25519.mjs +0 -1024
  576. package/dist/esm/node_modules/node-forge/lib/ed25519.mjs.map +0 -1
  577. package/dist/esm/node_modules/node-forge/lib/forge.mjs +0 -19
  578. package/dist/esm/node_modules/node-forge/lib/forge.mjs.map +0 -1
  579. package/dist/esm/node_modules/node-forge/lib/hmac.mjs +0 -111
  580. package/dist/esm/node_modules/node-forge/lib/hmac.mjs.map +0 -1
  581. package/dist/esm/node_modules/node-forge/lib/index.mjs +0 -70
  582. package/dist/esm/node_modules/node-forge/lib/index.mjs.map +0 -1
  583. package/dist/esm/node_modules/node-forge/lib/jsbn.mjs +0 -1260
  584. package/dist/esm/node_modules/node-forge/lib/jsbn.mjs.map +0 -1
  585. package/dist/esm/node_modules/node-forge/lib/kem.mjs +0 -150
  586. package/dist/esm/node_modules/node-forge/lib/kem.mjs.map +0 -1
  587. package/dist/esm/node_modules/node-forge/lib/log.mjs +0 -245
  588. package/dist/esm/node_modules/node-forge/lib/log.mjs.map +0 -1
  589. package/dist/esm/node_modules/node-forge/lib/md.all.mjs +0 -28
  590. package/dist/esm/node_modules/node-forge/lib/md.all.mjs.map +0 -1
  591. package/dist/esm/node_modules/node-forge/lib/md.mjs +0 -22
  592. package/dist/esm/node_modules/node-forge/lib/md.mjs.map +0 -1
  593. package/dist/esm/node_modules/node-forge/lib/md5.mjs +0 -328
  594. package/dist/esm/node_modules/node-forge/lib/md5.mjs.map +0 -1
  595. package/dist/esm/node_modules/node-forge/lib/mgf.mjs +0 -24
  596. package/dist/esm/node_modules/node-forge/lib/mgf.mjs.map +0 -1
  597. package/dist/esm/node_modules/node-forge/lib/mgf1.mjs +0 -48
  598. package/dist/esm/node_modules/node-forge/lib/mgf1.mjs.map +0 -1
  599. package/dist/esm/node_modules/node-forge/lib/oids.mjs +0 -157
  600. package/dist/esm/node_modules/node-forge/lib/oids.mjs.map +0 -1
  601. package/dist/esm/node_modules/node-forge/lib/pbe.mjs +0 -819
  602. package/dist/esm/node_modules/node-forge/lib/pbe.mjs.map +0 -1
  603. package/dist/esm/node_modules/node-forge/lib/pbkdf2.mjs +0 -130
  604. package/dist/esm/node_modules/node-forge/lib/pbkdf2.mjs.map +0 -1
  605. package/dist/esm/node_modules/node-forge/lib/pem.mjs +0 -179
  606. package/dist/esm/node_modules/node-forge/lib/pem.mjs.map +0 -1
  607. package/dist/esm/node_modules/node-forge/lib/pkcs1.mjs +0 -204
  608. package/dist/esm/node_modules/node-forge/lib/pkcs1.mjs.map +0 -1
  609. package/dist/esm/node_modules/node-forge/lib/pkcs12.mjs +0 -727
  610. package/dist/esm/node_modules/node-forge/lib/pkcs12.mjs.map +0 -1
  611. package/dist/esm/node_modules/node-forge/lib/pkcs7.mjs +0 -645
  612. package/dist/esm/node_modules/node-forge/lib/pkcs7.mjs.map +0 -1
  613. package/dist/esm/node_modules/node-forge/lib/pkcs7asn1.mjs +0 -409
  614. package/dist/esm/node_modules/node-forge/lib/pkcs7asn1.mjs.map +0 -1
  615. package/dist/esm/node_modules/node-forge/lib/pki.mjs +0 -105
  616. package/dist/esm/node_modules/node-forge/lib/pki.mjs.map +0 -1
  617. package/dist/esm/node_modules/node-forge/lib/prime.mjs +0 -197
  618. package/dist/esm/node_modules/node-forge/lib/prime.mjs.map +0 -1
  619. package/dist/esm/node_modules/node-forge/lib/prng.mjs +0 -295
  620. package/dist/esm/node_modules/node-forge/lib/prng.mjs.map +0 -1
  621. package/dist/esm/node_modules/node-forge/lib/pss.mjs +0 -145
  622. package/dist/esm/node_modules/node-forge/lib/pss.mjs.map +0 -1
  623. package/dist/esm/node_modules/node-forge/lib/random.mjs +0 -145
  624. package/dist/esm/node_modules/node-forge/lib/random.mjs.map +0 -1
  625. package/dist/esm/node_modules/node-forge/lib/rc2.mjs +0 -542
  626. package/dist/esm/node_modules/node-forge/lib/rc2.mjs.map +0 -1
  627. package/dist/esm/node_modules/node-forge/lib/rsa.mjs +0 -1304
  628. package/dist/esm/node_modules/node-forge/lib/rsa.mjs.map +0 -1
  629. package/dist/esm/node_modules/node-forge/lib/sha1.mjs +0 -234
  630. package/dist/esm/node_modules/node-forge/lib/sha1.mjs.map +0 -1
  631. package/dist/esm/node_modules/node-forge/lib/sha256.mjs +0 -271
  632. package/dist/esm/node_modules/node-forge/lib/sha256.mjs.map +0 -1
  633. package/dist/esm/node_modules/node-forge/lib/sha512.mjs +0 -417
  634. package/dist/esm/node_modules/node-forge/lib/sha512.mjs.map +0 -1
  635. package/dist/esm/node_modules/node-forge/lib/ssh.mjs +0 -198
  636. package/dist/esm/node_modules/node-forge/lib/ssh.mjs.map +0 -1
  637. package/dist/esm/node_modules/node-forge/lib/tls.mjs +0 -3659
  638. package/dist/esm/node_modules/node-forge/lib/tls.mjs.map +0 -1
  639. package/dist/esm/node_modules/node-forge/lib/util.mjs +0 -2121
  640. package/dist/esm/node_modules/node-forge/lib/util.mjs.map +0 -1
  641. package/dist/esm/node_modules/node-forge/lib/x509.mjs +0 -2168
  642. package/dist/esm/node_modules/node-forge/lib/x509.mjs.map +0 -1
  643. package/dist/esm/node_modules/node-forge/lib.mjs +0 -10
  644. package/dist/esm/node_modules/node-forge/lib.mjs.map +0 -1
  645. package/dist/esm/node_modules/node-rsa/src/NodeRSA.mjs +0 -338
  646. package/dist/esm/node_modules/node-rsa/src/NodeRSA.mjs.map +0 -1
  647. package/dist/esm/node_modules/node-rsa/src/encryptEngines/encryptEngines.mjs +0 -23
  648. package/dist/esm/node_modules/node-rsa/src/encryptEngines/encryptEngines.mjs.map +0 -1
  649. package/dist/esm/node_modules/node-rsa/src/encryptEngines/io.mjs +0 -62
  650. package/dist/esm/node_modules/node-rsa/src/encryptEngines/io.mjs.map +0 -1
  651. package/dist/esm/node_modules/node-rsa/src/encryptEngines/js.mjs +0 -41
  652. package/dist/esm/node_modules/node-rsa/src/encryptEngines/js.mjs.map +0 -1
  653. package/dist/esm/node_modules/node-rsa/src/encryptEngines/node12.mjs +0 -46
  654. package/dist/esm/node_modules/node-rsa/src/encryptEngines/node12.mjs.map +0 -1
  655. package/dist/esm/node_modules/node-rsa/src/formats/components.mjs +0 -52
  656. package/dist/esm/node_modules/node-rsa/src/formats/components.mjs.map +0 -1
  657. package/dist/esm/node_modules/node-rsa/src/formats/formats.mjs +0 -83
  658. package/dist/esm/node_modules/node-rsa/src/formats/formats.mjs.map +0 -1
  659. package/dist/esm/node_modules/node-rsa/src/formats/openssh.mjs +0 -174
  660. package/dist/esm/node_modules/node-rsa/src/formats/openssh.mjs.map +0 -1
  661. package/dist/esm/node_modules/node-rsa/src/formats/pkcs1.mjs +0 -101
  662. package/dist/esm/node_modules/node-rsa/src/formats/pkcs1.mjs.map +0 -1
  663. package/dist/esm/node_modules/node-rsa/src/formats/pkcs8.mjs +0 -128
  664. package/dist/esm/node_modules/node-rsa/src/formats/pkcs8.mjs.map +0 -1
  665. package/dist/esm/node_modules/node-rsa/src/libs/jsbn.mjs +0 -1344
  666. package/dist/esm/node_modules/node-rsa/src/libs/jsbn.mjs.map +0 -1
  667. package/dist/esm/node_modules/node-rsa/src/libs/rsa.mjs +0 -228
  668. package/dist/esm/node_modules/node-rsa/src/libs/rsa.mjs.map +0 -1
  669. package/dist/esm/node_modules/node-rsa/src/schemes/oaep.mjs +0 -120
  670. package/dist/esm/node_modules/node-rsa/src/schemes/oaep.mjs.map +0 -1
  671. package/dist/esm/node_modules/node-rsa/src/schemes/pkcs1.mjs +0 -172
  672. package/dist/esm/node_modules/node-rsa/src/schemes/pkcs1.mjs.map +0 -1
  673. package/dist/esm/node_modules/node-rsa/src/schemes/pss.mjs +0 -120
  674. package/dist/esm/node_modules/node-rsa/src/schemes/pss.mjs.map +0 -1
  675. package/dist/esm/node_modules/node-rsa/src/schemes/schemes.mjs +0 -25
  676. package/dist/esm/node_modules/node-rsa/src/schemes/schemes.mjs.map +0 -1
  677. package/dist/esm/node_modules/node-rsa/src/utils.mjs +0 -81
  678. package/dist/esm/node_modules/node-rsa/src/utils.mjs.map +0 -1
  679. package/dist/esm/node_modules/pako/index.mjs +0 -22
  680. package/dist/esm/node_modules/pako/index.mjs.map +0 -1
  681. package/dist/esm/node_modules/pako/lib/deflate.mjs +0 -308
  682. package/dist/esm/node_modules/pako/lib/deflate.mjs.map +0 -1
  683. package/dist/esm/node_modules/pako/lib/inflate.mjs +0 -314
  684. package/dist/esm/node_modules/pako/lib/inflate.mjs.map +0 -1
  685. package/dist/esm/node_modules/pako/lib/utils/common.mjs +0 -74
  686. package/dist/esm/node_modules/pako/lib/utils/common.mjs.map +0 -1
  687. package/dist/esm/node_modules/pako/lib/utils/strings.mjs +0 -128
  688. package/dist/esm/node_modules/pako/lib/utils/strings.mjs.map +0 -1
  689. package/dist/esm/node_modules/pako/lib/zlib/adler32.mjs +0 -26
  690. package/dist/esm/node_modules/pako/lib/zlib/adler32.mjs.map +0 -1
  691. package/dist/esm/node_modules/pako/lib/zlib/constants.mjs +0 -40
  692. package/dist/esm/node_modules/pako/lib/zlib/constants.mjs.map +0 -1
  693. package/dist/esm/node_modules/pako/lib/zlib/crc32.mjs +0 -28
  694. package/dist/esm/node_modules/pako/lib/zlib/crc32.mjs.map +0 -1
  695. package/dist/esm/node_modules/pako/lib/zlib/deflate.mjs +0 -886
  696. package/dist/esm/node_modules/pako/lib/zlib/deflate.mjs.map +0 -1
  697. package/dist/esm/node_modules/pako/lib/zlib/gzheader.mjs +0 -24
  698. package/dist/esm/node_modules/pako/lib/zlib/gzheader.mjs.map +0 -1
  699. package/dist/esm/node_modules/pako/lib/zlib/inffast.mjs +0 -224
  700. package/dist/esm/node_modules/pako/lib/zlib/inffast.mjs.map +0 -1
  701. package/dist/esm/node_modules/pako/lib/zlib/inflate.mjs +0 -1035
  702. package/dist/esm/node_modules/pako/lib/zlib/inflate.mjs.map +0 -1
  703. package/dist/esm/node_modules/pako/lib/zlib/inftrees.mjs +0 -275
  704. package/dist/esm/node_modules/pako/lib/zlib/inftrees.mjs.map +0 -1
  705. package/dist/esm/node_modules/pako/lib/zlib/messages.mjs +0 -22
  706. package/dist/esm/node_modules/pako/lib/zlib/messages.mjs.map +0 -1
  707. package/dist/esm/node_modules/pako/lib/zlib/trees.mjs +0 -623
  708. package/dist/esm/node_modules/pako/lib/zlib/trees.mjs.map +0 -1
  709. package/dist/esm/node_modules/pako/lib/zlib/zstream.mjs +0 -26
  710. package/dist/esm/node_modules/pako/lib/zlib/zstream.mjs.map +0 -1
  711. package/dist/esm/node_modules/possible-typed-array-names/index.mjs +0 -26
  712. package/dist/esm/node_modules/possible-typed-array-names/index.mjs.map +0 -1
  713. package/dist/esm/node_modules/safe-regex-test/index.mjs +0 -25
  714. package/dist/esm/node_modules/safe-regex-test/index.mjs.map +0 -1
  715. package/dist/esm/node_modules/safer-buffer/safer.mjs +0 -50
  716. package/dist/esm/node_modules/safer-buffer/safer.mjs.map +0 -1
  717. package/dist/esm/node_modules/samlify/build/index.mjs +0 -117
  718. package/dist/esm/node_modules/samlify/build/index.mjs.map +0 -1
  719. package/dist/esm/node_modules/samlify/build/src/api.mjs +0 -33
  720. package/dist/esm/node_modules/samlify/build/src/api.mjs.map +0 -1
  721. package/dist/esm/node_modules/samlify/build/src/binding-post.mjs +0 -504
  722. package/dist/esm/node_modules/samlify/build/src/binding-post.mjs.map +0 -1
  723. package/dist/esm/node_modules/samlify/build/src/binding-redirect.mjs +0 -339
  724. package/dist/esm/node_modules/samlify/build/src/binding-redirect.mjs.map +0 -1
  725. package/dist/esm/node_modules/samlify/build/src/binding-simplesign.mjs +0 -358
  726. package/dist/esm/node_modules/samlify/build/src/binding-simplesign.mjs.map +0 -1
  727. package/dist/esm/node_modules/samlify/build/src/entity-idp.mjs +0 -279
  728. package/dist/esm/node_modules/samlify/build/src/entity-idp.mjs.map +0 -1
  729. package/dist/esm/node_modules/samlify/build/src/entity-sp.mjs +0 -142
  730. package/dist/esm/node_modules/samlify/build/src/entity-sp.mjs.map +0 -1
  731. package/dist/esm/node_modules/samlify/build/src/entity.mjs +0 -253
  732. package/dist/esm/node_modules/samlify/build/src/entity.mjs.map +0 -1
  733. package/dist/esm/node_modules/samlify/build/src/extractor.mjs +0 -352
  734. package/dist/esm/node_modules/samlify/build/src/extractor.mjs.map +0 -1
  735. package/dist/esm/node_modules/samlify/build/src/flow.mjs +0 -389
  736. package/dist/esm/node_modules/samlify/build/src/flow.mjs.map +0 -1
  737. package/dist/esm/node_modules/samlify/build/src/libsaml.mjs +0 -544
  738. package/dist/esm/node_modules/samlify/build/src/libsaml.mjs.map +0 -1
  739. package/dist/esm/node_modules/samlify/build/src/metadata-idp.mjs +0 -171
  740. package/dist/esm/node_modules/samlify/build/src/metadata-idp.mjs.map +0 -1
  741. package/dist/esm/node_modules/samlify/build/src/metadata-sp.mjs +0 -214
  742. package/dist/esm/node_modules/samlify/build/src/metadata-sp.mjs.map +0 -1
  743. package/dist/esm/node_modules/samlify/build/src/metadata.mjs +0 -200
  744. package/dist/esm/node_modules/samlify/build/src/metadata.mjs.map +0 -1
  745. package/dist/esm/node_modules/samlify/build/src/urn.mjs +0 -225
  746. package/dist/esm/node_modules/samlify/build/src/urn.mjs.map +0 -1
  747. package/dist/esm/node_modules/samlify/build/src/utility.mjs +0 -277
  748. package/dist/esm/node_modules/samlify/build/src/utility.mjs.map +0 -1
  749. package/dist/esm/node_modules/samlify/build/src/validator.mjs +0 -53
  750. package/dist/esm/node_modules/samlify/build/src/validator.mjs.map +0 -1
  751. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/index.mjs +0 -39
  752. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/index.mjs.map +0 -1
  753. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/md5.mjs +0 -154
  754. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/md5.mjs.map +0 -1
  755. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/nil.mjs +0 -12
  756. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/nil.mjs.map +0 -1
  757. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/parse.mjs +0 -36
  758. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/parse.mjs.map +0 -1
  759. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/regex.mjs +0 -12
  760. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/regex.mjs.map +0 -1
  761. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/rng.mjs +0 -20
  762. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/rng.mjs.map +0 -1
  763. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/sha1.mjs +0 -101
  764. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/sha1.mjs.map +0 -1
  765. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/stringify.mjs +0 -22
  766. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/stringify.mjs.map +0 -1
  767. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v1.mjs +0 -63
  768. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v1.mjs.map +0 -1
  769. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v3.mjs +0 -17
  770. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v3.mjs.map +0 -1
  771. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v35.mjs +0 -48
  772. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v35.mjs.map +0 -1
  773. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v4.mjs +0 -28
  774. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v4.mjs.map +0 -1
  775. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v5.mjs +0 -17
  776. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/v5.mjs.map +0 -1
  777. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/validate.mjs +0 -17
  778. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/validate.mjs.map +0 -1
  779. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/version.mjs +0 -18
  780. package/dist/esm/node_modules/samlify/node_modules/uuid/dist/esm-browser/version.mjs.map +0 -1
  781. package/dist/esm/node_modules/set-function-length/index.mjs +0 -38
  782. package/dist/esm/node_modules/set-function-length/index.mjs.map +0 -1
  783. package/dist/esm/node_modules/util/support/isBufferBrowser.mjs +0 -14
  784. package/dist/esm/node_modules/util/support/isBufferBrowser.mjs.map +0 -1
  785. package/dist/esm/node_modules/util/support/types.mjs +0 -218
  786. package/dist/esm/node_modules/util/support/types.mjs.map +0 -1
  787. package/dist/esm/node_modules/util/util.mjs +0 -443
  788. package/dist/esm/node_modules/util/util.mjs.map +0 -1
  789. package/dist/esm/node_modules/which-typed-array/index.mjs +0 -93
  790. package/dist/esm/node_modules/which-typed-array/index.mjs.map +0 -1
  791. package/dist/esm/node_modules/xml/lib/escapeForXML.mjs +0 -24
  792. package/dist/esm/node_modules/xml/lib/escapeForXML.mjs.map +0 -1
  793. package/dist/esm/node_modules/xml/lib/xml.mjs +0 -183
  794. package/dist/esm/node_modules/xml/lib/xml.mjs.map +0 -1
  795. package/dist/esm/node_modules/xml-crypto/lib/c14n-canonicalization.mjs +0 -199
  796. package/dist/esm/node_modules/xml-crypto/lib/c14n-canonicalization.mjs.map +0 -1
  797. package/dist/esm/node_modules/xml-crypto/lib/enveloped-signature.mjs +0 -49
  798. package/dist/esm/node_modules/xml-crypto/lib/enveloped-signature.mjs.map +0 -1
  799. package/dist/esm/node_modules/xml-crypto/lib/exclusive-canonicalization.mjs +0 -220
  800. package/dist/esm/node_modules/xml-crypto/lib/exclusive-canonicalization.mjs.map +0 -1
  801. package/dist/esm/node_modules/xml-crypto/lib/hash-algorithms.mjs +0 -53
  802. package/dist/esm/node_modules/xml-crypto/lib/hash-algorithms.mjs.map +0 -1
  803. package/dist/esm/node_modules/xml-crypto/lib/index.mjs +0 -70
  804. package/dist/esm/node_modules/xml-crypto/lib/index.mjs.map +0 -1
  805. package/dist/esm/node_modules/xml-crypto/lib/signature-algorithms.mjs +0 -88
  806. package/dist/esm/node_modules/xml-crypto/lib/signature-algorithms.mjs.map +0 -1
  807. package/dist/esm/node_modules/xml-crypto/lib/signed-xml.mjs +0 -693
  808. package/dist/esm/node_modules/xml-crypto/lib/signed-xml.mjs.map +0 -1
  809. package/dist/esm/node_modules/xml-crypto/lib/types.mjs +0 -55
  810. package/dist/esm/node_modules/xml-crypto/lib/types.mjs.map +0 -1
  811. package/dist/esm/node_modules/xml-crypto/lib/utils.mjs +0 -210
  812. package/dist/esm/node_modules/xml-crypto/lib/utils.mjs.map +0 -1
  813. package/dist/esm/node_modules/xml-crypto/node_modules/xpath/xpath.mjs +0 -3442
  814. package/dist/esm/node_modules/xml-crypto/node_modules/xpath/xpath.mjs.map +0 -1
  815. package/dist/esm/node_modules/xml-escape/index.mjs +0 -27
  816. package/dist/esm/node_modules/xml-escape/index.mjs.map +0 -1
  817. package/dist/esm/node_modules/xpath/xpath.mjs +0 -3407
  818. package/dist/esm/node_modules/xpath/xpath.mjs.map +0 -1
  819. package/dist/esm/node_modules/zod/v4/classic/errors.mjs +0 -30
  820. package/dist/esm/node_modules/zod/v4/classic/errors.mjs.map +0 -1
  821. package/dist/esm/node_modules/zod/v4/classic/iso.mjs +0 -38
  822. package/dist/esm/node_modules/zod/v4/classic/iso.mjs.map +0 -1
  823. package/dist/esm/node_modules/zod/v4/classic/parse.mjs +0 -20
  824. package/dist/esm/node_modules/zod/v4/classic/parse.mjs.map +0 -1
  825. package/dist/esm/node_modules/zod/v4/classic/schemas.mjs +0 -519
  826. package/dist/esm/node_modules/zod/v4/classic/schemas.mjs.map +0 -1
  827. package/dist/esm/node_modules/zod/v4/core/api.mjs +0 -395
  828. package/dist/esm/node_modules/zod/v4/core/api.mjs.map +0 -1
  829. package/dist/esm/node_modules/zod/v4/core/checks.mjs +0 -226
  830. package/dist/esm/node_modules/zod/v4/core/checks.mjs.map +0 -1
  831. package/dist/esm/node_modules/zod/v4/core/core.mjs +0 -57
  832. package/dist/esm/node_modules/zod/v4/core/core.mjs.map +0 -1
  833. package/dist/esm/node_modules/zod/v4/core/doc.mjs +0 -34
  834. package/dist/esm/node_modules/zod/v4/core/doc.mjs.map +0 -1
  835. package/dist/esm/node_modules/zod/v4/core/errors.mjs +0 -63
  836. package/dist/esm/node_modules/zod/v4/core/errors.mjs.map +0 -1
  837. package/dist/esm/node_modules/zod/v4/core/parse.mjs +0 -110
  838. package/dist/esm/node_modules/zod/v4/core/parse.mjs.map +0 -1
  839. package/dist/esm/node_modules/zod/v4/core/regexes.mjs +0 -60
  840. package/dist/esm/node_modules/zod/v4/core/regexes.mjs.map +0 -1
  841. package/dist/esm/node_modules/zod/v4/core/registries.mjs +0 -53
  842. package/dist/esm/node_modules/zod/v4/core/registries.mjs.map +0 -1
  843. package/dist/esm/node_modules/zod/v4/core/schemas.mjs +0 -1069
  844. package/dist/esm/node_modules/zod/v4/core/schemas.mjs.map +0 -1
  845. package/dist/esm/node_modules/zod/v4/core/util.mjs +0 -302
  846. package/dist/esm/node_modules/zod/v4/core/util.mjs.map +0 -1
  847. package/dist/esm/node_modules/zod/v4/core/versions.mjs +0 -10
  848. package/dist/esm/node_modules/zod/v4/core/versions.mjs.map +0 -1
  849. package/dist/types/MagicLinkEmail.d.ts +0 -8
  850. package/dist/types/MagicLinkEmail.d.ts.map +0 -1
  851. package/dist/types/controllers/audit.controller.d.ts +0 -32
  852. package/dist/types/controllers/audit.controller.d.ts.map +0 -1
  853. package/dist/types/models/audit.model.d.ts +0 -5
  854. package/dist/types/models/audit.model.d.ts.map +0 -1
@@ -1,2124 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- const require_forge$1 = require('./forge.cjs');
3
- const require_baseN$1 = require('./baseN.cjs');
4
-
5
- //#region ../../node_modules/node-forge/lib/util.js
6
- var require_util = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/node-forge/lib/util.js": ((exports, module) => {
7
- /**
8
- * Utility functions for web applications.
9
- *
10
- * @author Dave Longley
11
- *
12
- * Copyright (c) 2010-2018 Digital Bazaar, Inc.
13
- */
14
- var forge = require_forge$1.default;
15
- var baseN = require_baseN$1.default;
16
- var util = module.exports = forge.util = forge.util || {};
17
- (function() {
18
- if (typeof process !== "undefined" && process.nextTick && !process.browser) {
19
- util.nextTick = process.nextTick;
20
- if (typeof setImmediate === "function") util.setImmediate = setImmediate;
21
- else util.setImmediate = util.nextTick;
22
- return;
23
- }
24
- if (typeof setImmediate === "function") {
25
- util.setImmediate = function() {
26
- return setImmediate.apply(void 0, arguments);
27
- };
28
- util.nextTick = function(callback) {
29
- return setImmediate(callback);
30
- };
31
- return;
32
- }
33
- util.setImmediate = function(callback) {
34
- setTimeout(callback, 0);
35
- };
36
- if (typeof window !== "undefined" && typeof window.postMessage === "function") {
37
- var msg = "forge.setImmediate";
38
- var callbacks = [];
39
- util.setImmediate = function(callback) {
40
- callbacks.push(callback);
41
- if (callbacks.length === 1) window.postMessage(msg, "*");
42
- };
43
- function handler(event) {
44
- if (event.source === window && event.data === msg) {
45
- event.stopPropagation();
46
- var copy = callbacks.slice();
47
- callbacks.length = 0;
48
- copy.forEach(function(callback) {
49
- callback();
50
- });
51
- }
52
- }
53
- window.addEventListener("message", handler, true);
54
- }
55
- if (typeof MutationObserver !== "undefined") {
56
- var now = Date.now();
57
- var attr = true;
58
- var div = document.createElement("div");
59
- var callbacks = [];
60
- new MutationObserver(function() {
61
- var copy = callbacks.slice();
62
- callbacks.length = 0;
63
- copy.forEach(function(callback) {
64
- callback();
65
- });
66
- }).observe(div, { attributes: true });
67
- var oldSetImmediate = util.setImmediate;
68
- util.setImmediate = function(callback) {
69
- if (Date.now() - now > 15) {
70
- now = Date.now();
71
- oldSetImmediate(callback);
72
- } else {
73
- callbacks.push(callback);
74
- if (callbacks.length === 1) div.setAttribute("a", attr = !attr);
75
- }
76
- };
77
- }
78
- util.nextTick = util.setImmediate;
79
- })();
80
- util.isNodejs = typeof process !== "undefined" && process.versions && process.versions.node;
81
- util.globalScope = (function() {
82
- if (util.isNodejs) return global;
83
- return typeof self === "undefined" ? window : self;
84
- })();
85
- util.isArray = Array.isArray || function(x) {
86
- return Object.prototype.toString.call(x) === "[object Array]";
87
- };
88
- util.isArrayBuffer = function(x) {
89
- return typeof ArrayBuffer !== "undefined" && x instanceof ArrayBuffer;
90
- };
91
- util.isArrayBufferView = function(x) {
92
- return x && util.isArrayBuffer(x.buffer) && x.byteLength !== void 0;
93
- };
94
- /**
95
- * Ensure a bits param is 8, 16, 24, or 32. Used to validate input for
96
- * algorithms where bit manipulation, JavaScript limitations, and/or algorithm
97
- * design only allow for byte operations of a limited size.
98
- *
99
- * @param n number of bits.
100
- *
101
- * Throw Error if n invalid.
102
- */
103
- function _checkBitsParam(n) {
104
- if (!(n === 8 || n === 16 || n === 24 || n === 32)) throw new Error("Only 8, 16, 24, or 32 bits supported: " + n);
105
- }
106
- util.ByteBuffer = ByteStringBuffer;
107
- /** Buffer w/BinaryString backing */
108
- /**
109
- * Constructor for a binary string backed byte buffer.
110
- *
111
- * @param [b] the bytes to wrap (either encoded as string, one byte per
112
- * character, or as an ArrayBuffer or Typed Array).
113
- */
114
- function ByteStringBuffer(b) {
115
- this.data = "";
116
- this.read = 0;
117
- if (typeof b === "string") this.data = b;
118
- else if (util.isArrayBuffer(b) || util.isArrayBufferView(b)) if (typeof Buffer !== "undefined" && b instanceof Buffer) this.data = b.toString("binary");
119
- else {
120
- var arr = new Uint8Array(b);
121
- try {
122
- this.data = String.fromCharCode.apply(null, arr);
123
- } catch (e) {
124
- for (var i = 0; i < arr.length; ++i) this.putByte(arr[i]);
125
- }
126
- }
127
- else if (b instanceof ByteStringBuffer || typeof b === "object" && typeof b.data === "string" && typeof b.read === "number") {
128
- this.data = b.data;
129
- this.read = b.read;
130
- }
131
- this._constructedStringLength = 0;
132
- }
133
- util.ByteStringBuffer = ByteStringBuffer;
134
- var _MAX_CONSTRUCTED_STRING_LENGTH = 4096;
135
- util.ByteStringBuffer.prototype._optimizeConstructedString = function(x) {
136
- this._constructedStringLength += x;
137
- if (this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) {
138
- this.data.substr(0, 1);
139
- this._constructedStringLength = 0;
140
- }
141
- };
142
- /**
143
- * Gets the number of bytes in this buffer.
144
- *
145
- * @return the number of bytes in this buffer.
146
- */
147
- util.ByteStringBuffer.prototype.length = function() {
148
- return this.data.length - this.read;
149
- };
150
- /**
151
- * Gets whether or not this buffer is empty.
152
- *
153
- * @return true if this buffer is empty, false if not.
154
- */
155
- util.ByteStringBuffer.prototype.isEmpty = function() {
156
- return this.length() <= 0;
157
- };
158
- /**
159
- * Puts a byte in this buffer.
160
- *
161
- * @param b the byte to put.
162
- *
163
- * @return this buffer.
164
- */
165
- util.ByteStringBuffer.prototype.putByte = function(b) {
166
- return this.putBytes(String.fromCharCode(b));
167
- };
168
- /**
169
- * Puts a byte in this buffer N times.
170
- *
171
- * @param b the byte to put.
172
- * @param n the number of bytes of value b to put.
173
- *
174
- * @return this buffer.
175
- */
176
- util.ByteStringBuffer.prototype.fillWithByte = function(b, n) {
177
- b = String.fromCharCode(b);
178
- var d = this.data;
179
- while (n > 0) {
180
- if (n & 1) d += b;
181
- n >>>= 1;
182
- if (n > 0) b += b;
183
- }
184
- this.data = d;
185
- this._optimizeConstructedString(n);
186
- return this;
187
- };
188
- /**
189
- * Puts bytes in this buffer.
190
- *
191
- * @param bytes the bytes (as a binary encoded string) to put.
192
- *
193
- * @return this buffer.
194
- */
195
- util.ByteStringBuffer.prototype.putBytes = function(bytes) {
196
- this.data += bytes;
197
- this._optimizeConstructedString(bytes.length);
198
- return this;
199
- };
200
- /**
201
- * Puts a UTF-16 encoded string into this buffer.
202
- *
203
- * @param str the string to put.
204
- *
205
- * @return this buffer.
206
- */
207
- util.ByteStringBuffer.prototype.putString = function(str) {
208
- return this.putBytes(util.encodeUtf8(str));
209
- };
210
- /**
211
- * Puts a 16-bit integer in this buffer in big-endian order.
212
- *
213
- * @param i the 16-bit integer.
214
- *
215
- * @return this buffer.
216
- */
217
- util.ByteStringBuffer.prototype.putInt16 = function(i) {
218
- return this.putBytes(String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255));
219
- };
220
- /**
221
- * Puts a 24-bit integer in this buffer in big-endian order.
222
- *
223
- * @param i the 24-bit integer.
224
- *
225
- * @return this buffer.
226
- */
227
- util.ByteStringBuffer.prototype.putInt24 = function(i) {
228
- return this.putBytes(String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255));
229
- };
230
- /**
231
- * Puts a 32-bit integer in this buffer in big-endian order.
232
- *
233
- * @param i the 32-bit integer.
234
- *
235
- * @return this buffer.
236
- */
237
- util.ByteStringBuffer.prototype.putInt32 = function(i) {
238
- return this.putBytes(String.fromCharCode(i >> 24 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255));
239
- };
240
- /**
241
- * Puts a 16-bit integer in this buffer in little-endian order.
242
- *
243
- * @param i the 16-bit integer.
244
- *
245
- * @return this buffer.
246
- */
247
- util.ByteStringBuffer.prototype.putInt16Le = function(i) {
248
- return this.putBytes(String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255));
249
- };
250
- /**
251
- * Puts a 24-bit integer in this buffer in little-endian order.
252
- *
253
- * @param i the 24-bit integer.
254
- *
255
- * @return this buffer.
256
- */
257
- util.ByteStringBuffer.prototype.putInt24Le = function(i) {
258
- return this.putBytes(String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i >> 16 & 255));
259
- };
260
- /**
261
- * Puts a 32-bit integer in this buffer in little-endian order.
262
- *
263
- * @param i the 32-bit integer.
264
- *
265
- * @return this buffer.
266
- */
267
- util.ByteStringBuffer.prototype.putInt32Le = function(i) {
268
- return this.putBytes(String.fromCharCode(i & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 24 & 255));
269
- };
270
- /**
271
- * Puts an n-bit integer in this buffer in big-endian order.
272
- *
273
- * @param i the n-bit integer.
274
- * @param n the number of bits in the integer (8, 16, 24, or 32).
275
- *
276
- * @return this buffer.
277
- */
278
- util.ByteStringBuffer.prototype.putInt = function(i, n) {
279
- _checkBitsParam(n);
280
- var bytes = "";
281
- do {
282
- n -= 8;
283
- bytes += String.fromCharCode(i >> n & 255);
284
- } while (n > 0);
285
- return this.putBytes(bytes);
286
- };
287
- /**
288
- * Puts a signed n-bit integer in this buffer in big-endian order. Two's
289
- * complement representation is used.
290
- *
291
- * @param i the n-bit integer.
292
- * @param n the number of bits in the integer (8, 16, 24, or 32).
293
- *
294
- * @return this buffer.
295
- */
296
- util.ByteStringBuffer.prototype.putSignedInt = function(i, n) {
297
- if (i < 0) i += 2 << n - 1;
298
- return this.putInt(i, n);
299
- };
300
- /**
301
- * Puts the given buffer into this buffer.
302
- *
303
- * @param buffer the buffer to put into this one.
304
- *
305
- * @return this buffer.
306
- */
307
- util.ByteStringBuffer.prototype.putBuffer = function(buffer) {
308
- return this.putBytes(buffer.getBytes());
309
- };
310
- /**
311
- * Gets a byte from this buffer and advances the read pointer by 1.
312
- *
313
- * @return the byte.
314
- */
315
- util.ByteStringBuffer.prototype.getByte = function() {
316
- return this.data.charCodeAt(this.read++);
317
- };
318
- /**
319
- * Gets a uint16 from this buffer in big-endian order and advances the read
320
- * pointer by 2.
321
- *
322
- * @return the uint16.
323
- */
324
- util.ByteStringBuffer.prototype.getInt16 = function() {
325
- var rval = this.data.charCodeAt(this.read) << 8 ^ this.data.charCodeAt(this.read + 1);
326
- this.read += 2;
327
- return rval;
328
- };
329
- /**
330
- * Gets a uint24 from this buffer in big-endian order and advances the read
331
- * pointer by 3.
332
- *
333
- * @return the uint24.
334
- */
335
- util.ByteStringBuffer.prototype.getInt24 = function() {
336
- var rval = this.data.charCodeAt(this.read) << 16 ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2);
337
- this.read += 3;
338
- return rval;
339
- };
340
- /**
341
- * Gets a uint32 from this buffer in big-endian order and advances the read
342
- * pointer by 4.
343
- *
344
- * @return the word.
345
- */
346
- util.ByteStringBuffer.prototype.getInt32 = function() {
347
- var rval = this.data.charCodeAt(this.read) << 24 ^ this.data.charCodeAt(this.read + 1) << 16 ^ this.data.charCodeAt(this.read + 2) << 8 ^ this.data.charCodeAt(this.read + 3);
348
- this.read += 4;
349
- return rval;
350
- };
351
- /**
352
- * Gets a uint16 from this buffer in little-endian order and advances the read
353
- * pointer by 2.
354
- *
355
- * @return the uint16.
356
- */
357
- util.ByteStringBuffer.prototype.getInt16Le = function() {
358
- var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8;
359
- this.read += 2;
360
- return rval;
361
- };
362
- /**
363
- * Gets a uint24 from this buffer in little-endian order and advances the read
364
- * pointer by 3.
365
- *
366
- * @return the uint24.
367
- */
368
- util.ByteStringBuffer.prototype.getInt24Le = function() {
369
- var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16;
370
- this.read += 3;
371
- return rval;
372
- };
373
- /**
374
- * Gets a uint32 from this buffer in little-endian order and advances the read
375
- * pointer by 4.
376
- *
377
- * @return the word.
378
- */
379
- util.ByteStringBuffer.prototype.getInt32Le = function() {
380
- var rval = this.data.charCodeAt(this.read) ^ this.data.charCodeAt(this.read + 1) << 8 ^ this.data.charCodeAt(this.read + 2) << 16 ^ this.data.charCodeAt(this.read + 3) << 24;
381
- this.read += 4;
382
- return rval;
383
- };
384
- /**
385
- * Gets an n-bit integer from this buffer in big-endian order and advances the
386
- * read pointer by ceil(n/8).
387
- *
388
- * @param n the number of bits in the integer (8, 16, 24, or 32).
389
- *
390
- * @return the integer.
391
- */
392
- util.ByteStringBuffer.prototype.getInt = function(n) {
393
- _checkBitsParam(n);
394
- var rval = 0;
395
- do {
396
- rval = (rval << 8) + this.data.charCodeAt(this.read++);
397
- n -= 8;
398
- } while (n > 0);
399
- return rval;
400
- };
401
- /**
402
- * Gets a signed n-bit integer from this buffer in big-endian order, using
403
- * two's complement, and advances the read pointer by n/8.
404
- *
405
- * @param n the number of bits in the integer (8, 16, 24, or 32).
406
- *
407
- * @return the integer.
408
- */
409
- util.ByteStringBuffer.prototype.getSignedInt = function(n) {
410
- var x = this.getInt(n);
411
- var max = 2 << n - 2;
412
- if (x >= max) x -= max << 1;
413
- return x;
414
- };
415
- /**
416
- * Reads bytes out as a binary encoded string and clears them from the
417
- * buffer. Note that the resulting string is binary encoded (in node.js this
418
- * encoding is referred to as `binary`, it is *not* `utf8`).
419
- *
420
- * @param count the number of bytes to read, undefined or null for all.
421
- *
422
- * @return a binary encoded string of bytes.
423
- */
424
- util.ByteStringBuffer.prototype.getBytes = function(count) {
425
- var rval;
426
- if (count) {
427
- count = Math.min(this.length(), count);
428
- rval = this.data.slice(this.read, this.read + count);
429
- this.read += count;
430
- } else if (count === 0) rval = "";
431
- else {
432
- rval = this.read === 0 ? this.data : this.data.slice(this.read);
433
- this.clear();
434
- }
435
- return rval;
436
- };
437
- /**
438
- * Gets a binary encoded string of the bytes from this buffer without
439
- * modifying the read pointer.
440
- *
441
- * @param count the number of bytes to get, omit to get all.
442
- *
443
- * @return a string full of binary encoded characters.
444
- */
445
- util.ByteStringBuffer.prototype.bytes = function(count) {
446
- return typeof count === "undefined" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + count);
447
- };
448
- /**
449
- * Gets a byte at the given index without modifying the read pointer.
450
- *
451
- * @param i the byte index.
452
- *
453
- * @return the byte.
454
- */
455
- util.ByteStringBuffer.prototype.at = function(i) {
456
- return this.data.charCodeAt(this.read + i);
457
- };
458
- /**
459
- * Puts a byte at the given index without modifying the read pointer.
460
- *
461
- * @param i the byte index.
462
- * @param b the byte to put.
463
- *
464
- * @return this buffer.
465
- */
466
- util.ByteStringBuffer.prototype.setAt = function(i, b) {
467
- this.data = this.data.substr(0, this.read + i) + String.fromCharCode(b) + this.data.substr(this.read + i + 1);
468
- return this;
469
- };
470
- /**
471
- * Gets the last byte without modifying the read pointer.
472
- *
473
- * @return the last byte.
474
- */
475
- util.ByteStringBuffer.prototype.last = function() {
476
- return this.data.charCodeAt(this.data.length - 1);
477
- };
478
- /**
479
- * Creates a copy of this buffer.
480
- *
481
- * @return the copy.
482
- */
483
- util.ByteStringBuffer.prototype.copy = function() {
484
- var c = util.createBuffer(this.data);
485
- c.read = this.read;
486
- return c;
487
- };
488
- /**
489
- * Compacts this buffer.
490
- *
491
- * @return this buffer.
492
- */
493
- util.ByteStringBuffer.prototype.compact = function() {
494
- if (this.read > 0) {
495
- this.data = this.data.slice(this.read);
496
- this.read = 0;
497
- }
498
- return this;
499
- };
500
- /**
501
- * Clears this buffer.
502
- *
503
- * @return this buffer.
504
- */
505
- util.ByteStringBuffer.prototype.clear = function() {
506
- this.data = "";
507
- this.read = 0;
508
- return this;
509
- };
510
- /**
511
- * Shortens this buffer by triming bytes off of the end of this buffer.
512
- *
513
- * @param count the number of bytes to trim off.
514
- *
515
- * @return this buffer.
516
- */
517
- util.ByteStringBuffer.prototype.truncate = function(count) {
518
- var len = Math.max(0, this.length() - count);
519
- this.data = this.data.substr(this.read, len);
520
- this.read = 0;
521
- return this;
522
- };
523
- /**
524
- * Converts this buffer to a hexadecimal string.
525
- *
526
- * @return a hexadecimal string.
527
- */
528
- util.ByteStringBuffer.prototype.toHex = function() {
529
- var rval = "";
530
- for (var i = this.read; i < this.data.length; ++i) {
531
- var b = this.data.charCodeAt(i);
532
- if (b < 16) rval += "0";
533
- rval += b.toString(16);
534
- }
535
- return rval;
536
- };
537
- /**
538
- * Converts this buffer to a UTF-16 string (standard JavaScript string).
539
- *
540
- * @return a UTF-16 string.
541
- */
542
- util.ByteStringBuffer.prototype.toString = function() {
543
- return util.decodeUtf8(this.bytes());
544
- };
545
- /** End Buffer w/BinaryString backing */
546
- /** Buffer w/UInt8Array backing */
547
- /**
548
- * FIXME: Experimental. Do not use yet.
549
- *
550
- * Constructor for an ArrayBuffer-backed byte buffer.
551
- *
552
- * The buffer may be constructed from a string, an ArrayBuffer, DataView, or a
553
- * TypedArray.
554
- *
555
- * If a string is given, its encoding should be provided as an option,
556
- * otherwise it will default to 'binary'. A 'binary' string is encoded such
557
- * that each character is one byte in length and size.
558
- *
559
- * If an ArrayBuffer, DataView, or TypedArray is given, it will be used
560
- * *directly* without any copying. Note that, if a write to the buffer requires
561
- * more space, the buffer will allocate a new backing ArrayBuffer to
562
- * accommodate. The starting read and write offsets for the buffer may be
563
- * given as options.
564
- *
565
- * @param [b] the initial bytes for this buffer.
566
- * @param options the options to use:
567
- * [readOffset] the starting read offset to use (default: 0).
568
- * [writeOffset] the starting write offset to use (default: the
569
- * length of the first parameter).
570
- * [growSize] the minimum amount, in bytes, to grow the buffer by to
571
- * accommodate writes (default: 1024).
572
- * [encoding] the encoding ('binary', 'utf8', 'utf16', 'hex') for the
573
- * first parameter, if it is a string (default: 'binary').
574
- */
575
- function DataBuffer(b, options) {
576
- options = options || {};
577
- this.read = options.readOffset || 0;
578
- this.growSize = options.growSize || 1024;
579
- var isArrayBuffer = util.isArrayBuffer(b);
580
- var isArrayBufferView = util.isArrayBufferView(b);
581
- if (isArrayBuffer || isArrayBufferView) {
582
- if (isArrayBuffer) this.data = new DataView(b);
583
- else this.data = new DataView(b.buffer, b.byteOffset, b.byteLength);
584
- this.write = "writeOffset" in options ? options.writeOffset : this.data.byteLength;
585
- return;
586
- }
587
- this.data = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0));
588
- this.write = 0;
589
- if (b !== null && b !== void 0) this.putBytes(b);
590
- if ("writeOffset" in options) this.write = options.writeOffset;
591
- }
592
- util.DataBuffer = DataBuffer;
593
- /**
594
- * Gets the number of bytes in this buffer.
595
- *
596
- * @return the number of bytes in this buffer.
597
- */
598
- util.DataBuffer.prototype.length = function() {
599
- return this.write - this.read;
600
- };
601
- /**
602
- * Gets whether or not this buffer is empty.
603
- *
604
- * @return true if this buffer is empty, false if not.
605
- */
606
- util.DataBuffer.prototype.isEmpty = function() {
607
- return this.length() <= 0;
608
- };
609
- /**
610
- * Ensures this buffer has enough empty space to accommodate the given number
611
- * of bytes. An optional parameter may be given that indicates a minimum
612
- * amount to grow the buffer if necessary. If the parameter is not given,
613
- * the buffer will be grown by some previously-specified default amount
614
- * or heuristic.
615
- *
616
- * @param amount the number of bytes to accommodate.
617
- * @param [growSize] the minimum amount, in bytes, to grow the buffer by if
618
- * necessary.
619
- */
620
- util.DataBuffer.prototype.accommodate = function(amount, growSize) {
621
- if (this.length() >= amount) return this;
622
- growSize = Math.max(growSize || this.growSize, amount);
623
- var src = new Uint8Array(this.data.buffer, this.data.byteOffset, this.data.byteLength);
624
- var dst = new Uint8Array(this.length() + growSize);
625
- dst.set(src);
626
- this.data = new DataView(dst.buffer);
627
- return this;
628
- };
629
- /**
630
- * Puts a byte in this buffer.
631
- *
632
- * @param b the byte to put.
633
- *
634
- * @return this buffer.
635
- */
636
- util.DataBuffer.prototype.putByte = function(b) {
637
- this.accommodate(1);
638
- this.data.setUint8(this.write++, b);
639
- return this;
640
- };
641
- /**
642
- * Puts a byte in this buffer N times.
643
- *
644
- * @param b the byte to put.
645
- * @param n the number of bytes of value b to put.
646
- *
647
- * @return this buffer.
648
- */
649
- util.DataBuffer.prototype.fillWithByte = function(b, n) {
650
- this.accommodate(n);
651
- for (var i = 0; i < n; ++i) this.data.setUint8(b);
652
- return this;
653
- };
654
- /**
655
- * Puts bytes in this buffer. The bytes may be given as a string, an
656
- * ArrayBuffer, a DataView, or a TypedArray.
657
- *
658
- * @param bytes the bytes to put.
659
- * @param [encoding] the encoding for the first parameter ('binary', 'utf8',
660
- * 'utf16', 'hex'), if it is a string (default: 'binary').
661
- *
662
- * @return this buffer.
663
- */
664
- util.DataBuffer.prototype.putBytes = function(bytes, encoding) {
665
- if (util.isArrayBufferView(bytes)) {
666
- var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
667
- var len = src.byteLength - src.byteOffset;
668
- this.accommodate(len);
669
- var dst = new Uint8Array(this.data.buffer, this.write);
670
- dst.set(src);
671
- this.write += len;
672
- return this;
673
- }
674
- if (util.isArrayBuffer(bytes)) {
675
- var src = new Uint8Array(bytes);
676
- this.accommodate(src.byteLength);
677
- var dst = new Uint8Array(this.data.buffer);
678
- dst.set(src, this.write);
679
- this.write += src.byteLength;
680
- return this;
681
- }
682
- if (bytes instanceof util.DataBuffer || typeof bytes === "object" && typeof bytes.read === "number" && typeof bytes.write === "number" && util.isArrayBufferView(bytes.data)) {
683
- var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length());
684
- this.accommodate(src.byteLength);
685
- var dst = new Uint8Array(bytes.data.byteLength, this.write);
686
- dst.set(src);
687
- this.write += src.byteLength;
688
- return this;
689
- }
690
- if (bytes instanceof util.ByteStringBuffer) {
691
- bytes = bytes.data;
692
- encoding = "binary";
693
- }
694
- encoding = encoding || "binary";
695
- if (typeof bytes === "string") {
696
- var view;
697
- if (encoding === "hex") {
698
- this.accommodate(Math.ceil(bytes.length / 2));
699
- view = new Uint8Array(this.data.buffer, this.write);
700
- this.write += util.binary.hex.decode(bytes, view, this.write);
701
- return this;
702
- }
703
- if (encoding === "base64") {
704
- this.accommodate(Math.ceil(bytes.length / 4) * 3);
705
- view = new Uint8Array(this.data.buffer, this.write);
706
- this.write += util.binary.base64.decode(bytes, view, this.write);
707
- return this;
708
- }
709
- if (encoding === "utf8") {
710
- bytes = util.encodeUtf8(bytes);
711
- encoding = "binary";
712
- }
713
- if (encoding === "binary" || encoding === "raw") {
714
- this.accommodate(bytes.length);
715
- view = new Uint8Array(this.data.buffer, this.write);
716
- this.write += util.binary.raw.decode(view);
717
- return this;
718
- }
719
- if (encoding === "utf16") {
720
- this.accommodate(bytes.length * 2);
721
- view = new Uint16Array(this.data.buffer, this.write);
722
- this.write += util.text.utf16.encode(view);
723
- return this;
724
- }
725
- throw new Error("Invalid encoding: " + encoding);
726
- }
727
- throw Error("Invalid parameter: " + bytes);
728
- };
729
- /**
730
- * Puts the given buffer into this buffer.
731
- *
732
- * @param buffer the buffer to put into this one.
733
- *
734
- * @return this buffer.
735
- */
736
- util.DataBuffer.prototype.putBuffer = function(buffer) {
737
- this.putBytes(buffer);
738
- buffer.clear();
739
- return this;
740
- };
741
- /**
742
- * Puts a string into this buffer.
743
- *
744
- * @param str the string to put.
745
- * @param [encoding] the encoding for the string (default: 'utf16').
746
- *
747
- * @return this buffer.
748
- */
749
- util.DataBuffer.prototype.putString = function(str) {
750
- return this.putBytes(str, "utf16");
751
- };
752
- /**
753
- * Puts a 16-bit integer in this buffer in big-endian order.
754
- *
755
- * @param i the 16-bit integer.
756
- *
757
- * @return this buffer.
758
- */
759
- util.DataBuffer.prototype.putInt16 = function(i) {
760
- this.accommodate(2);
761
- this.data.setInt16(this.write, i);
762
- this.write += 2;
763
- return this;
764
- };
765
- /**
766
- * Puts a 24-bit integer in this buffer in big-endian order.
767
- *
768
- * @param i the 24-bit integer.
769
- *
770
- * @return this buffer.
771
- */
772
- util.DataBuffer.prototype.putInt24 = function(i) {
773
- this.accommodate(3);
774
- this.data.setInt16(this.write, i >> 8 & 65535);
775
- this.data.setInt8(this.write, i >> 16 & 255);
776
- this.write += 3;
777
- return this;
778
- };
779
- /**
780
- * Puts a 32-bit integer in this buffer in big-endian order.
781
- *
782
- * @param i the 32-bit integer.
783
- *
784
- * @return this buffer.
785
- */
786
- util.DataBuffer.prototype.putInt32 = function(i) {
787
- this.accommodate(4);
788
- this.data.setInt32(this.write, i);
789
- this.write += 4;
790
- return this;
791
- };
792
- /**
793
- * Puts a 16-bit integer in this buffer in little-endian order.
794
- *
795
- * @param i the 16-bit integer.
796
- *
797
- * @return this buffer.
798
- */
799
- util.DataBuffer.prototype.putInt16Le = function(i) {
800
- this.accommodate(2);
801
- this.data.setInt16(this.write, i, true);
802
- this.write += 2;
803
- return this;
804
- };
805
- /**
806
- * Puts a 24-bit integer in this buffer in little-endian order.
807
- *
808
- * @param i the 24-bit integer.
809
- *
810
- * @return this buffer.
811
- */
812
- util.DataBuffer.prototype.putInt24Le = function(i) {
813
- this.accommodate(3);
814
- this.data.setInt8(this.write, i >> 16 & 255);
815
- this.data.setInt16(this.write, i >> 8 & 65535, true);
816
- this.write += 3;
817
- return this;
818
- };
819
- /**
820
- * Puts a 32-bit integer in this buffer in little-endian order.
821
- *
822
- * @param i the 32-bit integer.
823
- *
824
- * @return this buffer.
825
- */
826
- util.DataBuffer.prototype.putInt32Le = function(i) {
827
- this.accommodate(4);
828
- this.data.setInt32(this.write, i, true);
829
- this.write += 4;
830
- return this;
831
- };
832
- /**
833
- * Puts an n-bit integer in this buffer in big-endian order.
834
- *
835
- * @param i the n-bit integer.
836
- * @param n the number of bits in the integer (8, 16, 24, or 32).
837
- *
838
- * @return this buffer.
839
- */
840
- util.DataBuffer.prototype.putInt = function(i, n) {
841
- _checkBitsParam(n);
842
- this.accommodate(n / 8);
843
- do {
844
- n -= 8;
845
- this.data.setInt8(this.write++, i >> n & 255);
846
- } while (n > 0);
847
- return this;
848
- };
849
- /**
850
- * Puts a signed n-bit integer in this buffer in big-endian order. Two's
851
- * complement representation is used.
852
- *
853
- * @param i the n-bit integer.
854
- * @param n the number of bits in the integer.
855
- *
856
- * @return this buffer.
857
- */
858
- util.DataBuffer.prototype.putSignedInt = function(i, n) {
859
- _checkBitsParam(n);
860
- this.accommodate(n / 8);
861
- if (i < 0) i += 2 << n - 1;
862
- return this.putInt(i, n);
863
- };
864
- /**
865
- * Gets a byte from this buffer and advances the read pointer by 1.
866
- *
867
- * @return the byte.
868
- */
869
- util.DataBuffer.prototype.getByte = function() {
870
- return this.data.getInt8(this.read++);
871
- };
872
- /**
873
- * Gets a uint16 from this buffer in big-endian order and advances the read
874
- * pointer by 2.
875
- *
876
- * @return the uint16.
877
- */
878
- util.DataBuffer.prototype.getInt16 = function() {
879
- var rval = this.data.getInt16(this.read);
880
- this.read += 2;
881
- return rval;
882
- };
883
- /**
884
- * Gets a uint24 from this buffer in big-endian order and advances the read
885
- * pointer by 3.
886
- *
887
- * @return the uint24.
888
- */
889
- util.DataBuffer.prototype.getInt24 = function() {
890
- var rval = this.data.getInt16(this.read) << 8 ^ this.data.getInt8(this.read + 2);
891
- this.read += 3;
892
- return rval;
893
- };
894
- /**
895
- * Gets a uint32 from this buffer in big-endian order and advances the read
896
- * pointer by 4.
897
- *
898
- * @return the word.
899
- */
900
- util.DataBuffer.prototype.getInt32 = function() {
901
- var rval = this.data.getInt32(this.read);
902
- this.read += 4;
903
- return rval;
904
- };
905
- /**
906
- * Gets a uint16 from this buffer in little-endian order and advances the read
907
- * pointer by 2.
908
- *
909
- * @return the uint16.
910
- */
911
- util.DataBuffer.prototype.getInt16Le = function() {
912
- var rval = this.data.getInt16(this.read, true);
913
- this.read += 2;
914
- return rval;
915
- };
916
- /**
917
- * Gets a uint24 from this buffer in little-endian order and advances the read
918
- * pointer by 3.
919
- *
920
- * @return the uint24.
921
- */
922
- util.DataBuffer.prototype.getInt24Le = function() {
923
- var rval = this.data.getInt8(this.read) ^ this.data.getInt16(this.read + 1, true) << 8;
924
- this.read += 3;
925
- return rval;
926
- };
927
- /**
928
- * Gets a uint32 from this buffer in little-endian order and advances the read
929
- * pointer by 4.
930
- *
931
- * @return the word.
932
- */
933
- util.DataBuffer.prototype.getInt32Le = function() {
934
- var rval = this.data.getInt32(this.read, true);
935
- this.read += 4;
936
- return rval;
937
- };
938
- /**
939
- * Gets an n-bit integer from this buffer in big-endian order and advances the
940
- * read pointer by n/8.
941
- *
942
- * @param n the number of bits in the integer (8, 16, 24, or 32).
943
- *
944
- * @return the integer.
945
- */
946
- util.DataBuffer.prototype.getInt = function(n) {
947
- _checkBitsParam(n);
948
- var rval = 0;
949
- do {
950
- rval = (rval << 8) + this.data.getInt8(this.read++);
951
- n -= 8;
952
- } while (n > 0);
953
- return rval;
954
- };
955
- /**
956
- * Gets a signed n-bit integer from this buffer in big-endian order, using
957
- * two's complement, and advances the read pointer by n/8.
958
- *
959
- * @param n the number of bits in the integer (8, 16, 24, or 32).
960
- *
961
- * @return the integer.
962
- */
963
- util.DataBuffer.prototype.getSignedInt = function(n) {
964
- var x = this.getInt(n);
965
- var max = 2 << n - 2;
966
- if (x >= max) x -= max << 1;
967
- return x;
968
- };
969
- /**
970
- * Reads bytes out as a binary encoded string and clears them from the
971
- * buffer.
972
- *
973
- * @param count the number of bytes to read, undefined or null for all.
974
- *
975
- * @return a binary encoded string of bytes.
976
- */
977
- util.DataBuffer.prototype.getBytes = function(count) {
978
- var rval;
979
- if (count) {
980
- count = Math.min(this.length(), count);
981
- rval = this.data.slice(this.read, this.read + count);
982
- this.read += count;
983
- } else if (count === 0) rval = "";
984
- else {
985
- rval = this.read === 0 ? this.data : this.data.slice(this.read);
986
- this.clear();
987
- }
988
- return rval;
989
- };
990
- /**
991
- * Gets a binary encoded string of the bytes from this buffer without
992
- * modifying the read pointer.
993
- *
994
- * @param count the number of bytes to get, omit to get all.
995
- *
996
- * @return a string full of binary encoded characters.
997
- */
998
- util.DataBuffer.prototype.bytes = function(count) {
999
- return typeof count === "undefined" ? this.data.slice(this.read) : this.data.slice(this.read, this.read + count);
1000
- };
1001
- /**
1002
- * Gets a byte at the given index without modifying the read pointer.
1003
- *
1004
- * @param i the byte index.
1005
- *
1006
- * @return the byte.
1007
- */
1008
- util.DataBuffer.prototype.at = function(i) {
1009
- return this.data.getUint8(this.read + i);
1010
- };
1011
- /**
1012
- * Puts a byte at the given index without modifying the read pointer.
1013
- *
1014
- * @param i the byte index.
1015
- * @param b the byte to put.
1016
- *
1017
- * @return this buffer.
1018
- */
1019
- util.DataBuffer.prototype.setAt = function(i, b) {
1020
- this.data.setUint8(i, b);
1021
- return this;
1022
- };
1023
- /**
1024
- * Gets the last byte without modifying the read pointer.
1025
- *
1026
- * @return the last byte.
1027
- */
1028
- util.DataBuffer.prototype.last = function() {
1029
- return this.data.getUint8(this.write - 1);
1030
- };
1031
- /**
1032
- * Creates a copy of this buffer.
1033
- *
1034
- * @return the copy.
1035
- */
1036
- util.DataBuffer.prototype.copy = function() {
1037
- return new util.DataBuffer(this);
1038
- };
1039
- /**
1040
- * Compacts this buffer.
1041
- *
1042
- * @return this buffer.
1043
- */
1044
- util.DataBuffer.prototype.compact = function() {
1045
- if (this.read > 0) {
1046
- var src = new Uint8Array(this.data.buffer, this.read);
1047
- var dst = new Uint8Array(src.byteLength);
1048
- dst.set(src);
1049
- this.data = new DataView(dst);
1050
- this.write -= this.read;
1051
- this.read = 0;
1052
- }
1053
- return this;
1054
- };
1055
- /**
1056
- * Clears this buffer.
1057
- *
1058
- * @return this buffer.
1059
- */
1060
- util.DataBuffer.prototype.clear = function() {
1061
- this.data = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(0));
1062
- this.read = this.write = 0;
1063
- return this;
1064
- };
1065
- /**
1066
- * Shortens this buffer by triming bytes off of the end of this buffer.
1067
- *
1068
- * @param count the number of bytes to trim off.
1069
- *
1070
- * @return this buffer.
1071
- */
1072
- util.DataBuffer.prototype.truncate = function(count) {
1073
- this.write = Math.max(0, this.length() - count);
1074
- this.read = Math.min(this.read, this.write);
1075
- return this;
1076
- };
1077
- /**
1078
- * Converts this buffer to a hexadecimal string.
1079
- *
1080
- * @return a hexadecimal string.
1081
- */
1082
- util.DataBuffer.prototype.toHex = function() {
1083
- var rval = "";
1084
- for (var i = this.read; i < this.data.byteLength; ++i) {
1085
- var b = this.data.getUint8(i);
1086
- if (b < 16) rval += "0";
1087
- rval += b.toString(16);
1088
- }
1089
- return rval;
1090
- };
1091
- /**
1092
- * Converts this buffer to a string, using the given encoding. If no
1093
- * encoding is given, 'utf8' (UTF-8) is used.
1094
- *
1095
- * @param [encoding] the encoding to use: 'binary', 'utf8', 'utf16', 'hex',
1096
- * 'base64' (default: 'utf8').
1097
- *
1098
- * @return a string representation of the bytes in this buffer.
1099
- */
1100
- util.DataBuffer.prototype.toString = function(encoding) {
1101
- var view = new Uint8Array(this.data, this.read, this.length());
1102
- encoding = encoding || "utf8";
1103
- if (encoding === "binary" || encoding === "raw") return util.binary.raw.encode(view);
1104
- if (encoding === "hex") return util.binary.hex.encode(view);
1105
- if (encoding === "base64") return util.binary.base64.encode(view);
1106
- if (encoding === "utf8") return util.text.utf8.decode(view);
1107
- if (encoding === "utf16") return util.text.utf16.decode(view);
1108
- throw new Error("Invalid encoding: " + encoding);
1109
- };
1110
- /** End Buffer w/UInt8Array backing */
1111
- /**
1112
- * Creates a buffer that stores bytes. A value may be given to populate the
1113
- * buffer with data. This value can either be string of encoded bytes or a
1114
- * regular string of characters. When passing a string of binary encoded
1115
- * bytes, the encoding `raw` should be given. This is also the default. When
1116
- * passing a string of characters, the encoding `utf8` should be given.
1117
- *
1118
- * @param [input] a string with encoded bytes to store in the buffer.
1119
- * @param [encoding] (default: 'raw', other: 'utf8').
1120
- */
1121
- util.createBuffer = function(input, encoding) {
1122
- encoding = encoding || "raw";
1123
- if (input !== void 0 && encoding === "utf8") input = util.encodeUtf8(input);
1124
- return new util.ByteBuffer(input);
1125
- };
1126
- /**
1127
- * Fills a string with a particular value. If you want the string to be a byte
1128
- * string, pass in String.fromCharCode(theByte).
1129
- *
1130
- * @param c the character to fill the string with, use String.fromCharCode
1131
- * to fill the string with a byte value.
1132
- * @param n the number of characters of value c to fill with.
1133
- *
1134
- * @return the filled string.
1135
- */
1136
- util.fillString = function(c, n) {
1137
- var s = "";
1138
- while (n > 0) {
1139
- if (n & 1) s += c;
1140
- n >>>= 1;
1141
- if (n > 0) c += c;
1142
- }
1143
- return s;
1144
- };
1145
- /**
1146
- * Performs a per byte XOR between two byte strings and returns the result as a
1147
- * string of bytes.
1148
- *
1149
- * @param s1 first string of bytes.
1150
- * @param s2 second string of bytes.
1151
- * @param n the number of bytes to XOR.
1152
- *
1153
- * @return the XOR'd result.
1154
- */
1155
- util.xorBytes = function(s1, s2, n) {
1156
- var s3 = "";
1157
- var b = "";
1158
- var t = "";
1159
- var i = 0;
1160
- var c = 0;
1161
- for (; n > 0; --n, ++i) {
1162
- b = s1.charCodeAt(i) ^ s2.charCodeAt(i);
1163
- if (c >= 10) {
1164
- s3 += t;
1165
- t = "";
1166
- c = 0;
1167
- }
1168
- t += String.fromCharCode(b);
1169
- ++c;
1170
- }
1171
- s3 += t;
1172
- return s3;
1173
- };
1174
- /**
1175
- * Converts a hex string into a 'binary' encoded string of bytes.
1176
- *
1177
- * @param hex the hexadecimal string to convert.
1178
- *
1179
- * @return the binary-encoded string of bytes.
1180
- */
1181
- util.hexToBytes = function(hex) {
1182
- var rval = "";
1183
- var i = 0;
1184
- if (hex.length & true) {
1185
- i = 1;
1186
- rval += String.fromCharCode(parseInt(hex[0], 16));
1187
- }
1188
- for (; i < hex.length; i += 2) rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
1189
- return rval;
1190
- };
1191
- /**
1192
- * Converts a 'binary' encoded string of bytes to hex.
1193
- *
1194
- * @param bytes the byte string to convert.
1195
- *
1196
- * @return the string of hexadecimal characters.
1197
- */
1198
- util.bytesToHex = function(bytes) {
1199
- return util.createBuffer(bytes).toHex();
1200
- };
1201
- /**
1202
- * Converts an 32-bit integer to 4-big-endian byte string.
1203
- *
1204
- * @param i the integer.
1205
- *
1206
- * @return the byte string.
1207
- */
1208
- util.int32ToBytes = function(i) {
1209
- return String.fromCharCode(i >> 24 & 255) + String.fromCharCode(i >> 16 & 255) + String.fromCharCode(i >> 8 & 255) + String.fromCharCode(i & 255);
1210
- };
1211
- var _base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
1212
- var _base64Idx = [
1213
- 62,
1214
- -1,
1215
- -1,
1216
- -1,
1217
- 63,
1218
- 52,
1219
- 53,
1220
- 54,
1221
- 55,
1222
- 56,
1223
- 57,
1224
- 58,
1225
- 59,
1226
- 60,
1227
- 61,
1228
- -1,
1229
- -1,
1230
- -1,
1231
- 64,
1232
- -1,
1233
- -1,
1234
- -1,
1235
- 0,
1236
- 1,
1237
- 2,
1238
- 3,
1239
- 4,
1240
- 5,
1241
- 6,
1242
- 7,
1243
- 8,
1244
- 9,
1245
- 10,
1246
- 11,
1247
- 12,
1248
- 13,
1249
- 14,
1250
- 15,
1251
- 16,
1252
- 17,
1253
- 18,
1254
- 19,
1255
- 20,
1256
- 21,
1257
- 22,
1258
- 23,
1259
- 24,
1260
- 25,
1261
- -1,
1262
- -1,
1263
- -1,
1264
- -1,
1265
- -1,
1266
- -1,
1267
- 26,
1268
- 27,
1269
- 28,
1270
- 29,
1271
- 30,
1272
- 31,
1273
- 32,
1274
- 33,
1275
- 34,
1276
- 35,
1277
- 36,
1278
- 37,
1279
- 38,
1280
- 39,
1281
- 40,
1282
- 41,
1283
- 42,
1284
- 43,
1285
- 44,
1286
- 45,
1287
- 46,
1288
- 47,
1289
- 48,
1290
- 49,
1291
- 50,
1292
- 51
1293
- ];
1294
- var _base58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
1295
- /**
1296
- * Base64 encodes a 'binary' encoded string of bytes.
1297
- *
1298
- * @param input the binary encoded string of bytes to base64-encode.
1299
- * @param maxline the maximum number of encoded characters per line to use,
1300
- * defaults to none.
1301
- *
1302
- * @return the base64-encoded output.
1303
- */
1304
- util.encode64 = function(input, maxline) {
1305
- var line = "";
1306
- var output = "";
1307
- var chr1, chr2, chr3;
1308
- var i = 0;
1309
- while (i < input.length) {
1310
- chr1 = input.charCodeAt(i++);
1311
- chr2 = input.charCodeAt(i++);
1312
- chr3 = input.charCodeAt(i++);
1313
- line += _base64.charAt(chr1 >> 2);
1314
- line += _base64.charAt((chr1 & 3) << 4 | chr2 >> 4);
1315
- if (isNaN(chr2)) line += "==";
1316
- else {
1317
- line += _base64.charAt((chr2 & 15) << 2 | chr3 >> 6);
1318
- line += isNaN(chr3) ? "=" : _base64.charAt(chr3 & 63);
1319
- }
1320
- if (maxline && line.length > maxline) {
1321
- output += line.substr(0, maxline) + "\r\n";
1322
- line = line.substr(maxline);
1323
- }
1324
- }
1325
- output += line;
1326
- return output;
1327
- };
1328
- /**
1329
- * Base64 decodes a string into a 'binary' encoded string of bytes.
1330
- *
1331
- * @param input the base64-encoded input.
1332
- *
1333
- * @return the binary encoded string.
1334
- */
1335
- util.decode64 = function(input) {
1336
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
1337
- var output = "";
1338
- var enc1, enc2, enc3, enc4;
1339
- var i = 0;
1340
- while (i < input.length) {
1341
- enc1 = _base64Idx[input.charCodeAt(i++) - 43];
1342
- enc2 = _base64Idx[input.charCodeAt(i++) - 43];
1343
- enc3 = _base64Idx[input.charCodeAt(i++) - 43];
1344
- enc4 = _base64Idx[input.charCodeAt(i++) - 43];
1345
- output += String.fromCharCode(enc1 << 2 | enc2 >> 4);
1346
- if (enc3 !== 64) {
1347
- output += String.fromCharCode((enc2 & 15) << 4 | enc3 >> 2);
1348
- if (enc4 !== 64) output += String.fromCharCode((enc3 & 3) << 6 | enc4);
1349
- }
1350
- }
1351
- return output;
1352
- };
1353
- /**
1354
- * Encodes the given string of characters (a standard JavaScript
1355
- * string) as a binary encoded string where the bytes represent
1356
- * a UTF-8 encoded string of characters. Non-ASCII characters will be
1357
- * encoded as multiple bytes according to UTF-8.
1358
- *
1359
- * @param str a standard string of characters to encode.
1360
- *
1361
- * @return the binary encoded string.
1362
- */
1363
- util.encodeUtf8 = function(str) {
1364
- return unescape(encodeURIComponent(str));
1365
- };
1366
- /**
1367
- * Decodes a binary encoded string that contains bytes that
1368
- * represent a UTF-8 encoded string of characters -- into a
1369
- * string of characters (a standard JavaScript string).
1370
- *
1371
- * @param str the binary encoded string to decode.
1372
- *
1373
- * @return the resulting standard string of characters.
1374
- */
1375
- util.decodeUtf8 = function(str) {
1376
- return decodeURIComponent(escape(str));
1377
- };
1378
- util.binary = {
1379
- raw: {},
1380
- hex: {},
1381
- base64: {},
1382
- base58: {},
1383
- baseN: {
1384
- encode: baseN.encode,
1385
- decode: baseN.decode
1386
- }
1387
- };
1388
- /**
1389
- * Encodes a Uint8Array as a binary-encoded string. This encoding uses
1390
- * a value between 0 and 255 for each character.
1391
- *
1392
- * @param bytes the Uint8Array to encode.
1393
- *
1394
- * @return the binary-encoded string.
1395
- */
1396
- util.binary.raw.encode = function(bytes) {
1397
- return String.fromCharCode.apply(null, bytes);
1398
- };
1399
- /**
1400
- * Decodes a binary-encoded string to a Uint8Array. This encoding uses
1401
- * a value between 0 and 255 for each character.
1402
- *
1403
- * @param str the binary-encoded string to decode.
1404
- * @param [output] an optional Uint8Array to write the output to; if it
1405
- * is too small, an exception will be thrown.
1406
- * @param [offset] the start offset for writing to the output (default: 0).
1407
- *
1408
- * @return the Uint8Array or the number of bytes written if output was given.
1409
- */
1410
- util.binary.raw.decode = function(str, output, offset) {
1411
- var out = output;
1412
- if (!out) out = new Uint8Array(str.length);
1413
- offset = offset || 0;
1414
- var j = offset;
1415
- for (var i = 0; i < str.length; ++i) out[j++] = str.charCodeAt(i);
1416
- return output ? j - offset : out;
1417
- };
1418
- /**
1419
- * Encodes a 'binary' string, ArrayBuffer, DataView, TypedArray, or
1420
- * ByteBuffer as a string of hexadecimal characters.
1421
- *
1422
- * @param bytes the bytes to convert.
1423
- *
1424
- * @return the string of hexadecimal characters.
1425
- */
1426
- util.binary.hex.encode = util.bytesToHex;
1427
- /**
1428
- * Decodes a hex-encoded string to a Uint8Array.
1429
- *
1430
- * @param hex the hexadecimal string to convert.
1431
- * @param [output] an optional Uint8Array to write the output to; if it
1432
- * is too small, an exception will be thrown.
1433
- * @param [offset] the start offset for writing to the output (default: 0).
1434
- *
1435
- * @return the Uint8Array or the number of bytes written if output was given.
1436
- */
1437
- util.binary.hex.decode = function(hex, output, offset) {
1438
- var out = output;
1439
- if (!out) out = new Uint8Array(Math.ceil(hex.length / 2));
1440
- offset = offset || 0;
1441
- var i = 0, j = offset;
1442
- if (hex.length & 1) {
1443
- i = 1;
1444
- out[j++] = parseInt(hex[0], 16);
1445
- }
1446
- for (; i < hex.length; i += 2) out[j++] = parseInt(hex.substr(i, 2), 16);
1447
- return output ? j - offset : out;
1448
- };
1449
- /**
1450
- * Base64-encodes a Uint8Array.
1451
- *
1452
- * @param input the Uint8Array to encode.
1453
- * @param maxline the maximum number of encoded characters per line to use,
1454
- * defaults to none.
1455
- *
1456
- * @return the base64-encoded output string.
1457
- */
1458
- util.binary.base64.encode = function(input, maxline) {
1459
- var line = "";
1460
- var output = "";
1461
- var chr1, chr2, chr3;
1462
- var i = 0;
1463
- while (i < input.byteLength) {
1464
- chr1 = input[i++];
1465
- chr2 = input[i++];
1466
- chr3 = input[i++];
1467
- line += _base64.charAt(chr1 >> 2);
1468
- line += _base64.charAt((chr1 & 3) << 4 | chr2 >> 4);
1469
- if (isNaN(chr2)) line += "==";
1470
- else {
1471
- line += _base64.charAt((chr2 & 15) << 2 | chr3 >> 6);
1472
- line += isNaN(chr3) ? "=" : _base64.charAt(chr3 & 63);
1473
- }
1474
- if (maxline && line.length > maxline) {
1475
- output += line.substr(0, maxline) + "\r\n";
1476
- line = line.substr(maxline);
1477
- }
1478
- }
1479
- output += line;
1480
- return output;
1481
- };
1482
- /**
1483
- * Decodes a base64-encoded string to a Uint8Array.
1484
- *
1485
- * @param input the base64-encoded input string.
1486
- * @param [output] an optional Uint8Array to write the output to; if it
1487
- * is too small, an exception will be thrown.
1488
- * @param [offset] the start offset for writing to the output (default: 0).
1489
- *
1490
- * @return the Uint8Array or the number of bytes written if output was given.
1491
- */
1492
- util.binary.base64.decode = function(input, output, offset) {
1493
- var out = output;
1494
- if (!out) out = new Uint8Array(Math.ceil(input.length / 4) * 3);
1495
- input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
1496
- offset = offset || 0;
1497
- var enc1, enc2, enc3, enc4;
1498
- var i = 0, j = offset;
1499
- while (i < input.length) {
1500
- enc1 = _base64Idx[input.charCodeAt(i++) - 43];
1501
- enc2 = _base64Idx[input.charCodeAt(i++) - 43];
1502
- enc3 = _base64Idx[input.charCodeAt(i++) - 43];
1503
- enc4 = _base64Idx[input.charCodeAt(i++) - 43];
1504
- out[j++] = enc1 << 2 | enc2 >> 4;
1505
- if (enc3 !== 64) {
1506
- out[j++] = (enc2 & 15) << 4 | enc3 >> 2;
1507
- if (enc4 !== 64) out[j++] = (enc3 & 3) << 6 | enc4;
1508
- }
1509
- }
1510
- return output ? j - offset : out.subarray(0, j);
1511
- };
1512
- util.binary.base58.encode = function(input, maxline) {
1513
- return util.binary.baseN.encode(input, _base58, maxline);
1514
- };
1515
- util.binary.base58.decode = function(input, maxline) {
1516
- return util.binary.baseN.decode(input, _base58, maxline);
1517
- };
1518
- util.text = {
1519
- utf8: {},
1520
- utf16: {}
1521
- };
1522
- /**
1523
- * Encodes the given string as UTF-8 in a Uint8Array.
1524
- *
1525
- * @param str the string to encode.
1526
- * @param [output] an optional Uint8Array to write the output to; if it
1527
- * is too small, an exception will be thrown.
1528
- * @param [offset] the start offset for writing to the output (default: 0).
1529
- *
1530
- * @return the Uint8Array or the number of bytes written if output was given.
1531
- */
1532
- util.text.utf8.encode = function(str, output, offset) {
1533
- str = util.encodeUtf8(str);
1534
- var out = output;
1535
- if (!out) out = new Uint8Array(str.length);
1536
- offset = offset || 0;
1537
- var j = offset;
1538
- for (var i = 0; i < str.length; ++i) out[j++] = str.charCodeAt(i);
1539
- return output ? j - offset : out;
1540
- };
1541
- /**
1542
- * Decodes the UTF-8 contents from a Uint8Array.
1543
- *
1544
- * @param bytes the Uint8Array to decode.
1545
- *
1546
- * @return the resulting string.
1547
- */
1548
- util.text.utf8.decode = function(bytes) {
1549
- return util.decodeUtf8(String.fromCharCode.apply(null, bytes));
1550
- };
1551
- /**
1552
- * Encodes the given string as UTF-16 in a Uint8Array.
1553
- *
1554
- * @param str the string to encode.
1555
- * @param [output] an optional Uint8Array to write the output to; if it
1556
- * is too small, an exception will be thrown.
1557
- * @param [offset] the start offset for writing to the output (default: 0).
1558
- *
1559
- * @return the Uint8Array or the number of bytes written if output was given.
1560
- */
1561
- util.text.utf16.encode = function(str, output, offset) {
1562
- var out = output;
1563
- if (!out) out = new Uint8Array(str.length * 2);
1564
- var view = new Uint16Array(out.buffer);
1565
- offset = offset || 0;
1566
- var j = offset;
1567
- var k = offset;
1568
- for (var i = 0; i < str.length; ++i) {
1569
- view[k++] = str.charCodeAt(i);
1570
- j += 2;
1571
- }
1572
- return output ? j - offset : out;
1573
- };
1574
- /**
1575
- * Decodes the UTF-16 contents from a Uint8Array.
1576
- *
1577
- * @param bytes the Uint8Array to decode.
1578
- *
1579
- * @return the resulting string.
1580
- */
1581
- util.text.utf16.decode = function(bytes) {
1582
- return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer));
1583
- };
1584
- /**
1585
- * Deflates the given data using a flash interface.
1586
- *
1587
- * @param api the flash interface.
1588
- * @param bytes the data.
1589
- * @param raw true to return only raw deflate data, false to include zlib
1590
- * header and trailer.
1591
- *
1592
- * @return the deflated data as a string.
1593
- */
1594
- util.deflate = function(api, bytes, raw) {
1595
- bytes = util.decode64(api.deflate(util.encode64(bytes)).rval);
1596
- if (raw) {
1597
- var start = 2;
1598
- if (bytes.charCodeAt(1) & 32) start = 6;
1599
- bytes = bytes.substring(start, bytes.length - 4);
1600
- }
1601
- return bytes;
1602
- };
1603
- /**
1604
- * Inflates the given data using a flash interface.
1605
- *
1606
- * @param api the flash interface.
1607
- * @param bytes the data.
1608
- * @param raw true if the incoming data has no zlib header or trailer and is
1609
- * raw DEFLATE data.
1610
- *
1611
- * @return the inflated data as a string, null on error.
1612
- */
1613
- util.inflate = function(api, bytes, raw) {
1614
- var rval = api.inflate(util.encode64(bytes)).rval;
1615
- return rval === null ? null : util.decode64(rval);
1616
- };
1617
- /**
1618
- * Sets a storage object.
1619
- *
1620
- * @param api the storage interface.
1621
- * @param id the storage ID to use.
1622
- * @param obj the storage object, null to remove.
1623
- */
1624
- var _setStorageObject = function(api, id, obj) {
1625
- if (!api) throw new Error("WebStorage not available.");
1626
- var rval;
1627
- if (obj === null) rval = api.removeItem(id);
1628
- else {
1629
- obj = util.encode64(JSON.stringify(obj));
1630
- rval = api.setItem(id, obj);
1631
- }
1632
- if (typeof rval !== "undefined" && rval.rval !== true) {
1633
- var error = new Error(rval.error.message);
1634
- error.id = rval.error.id;
1635
- error.name = rval.error.name;
1636
- throw error;
1637
- }
1638
- };
1639
- /**
1640
- * Gets a storage object.
1641
- *
1642
- * @param api the storage interface.
1643
- * @param id the storage ID to use.
1644
- *
1645
- * @return the storage object entry or null if none exists.
1646
- */
1647
- var _getStorageObject = function(api, id) {
1648
- if (!api) throw new Error("WebStorage not available.");
1649
- var rval = api.getItem(id);
1650
- if (api.init) if (rval.rval === null) {
1651
- if (rval.error) {
1652
- var error = new Error(rval.error.message);
1653
- error.id = rval.error.id;
1654
- error.name = rval.error.name;
1655
- throw error;
1656
- }
1657
- rval = null;
1658
- } else rval = rval.rval;
1659
- if (rval !== null) rval = JSON.parse(util.decode64(rval));
1660
- return rval;
1661
- };
1662
- /**
1663
- * Stores an item in local storage.
1664
- *
1665
- * @param api the storage interface.
1666
- * @param id the storage ID to use.
1667
- * @param key the key for the item.
1668
- * @param data the data for the item (any javascript object/primitive).
1669
- */
1670
- var _setItem = function(api, id, key, data) {
1671
- var obj = _getStorageObject(api, id);
1672
- if (obj === null) obj = {};
1673
- obj[key] = data;
1674
- _setStorageObject(api, id, obj);
1675
- };
1676
- /**
1677
- * Gets an item from local storage.
1678
- *
1679
- * @param api the storage interface.
1680
- * @param id the storage ID to use.
1681
- * @param key the key for the item.
1682
- *
1683
- * @return the item.
1684
- */
1685
- var _getItem = function(api, id, key) {
1686
- var rval = _getStorageObject(api, id);
1687
- if (rval !== null) rval = key in rval ? rval[key] : null;
1688
- return rval;
1689
- };
1690
- /**
1691
- * Removes an item from local storage.
1692
- *
1693
- * @param api the storage interface.
1694
- * @param id the storage ID to use.
1695
- * @param key the key for the item.
1696
- */
1697
- var _removeItem = function(api, id, key) {
1698
- var obj = _getStorageObject(api, id);
1699
- if (obj !== null && key in obj) {
1700
- delete obj[key];
1701
- var empty = true;
1702
- for (var prop in obj) {
1703
- empty = false;
1704
- break;
1705
- }
1706
- if (empty) obj = null;
1707
- _setStorageObject(api, id, obj);
1708
- }
1709
- };
1710
- /**
1711
- * Clears the local disk storage identified by the given ID.
1712
- *
1713
- * @param api the storage interface.
1714
- * @param id the storage ID to use.
1715
- */
1716
- var _clearItems = function(api, id) {
1717
- _setStorageObject(api, id, null);
1718
- };
1719
- /**
1720
- * Calls a storage function.
1721
- *
1722
- * @param func the function to call.
1723
- * @param args the arguments for the function.
1724
- * @param location the location argument.
1725
- *
1726
- * @return the return value from the function.
1727
- */
1728
- var _callStorageFunction = function(func, args, location) {
1729
- var rval = null;
1730
- if (typeof location === "undefined") location = ["web", "flash"];
1731
- var type;
1732
- var done = false;
1733
- var exception = null;
1734
- for (var idx in location) {
1735
- type = location[idx];
1736
- try {
1737
- if (type === "flash" || type === "both") {
1738
- if (args[0] === null) throw new Error("Flash local storage not available.");
1739
- rval = func.apply(this, args);
1740
- done = type === "flash";
1741
- }
1742
- if (type === "web" || type === "both") {
1743
- args[0] = localStorage;
1744
- rval = func.apply(this, args);
1745
- done = true;
1746
- }
1747
- } catch (ex) {
1748
- exception = ex;
1749
- }
1750
- if (done) break;
1751
- }
1752
- if (!done) throw exception;
1753
- return rval;
1754
- };
1755
- /**
1756
- * Stores an item on local disk.
1757
- *
1758
- * The available types of local storage include 'flash', 'web', and 'both'.
1759
- *
1760
- * The type 'flash' refers to flash local storage (SharedObject). In order
1761
- * to use flash local storage, the 'api' parameter must be valid. The type
1762
- * 'web' refers to WebStorage, if supported by the browser. The type 'both'
1763
- * refers to storing using both 'flash' and 'web', not just one or the
1764
- * other.
1765
- *
1766
- * The location array should list the storage types to use in order of
1767
- * preference:
1768
- *
1769
- * ['flash']: flash only storage
1770
- * ['web']: web only storage
1771
- * ['both']: try to store in both
1772
- * ['flash','web']: store in flash first, but if not available, 'web'
1773
- * ['web','flash']: store in web first, but if not available, 'flash'
1774
- *
1775
- * The location array defaults to: ['web', 'flash']
1776
- *
1777
- * @param api the flash interface, null to use only WebStorage.
1778
- * @param id the storage ID to use.
1779
- * @param key the key for the item.
1780
- * @param data the data for the item (any javascript object/primitive).
1781
- * @param location an array with the preferred types of storage to use.
1782
- */
1783
- util.setItem = function(api, id, key, data, location) {
1784
- _callStorageFunction(_setItem, arguments, location);
1785
- };
1786
- /**
1787
- * Gets an item on local disk.
1788
- *
1789
- * Set setItem() for details on storage types.
1790
- *
1791
- * @param api the flash interface, null to use only WebStorage.
1792
- * @param id the storage ID to use.
1793
- * @param key the key for the item.
1794
- * @param location an array with the preferred types of storage to use.
1795
- *
1796
- * @return the item.
1797
- */
1798
- util.getItem = function(api, id, key, location) {
1799
- return _callStorageFunction(_getItem, arguments, location);
1800
- };
1801
- /**
1802
- * Removes an item on local disk.
1803
- *
1804
- * Set setItem() for details on storage types.
1805
- *
1806
- * @param api the flash interface.
1807
- * @param id the storage ID to use.
1808
- * @param key the key for the item.
1809
- * @param location an array with the preferred types of storage to use.
1810
- */
1811
- util.removeItem = function(api, id, key, location) {
1812
- _callStorageFunction(_removeItem, arguments, location);
1813
- };
1814
- /**
1815
- * Clears the local disk storage identified by the given ID.
1816
- *
1817
- * Set setItem() for details on storage types.
1818
- *
1819
- * @param api the flash interface if flash is available.
1820
- * @param id the storage ID to use.
1821
- * @param location an array with the preferred types of storage to use.
1822
- */
1823
- util.clearItems = function(api, id, location) {
1824
- _callStorageFunction(_clearItems, arguments, location);
1825
- };
1826
- /**
1827
- * Check if an object is empty.
1828
- *
1829
- * Taken from:
1830
- * http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937
1831
- *
1832
- * @param object the object to check.
1833
- */
1834
- util.isEmpty = function(obj) {
1835
- for (var prop in obj) if (obj.hasOwnProperty(prop)) return false;
1836
- return true;
1837
- };
1838
- /**
1839
- * Format with simple printf-style interpolation.
1840
- *
1841
- * %%: literal '%'
1842
- * %s,%o: convert next argument into a string.
1843
- *
1844
- * @param format the string to format.
1845
- * @param ... arguments to interpolate into the format string.
1846
- */
1847
- util.format = function(format) {
1848
- var re = /%./g;
1849
- var match;
1850
- var part;
1851
- var argi = 0;
1852
- var parts = [];
1853
- var last = 0;
1854
- while (match = re.exec(format)) {
1855
- part = format.substring(last, re.lastIndex - 2);
1856
- if (part.length > 0) parts.push(part);
1857
- last = re.lastIndex;
1858
- var code = match[0][1];
1859
- switch (code) {
1860
- case "s":
1861
- case "o":
1862
- if (argi < arguments.length) parts.push(arguments[argi++ + 1]);
1863
- else parts.push("<?>");
1864
- break;
1865
- case "%":
1866
- parts.push("%");
1867
- break;
1868
- default: parts.push("<%" + code + "?>");
1869
- }
1870
- }
1871
- parts.push(format.substring(last));
1872
- return parts.join("");
1873
- };
1874
- /**
1875
- * Formats a number.
1876
- *
1877
- * http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/
1878
- */
1879
- util.formatNumber = function(number, decimals, dec_point, thousands_sep) {
1880
- var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
1881
- var d = dec_point === void 0 ? "," : dec_point;
1882
- var t = thousands_sep === void 0 ? "." : thousands_sep, s = n < 0 ? "-" : "";
1883
- var i = parseInt(n = Math.abs(+n || 0).toFixed(c), 10) + "";
1884
- var j = i.length > 3 ? i.length % 3 : 0;
1885
- return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
1886
- };
1887
- /**
1888
- * Formats a byte size.
1889
- *
1890
- * http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/
1891
- */
1892
- util.formatSize = function(size) {
1893
- if (size >= 1073741824) size = util.formatNumber(size / 1073741824, 2, ".", "") + " GiB";
1894
- else if (size >= 1048576) size = util.formatNumber(size / 1048576, 2, ".", "") + " MiB";
1895
- else if (size >= 1024) size = util.formatNumber(size / 1024, 0) + " KiB";
1896
- else size = util.formatNumber(size, 0) + " bytes";
1897
- return size;
1898
- };
1899
- /**
1900
- * Converts an IPv4 or IPv6 string representation into bytes (in network order).
1901
- *
1902
- * @param ip the IPv4 or IPv6 address to convert.
1903
- *
1904
- * @return the 4-byte IPv6 or 16-byte IPv6 address or null if the address can't
1905
- * be parsed.
1906
- */
1907
- util.bytesFromIP = function(ip) {
1908
- if (ip.indexOf(".") !== -1) return util.bytesFromIPv4(ip);
1909
- if (ip.indexOf(":") !== -1) return util.bytesFromIPv6(ip);
1910
- return null;
1911
- };
1912
- /**
1913
- * Converts an IPv4 string representation into bytes (in network order).
1914
- *
1915
- * @param ip the IPv4 address to convert.
1916
- *
1917
- * @return the 4-byte address or null if the address can't be parsed.
1918
- */
1919
- util.bytesFromIPv4 = function(ip) {
1920
- ip = ip.split(".");
1921
- if (ip.length !== 4) return null;
1922
- var b = util.createBuffer();
1923
- for (var i = 0; i < ip.length; ++i) {
1924
- var num = parseInt(ip[i], 10);
1925
- if (isNaN(num)) return null;
1926
- b.putByte(num);
1927
- }
1928
- return b.getBytes();
1929
- };
1930
- /**
1931
- * Converts an IPv6 string representation into bytes (in network order).
1932
- *
1933
- * @param ip the IPv6 address to convert.
1934
- *
1935
- * @return the 16-byte address or null if the address can't be parsed.
1936
- */
1937
- util.bytesFromIPv6 = function(ip) {
1938
- var blanks = 0;
1939
- ip = ip.split(":").filter(function(e) {
1940
- if (e.length === 0) ++blanks;
1941
- return true;
1942
- });
1943
- var zeros = (8 - ip.length + blanks) * 2;
1944
- var b = util.createBuffer();
1945
- for (var i = 0; i < 8; ++i) {
1946
- if (!ip[i] || ip[i].length === 0) {
1947
- b.fillWithByte(0, zeros);
1948
- zeros = 0;
1949
- continue;
1950
- }
1951
- var bytes = util.hexToBytes(ip[i]);
1952
- if (bytes.length < 2) b.putByte(0);
1953
- b.putBytes(bytes);
1954
- }
1955
- return b.getBytes();
1956
- };
1957
- /**
1958
- * Converts 4-bytes into an IPv4 string representation or 16-bytes into
1959
- * an IPv6 string representation. The bytes must be in network order.
1960
- *
1961
- * @param bytes the bytes to convert.
1962
- *
1963
- * @return the IPv4 or IPv6 string representation if 4 or 16 bytes,
1964
- * respectively, are given, otherwise null.
1965
- */
1966
- util.bytesToIP = function(bytes) {
1967
- if (bytes.length === 4) return util.bytesToIPv4(bytes);
1968
- if (bytes.length === 16) return util.bytesToIPv6(bytes);
1969
- return null;
1970
- };
1971
- /**
1972
- * Converts 4-bytes into an IPv4 string representation. The bytes must be
1973
- * in network order.
1974
- *
1975
- * @param bytes the bytes to convert.
1976
- *
1977
- * @return the IPv4 string representation or null for an invalid # of bytes.
1978
- */
1979
- util.bytesToIPv4 = function(bytes) {
1980
- if (bytes.length !== 4) return null;
1981
- var ip = [];
1982
- for (var i = 0; i < bytes.length; ++i) ip.push(bytes.charCodeAt(i));
1983
- return ip.join(".");
1984
- };
1985
- /**
1986
- * Converts 16-bytes into an IPv16 string representation. The bytes must be
1987
- * in network order.
1988
- *
1989
- * @param bytes the bytes to convert.
1990
- *
1991
- * @return the IPv16 string representation or null for an invalid # of bytes.
1992
- */
1993
- util.bytesToIPv6 = function(bytes) {
1994
- if (bytes.length !== 16) return null;
1995
- var ip = [];
1996
- var zeroGroups = [];
1997
- var zeroMaxGroup = 0;
1998
- for (var i = 0; i < bytes.length; i += 2) {
1999
- var hex = util.bytesToHex(bytes[i] + bytes[i + 1]);
2000
- while (hex[0] === "0" && hex !== "0") hex = hex.substr(1);
2001
- if (hex === "0") {
2002
- var last = zeroGroups[zeroGroups.length - 1];
2003
- var idx = ip.length;
2004
- if (!last || idx !== last.end + 1) zeroGroups.push({
2005
- start: idx,
2006
- end: idx
2007
- });
2008
- else {
2009
- last.end = idx;
2010
- if (last.end - last.start > zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start) zeroMaxGroup = zeroGroups.length - 1;
2011
- }
2012
- }
2013
- ip.push(hex);
2014
- }
2015
- if (zeroGroups.length > 0) {
2016
- var group = zeroGroups[zeroMaxGroup];
2017
- if (group.end - group.start > 0) {
2018
- ip.splice(group.start, group.end - group.start + 1, "");
2019
- if (group.start === 0) ip.unshift("");
2020
- if (group.end === 7) ip.push("");
2021
- }
2022
- }
2023
- return ip.join(":");
2024
- };
2025
- /**
2026
- * Estimates the number of processes that can be run concurrently. If
2027
- * creating Web Workers, keep in mind that the main JavaScript process needs
2028
- * its own core.
2029
- *
2030
- * @param options the options to use:
2031
- * update true to force an update (not use the cached value).
2032
- * @param callback(err, max) called once the operation completes.
2033
- */
2034
- util.estimateCores = function(options, callback) {
2035
- if (typeof options === "function") {
2036
- callback = options;
2037
- options = {};
2038
- }
2039
- options = options || {};
2040
- if ("cores" in util && !options.update) return callback(null, util.cores);
2041
- if (typeof navigator !== "undefined" && "hardwareConcurrency" in navigator && navigator.hardwareConcurrency > 0) {
2042
- util.cores = navigator.hardwareConcurrency;
2043
- return callback(null, util.cores);
2044
- }
2045
- if (typeof Worker === "undefined") {
2046
- util.cores = 1;
2047
- return callback(null, util.cores);
2048
- }
2049
- if (typeof Blob === "undefined") {
2050
- util.cores = 2;
2051
- return callback(null, util.cores);
2052
- }
2053
- var blobUrl = URL.createObjectURL(new Blob([
2054
- "(",
2055
- function() {
2056
- self.addEventListener("message", function(e) {
2057
- var st = Date.now();
2058
- var et = st + 4;
2059
- while (Date.now() < et);
2060
- self.postMessage({
2061
- st,
2062
- et
2063
- });
2064
- });
2065
- }.toString(),
2066
- ")()"
2067
- ], { type: "application/javascript" }));
2068
- sample([], 5, 16);
2069
- function sample(max, samples, numWorkers) {
2070
- if (samples === 0) {
2071
- var avg = Math.floor(max.reduce(function(avg$1, x) {
2072
- return avg$1 + x;
2073
- }, 0) / max.length);
2074
- util.cores = Math.max(1, avg);
2075
- URL.revokeObjectURL(blobUrl);
2076
- return callback(null, util.cores);
2077
- }
2078
- map(numWorkers, function(err, results) {
2079
- max.push(reduce(numWorkers, results));
2080
- sample(max, samples - 1, numWorkers);
2081
- });
2082
- }
2083
- function map(numWorkers, callback$1) {
2084
- var workers = [];
2085
- var results = [];
2086
- for (var i = 0; i < numWorkers; ++i) {
2087
- var worker = new Worker(blobUrl);
2088
- worker.addEventListener("message", function(e) {
2089
- results.push(e.data);
2090
- if (results.length === numWorkers) {
2091
- for (var i$1 = 0; i$1 < numWorkers; ++i$1) workers[i$1].terminate();
2092
- callback$1(null, results);
2093
- }
2094
- });
2095
- workers.push(worker);
2096
- }
2097
- for (var i = 0; i < numWorkers; ++i) workers[i].postMessage(i);
2098
- }
2099
- function reduce(numWorkers, results) {
2100
- var overlaps = [];
2101
- for (var n = 0; n < numWorkers; ++n) {
2102
- var r1 = results[n];
2103
- var overlap = overlaps[n] = [];
2104
- for (var i = 0; i < numWorkers; ++i) {
2105
- if (n === i) continue;
2106
- var r2 = results[i];
2107
- if (r1.st > r2.st && r1.st < r2.et || r2.st > r1.st && r2.st < r1.et) overlap.push(i);
2108
- }
2109
- }
2110
- return overlaps.reduce(function(max, overlap$1) {
2111
- return Math.max(max, overlap$1.length);
2112
- }, 0);
2113
- }
2114
- };
2115
- }) });
2116
-
2117
- //#endregion
2118
- Object.defineProperty(exports, 'default', {
2119
- enumerable: true,
2120
- get: function () {
2121
- return require_util();
2122
- }
2123
- });
2124
- //# sourceMappingURL=util.cjs.map