(s)
| 44191 | return String(s).replace(/~/g, '~0').replace(/\//g, '~1') |
| 44192 | } |
| 44193 | const Up = class JSONPointerCompileError extends Ip {}, |
| 44194 | es_compile = (s) => { |
| 44195 | if (!Array.isArray(s)) |
| 44196 | throw new TypeError('Reference tokens must be a list of strings or numbers') |
| 44197 | try { |
| 44198 | return 0 === s.length |
| 44199 | ? '' |
| 44200 | : `/${s |
| 44201 | .map((s) => { |
| 44202 | if ('string' != typeof s && 'number' != typeof s) |
| 44203 | throw new TypeError('Reference token must be a string or number') |
| 44204 | return es_escape(String(s)) |
| 44205 | }) |
| 44206 | .join('/')}` |
| 44207 | } catch (o) { |
| 44208 | throw new Up('Unexpected error during JSON Pointer compilation', { |
| 44209 | cause: o, |
| 44210 | referenceTokens: s, |
| 44211 | }) |
| 44212 | } |
| 44213 | } |
| 44214 | const Vp = class TraceBuilder { |
| 44215 | #e |
no test coverage detected