{"version":3,"file":"adapter.cjs","sources":["../../../../../src/mods/base64/adapter.ts"],"sourcesContent":["import { Nullable, Option, Some } from \"@hazae41/option\"\nimport { BytesOrCopiable, Copiable } from \"libs/copiable/index.js\"\nimport { fromBuffer } from \"./buffer.js\"\n\nlet global: Option<Adapter> = new Some(fromBuffer())\n\nexport function get() {\n  return global\n}\n\nexport function set(value: Nullable<Adapter>) {\n  global = Option.wrap(value)\n}\n\nexport interface Adapter {\n  encodePaddedOrThrow(bytes: BytesOrCopiable): string\n  decodePaddedOrThrow(text: string): Copiable\n\n  encodeUnpaddedOrThrow(bytes: BytesOrCopiable): string\n  decodeUnpaddedOrThrow(text: string): Copiable\n}\n\n"],"names":["Some","fromBuffer","Option"],"mappings":";;;;;AAIA,IAAI,MAAM,GAAoB,IAAIA,WAAI,CAACC,iBAAU,EAAE,CAAC;SAEpC,GAAG,GAAA;AACjB,IAAA,OAAO,MAAM;AACf;AAEM,SAAU,GAAG,CAAC,KAAwB,EAAA;AAC1C,IAAA,MAAM,GAAGC,aAAM,CAAC,IAAI,CAAC,KAAK,CAAC;AAC7B;;;;;"}