Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1import { DEV } from 'esm-env';2import { set, state } from '../internal/client/reactivity/sources.js';3import { tag } from '../internal/client/dev/tracing.js';4import { get } from '../internal/client/runtime.js';5import { REPLACE, SvelteURLSearchParams } from './url-search-params.js';6 7/** @type {SvelteURL | null} */8let current_url = null;9 10export function get_current_url() {11 // ideally we'd just export `current_url` directly, but it seems Vitest doesn't respect live bindings12 return current_url;13}14 15/**16 * A reactive version of the built-in [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) object.17 * Reading properties of the URL (such as `url.href` or `url.pathname`) in an [effect](https://svelte.dev/docs/svelte/$effect) or [derived](https://svelte.dev/docs/svelte/$derived)18 * will cause it to be re-evaluated as necessary when the URL changes.19 *20 * The `searchParams` property is an instance of [SvelteURLSearchParams](https://svelte.dev/docs/svelte/svelte-reactivity#SvelteURLSearchParams).21 *22 * [Example](https://svelte.dev/playground/5a694758901b448c83dc40dc31c71f2a):23 *24 * ```svelte25 * <script>26 * import { SvelteURL } from 'svelte/reactivity';27 *28 * const url = new SvelteURL('https://example.com/path');29 * </script>30 *31 * <!-- changes to these... -->32 * <input bind:value={url.protocol} />33 * <input bind:value={url.hostname} />34 * <input bind:value={url.pathname} />35 *36 * <hr />37 *38 * <!-- will update `href` and vice versa -->39 * <input bind:value={url.href} size="65" />40 * ```41 */42export class SvelteURL extends URL {43 #protocol = state(super.protocol);44 #username = state(super.username);45 #password = state(super.password);46 #hostname = state(super.hostname);47 #port = state(super.port);48 #pathname = state(super.pathname);49 #hash = state(super.hash);50 #search = state(super.search);51 #searchParams;52 53 /**54 * @param {string | URL} url55 * @param {string | URL} [base]56 */57 constructor(url, base) {58 url = new URL(url, base);59 super(url);60 61 if (DEV) {62 tag(this.#protocol, 'SvelteURL.protocol');63 tag(this.#username, 'SvelteURL.username');64 tag(this.#password, 'SvelteURL.password');65 tag(this.#hostname, 'SvelteURL.hostname');66 tag(this.#port, 'SvelteURL.port');67 tag(this.#pathname, 'SvelteURL.pathname');68 tag(this.#hash, 'SvelteURL.hash');69 tag(this.#search, 'SvelteURL.search');70 }71 72 current_url = this;73 this.#searchParams = new SvelteURLSearchParams(url.searchParams);74 current_url = null;75 }76 77 get hash() {78 return get(this.#hash);79 }80 81 set hash(value) {82 super.hash = value;83 set(this.#hash, super.hash);84 }85 86 get host() {87 get(this.#hostname);88 get(this.#port);89 return super.host;90 }91 92 set host(value) {93 super.host = value;94 set(this.#hostname, super.hostname);95 set(this.#port, super.port);96 }97 98 get hostname() {99 return get(this.#hostname);100 }101 102 set hostname(value) {103 super.hostname = value;104 set(this.#hostname, super.hostname);105 }106 107 get href() {108 get(this.#protocol);109 get(this.#username);110 get(this.#password);111 get(this.#hostname);112 get(this.#port);113 get(this.#pathname);114 get(this.#hash);115 get(this.#search);116 return super.href;117 }118 119 set href(value) {120 super.href = value;121 set(this.#protocol, super.protocol);122 set(this.#username, super.username);123 set(this.#password, super.password);124 set(this.#hostname, super.hostname);125 set(this.#port, super.port);126 set(this.#pathname, super.pathname);127 set(this.#hash, super.hash);128 set(this.#search, super.search);129 this.#searchParams[REPLACE](super.searchParams);130 }131 132 get password() {133 return get(this.#password);134 }135 136 set password(value) {137 super.password = value;138 set(this.#password, super.password);139 }140 141 get pathname() {142 return get(this.#pathname);143 }144 145 set pathname(value) {146 super.pathname = value;147 set(this.#pathname, super.pathname);148 }149 150 get port() {151 return get(this.#port);152 }153 154 set port(value) {155 super.port = value;156 set(this.#port, super.port);157 }158 159 get protocol() {160 return get(this.#protocol);161 }162 163 set protocol(value) {164 super.protocol = value;165 set(this.#protocol, super.protocol);166 }167 168 get search() {169 return get(this.#search);170 }171 172 set search(value) {173 super.search = value;174 set(this.#search, super.search);175 this.#searchParams[REPLACE](super.searchParams);176 }177 178 get username() {179 return get(this.#username);180 }181 182 set username(value) {183 super.username = value;184 set(this.#username, super.username);185 }186 187 get origin() {188 get(this.#protocol);189 get(this.#hostname);190 get(this.#port);191 return super.origin;192 }193 194 get searchParams() {195 return this.#searchParams;196 }197 198 toString() {199 return this.href;200 }201 202 toJSON() {203 return this.href;204 }205}206 