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
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7 for (var name in all)8 __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11 if (from && typeof from === "object" || typeof from === "function") {12 for (let key of __getOwnPropNames(from))13 if (!__hasOwnProp.call(to, key) && key !== except)14 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15 }16 return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var cookieStore_exports = {};20__export(cookieStore_exports, {21 Cookie: () => Cookie,22 CookieStore: () => CookieStore,23 domainMatches: () => domainMatches,24 parseRawCookie: () => parseRawCookie25});26module.exports = __toCommonJS(cookieStore_exports);27var import_network = require("./network");28class Cookie {29 constructor(data) {30 this._raw = data;31 }32 name() {33 return this._raw.name;34 }35 // https://datatracker.ietf.org/doc/html/rfc6265#section-5.436 matches(url) {37 if (this._raw.secure && (url.protocol !== "https:" && !(0, import_network.isLocalHostname)(url.hostname)))38 return false;39 if (!domainMatches(url.hostname, this._raw.domain))40 return false;41 if (!pathMatches(url.pathname, this._raw.path))42 return false;43 return true;44 }45 equals(other) {46 return this._raw.name === other._raw.name && this._raw.domain === other._raw.domain && this._raw.path === other._raw.path;47 }48 networkCookie() {49 return this._raw;50 }51 updateExpiresFrom(other) {52 this._raw.expires = other._raw.expires;53 }54 expired() {55 if (this._raw.expires === -1)56 return false;57 return this._raw.expires * 1e3 < Date.now();58 }59}60class CookieStore {61 constructor() {62 this._nameToCookies = /* @__PURE__ */ new Map();63 }64 addCookies(cookies) {65 for (const cookie of cookies)66 this._addCookie(new Cookie(cookie));67 }68 cookies(url) {69 const result = [];70 for (const cookie of this._cookiesIterator()) {71 if (cookie.matches(url))72 result.push(cookie.networkCookie());73 }74 return result;75 }76 allCookies() {77 const result = [];78 for (const cookie of this._cookiesIterator())79 result.push(cookie.networkCookie());80 return result;81 }82 _addCookie(cookie) {83 let set = this._nameToCookies.get(cookie.name());84 if (!set) {85 set = /* @__PURE__ */ new Set();86 this._nameToCookies.set(cookie.name(), set);87 }88 for (const other of set) {89 if (other.equals(cookie))90 set.delete(other);91 }92 set.add(cookie);93 CookieStore.pruneExpired(set);94 }95 *_cookiesIterator() {96 for (const [name, cookies] of this._nameToCookies) {97 CookieStore.pruneExpired(cookies);98 for (const cookie of cookies)99 yield cookie;100 if (cookies.size === 0)101 this._nameToCookies.delete(name);102 }103 }104 static pruneExpired(cookies) {105 for (const cookie of cookies) {106 if (cookie.expired())107 cookies.delete(cookie);108 }109 }110}111function parseRawCookie(header) {112 const pairs = header.split(";").filter((s) => s.trim().length > 0).map((p) => {113 let key = "";114 let value2 = "";115 const separatorPos = p.indexOf("=");116 if (separatorPos === -1) {117 key = p.trim();118 } else {119 key = p.slice(0, separatorPos).trim();120 value2 = p.slice(separatorPos + 1).trim();121 }122 return [key, value2];123 });124 if (!pairs.length)125 return null;126 const [name, value] = pairs[0];127 const cookie = {128 name,129 value130 };131 for (let i = 1; i < pairs.length; i++) {132 const [name2, value2] = pairs[i];133 switch (name2.toLowerCase()) {134 case "expires":135 const expiresMs = +new Date(value2);136 if (isFinite(expiresMs)) {137 if (expiresMs <= 0)138 cookie.expires = 0;139 else140 cookie.expires = Math.min(expiresMs / 1e3, import_network.kMaxCookieExpiresDateInSeconds);141 }142 break;143 case "max-age":144 const maxAgeSec = parseInt(value2, 10);145 if (isFinite(maxAgeSec)) {146 if (maxAgeSec <= 0)147 cookie.expires = 0;148 else149 cookie.expires = Math.min(Date.now() / 1e3 + maxAgeSec, import_network.kMaxCookieExpiresDateInSeconds);150 }151 break;152 case "domain":153 cookie.domain = value2.toLocaleLowerCase() || "";154 if (cookie.domain && !cookie.domain.startsWith(".") && cookie.domain.includes("."))155 cookie.domain = "." + cookie.domain;156 break;157 case "path":158 cookie.path = value2 || "";159 break;160 case "secure":161 cookie.secure = true;162 break;163 case "httponly":164 cookie.httpOnly = true;165 break;166 case "samesite":167 switch (value2.toLowerCase()) {168 case "none":169 cookie.sameSite = "None";170 break;171 case "lax":172 cookie.sameSite = "Lax";173 break;174 case "strict":175 cookie.sameSite = "Strict";176 break;177 }178 break;179 }180 }181 return cookie;182}183function domainMatches(value, domain) {184 if (value === domain)185 return true;186 if (!domain.startsWith("."))187 return false;188 value = "." + value;189 return value.endsWith(domain);190}191function pathMatches(value, path) {192 if (value === path)193 return true;194 if (!value.endsWith("/"))195 value = value + "/";196 if (!path.endsWith("/"))197 path = path + "/";198 return value.startsWith(path);199}200// Annotate the CommonJS export names for ESM import in node:2010 && (module.exports = {202 Cookie,203 CookieStore,204 domainMatches,205 parseRawCookie206});207 