1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2397],{22397:function(n,e,t){t.r(e),t.d(e,{Tiktoken:function(){return r.Tiktoken},__wbg_parse_3ac95b51fc312db8:function(){return r.__wbg_parse_3ac95b51fc312db8},__wbg_set_wasm:function(){return r.__wbg_set_wasm},__wbg_stringify_029a979dfb73aa17:function(){return r.__wbg_stringify_029a979dfb73aa17},__wbindgen_error_new:function(){return r.__wbindgen_error_new},__wbindgen_is_undefined:function(){return r.__wbindgen_is_undefined},__wbindgen_object_drop_ref:function(){return r.__wbindgen_object_drop_ref},__wbindgen_string_get:function(){return r.__wbindgen_string_get},__wbindgen_throw:function(){return r.__wbindgen_throw},encoding_for_model:function(){return r.encoding_for_model},get_encoding:function(){return r.get_encoding},init:function(){return i}});var r=t(31367);let _=!1;async function i(n){if(_)return r;let e=await n({"./tiktoken_bg.js":r}),t="instance"in e&&e.instance instanceof WebAssembly.Instance?e.instance:e instanceof WebAssembly.Instance?e:null;if(null==t)throw Error("Missing instance");return r.__wbg_set_wasm(t.exports),_=!0,r}},31367:function(n,e,t){let r;function _(n){r=n}t.r(e),t.d(e,{Tiktoken:function(){return q},__wbg_parse_3ac95b51fc312db8:function(){return j},__wbg_set_wasm:function(){return _},__wbg_stringify_029a979dfb73aa17:function(){return W},__wbindgen_error_new:function(){return T},__wbindgen_is_undefined:function(){return S},__wbindgen_object_drop_ref:function(){return M},__wbindgen_string_get:function(){return z},__wbindgen_throw:function(){return I},encoding_for_model:function(){return A},get_encoding:function(){return m}}),n=t.hmd(n);let i=Array(128).fill(void 0);i.push(void 0,null,!0,!1);let o=i.length;function d(n){let e=i[n];return n<132||(i[n]=o,o=n),e}let u=0,a=null;function l(){return(null===a||0===a.byteLength)&&(a=new Uint8Array(r.memory.buffer)),a}let b=new("undefined"==typeof TextEncoder?(0,n.require)("util").TextEncoder:TextEncoder)("utf-8"),c="function"==typeof b.encodeInto?function(n,e){return b.encodeInto(n,e)}:function(n,e){let t=b.encode(n);return e.set(t),{read:n.length,written:t.length}};function f(n,e,t){if(void 0===t){let t=b.encode(n),r=e(t.length);return l().subarray(r,r+t.length).set(t),u=t.length,r}let r=n.length,_=e(r),i=l(),o=0;for(;o<r;o++){let e=n.charCodeAt(o);if(e>127)break;i[_+o]=e}if(o!==r){0!==o&&(n=n.slice(o)),_=t(_,r,r=o+3*n.length);let e=c(n,l().subarray(_+o,_+r));o+=e.written}return u=o,_}let s=null;function g(){return(null===s||0===s.byteLength)&&(s=new Int32Array(r.memory.buffer)),s}let w=new("undefined"==typeof TextDecoder?(0,n.require)("util").TextDecoder:TextDecoder)("utf-8",{ignoreBOM:!0,fatal:!0});function p(n,e){return w.decode(l().subarray(n,n+e))}function k(n){o===i.length&&i.push(i.length+1);let e=o;return o=i[e],i[e]=n,e}w.decode();let y=null;function h(){return(null===y||0===y.byteLength)&&(y=new Uint32Array(r.memory.buffer)),y}function x(n,e){return h().subarray(n/4,n/4+e)}function E(n,e){return l().subarray(n/1,n/1+e)}function m(n,e){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let i=r.__wbindgen_add_to_stack_pointer(-16),o=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),a=u;r.get_encoding(i,o,a,k(e));var t=g()[i/4+0],_=g()[i/4+1];if(g()[i/4+2])throw d(_);return q.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}function A(n,e){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let i=r.__wbindgen_add_to_stack_pointer(-16),o=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),a=u;r.encoding_for_model(i,o,a,k(e));var t=g()[i/4+0],_=g()[i/4+1];if(g()[i/4+2])throw d(_);return q.__wrap(t)}finally{r.__wbindgen_add_to_stack_pointer(16)}}function v(n,e){try{return n.apply(this,e)}catch(n){r.__wbindgen_export_3(k(n))}}class q{static __wrap(n){let e=Object.create(q.prototype);return e.ptr=n,e}__destroy_into_raw(){let n=this.ptr;return this.ptr=0,n}free(){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");let n=this.__destroy_into_raw();r.__wbg_tiktoken_free(n)}constructor(n,e,t){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");let _=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),i=u,o=f(t,r.__wbindgen_export_0,r.__wbindgen_export_1),d=u,a=r.tiktoken_new(_,i,k(e),o,d);return q.__wrap(a)}get name(){try{let t;let _=r.__wbindgen_add_to_stack_pointer(-16);r.tiktoken_name(_,this.ptr);var n=g()[_/4+0],e=g()[_/4+1];return 0!==n&&(t=p(n,e).slice(),r.__wbindgen_export_2(n,1*e)),t}finally{r.__wbindgen_add_to_stack_pointer(16)}}encode(n,e,t){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let l=r.__wbindgen_add_to_stack_pointer(-16),b=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),c=u;r.tiktoken_encode(l,this.ptr,b,c,k(e),k(t));var _=g()[l/4+0],i=g()[l/4+1],o=g()[l/4+2];if(g()[l/4+3])throw d(o);var a=x(_,i).slice();return r.__wbindgen_export_2(_,4*i),a}finally{r.__wbindgen_add_to_stack_pointer(16)}}encode_ordinary(n){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let i=r.__wbindgen_add_to_stack_pointer(-16),o=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),d=u;r.tiktoken_encode_ordinary(i,this.ptr,o,d);var e=g()[i/4+0],t=g()[i/4+1],_=x(e,t).slice();return r.__wbindgen_export_2(e,4*t),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}encode_with_unstable(n,e,t){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let o=r.__wbindgen_add_to_stack_pointer(-16),a=f(n,r.__wbindgen_export_0,r.__wbindgen_export_1),l=u;r.tiktoken_encode_with_unstable(o,this.ptr,a,l,k(e),k(t));var _=g()[o/4+0],i=g()[o/4+1];if(g()[o/4+2])throw d(i);return d(_)}finally{r.__wbindgen_add_to_stack_pointer(16)}}
1encode_single_token(n){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");let e=function(n,e){let t=e(1*n.length);return l().set(n,t/1),u=n.length,t}(n,r.__wbindgen_export_0),t=u;return r.tiktoken_encode_single_token(this.ptr,e,t)>>>0}decode(n){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let i=r.__wbindgen_add_to_stack_pointer(-16),o=function(n,e){let t=e(4*n.length);return h().set(n,t/4),u=n.length,t}(n,r.__wbindgen_export_0),d=u;r.tiktoken_decode(i,this.ptr,o,d);var e=g()[i/4+0],t=g()[i/4+1],_=E(e,t).slice();return r.__wbindgen_export_2(e,1*t),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}decode_single_token_bytes(n){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");try{let i=r.__wbindgen_add_to_stack_pointer(-16);r.tiktoken_decode_single_token_bytes(i,this.ptr,n);var e=g()[i/4+0],t=g()[i/4+1],_=E(e,t).slice();return r.__wbindgen_export_2(e,1*t),_}finally{r.__wbindgen_add_to_stack_pointer(16)}}token_byte_values(){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");return d(r.tiktoken_token_byte_values(this.ptr))}}function M(n){d(n)}function S(n){return void 0===i[n]}function W(){return v(function(n){return k(JSON.stringify(i[n]))},arguments)}function z(n,e){if(null==r)throw Error("@dqbd/tiktoken: WASM binary has not been propery initialized.");let t=i[e],_="string"==typeof t?t:void 0;var o=null==_?0:f(_,r.__wbindgen_export_0,r.__wbindgen_export_1),d=u;g()[n/4+1]=d,g()[n/4+0]=o}function T(n,e){return k(Error(p(n,e)))}function j(){return v(function(n,e){return k(JSON.parse(p(n,e)))},arguments)}function I(n,e){throw Error(p(n,e))}}}]); 2//# sourceMappingURL=2397.07db33b63b6aa33f.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.