hunk.code_window:   });
     test("root relative image URLs", async ({ page }) => {
       let app = new PlaywrightFixture(appFixture, page);
       await app.goto("/root-relative-image-urls-test");
       let locator = await page.locator(
         "[data-testid='root-relative-image-urls']"
       );
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:     let imgStatus: number | null = null;
       app.page.on("response", (res) => {
         if (res.url().endsWith(".svg")) imgStatus = res.status();
       });
  
hunk.file_path: integration/css-side-effect-imports-test.ts
hunk.type: add
file: import type { SignFunction, UnsignFunction } from "@remix-run/server-runtime";
  
  const encoder = new TextEncoder();
  
  export const sign: SignFunction = async (value, secret) => {
    let key = await createKey(secret, ["sign"]);
    let data = encoder.encode(value);
    let signature = await crypto.subtle.sign("HMAC", key, data);
    let hash = btoa(String.fromCharCode(...new Uint8Array(signature))).replace(
      /=+$/,
      ""
    );
  
    return value + "." + hash;
  };
  
  export const unsign: UnsignFunction = async (signed, secret) => {
    let index = signed.lastIndexOf(".");
    let value = signed.slice(0, index);
    let hash = signed.slice(index + 1);
  
    let key = await createKey(secret, ["verify"]);
    let data = encoder.encode(value);
    let signature = byteStringToUint8Array(atob(hash));
    let valid = await crypto.subtle.verify("HMAC", key, signature, data);
  
    return valid ? value : false;
  };
  
  async function createKey(
    secret: string,
    usages: CryptoKey["usages"]
  ): Promise<CryptoKey> {
    let key = await crypto.subtle.importKey(
      "raw",
      encoder.encode(secret),
      { name: "HMAC", hash: "SHA-256" },
      false,
      usages
    );
  
    return key;
  }
  
  function byteStringToUint8Array(byteString: string): Uint8Array {
    let array = new Uint8Array(byteString.length);
  
    for (let i = 0; i < byteString.length; i++) {
      array[i] = byteString.charCodeAt(i);
    }
  
    return array;
  }
  