/// A generator for a hello world command-line application.
class ConsoleGenerator extends DefaultGenerator {
  ConsoleGenerator()
      : super(
          'console',
          'Console Application',
          'A command-line application.',
          alternateId: 'console-full',
          categories: const ['dart', 'console'],
        ) {
    addFile('.gitignore', common.gitignore);
    addFile('analysis_options.yaml', common.analysisOptions);
    addFile('CHANGELOG.md', common.changelog);
    addFile('pubspec.yaml', _pubspec);
    addFile('README.md', _readme);
    setEntrypoint(
      addFile('bin/__projectName__.dart', _mainDart),
    );
    addFile('lib/__projectName__.dart', _libDart);
    addFile('test/__projectName___test.dart', _testDart);
  }

  @override
  String getInstallInstructions(
    String directory, {
    String? scriptPath,
  }) =>
      super.getInstallInstructions(directory);
}

final String _pubspec = '''
name: __projectName__
description: A sample command-line application.
version: 1.0.0
# repository: https://github.com/my_org/my_repo

environment:
  ${common.sdkConstraint}

# Add regular dependencies here.
dependencies:
  path: ^1.9.0

dev_dependencies:
  lints: ^6.0.0
  test: ^1.25.6
''';

final String _readme = '''
A sample command-line application with an entrypoint in `bin/`, library code
in `lib/`, and example unit test in `test/`.
''';

final String _mainDart = r'''
import 'package:__projectName__/__projectName__.dart' as __projectName__;

void main(List<String> arguments) {
  print('Hello world: ${__projectName__.calculate()}!');
}
''';

final String _libDart = '''
int calculate() {
  return 6 * 7;
}
''';

final String _testDart = '''
import 'package:__projectName__/__projectName__.dart';
import 'package:test/test.dart';

void main() {
  test('calculate', () {
    expect(calculate(), 42);
  });
}
''';
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import '../sdk.dart';

String get sdkConstraint => 'sdk: ^${sdk.version}';

const String gitignore = '''
# https://dart.dev/guides/libraries/private-files
# Created by `dart pub`
.dart_tool/
''';

const String analysisOptions = '''
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the 'recommended' set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# 'package:lints/core.yaml'. These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.

include: package:lints/recommended.yaml

# Uncomment the following section to specify additional rules.

# linter:
#   rules:
#     - camel_case_types

# analyzer:
#   exclude:
#     - path/to/excluded/files/**

# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints

# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options
''';

const String ch


    }

    override fun popScissor() {
        flush()
        if (curScissor <= 4) {
            curScissor = 0
            glDisable(GL_SCISSOR_TEST)
            return
        }
        curScissor -= 4
        val x = scissorStack[curScissor - 4]
        val y = scissorStack[curScissor - 3]
        val width = scissorStack[curScissor - 2]
        val height = scissorStack[curScissor - 1]
        glEnable(GL_SCISSOR_TEST)
        glScissor(x, y, width, height)
    }

    override fun globalAlpha(alpha: Float) {
        alphaCap = alpha
    }

    override fun resetGlobalAlpha() = globalAlpha(1f)

    override fun transformsWithPoint() = false

    override fun push() {
        if (transform.isIdentity()) return
        transformStack.add(transform.copyOf())
    }

    override fun pop() {
        val prevProg = glGetInteger(GL_CURRENT_PROGRAM)
        if (popFlushNeeded) {
            glUseProgram(program)
            transformBuffer.clear()
            transformBuffer.put(transform).flip()
            glUniformMatrix3fv(uTransform, false, transformBuffer)
            glUseProgram(prevProg)
            flush()
            popFlushNeeded = false
        }
        if (transform.isIdentity()) return
        if (transformStack.isEmpty()) {
            loadIdentity()
        } else transform = transformStack.removeLast()
        glUseProgram(program)
        glUniformMatrix3fv(uTransform, false, transformBuffer)
        glUseProgram(prevProg)
    }

    override fun translate(x: Float, y: Float) {
        flush()
        transform[6] += transform[0] * x + transform[3] * y
        transform[7] += transform[1] * x + transform[4] * y
        popFlushNeeded = true
    }

    override fun scale(sx: Float, sy: Float, px: Float, py: Float) {
        flush()
        transform[0] *= sx; transform[1] *= sx
        transform[3] *= sy; transform[4] *= sy
        popFlushNeeded = true
    }

    override fun rotate(angleRadians: Double, px: Float, py: Float) {
        flush()
        val c = cos(angleRadians).toFloat()
        val s = sin(angleRadians).toFloat()
        val a00 = transform[0]
        val a01 = transform[1]
        val a10 = transform[3]
        val a11 = transform[4]
        transform[0] = a00 * c + a10 * s
        transform[1] = a01 * c + a11 * s
        transform[3] = a00 * -s + a10 * c
        transform[4] = a01 * -s + a11 * c
        popFlushNeeded = true
    }

    override fun skewX(angleRadians: Double, px: Float, py: Float) {
        flush()
        val t = tan(angleRadians).toFloat()
        val a00 = transform[0]
        val a01 = transform[1]
        val a10 = transform[3]
        val a11 = transform[4]
        transform[0] = a00 + a10 * t
        transform[1] = a01 + a11 * t
        popFlushNeeded = true

    }

    override fun skewY(angleRadians: Double, px: Float, py: Float) {
        flush()
        val t = tan(angleRadians).toFloat()
        val a00 = transform[0]
        val a01 = transform[1]
        val a10 = transform[3]
        val a11 = transform[4]
        transfo


 (std::isinf(x) && std::isinf(y)) {
    EXPECT_EQ(std::signbit(x), std::signbit(y));
    return true;
  }

  if (std::isnan(x) && std::isnan(y)) {
    return true;
  }

  double absolute_difference = fabs(x - y);
  double relative_difference;
  if (std::fpclassify(x) == FP_ZERO || std::fpclassify(y) == FP_ZERO) {
    // If x or y is exactly zero, then relative difference doesn't have any
    // meaning. Take the absolute difference instead.
    relative_difference = absolute_difference;
  } else {
    relative_difference =
        absolute_difference / std::max(std::fabs(x), std::fabs(y));
  }
  if (relative_difference > max_abs_relative_difference) {
    VLOG(1) << absl::StrFormat("x=%17g y=%17g abs=%17g rel=%17g",
                               x,
                               y,
                               absolute_difference,
                               relative_difference);
  }

  EXPECT_NEAR(relative_difference, 0.0, max_abs_relative_difference);
  return relative_difference <= max_abs_relative_difference;
}

void ExpectArraysCloseUptoScale(int n,
                                const double* p,
                                const double* q,
                                double tol) {
  CHECK_GT(n, 0);
  CHECK(p);
  CHECK(q);

  double p_max = 0;
  double q_max = 0;
  int p_i = 0;
  int q_i = 0;

  for (int i = 0; i < n; ++i) {
    if (std::abs(p[i]) > p_max) {
      p_max = std::abs(p[i]);
      p_i = i;
    }
    if (std::abs(q[i]) > q_max) {
      q_max = std::abs(q[i]);
      q_i = i;
    }
  }

  // If both arrays are all zeros, they are equal up to scale, but
  // for testing purposes, that's more likely to be an error than
  // a desired result.
  CHECK_NE(p_max, 0.0);
  CHECK_NE(q_max, 0.0);

  for (int i = 0; i < n; ++i) {
    double p_norm = p[i] / p[p_i];
    double q_norm = q[i] / q[q_i];

    EXPECT_NEAR(p_norm, q_norm, tol) << "i=" << i;
  }
}

void ExpectArraysClose(int n, const double* p, const double* q, double tol) {
  CHECK_GT(n, 0);
  CHECK(p);
  CHECK(q);

  for (int i = 0; i < n; ++i) {
    EXPECT_TRUE(ExpectClose(p[i], q[i], tol)) << "p[" << i << "]" << p[i] << " "
                                              << "q[" << i << "]" << q[i] << " "
                                              << "tol: " << tol;
  }
}

std::string TestFileAbsolutePath(const std::string& filename) {
  return JoinPath(::testing::SrcDir() + CERES_TEST_SRCDIR_SUFFIX, filename);
}

std::string ToString(const Solver::Options& options) {
  return absl::StrFormat(
      "(%s, %s, %s, %s, %d)",
      LinearSolverTypeToString(options.linear_solver_type),
      SparseLinearAlgebraLibraryTypeToString(
          options.sparse_linear_algebra_library_type),
      options.linear_solver_ordering ? "USER" : "AUTOMATIC",
      PreconditionerTypeToString(options.preconditioner_type),
      options.num_threads);
}

}  // namespace internal
}  // namespace ceres
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2023 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
//   this list of conditions and the following


езидентными антивирусными программами, следящими за записью в программные файлы, поскольку вирус передает  управление непосредственно  в BIOS,  обходя сторожей. С версии TP-33  вирусы принимают  меры защиты от трассировки. В предыдущей главе описан  нерезидентный вирус E-1961, называемый Scan "Yankee Doodle Short", однако  с данной группой его объединяет только общность играемой мелодии.

Для данного  семейства вирусов просматривается прямая аналогия с описанной выше  игрой Animal,  хотя конструктивная цель в данном случае отсутствует. Номер версии вируса используется данным вирусом для идентификации себя  в оперативной памяти и возвращается резидентными частями вируса при  выполнении функции  С500h прерывания  21h для версий 19h, 21h, 22h или функции C600h для версий 26h, 29h, 2Сh. При этом, если запускать поочередно файлы,  зараженные вирусами разных версий в порядке возрастания версий,  то в  оперативной памяти будет создана как бы цепочка резидентных вирусов, причем при запуске незараженной программы она будет инфицирована версией вируса с наибольшим номером. Если же начать загружать зараженные программы в порядке убывания версии вируса, то версии с меньшими номерами  не будут  становиться резидентными.  Используя эту  идею, В.В.Пономаренко создал  резидентную поливакцину NeatVac (см. Софтпанорама, т.2, No. 7), позволяющую блокировать заражение оперативной памяти данным вирусом.

Кроме того,  и это существенно усиливает аналогию с игрой Animal, резидентный вирус,  входящий в  подгруппу самоедов,  при попытке заражения некоторой программы  не только  контролирует, заражена уже эта программа или нет, но и определяет номер версии, если программа уже заражена одним из вирусов  данной группы.  Дальнейшие действия  вируса зависят от того, больше этот номер версии его собственного номера или нет. Если программа заражена вирусом с меньшим номером, то вирус заменит


-- The embedding runs in the cloud. All your data from the folder '{0}' and all its subdirectories will be sent to the cloud.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALDIRECTORYINFODIALOG::T443873444"] = "The embedding runs in the cloud. All your data from the folder '{0}' and all its subdirectories will be sent to the cloud."

-- The directory chosen for the data source exists.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALDIRECTORYINFODIALOG::T445858624"] = "The directory chosen for the data source exists."

-- Select a file for this data source. The content of this file will be processed for the data source.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T1190880267"] = "Select a file for this data source. The content of this file will be processed for the data source."

-- How many matches do you want at most per query?
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T1827669611"] = "How many matches do you want at most per query?"

-- Update
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T1847791252"] = "Update"

-- Please note: the embedding you selected runs in the cloud. All your data will be sent to the cloud. Please confirm that you have read and understood this.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T1922618794"] = "Please note: the embedding you selected runs in the cloud. All your data will be sent to the cloud. Please confirm that you have read and understood this."

-- In order for the AI to be able to determine the appropriate data at any time, you must choose an embedding method.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T1948697886"] = "In order for the AI to be able to determine the appropriate data at any time, you must choose an embedding method."

-- Please note: the embedding you selected runs in the cloud. All your data within the file '{0}' will be sent to the cloud. Please confirm that you have read and understood this.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T2090178026"] = "Please note: the embedding you selected runs in the cloud. All your data within the file '{0}' will be sent to the cloud. Please confirm that you have read and understood this."

-- Add
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T2646845972"] = "Add"

-- The embedding you selected runs locally or in your organization. Your data is not sent to the cloud.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T2814869210"] = "The embedding you selected runs locally or in your organization. Your data is not sent to the cloud."

-- Embedding
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T2838542994"] = "Embedding"

-- For some data types, such as Office files, MindWork AI Studio requires the open-source application Pandoc.
UI_TEXT_CONTENT["AISTUDIO::DIALOGS::DATASOURCELOCALFILEDIALOG::T3359366900"] = "For some data types, such as Office files, MindWork AI Studio requires the open-source application Pa


_we}, dense_ta)[1]
    local out_de = o2d_in:backward(grid_in, out_de)

    out_oc = out_oc:float()
    out_de = out_de:float()
    mytester:assert(out_oc:equals(out_de, 1e-4, true), 'error in test_weights backward')
  end

  local ocrand = test_utils.octree_rand

  test_weights(ocrand(1, 1,1,1, 1, 0,0,0), ocrand(1, 1,1,1, 1, 0,0,0))
  test_weights(ocrand(1, 1,1,1, 1, 0,0,0), ocrand(1, 1,1,1, 1, 1,1,1))
  test_weights(ocrand(1, 1,1,1, 1, 1,1,1), ocrand(1, 1,1,1, 1, 0,0,0))
  test_weights(ocrand(1, 1,1,1, 1, 0.5,0.5,0.5), ocrand(1, 1,1,1, 1, 0.5,0.5,0.5))
  test_weights(ocrand(1, 1,1,1, 3, 0.5,0.5,0.5), ocrand(1, 1,1,1, 3, 0.5,0.5,0.5))
  test_weights(ocrand(1, 2,3,4, 3, 0.5,0.5,0.5), ocrand(1, 2,3,4, 3, 0.5,0.5,0.5))
  test_weights(ocrand(3, 2,3,4, 3, 0.5,0.5,0.5), ocrand(3, 2,3,4, 3, 0.5,0.5,0.5))

  for _, weights in ipairs{false, true} do
  for _, n in ipairs{1, 4} do
    test_grid_grid(ocrand(n, 1,1,1, 1, 0,0,0))
    test_grid_grid(ocrand(n, 1,1,1, 1, 1,1,1))
    test_grid_grid(ocrand(n, 2,2,2, 2, 0,0,0))
    test_grid_grid(ocrand(n, 2,2,2, 2, 1,0,0))
    test_grid_grid(ocrand(n, 2,2,2, 2, 1,1,0))
    test_grid_grid(ocrand(n, 2,2,2, 2, 1,1,1))
    test_grid_grid(ocrand(n, 2,2,2, 2, 0.5,0.5,0.5))
    test_grid_grid(ocrand(n, 2,4,6, 2, 0.5,0.5,0.5))
    test_grid_grid(ocrand(n, 4,8,6, 8, 0.5,0.5,0.5))

    test_grid_dense(ocrand(n, 1,1,2, 1, 0,0,0))
    test_grid_dense(ocrand(n, 1,1,1, 1, 1,1,1))
    test_grid_dense(ocrand(n, 2,2,2, 2, 0,0,0))
    test_grid_dense(ocrand(n, 2,2,2, 2, 1,0,0))
    test_grid_dense(ocrand(n, 2,2,2, 2, 1,1,0))
    test_grid_dense(ocrand(n, 2,2,2, 2, 1,1,1))
    test_grid_dense(ocrand(n, 2,2,2, 2, 0.5,0.5,0.5))
    test_grid_dense(ocrand(n, 2,4,6, 2, 0.5,0.5,0.5))
    test_grid_dense(ocrand(n, 4,8,6, 8, 0.5,0.5,0.5))

    -- test_grid_grid_ds(ocrand(n, 1,1,1, 1, 0,0,0), ocrand(n, 1


KEEP, [x10, #16]
//	fmla	v3.4s, v24.4s, v31.s[0]
//	prfm	PLDL1KEEP, [x12, #16]

	// unroll 1
	fmla	v0.4s, v25.4s, v28.s[1]
//	prfm	PLDL1KEEP, [x13, #16]
//	fmla	v1.4s, v25.4s, v29.s[1]
//	prfm	PLDL1KEEP, [x14, #16]
//	fmla	v2.4s, v25.4s, v30.s[1]
//	fmla	v3.4s, v25.4s, v31.s[1]
//	ldp		q24, q25, [x9], #32

	// unroll 2
	fmla	v0.4s, v26.4s, v28.s[2]
//	fmla	v1.4s, v26.4s, v29.s[2]
//	fmla	v2.4s, v26.4s, v30.s[2]
//	fmla	v3.4s, v26.4s, v31.s[2]
	sub		w8, w8, #4

	// unroll 3
	fmla	v0.4s, v27.4s, v28.s[3]
//	ldr		q28, [x10], #16
//	fmla	v1.4s, v27.4s, v29.s[3]
//	ldr		q29, [x12], #16
//	fmla	v2.4s, v27.4s, v30.s[3]
//	ldr		q30, [x13], #16
//	fmla	v3.4s, v27.4s, v31.s[3]
//	ldr		q31, [x14], #16

	b		2f // return

4: // consider clean1-up loop

	cmp		w8, #0
	ble		2f // return

	sub		x9, x9, #32
	sub		x10, x10, #16
//	sub		x12, x12, #16
//	sub		x13, x13, #16
//	sub		x14, x14, #16

3: // clean1-up loop

	// unroll 0
	ldr		q24, [x9], #16
	ldr		s28, [x10], #4
//	ldr		s29, [x12], #4
//	ldr		s30, [x13], #4
//	ldr		s31, [x14], #4
	fmla	v0.4s, v24.4s, v28.s[0]
//	fmla	v1.4s, v24.4s, v29.s[0]
//	fmla	v2.4s, v24.4s, v30.s[0]
//	fmla	v3.4s, v24.4s, v31.s[0]

	sub		w8, w8, #1
	cmp		w8, #0

	bgt		3b

2: // return

#endif // cortex a53

#if MACRO_LEVEL>=2
	.endm
#else
	ret

	FUN_END(inner_kernel_gemm_add_nn_4x1_lib4c)
#endif

// subroutine
//
// triangular substitution:
// side = right
// uplo = lower
// tran = transposed
// requires explicit inverse of diagonal
//
// input arguments:
// x8   <- E
// x9   <- lde
// x10  <- inv_diag_E
//
// output arguments:

#if MAC


name: 'Ianus Arendse',
    time: 'about 42 mins ago',
    iconClass: 'text-info'
  },
  {
    icon: 'assets/img/people/a3.jpg',
    name: 'Valdemar Landau',
    time: 'one hour ago',
    iconClass: 'text-success'
  },
  {
    icon: 'assets/img/people/a4.jpg',
    name: 'Rick Teagan',
    time: '3 hours ago',
    iconClass: 'text-warning'
  }
];

export const updatedSharedWidgetData: SharesWidgetData[] = [
  {
    class: ['animated', 'fadeInDown', 'bg-danger'],
    icon: 'assets/img/people/a6.jpg',
    name: 'Jenny Wilington',
    time: 'just now',
    iconClass: ['text-success', 'mt-sm']
  },
  ...initialSharesWidgetData,
];

export const initialAutoloadWidgetData: string = `

Sign up, it's free

        Faith makes it possible to achieve that which man's mind can conceive and believe.

      <form>

             Email address
          <input type="email" class="form-control input-transparent" id="exampleInputEmail1" placeholder="Enter email">

             Password
          <input class="form-control input-transparent" id="pswd" type="text" placeholder="Min 8 characters">

          To make a widget automatically load it's content you just need to set
          data-widgster-autoload attribute and provide an url.

data-widgster-load="server/ajax_widget.html"
data-widgster-autoload="true"

          data-widgster-autoload may be set to an integer value. If set, for example, to
          2000 will refresh widget every 2 seconds.

            <button type="button" class="btn btn-transparent">Cancel</button>
            <button type="button" class="btn btn-success"> Submit </button>

      </form>`;

export const updatedAutoloadWidgetData: string = `

Sign up, it's free and get $50 now!

    Faith makes it possible to achieve that which man's mind can conceive and believe.

<form>

           Email address
        <input type="email" class="form-control input-transparent" id="exampleInputEmail1"
               placeholder="Enter email">

           Password
        <input class="form-control input-transparent" id="pswd" type="text" placeholder="Min 8 characters">

        To make a widget automatically load it's content you just need to set
        data-widgster-autoload attribute and provide an url.

data-widgster-load="server/ajax_widget.php"
data-widgster-autoload="true"

        data-


19140086,-87.5875794561014'/><link point='32.87739507600101,-87.22108648892502'/><link point='26.135448709162823,-86.6213707244546'/><link point='25.632318383279376,-86.02165495998418'/><link point='25.93419657880944,-84.98881114339622'/><link point='28.952978534110123,-79.35814646586832'/><link point='29.154230664463505,-78.4252552766921'/><link point='24.76022581841473,-79.3914640083389'/><link point='22.64707844970426,-79.35814646586832'/><link point='22.110406102095247,-79.09160612610368'/><link point='21.674359819662925,-78.15871493692747'/><link point='21.640817797937366,-74.96023085975185'/><link point='22.378742275899754,-72.72795551422304'/><link point='22.44582631935088,-72.39478008951724'/><link point='22.31165823244863,-72.22819237716435'/><link point='21.171229493779478,-72.49473271692898'/><link point='20.164968842012584,-72.9611783115171'/><link point='18.185989560204362,-74.39383263775201'/><link point='17.213270930163034,-75.8598045064575'/><link point='17.079102843260785,-76.45952027092792'/><link point='17.280354973614152,-77.95880968210399'/><link point='17.917653386399863,-79.82459206045642'/><link point='18.957456059892316,-84.05591995421999'/><link point='19.594754472678012,-85.85506724763127'/><link point='20.3326789506404,-87.35435665880735'/><link point='21.13768747205392,-88.28724784798356'/><link point='22.68062047142982,-89.12018640974804'/><link point='24.793767840140298,-89.78653725915963'/><link point='26.73920510022296,-90.21966531127715'/><link point='28.18151203442217,-90.28630039621832'/><link point='29.389024816542445,-90.153030226336'/><link point='31.133209946271727,-89.61994954680674'/><link point='32.87739507600101,-88.52047064527761'/><strokeColor value='-65536'/><fillColor value='16711680'/><strokeWeight value='6.0'/><precisionlocation altsrc='???' geopointsrc='???'/></detail></event>\"/><link line=\"<?xml version='1.0' encoding='UTF-8' standalone='yes'?><event version='2.0' uid='1e31f5a3-8243-4f6b-98cc-a569c09


NTCAST_TTL,
  QUANTCAST_TEST_PUBLISHER,
  QUANTCAST_PROTOCOL,
  QUANTCAST_PORT,
  spec as qcSpec,
  storage
} from '../../../modules/quantcastBidAdapter.js';
import { newBidder } from '../../../src/adapters/bidderFactory.js';
import { parseUrl } from 'src/utils.js';
import { config } from 'src/config.js';
import {getGlobal} from '../../../src/prebidGlobal.js';

describe('Quantcast adapter', function () {
  const quantcastAdapter = newBidder(qcSpec);
  let bidRequest;
  let bidderRequest;

  afterEach(function () {
    getGlobal().bidderSettings = {};
  });
  beforeEach(function () {
    getGlobal().bidderSettings = {
      quantcast: {
        storageAllowed: true
      }
    };
    bidRequest = {
      bidder: 'quantcast',
      bidId: '2f7b179d443f14',
      auctionId: '595ffa73-d78a-46c9-b18e-f99548a5be6b',
      bidderRequestId: '1cc026909c24c8',
      placementCode: 'div-gpt-ad-1438287399331-0',
      params: {
        publisherId: QUANTCAST_TEST_PUBLISHER, // REQUIRED - Publisher ID provided by Quantcast
        battr: [1, 2] // OPTIONAL - Array of blocked creative attributes as per OpenRTB Spec List 5.3
      },
      mediaTypes: {
        banner: {
          sizes: [[300, 250]]
        }
      }
    };

    bidderRequest = {
      refererInfo: {
        page: 'http://example.com/hello.html',
        ref: 'http://example.com/hello.html',
        domain: 'example.com'
      }
    };

    storage.setCookie('__qca', '', 'Thu, 01 Jan 1970 00:00:00 GMT');
  });

  function setupVideoBidRequest(videoParams, mediaTypesParams) {
    bidRequest.params = {
      publisherId: 'test-publisher', // REQUIRED - Publisher ID provided by Quantcast
      // Video object as specified in OpenRTB 2.5
      video: videoParams
    };
    if (mediaTypesParams) {
      bidRequest['mediaTypes'] = {
        video: mediaTypesParams
      }
    }
  };

  describe('inherited functions', function () {
    it('exists and is a function', function () {
      expect(quantcastAdapter.callBids).to.exist.and.to.be.a('function');
    });
  });

  describe('`isBidRequestValid`', function () {
    it('should return `true` when bid has publisherId', function () {
      const bidRequest = {
        bidder: 'quantcast',
        params: {
          publisherId: 'my_publisher_id'
        }
      };

      expect(qcSpec.isBidRequestValid(bidRequest)).to.equal(true);
    });

    it('should return `false` when bid has no publisherId', function () {
      const bidRequest = {
        bidder: 'quantcast',
        params: {
        }
      };

      expect(qcSpec.isBidRequestValid(bidRequest)).to.equal(false);
    });
  });

  describe('`buildRequests`', function () {
    it('sends secure bid requests', function () {
      const requests = qcSpec.buildRequests([bidRequest]);
      const url = parseUrl(requests[0]['url']);
      expect(url.protocol).to.equal('https');
    });

    it('sends bid requests to Quantcast Canary Endpoint if `publisherId` is `test-publisher`', function () {
      const requests = qcSpec.buildRequests([bidRequest]);
      const url = parseUrl(requests[0]['url']);
      expect(url.hostname).to.equal(QUANTCAST_TEST_DOMAIN);
    });

    it('sends bid requests to default endpoint for non standard publisher IDs', function () {
      const modifiedBidRequest = Object.assign({}, bidRequest, {


tor))
		args = append(args, toAdd)
	}

	if len(wheres) == 0 {
		wheres = []string{"1"}
	} else if len(wheres) > 1 {
		wheres = []string{strings.Join(wheres, " OR ")}
	}

	if f.ForTenant != "" {
		wheres = append(wheres, "j.tenant_uuid = ?")
		args = append(args, f.ForTenant)
	}
	if f.ForTarget != "" {
		wheres = append(wheres, "j.target_uuid = ?")
		args = append(args, f.ForTarget)
	}
	if f.ForStore != "" {
		wheres = append(wheres, "j.store_uuid = ?")
		args = append(args, f.ForStore)
	}
	if f.SkipPaused || f.SkipUnpaused {
		wheres = append(wheres, "j.paused = ?")
		if f.SkipPaused {
			args = append(args, false)
		} else {
			args = append(args, true)
		}
	}
	if f.Overdue {
		wheres = append(wheres, "j.next_run <= ?")
		args = append(args, time.Now().Unix())
	}

	return `
	   WITH recent_tasks AS (
	           SELECT uuid AS task_uuid, job_uuid, started_at, status
	             FROM tasks
	            WHERE stopped_at IS NOT NULL
	         GROUP BY job_uuid
	        )

	   SELECT j.uuid, j.name, j.summary, j.paused, j.schedule,
	          j.tenant_uuid, j.fixed_key, j.healthy, j.keep_n, j.keep_days,
	          s.uuid, s.name, s.plugin, s.endpoint, s.summary, s.healthy,
	          t.uuid, t.name, t.plugin, t.endpoint, t.agent, t.compression,
	          k.started_at, k.status

	     FROM jobs j
	          INNER JOIN stores       s  ON  s.uuid = j.store_uuid
	          INNER JOIN targets      t  ON  t.uuid = j.target_uuid
	          LEFT  JOIN recent_tasks k  ON  j.uuid = k.job_uuid

	    WHERE ` + strings.Join(wheres, " AND ") + `
	 ORDER BY j.name, j.uuid ASC`, args
}

func (db *DB) GetAllJobsV6(filter *JobFilter) ([]*Job, error) {
	db.exclusive.Lock()
	defer db.exclusive.Unlock()

	if filter == nil {
		filter = &JobFilter{}
	}

	l := []*Job{}
	query, args := filter.QueryV6()
	r, err := db.query(query, args...)
	if err != nil {
		return l, err
	}
	defer r.Close()

	for r.Next() {
		j := &Job{}

		var (
			last   *int64
			status sql.NullString
		)
		if err = r.Scan(
			&j.UUID, &j.Name, &j.Summary, &j.Paused, &j.Schedule,
			&j.TenantUUID, &j.FixedKey, &j.Healthy, &j.KeepN, &j.KeepDays,
			&j.Store.UUID, &j.Store.Name, &j.Store.Plugin, &j.Store.Endpoint, &j.Store.Summary, &j.Store.Healthy,
			&j.Target.UUID, &j.Target.Name, &j.Target.Plugin, &j.Target.Endpoint,
			&j.Agent, &j.Target.Compression, &last, &status); err != nil {
			return l, err
		}
		if last != nil {
			j.LastRun = *last
		}
		if status.Valid {
			j.LastTaskStatus = status.String
		}

		j.StoreUUID = j.Store.UUID
		j.TargetUUID = j.Target.UUID
		l = append(l, j)


                Toast.makeText(context, getString(R.string.freeze_entrance_changed), Toast.LENGTH_SHORT).show()
            } catch (ex: java.lang.Exception) {
            }
            (it as CompoundButton).isChecked = p.getComponentEnabledSetting(startActivity) == PackageManager.COMPONENT_ENABLED_STATE_ENABLED
        }
    }

    private fun loadData() {
        Thread(Runnable {
            try {
                // 数据库
                val store = SceneConfigStore(context)
                // 数据库中记录的已添加的偏见应用
                freezeApps = store.freezeAppList
                val checkShortcuts = config.getBoolean(SpfConfig.GLOBAL_SPF_FREEZE_ICON_NOTIFY, true)
                // 已添加到桌面的快捷方式
                val pinnedShortcuts = if (checkShortcuts) FreezeAppShortcutHelper().getPinnedShortcuts(context) else arrayListOf()

                val lostedShortcuts = ArrayList<AppInfo>()
                val lostedShortcutsName = StringBuilder()

                // val allApp = AppListHelper(context).getAll()
                val appListHelper = AppListHelper(context)

                val freezeAppsInfo = ArrayList<AppInfo>()
                // 遍历偏见应用列表 获取应用详情
                for (it in freezeApps) {
                    val packageName = it
                    val result = appListHelper.getApp(packageName)
                    if (result != null) {
                        freezeAppsInfo.add(result)

                        // 检查是否添加了快捷方式，如果没有则记录下来
                        if (checkShortcuts && !pinnedShortcuts.contains(it)) {
                            lostedShortcuts.add(result)
                            lostedShortcutsName.append(result.appName).append("\n")
                        }
                    }
                }
                store.close()

                handler.post {
                    try {
                        freeze_apps.adapter = FreezeAppAdapter(this.applicationContext, freezeAppsInfo)
                        processBarDialog.hideDialog()

                        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { // 即时是Oreo也可能出现获取不到已添加的快捷方式的情况，例如换了第三方桌面
                            // 如果发现有快捷方式丢失，提示是否重新添加
                            if (lostedShortcuts.size > 0) {
                                shortcutsLostDialog(lostedShortcutsName.toString(), lostedShortcuts)
                            }
                        }
                    } catch (ex: java.lang.Exception) {
                    }
                }
            } catch (ex: java.lang.Exception) {
            }
        }).start()
    }

    /**
     * 显示快捷方式丢失，提示添加
     */
    private fun shortcutsLostDialog(lostedShortcutsName: String, lostedShortcuts: ArrayList<AppInfo>) {
        if (!config.getBoolean(SpfConfig.GLOBAL_SPF_FREEZE_ICON_NOTIFY, true)) {
            return
        }

        DialogHelper.confirm(this,
                getString(R.string.freeze_shortcut_lost),
                getString(R.string.freeze_shortcut_lost_desc) + "\n\n$lostedShortcutsName",
                {
                    processBarDialog.showDialog(getString(R.string.please_wait))
                    CreateShortcutThread(lostedShortcuts, context, Runnable {
                        handler.post {
                            loadData()
                            processBarDialog.hideDialog()
                        }
                    }).start()
                })
    }

    private fun showOptions(appInfo: AppInfo) {
        val view = layoutInflater.inflate(R.layout.dialog_freeze_app_opt, null)
        val dialog = DialogHelper.customDialog(this, view)

        view.findViewById<View>(R.id.app_options_open).setOnClickListener {
            dialog.


---@class Collider : Class
---@overload fun(...) : Collider
local Collider = Class()

---@class Collider.Mode
---@field invert boolean?
---@field inside boolean?

---@param parent Object
---@param x number?
---@param y number?
---@param mode Collider.Mode
function Collider:init(parent, x, y, mode)
    self.parent = parent

    self.x = x or 0
    self.y = y or 0

    mode = mode or {}
    self.invert = mode.invert or false
    self.inside = mode.inside or false

    self.collidable = true
end

function Collider:collidableCheck(other)
    return self.collidable and other and other.collidable and (not self.parent or self.parent.collidable) and (not other.parent or other.parent.collidable)
end
function Collider:insideCheck(other)
    return not (self.inside and other.inside)
end

function Collider:applyInvert(other, val)
    if self.invert ~= other.invert then
        return not val
    else
        return val
    end
end

function Collider:getOtherCollider(other)
    if isClass(other) then
        if other:includes(Collider) then
            return other
        elseif other:includes(Object) and other.collidable and other.collider then
            return other.collider
        end
    end
end

function Collider:getTransform()
    if self.parent then
        return self.parent:getFullTransform()
    else
        return nil
    end
end

function Collider:getTransformsWith(other)
    if self.parent and other.parent and self.parent.parent == other.parent.parent then
        return self.parent:getTransform(), other.parent:getTransform()
    else
        return self:getTransform(), other:getTransform()
    end
end

function Collider:getPointFor(other, x, y)
    if self.parent and other.parent then
        return other.parent:getRelativePos(other.x + x, other.y + y, self.parent)
    elseif self.parent then
        return self.parent:getFullTransform():inverseTransformPoint(other.x + x, other.y + y)
    elseif other.parent then
        return other.parent:getFullTransform():transformPoint(other.x + x, other.y + y)
    else
        return other.x + x, other.y + y
    end
end

function Collider:getLocalPointsWith(other, ...)
    local tf1, tf2 = self:getTransformsWith(other)
    return self:getLocalPoints(tf1, tf2, ...)
end

function Collider:getLocalPoints(tf1,tf2, ...)
    local points = {...}
    if type(points[1]) == "table" then


var maxDepth;
	var newMaxDepth = selectedNode.getMaxDepth() - selectedNode.getDepth() + 1;
	//
	do
	{
		maxDepth = newMaxDepth;

		if ( ! compress && maxDepth > maxPossibleDepth )
		{
			maxDepth = maxPossibleDepth;
		}

		if ( compress )
		{
			compressedRadii = new Array(maxDepth);

			compressedRadii[0] = minRadiusInner;

			var offset = 0;

			while
			(
				lerp
				(
					Math.atan(offset + 2),
					Math.atan(offset + 1),
					Math.atan(maxDepth + offset - 1),
					minRadiusInner,
					1 - minRadiusOuter
				) - minRadiusInner > minRadiusFirst &&
				offset < 10
			)
			{
				offset++;
			}

			offset--;

			for ( var i = 1; i < maxDepth; i++ )
			{
				compressedRadii[i] = lerp
				(
					Math.atan(i + offset),
					Math.atan(offset),
					Math.atan(maxDepth + offset - 1),
					minRadiusInner,
					1 - minRadiusOuter
				)
			}
		}
		else
		{
			nodeRadius = 1 / maxDepth;
		}

		newMaxDepth = selectedNode.maxVisibleDepth(maxDepth);

		if ( compress )
		{
			if ( newMaxDepth <= maxPossibleDepth )
			{
//				compress
			}
		}
		else
		{
			if ( newMaxDepth > maxPossibleDepth )
			{
				newMaxDepth = maxPossibleDepth;
			}
		}
	}
	while ( newMaxDepth < maxDepth );

	maxDisplayDepth = maxDepth;

	lightnessFactor = (lightnessMax - lightnessBase) / (maxDepth > 8 ? 8 : maxDepth);
	keys = 0;

	nLabelOffsets = new Array(maxDisplayDepth - 1);
	labelOffsets = new Array(maxDisplayDepth - 1);
	labelLastNodes = new Array(maxDisplayDepth - 1);
	labelFirstNodes = new Array(maxDisplayDepth - 1);

	for ( var i = 0; i < maxDisplayDepth - 1; i++ )
	{
		if ( compress )
		{
			if ( i == maxDisplayDepth - 1 )
			{
				nLabelOffsets[i] = 0;
			}
			else
			{
				var width =
					(compressedRadii[i + 1] - compressedRadii[i]) *
					gRadius;

				nLabelOffsets[i] = Math.floor(width / fontSize / 1.2);

				if ( nLabelOffsets[i] > 2 )
				{
					nLabelOffsets[i] = min
					(
						Math.floor(width / fontSize / 1.75),
						5
					);
				}
			}
		}
		else
		{
			nLabelOffsets[i] = Math.max
			(
				Math.floor(Math.sqrt((nodeRadius * gRadius / fontSize)) * 1.5),
				3
			);
		}

		labelOffsets[i] = Math.floor((nLabelOffsets[i] - 1) / 2);
		labelLastNodes[i] = new Array(nLabelOffsets[i] + 1);
		labelFirstNodes[i] = new Array(nLabelOffsets[i] + 1);

		for ( var j = 0; j <= nLabelOffsets[i]; j++ )
		{
			// these arrays will allow nodes with neighboring labels to link to
			// each other to determine max label length

			labelLastNodes[i][j] = 0;
			labelFirstNodes[i][j] = 0;
		}
	}

	fontSizeText.innerHTML = fontSize;
	fontNormal = fontSize + 'px ' + fontFamily;
	context.font = fontNormal;
	fontBold = 'bold ' + fontSize + 'px ' + fontFamily;
	tickLength = fontSize * .7;

	head.setTargets(0);

	keySize = ((imageHeight - margin * 3) * 1 / 2) / keys * 3 / 4;

	if ( keySize > fontSize * maxKeySizeFactor )
	{
		keySize = fontSize * maxKeySizeFactor;
	}

	keyBuff


, z0),
		     z0_res = svldff1uw_gather_index_u64 (p0, x0, z0))

/*
** ldff1uw_gather_tied1_u64_u64index:
**	ldff1w	z0\.d, p0/z, \[x0, z0\.d, lsl 2\]
**	ret
*/
TEST_LOAD_GATHER_SZ (ldff1uw_gather_tied1_u64_u64index, svuint64_t, uint32_t, svuint64_t,
		     z0_res = svldff1uw_gather_u64index_u64 (p0, x0, z0),
		     z0_res = svldff1uw_gather_index_u64 (p0, x0, z0))

/*
** ldff1uw_gather_untied_u64_u64index:
**	ldff1w	z0\.d, p0/z, \[x0, z1\.d, lsl 2\]
**	ret
*/
TEST_LOAD_GATHER_SZ (ldff1uw_gather_untied_u64_u64index, svuint64_t, uint32_t, svuint64_t,
		     z0_res = svldff1uw_gather_u64index_u64 (p0, x0, z1),
		     z0_res = svldff1uw_gather_index_u64 (p0, x0, z1))

/*
** ldff1uw_gather_ext_u64_u64index:
**	ldff1w	z0\.d, p0/z, \[x0, z1\.d, uxtw 2\]
**	ret
*/
TEST_LOAD_GATHER_SZ (ldff1uw_gather_ext_u64_u64index, svuint64_t, uint32_t, svuint64_t,
		     z0_res = svldff1uw_gather_u64index_u64 (p0, x0, svextw_u64_x (p0, z1)),
		     z0_res = svldff1uw_gather_index_u64 (p0, x0, svextw_x (p0, z1)))


tunnel_loop_start(a3)
		move.w	(a1)+,d2			;fetch orig offset
		sub.w	#64*64*2,d2
		move.w	d2,tunnel_off2-tunnel_loop_start(a3)
		move.w	(a1)+,d2			;fetch orig offset
		;add.w	#64*64*2,d2
		move.w	d2,tunnel_off1-tunnel_loop_start(a3)
		move.w	(a1)+,d2			;fetch orig offset
		add.w	#64*64*2,d2
		move.w	d2,tunnel_off4-tunnel_loop_start(a3)
							;screen offsets

		move.w	d7,tunnel_off5-tunnel_loop_start(a3)
		move.w	d7,d6
		add.w	#160,d6
		move.w	d6,tunnel_off6-tunnel_loop_start(a3)

		add.w	d5,d7				;next scrn chunk
		eor.w	#%110,d5			;1 or 7...
		dbf	d1,.loop2

		move.w	tunnel_chunk_width,d1
		asl.w	#3,d1				;multiply by 8
		neg.w	d1
		move.w	d1,d2
		add.w	#320,d1
		ext.l	d1
		add.l	d1,d7
		add.w	#200,d2
		add.w	d2,d2
		add.w	d2,a1
		;add.l	#320-(8*tunnel_chunk_width),d7	;next scan line
		;add.l	#2*(200-(8*tunnel_chunk_width)),a1
		dbf	d0,.loop1
		move.w	#$4e75,(a0)+			;'rts'
		rts

;------------------------------------------------------
tunnel_loop_start:
tunnel_off1	= *+2
		move.w	2(a0),d0	;16
tunnel_off2	= *+2
		or.w	2(a0),d0	;20
tunnel_off3	= *+2
		or.w	2(a0),d0	;20
tunnel_off4	= *+2
		or.w	2(a0),d0	;20
tunnel_off5	= *+2
		movep.w	d0,2(a1)	;16
tunnel_off6	= *+2
		movep.w	d0,2+160(a1)	;16	total 60+48=108 for 4 pixels
tunnel_loop_end:

tunnel_loop_size =	tunnel_loop_end-tunnel_loop_start

;------------------------------------------------------
tunnel_make_gfx_buffers:
		lea	tunnel_gfx_buffer,a1
		lea	64*64*2(a1),a2
		lea	64*64*2(a2),a3
		lea	64*64*2(a3),a4
		move.w	#32-1,d0
		moveq	#0,d1
.loop1:		moveq	#2-1,d2			;chunks
.loop2:		move.w	(a0)+,d3
		move.w	(a0)+,d4
		moveq	#16-1,d5		;pixels to do
.loop3:
		moveq	#0,d6
		moveq	#0,d7
		add.w	d3,d3


tip
				flow1.silo_label_1.tooltip = tooltip
				flow1.silo_label_2.tooltip = tooltip
				flow1.silo_progressbar.tooltip = tooltip

				if recent ~= 0 then
					active_eta = (needed - consumed) / recent
					flow1.silo_label_2.caption = Utils.standard_string_form_of_time_in_seconds(active_eta)
					if active_eta < dynamic_data.time_remaining or not bools.eta_bool then
						flow1.silo_label_2.style.font_color = GuiCommon.sufficient_font_color
					else
						flow1.silo_label_2.style.font_color = GuiCommon.insufficient_font_color
					end
				else
					flow1.silo_label_2.caption = '∞'
					flow1.silo_label_2.style.font_color = GuiCommon.insufficient_font_color
				end
			end
		else
			flow1.visible = false
		end
	end

	flow1 = flowquest
	if flow1 then
		if bools.quest_bool then
			flow1.visible = true

			local quest_type = dynamic_data.quest_type or nil
			local quest_params = dynamic_data.quest_params or {}
			local quest_reward = dynamic_data.quest_reward or nil
			local quest_progress = dynamic_data.quest_progress or 0
			local quest_progressneeded = dynamic_data.quest_progressneeded or 0
			local quest_complete = dynamic_data.quest_complete or false

			if quest_type then
				---@type string|table
				local tooltip = ''

				if quest_complete and quest_reward then
					tooltip = { 'pirates.gui_questframe_complete_tooltip', quest_type }
					flow1.quest_label_1.caption = { 'pirates.gui_questframe' }
					flow1.quest_label_1.style.font_color = GuiCommon.achieved_font_color
					flow1.quest_label_2.visible = true
					flow1.quest_label_3.visible = false
					flow1.quest_label_4.visible = false
					flow1.quest_label_2.caption = quest_reward.display_amount .. ' ' .. quest_reward.display_sprite
				elseif quest_reward then
					if quest_progress < quest_progressneeded then
						flow1.quest_label_1.caption = { 'pirates.gui_questframe' }
						flow1.quest_label_1.style.font_color = GuiCommon.bold_font_color
						flow1.quest_label_2.visible = true
						flow1.quest_label_3.visible = true
						flow1.quest_label_4.visible = true
						-- defaults, to be overwritten:
						flow1.quest_label_2.caption = string.format('%s ', Quest.quest_icons[quest_type])
						flow1.quest_label_3.caption = string.format('%.0f/%.0f', quest_progress, quest_progressneeded)
						flow1.quest_label_3.style.font_color = GuiCommon.insufficient_font_color
						flow1.quest_label_4.caption = string.format(' for %s', quest_reward.display_sprite)
						flow1.quest_label_4.style.font_color = Common.default_font_color
					end

					if quest_type == Quest.enum.TIME then
						if tooltip == '' then
							tooltip = { 'pirates.gui_questframe_time' }
						end

						if quest_progress >= 0 then
							flow1.quest_label_3.caption =
								string.format('%.0fm%.0fs', Math.floor(quest_progress / 60), quest_progress % 60)
							if active_eta then
								if active_eta < quest_progress - 35 then --35 is roughly the number of seconds between charge and launch
									flow1.quest_label_3.style.font_color = GuiCommon.sufficient_font_color


    * @param p
     * @return
     */
    public DanmakuContext setScrollSpeedFactor(float p){
        if (scrollSpeedFactor != p) {
            scrollSpeedFactor = p;
            mDanmakuFactory.updateDurationFactor(p);
            mGlobalFlagValues.updateMeasureFlag();
            mGlobalFlagValues.updateVisibleFlag();
            notifyConfigureChanged(DanmakuConfigTag.SCROLL_SPEED_FACTOR, p);
        }
        return this;
    }

    /**
     * 设置是否启用合并重复弹幕
     * @param enable
     * @return
     */
    public DanmakuContext setDuplicateMergingEnabled(boolean enable) {
        if (mDuplicateMergingEnable != enable) {
            mDuplicateMergingEnable = enable;
            mGlobalFlagValues.updateFilterFlag();
            notifyConfigureChanged(DanmakuConfigTag.DUPLICATE_MERGING_ENABLED, enable);
        }
        return this;
    }

    public boolean isDuplicateMergingEnabled() {
        return mDuplicateMergingEnable;
    }

    public DanmakuContext alignBottom(boolean enable) {
        if (mIsAlignBottom != enable) {
            mIsAlignBottom = enable;
            notifyConfigureChanged(DanmakuConfigTag.ALIGN_BOTTOM, enable);
            mGlobalFlagValues.updateVisibleFlag();
        }
        return this;
    }

    public boolean isAlignBottom() {
        return mIsAlignBottom;
    }

    /**
     * 设置最大显示行数
     * @param pairs map<K,V> 设置null取消行数限制
     * K = (BaseDanmaku.TYPE_SCROLL_RL|BaseDanmaku.TYPE_SCROLL_LR|BaseDanmaku.TYPE_FIX_TOP|BaseDanmaku.TYPE_FIX_BOTTOM)
     * V = 最大行数
     * @return
     */
    public DanmakuContext setMaximumLines(Map<Integer, Integer> pairs) {
        mIsMaxLinesLimited = (pairs != null);
        if (pairs == null) {
            mDanmakuFilters.unregisterFilter(DanmakuFilters.TAG_MAXIMUN_LINES_FILTER, false);
        } else {
            setFilterData(DanmakuFilters.TAG_MAXIMUN_LINES_FILTER, pairs, false);
        }
        mGlobalFlagValues.updateFilterFlag();
        notifyConfigureChanged(DanmakuConfigTag.MAXIMUN_LINES, pairs);
        return this;
    }

    @Deprecated
    public DanmakuContext setOverlapping(Map<Integer, Boolean> pairs) {
        return preventOverlapping(pairs);
    }

    /**
     * 设置防弹幕重叠
     * @param pairs map<K,V> 设置null恢复默认设置,默认为允许重叠
     * K = (BaseDanmaku.TYPE_SCROLL_RL|BaseDanmaku.TYPE_SCROLL_LR|BaseDanmaku.TYPE_FIX_TOP|BaseDanmaku.TYPE_FIX_BOTTOM)
     * V = true|false 是否重叠
     * @return
     */
    public DanmakuContext preventOverlapping(Map<Integer, Boolean> pairs) {
        mIsPreventOverlappingEnabled = (pairs != null);
        if (pairs == null) {
            mDanmakuFilters.unregisterFilter(DanmakuFilters.TAG_OVERLAPPING_FILTER, false);
        } else {
            setFilterData(DanmakuFilters.TAG_OVERLAPPING_FILTER, pairs, false);
        }
        mGlobalFlagValues.updateFilterFlag();
        notifyConfigureChanged(DanmakuConfigTag.OVERLAPPING_ENABLE, pairs);
        return this;
    }

    public boolean isMaxLinesLimited() {
        return mIsMaxLinesLimited;


namespace BossMod.Endwalker.Savage.P6SHegemone;

class Synergy(BossModule module) : BossComponent(module)
{
    public bool Done { get; private set; }
    private readonly Actor?[] _targets = [null, null]; // second target is for non-chelic synergy
    private bool _chelic;

    private static readonly AOEShapeCircle _shapeNormal = new(5);
    private static readonly AOEShapeCone _shapeChelic = new(60, 30.Degrees());

    public override void AddHints(int slot, Actor actor, TextHints hints)
    {
        if (!_chelic)
        {
            if (_targets.Any(t => actor != t && _shapeNormal.Check(actor.Position, t)))
                hints.Add("GTFO from tanks!");

            if (Module.PrimaryActor.TargetID == _targets[0]?.InstanceID)
            {
                if (actor == _targets[0])
                    hints.Add("Shirk!");
                else if (actor.Role == Role.Tank)
                    hints.Add("Taunt!");
            }
        }
        else if (_targets[0] == actor)
        {
            hints.Add("Stack with other tanks or press invuln!", false);
        }
        else
        {
            hints.Add("GTFO from tank!", _shapeChelic.Check(actor.Position, Module.PrimaryActor.Position, Angle.FromDirection(_targets[0]!.Position - Module.PrimaryActor.Position)));
        }
    }

    public override Pla


    int            `json:"max"`
	Sample []SamplePlayer `json:"sample,omitempty"`
}

type SamplePlayer struct {
	Name string    `json:"name"`
	ID   uuid.UUID `json:"id"`
}
package lite

import (
	"errors"
	"testing"

	"github.com/go-logr/logr"
	"github.com/go-logr/logr/testr"
	"github.com/stretchr/testify/assert"
)

// TestLogSpamReduction verifies that failed backend logs use higher verbosity
// to avoid spamming the console when backends are unreachable.
func TestLogSpamReduction(t *testing.T) {
	// Create a logger with verbosity 0 (normal level)
	log := testr.New(t)

	// The actual log level check happens in tryBackends function
	// where we use log.V(1) for failed backend attempts

	// Verify that log.V(1) creates a logger with increased verbosity
	verboseLog := log.V(1)
	assert.NotNil(t, verboseLog, "Should create verbose logger")

	// This test ensures the code compiles with the verbosity changes
	// The actual effect is that failed backend logs will only show
	// when running with -v flag or higher verbosity settings
}

// TestTryBackendsErrorHandling verifies error handling behavior
func TestTryBackendsErrorHandling(t *testing.T) {
	log := testr.New(t)

	attempts := 0
	next := func() (string, logr.Logger, bool) {
		attempts++
		if attempts > 3 {
			return "", log, false
		}
		return "backend" + string(rune('0'+attempts)), log, true
	}

	tryFunc := func(log logr.Logger, backendAddr string) (logr.Logger, string, error) {
		// Simulate all backends failing
		return log, "", errors.New("connection refused")
	}

	// Should try all backends and return errAllBackendsFailed
	_, _, result, err := tryBackends(next, tryFunc)
	assert.Equal(t, "", result)
	assert.Equal(t, errAllBackendsFailed, err)
	assert.Equal(t, 4, attempts, "Should try all backends before giving up")
}
package lite

import (
	"errors"
	"testing"

	"github.com/go-logr/logr"
	"github.com/go-logr/logr/testr"
	"github.com/stretchr/testify/assert"
)

// TestBackendSelection_TriesAllBackends verifies that when one backend fails,
// the system tries other available backends in sequential order (fixes issue #2)
func TestBackendSelection_TriesAllBackends(t *testing.T) {
	log := testr.New(t)

	// Create a simple nextBackend function that simulates the real behavior
	backends := []string{"backend1:25565", "backend2:25565", "backend3:25565"}
	remainingBackends := make([]string, len(backends))
	copy(remainingBackends, backends)

	nextBackend := func() (string, logr.Logger, bool) {
		if len(remainingBackends) == 0 {
			return "", log, false
		}
		// Pop first backend - simple sequential approach
		backend := remainingBackends[0]
		remainingBackends = remainingBackends[1:]
		return backend, log, true
	}

	// Track which backends were tried
	triedBackends := make([]string, 0, 3)
	attemptCount := 0

	// Try function that simulates all backends failing
	tryFunc := func(log logr.Logger, backendAddr string) (logr.Logger, string, error) {
		attemptCount++
		triedBackends = append(triedBackends, backendAddr)
		// Simulate all backends failing
		return log, "", errors.New("connection refused")
	}

	// Should try all backends before giving up
	_, _, _, err := tryBackends(nextBackend, tryFunc)

	assert.Equal(t, errAllBackendsFailed, err, "S


o_wrap(
            format!("Spatulas: {}", player.score),
            TextStyle::Body.resolve(ui.style()),
            color,
        );
        let room_galley = ui.painter().layout_no_wrap(
            player
                .current_room
                .map(|r| r.to_string())
                .unwrap_or_else(|| "? ? ?".to_string()),
            TextStyle::Small.resolve(ui.style()),
            color,
        );

        let name_size = name_galley.size();
        let score_size = score_galley.size();
        let room_size = room_galley.size();
        // Use longest level name for the overall width
        let longest_width = ui
            .painter()
            .layout_no_wrap(
                Room::MermalairVillianContainment.to_string(),
                TextStyle::Small.resolve(ui.style()),
                color,
            )
            .size()
            .x;

        let padding = ui.spacing().button_padding;
        let desired_size = Vec2::new(
            longest_width + 4. * padding.x,
            name_size.y + score_size.y + room_size.y + 4. * padding.y,
        );
        let (rect, response) =
            ui.allocate_exact_size(desired_size, Sense::focusable_noninteractive());

        if ui.is_rect_visible(rect) {
            ui.painter().rect_stroke(rect, 0., Stroke::new(2., color));
            let mut text_pos = rect.left_top() + padding;

            ui.painter().galley(text_pos, name_galley);
            text_pos.y += name_size.y + padding.y;

            ui.painter().galley(text_pos, score_galley);
            text_pos.y += score_size.y + padding.y;

            ui.painter().galley(text_pos, room_galley);
        }

        response
    }
}

use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct AllocRegulatoryTradeIDGrp {
	/// NoAllocRegulatoryTradeIDs
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "1908")]
	pub alloc_regulatory_trade_i_ds: Option<fix_common::RepeatingValues<AllocRegulatoryTradeID>>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct AllocRegulatoryTradeID {
	/// Required if NoAllocRegulatoryTradeIDs(1908) > 0.
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "1909")]
	pub alloc_regulatory_trade_id: Option<String>,
	/// AllocRegulatoryTradeIDSource
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "1910")]
	pub alloc_regulatory_trade_id_source: Option<String>,
	/// AllocRegulatoryTradeIDEvent
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "1911")]
	pub alloc_regulatory_trade_id_event: Option<AllocRegulatoryTradeIDEvent>,
	/// AllocRegulatoryTradeIDType
	#[serde(skip_serializing_if = "Option::is_none")]
	#[serde(rename = "1912")]
	pub alloc_regulatory_trade_id_type: Option<AllocRegulatoryTradeIDType>,
	/// This field may be is used for multi-leg trades sent as a single message


< timeDataEnd; i++){
        messageBytes[i] = pulseTimeBytes[i - 7];
    }
    for (int i = timeDataEnd; i < nMessageBytes; i++){
        messageBytes[i] = voltageBytes[i - timeDataEnd];
    }
    serial.writeBytes(messageBytes, nMessageBytes);
}

void PulsePal::syncAllParams() {
    uint8_t messageBytes[168] = { 0 };
    messageBytes[0] = 213;
    messageBytes[1] = 73;
    int pos = 2;
    uint32_t thisTime = 0;
    float thisVoltage = 0;
    uint8_t thisVoltageByte = 0;

    // add time params
    for (int i = 1; i < 5; i++){
        thisTime = (uint32_t)(currentOutputParams[i].phase1Duration * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].interPhaseInterval * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].phase2Duration * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].interPulseInterval * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].burstDuration * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].interBurstInterval * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].pulseTrainDuration * CycleFreq);
        messageBytes[pos] = (uint8_t)(thisTime); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 8); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 16); pos++;
        messageBytes[pos] = (uint8_t)(thisTime >> 24); pos++;
        thisTime = (uint32_t)(currentOutputParams[i].pulseTrainDelay * CycleFreq);
        message


disi de dahil olmak üzere, programların yürütülmesi sırasında herhangi bir noktada çağrılabilir.

Başlangıçta, tüm prosedürler bir programın herhangi bir bölümünde global veri olarak mevcuttu. Küçük programlarda bu bir problem teşkil etmedi, ancak işler daha da karmaşıklaştıkça ve programın boyutu büyüdükçe, programın bir kısmındaki küçük değişiklikler diğer birçok bölümü de büyük ölçüde etkiledi.

Hiç kimse programdaki değişiklikleri planlamıyordu ve çok fazla bağımlılık vardı. Bir prosedürde yapılan küçük bir değişiklik, orijinal koda bağlı olan birçok başka prosedürde bir hata dizisine neden olur.

Verilerin “nesneler” adı verilen ayrı kapsamlara bölünmesine izin veren yeni bir teknik gelişti. Yalnızca aynı kapsama ait belirli prosedürler aynı verilere erişebilmeli. Buna veri gizleme veya kapsülleme dendi. Sonuç çok daha iyi organize edilmiş kod oldu.

Başlangıçta nesneler nesne olarak adlandırılmadı, sadece ayrı kapsamlar olarak görüldü. Daha sonra bağımlılıklar azaltılarak bu kapsamların içindeki prosedürler ve değişkenler arasındaki bağlantılar yalıtılmış bölümler olarak görüldüğünde, sonuç “nesneler” ve “nesneye tabanlı programlama” kavramlarını doğurdu.

Daha sonra, esas olarak Java’nın gelişmesi nedeniyle, bazı “buzzwords” ifadeleri ortaya çıktı ve “bir prosedür” veya “bir işlev” artık bir işlev olarak adlandırılmadı, ancak ayrı bir kapsamda bulunduğunda “bir yöntem” olarak yeniden adlandırıldı. Değişkenler artık “değişkenler” olarak da adlandırılmadı, ancak ayrı bir kapsamda bulunduklarında “özellikler” olarak yeniden adlandırıldılar.

Dolayısıyla bir nesne özünde basitçe şimdi “yöntemler ve öznitelikler” olarak adlandırılan fonksiyonlar ve değişkenler topluluğudur.

Yöntemlerin ve niteliklerin ayrı bir kapsam içinde izole edilmesinin yolu “bir sınıf” kullanımıdır. Bir sınıf, bir kez yaratıldığında nesne olarak adlandırılır.

Nesneler birbirlerine referans verebilir ve bu referansla içerideki yöntemler (fonksiyonlar) birbirleriyle “iletişim kurabilir”. Nesneler ayrıca yöntemleri diğer nesnelerden “devralabilir” ve bu şekilde genişletilir, buna “miras” denir. Bu, kodu tekrar kullanmanın ve ortak sınıflar ve arabirimler aracılığıyla yazılımın bağımsız uzantılar


}
		parts := strings.Split(line, ":")
		if len(parts) != 2 {
			continue
		}
		key := strings.TrimSpace(parts[0])
		value, err := strconv.ParseInt(strings.TrimSpace(parts[1]), 10, 64)
		if err != nil {
			return err
		}

		// Update the counter based on the key
		switch key {
		case "syscr":
			stats.ReadCount = value
		case "syscw":
			stats.WriteCount = value
		case "rchar":
			stats.ReadBytes = value
		case "wchar":
			stats.WriteBytes = value
		}
	}
}
// Copyright 2014 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

package trie

import (
	"bytes"
	"testing"
)

func TestHexCompact(t *testing.T) {
	tests := []struct{ hex, compact []byte }{
		// empty keys, with and without terminator.
		{hex: []byte{}, compact: []byte{0x00}},
		{hex: []byte{16}, compact: []byte{0x20}},
		// odd length, no terminator
		{hex: []byte{1, 2, 3, 4, 5}, compact: []byte{0x11, 0x23, 0x45}},
		// even length, no terminator
		{hex: []byte{0, 1, 2, 3, 4, 5}, compact: []byte{0x00, 0x01, 0x23, 0x45}},
		// odd length, terminator
		{hex: []byte{15, 1, 12, 11, 8, 16 /*term*/}, compact: []byte{0x3f, 0x1c, 0xb8}},
		// even length, terminator
		{hex: []byte{0, 15, 1, 12, 11, 8, 16 /*term*/}, compact: []byte{0x20, 0x0f, 0x1c, 0xb8}},
	}
	for _, test := range tests {
		if c := hexToCompact(test.hex); !bytes.Equal(c, test.compact) {
			t.Errorf("hexToCompact(%x) -> %x, want %x", test.hex, c, test.compact)
		}
		if h := compactToHex(test.compact); !bytes.Equal(h, test.hex) {
			t.Errorf("compactToHex(%x) -> %x, want %x", test.compact, h, test.hex)
		}
	}
}

func TestHexKeybytes(t *testing.T) {
	tests := []struct{ key, hexIn, hexOut []byte }{
		{key: []byte{}, hexIn: []byte{16}, hexOut: []byte{16}},
		{key: []byte{}, hexIn: []byte{}, hexOut: []byte{16}},
		{
			key:    []byte{0x12, 0x34, 0x56},
			hexIn:  []byte{1, 2, 3, 4, 5, 6, 16},
			hexOut: []byte{1, 2, 3, 4, 5, 6, 16},
		},
		{
			key:    []b


/**
 * Description: 2D matrix operations. Change \texttt{d}
 	* to array if possible.
 * Source: KACTL
 * Verification: https://dmoj.ca/problem/si17c1p5, SPOJ MIFF
 */

template<class T> struct Mat {
	int r,c; vector<vector<T>> d;
	Mat(int _r, int _c) : r(_r), c(_c) {
		d.assign(r,vector<T>(c)); }
	Mat() : Mat(0,0) {}
	Mat(const vector<vector<T>>&_d) :
		r(sz(_d)), c(sz(_d[0])) { d = _d; }
	/// friend str ts(const Mat& m) { return ts(m.d); }
	Mat& operator+=(const Mat& m) {
		/// assert(r == m.r && c == m.c);
		F0R(i,r) F0R(j,c) d[i][j] += m.d[i][j];
		return *this; }
	Mat& operator-=(const Mat& m) {
		/// assert(r == m.r && c == m.c);
		F0R(i,r) F0R(j,c) d[i][j] -= m.d[i][j];
		return *this; }
	Mat operator*(const Mat& m) {
		assert(c == m.r); Mat x(r,m.c);
		F0R(i,r) F0R(j,c) F0R(k,m.c)
			x.d[i][k] += d[i][j]*m.d[j][k];
		return x; }
	Mat operator+(const Mat& m) { return Mat(*this)+=m; }
	Mat operator-(const Mat& m) { return Mat(*this)-=m; }
	Mat& operator*=(const Mat& m) { return *this = (*this)*m; }
	friend Mat pow(Mat m, ll p) {
		assert(m.r == m.c && p >= 0);
		Mat res(m.r,m.c); F0R(i,m.r) res.d[i][i] = 1;
		for (; p; p /= 2, m *= m) if (p&1) res *= m;
		return res;
	}
};


 = b (shift counts)

            vshl.u16 q2,q0,q1                   // vector shift using counts

            vstm r0,{q2}                        // save result to x
            bx lr

// extern "C" bool PackedShiftC_(Vec128* x, const Vec128& a, const Vec128& b);

            .global PackedShiftC_
PackedShiftC_:
            vpush {q4}

            vldm r1,{q0}                        // q0 = a
            vldm r2,{q1}                        // q1 = b (shift counts)

            vshl.s16 q2,q0,q1                   // vector left shift
            vqshl.s16 q3,q0,q1                  // vector left shift - sat
            vrshl.s16 q4,q0,q1                  // vector left shift - round

            vstm r0,{q2-q4}                     // save result to x

            vpop {q4}
            bx lr


ffuseAlbedo, renderTargets.PrevGBufferDiffuseAlbedo, renderTargets.DebugColor);
    m_gBufferSpecularRoughnessViz->CreateBindingSet(renderTargets.GBufferSpecularRough, renderTargets.PrevGBufferSpecularRough, renderTargets.DebugColor);
}

void DebugVizPasses::RenderUnpackedNormals(nvrhi::ICommandList* commandList, const donut::engine::IView& view)
{
    m_gBufferNormalsViz->Render(commandList, view);
}

void DebugVizPasses::RenderUnpackedGeoNormals(nvrhi::ICommandList* commandList, const donut::engine::IView& view)
{
    m_gBufferGeoNormalsViz->Render(commandList, view);
}

void DebugVizPasses::RenderUnpackedDiffuseAlbeo(nvrhi::ICommandList* commandList, const donut::engine::IView& view)
{
    m_gBufferDiffuseAlbedoViz->Render(commandList, view);
}

void DebugVizPasses::RenderUnpackedSpecularRoughness(nvrhi::ICommandList* commandList, const donut::engine::IView& view)
{
    m_gBufferSpecularRoughnessViz->Render(commandList, view);
}

void DebugVizPasses::NextFrame()
{
    m_gBufferNormalsViz->NextFrame();
    m_gBufferGeoNormalsViz->NextFrame();
    m_gBufferDiffuseAlbedoViz->NextFrame();
    m_gBufferSpecularRoughnessViz->NextFrame();
}#include "gtest/gtest.h"

#include <algorithm>
#include <random>
#include <vector>

#include "Kernel/BlueNoiseGaussianKernel.h"
#include "Kernel/SymmetricKernel.h"
#include "Kernel/ConstantKernel.h"
#include "Utils/PixelCoords.h"
#include "STBNData.h"
#include "STBNRandom.h"

#include "VoidAndCluster/Reference/ReferenceImpl.h"
#include "VoidAndCluster/Reference/ReferenceController2Dx1Dx1D.h"
#include "VoidAndCluster/SliceCache/SliceCacheImpl.h"
#include "VoidAndCluster/SliceCache/SliceCacheController2Dx1Dx1D.h"
#include "VoidAndCluster/VoidAndCluster.h"

#define TEST_IMPLS()   STBNData dataSC(dimensions); \
                       SliceCacheImpl updaterSC(dataSC); \
                       STBNData dataRef(dimensions); \
                       ReferenceImpl2Dx1Dx1D updaterRef(dataRef); \
                       std::vector<VCImpl*> impls = { &updaterSC, &updaterRef };

TEST(SliceCacheImpl, Constructor)
{
    STBNData data({ 1, 2, 3, 4 });
    SliceCacheImpl impl(data);

    EXPECT_EQ(impl.GetSTBNData(), data);
}

TEST(SliceCacheImpl, SplatZOnConstantR1At0)
{
    Dimensions dimensions{ 8, 1, 1, 1 };
    PixelCoords pixelCoords = { 0, 0, 0, 0 };
    ConstantKernel constantKernel(2.0f, 1);

    TEST_IMPLS();

    for (auto impl : impls)
    {
        impl->SplatOnZ(pixelCoords, constantKernel);
    }

    EXPECT_EQ(dataSC.energy, dataRef.energy);
}

TEST(SliceCacheImpl, SplatXYOnConstantR1At0)
{
    size_t width = 8;
    Dimensions dimensions{ width, 1, 1, 1 };
    PixelCoords pixelCoords = { 2, 2, 0, 0 };
    ConstantKernel constantKernelX(2.0f, 1);
    ConstantKernel constantKernelY(3.0f, 1);

    TEST_IMPLS();

    for (auto impl : impls)
    {
        impl->SplatOnXY(pixelCoords, constantKernelY, constantKernelX);
    }

    EXPECT_EQ(dataSC.energy, dataRef.energy);
}

TEST(SliceCacheImpl, GetTightestClusterLargestVoid2D)
{
    Dimensions dimensions{ 5, 5, 1, 1 };
    PixelCoords pixelCoords


		container.style.position = 'absolute';
		document.body.appendChild(container);

		map = new L.Map(container, {
			touchZoom: true,
			inertia: false,
			zoomAnimation: false	// If true, the test has to wait extra 250msec
		});
	});

	afterEach(function () {
		map.remove();
		document.body.removeChild(container);
	});

	it.skipIfNotTouch("Increases zoom when pinching out", function (done) {
		map.setView([0, 0], 1);
		map.once('zoomend', function () {
			expect(map.getCenter()).to.eql({lat:0, lng:0});
			// Initial zoom 1, initial distance 50px, final distance 450px
			expect(map.getZoom()).to.be(4);

			done();
		});

		const hand = new Hand({timing: 'fastframe'});
		const f1 = hand.growFinger(touchEventType);
		const f2 = hand.growFinger(touchEventType);

		hand.sync(5);
		f1.wait(100).moveTo(275, 300, 0)
			.down().moveBy(-200, 0, 500).up(100);
		f2.wait(100).moveTo(325, 300, 0)
			.down().moveBy(200, 0, 500).up(100);
	});

	it.skipIfNotTouch("Decreases zoom when pinching in", function (done) {
		map.setView([0, 0], 4);
		map.once('zoomend', function () {
			expect(map.getCenter()).to.eql({lat:0, lng:0});
			// Initial zoom 4, initial distance 450px, final distance 50px
			expect(map.getZoom()).to.be(1);

			done();
		});

		const hand = new Hand({timing: 'fastframe'});
		const f1 = hand.growFinger(touchEventType);
		const f2 = hand.growFinger(touchEventType);

		hand.sync(5);
		f1.wait(100).moveTo(75, 300, 0)
			.down().moveBy(200, 0, 500).up(100);
		f2.wait(100).moveTo(525, 300, 0)
			.down().moveBy(-200, 0, 500).up(100);
	});
});
import flashcardsAPI from "../../lib/api/flashcards";
import FlashcardsKnowType from "./type/FlashcardsKnowType"
import FlashcardsDontKnowType from "./type/FlashcardsDontKnowType";
import FlashcardsAbstractType from "./type/FlashcardsAbstractType";
import FlashcardsUnassignedType from "./type/FlashcardsUnassignedType";

class FlashcardsModel {

    flashcardsKnowType;
    flashcardsDontKnowType;
    flashcardsUnassignedType;

    currentFlashcardsType = FlashcardsAbstractType.FLASHCARD_KNOWLEDGE_TYPE_UNASSIGNED;
    currentFlashcardsTypeObject;

    flashcardList = [
        /*
            {
                "id": "5fcd254ecf7d001e21fe7648",
                "flashcardId": 0,
                "knowledgeType": "",
                "textLeft": "",
                "textRight": "",
                "createdAt": 1607279950133,
                "updatedAt": null
            }
         */
    ];

    constructor() {
        this.flashcardsKnowType = new FlashcardsKnowType();
        this.flashcardsDontKnowType = new FlashcardsDontKnowType();
        this.flashcardsUnassignedType = new FlashcardsUnassignedType();

        this.currentFlashcardsTypeObject = this.flashcardsUnassignedType;
    }

    setFlashcardList(flashcardList) {
        this.flashcardList = flashcardList
        this.recalculateFlashcards();
    }

    recalculateFlashcards() {
        this.flashcardsKnowType.reset();
        this.flashcardsDontKnowType.reset();
        this.flashcardsUnassignedType.reset();

        // fill flashcards type objects
        for (let [key, flashcard] of Object.entries(this.flashcardList)) {
            // set flashcards by type
            switch (flashcard.knowledgeType) {
                case FlashcardsAbstractType.FLASHCARD_KNOWLEDGE_TYPE_KNOW:
                    this.flashcardsKnowType.addFlashcardToList(flashcard);
                    break;
                case Flashcar


https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ04IQPD-wCoIQ3vpWQy5mjc1HTVrCP1ZvJyg&usqp=CAU'
    },
    {
        name:    { value: 'Raja', valid: true },
        email:   { value: 'Phasellus.fermentum@enimMaurisquis.co.uk', valid: true },
        phone:   { value: '02 68 21 83 08', valid: true },
        address: { value: 'Värnamo', valid: true },
        birth:   { value: '29-12-95', valid: true },
        img:     'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ04IQPD-wCoIQ3vpWQy5mjc1HTVrCP1ZvJyg&usqp=CAU'
    },
    {
        name:    { value: 'George', valid: true },
        email:   { value: 'lobortis.risus.In@Proin.org', valid: true },
        phone:   { value: '06 54 50 42 24', valid: true },
        address: { value: 'Macklin', valid: true },
        birth:   { value: '26-02-98', valid: true },
        img:     'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ04IQPD-wCoIQ3vpWQy5mjc1HTVrCP1ZvJyg&usqp=CAU'
    }
];
/* eslint-disable @typescript-eslint/no-explicit-any */
import { ImageSharp } from "../types/data";
import { image, imageSharp } from "../types/fixtures";
import { absolutifyURL, extractNodes, getSrc, isImageSharp } from "./helpers";

describe("Helpers", () => {
    it("correctly detects an imageSharp", () => {
        expect(isImageSharp(imageSharp)).toBeTruthy();
        expect(isImageSharp(image)).toBeFalsy();
    });

    it("returns src for images", () => {
        const fixed: ImageSharp = {
            childImageSharp: {
                ...imageSharp.childImageSharp,
                fluid: imageSharp.childImageSharp.fluid
            }
        };
        expect(getSrc()).toBe("");
        expect(getSrc(image)).toBe(image);
        expect(getSrc(imageSharp)).toBe(
            imageSharp!.childImageSharp!.fluid!.src
        );
        expect(getSrc(fixed)).toBe(imageSharp!.childImageSharp!.fluid!.src);
    });
    it("absolutifies a path", () => {
        expect(absolutifyURL("/assets/foo.txt")).toBe(
            "https://raw.githubusercontent.com/aerian-studios/aerian-site-rebuild/master/static/assets/foo.txt"
        );
    });
    it("doesn't absolutify a non-path", () => {
        expect(absolutifyURL("/foo.txt")).toBe("/foo.txt");
        expect(absolutifyURL((1 as any) as string)).toBe(1);
    });
    it("extracts nodes from a nodelist", () => {
        const nl = {
            edges: [
                { node: 1 },
                { node: 3 },
                { node: 5 },
                { node: 7 },
                { node: 9 }
            ]
        };
        expect(extractNodes(nl)).toEqual([1, 3, 5, 7, 9]);
    });
});
// NG2
import { Injectable, Pipe, PipeTransform } from '@angular/core';

@Pipe({ name: 'highlight', pure: true })
@Injectable()
export class HighlightPipe implements PipeTransform {
  transform(value: any, term: any): any {
    return term ? value.replace(new RegExp(this.escapeRegexp(term.trim()), 'gi'), '<strong>$&</strong>') : value;
  }

  escapeRegexp(queryToEscape) {
    // Ex: if the capture is "a" the result will be \a
    return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
  }
}
/// <reference path="dictionary.ts"/>
// This co


ベントを発生させないように処理しています。

Firefox はまた、ページが `beforeunload` ハンドラーを格納している場合、bfcache からページを除外します。

#### pagehide をフォールバックとして使う

`visibilitychange` を実装していないブラウザーに対応するには、 [`pagehide`](/ja/docs/Web/API/Window/pagehide_event) イベントを使用します。
`beforeunload` と `unload` のように、このイベントは特にモバイルでは確実に発行されるわけではありません。しかし、 bfcache と互換性があります。

## 例

次の例では、　{{domxref("document.visibilitychange_event", "visibilitychange")}}　イベントのハンドラーを指定しています。ハンドラーは `sendBeacon()` を呼び出して分析を送信します。

```js
document.addEventListener("visibilitychange", function logData() {
  if (document.visibilityState === "hidden") {
    navigator.sendBeacon("/log", analyticsData);
  }
});
```

## 仕様書

{{Specifications}}

## ブラウザーの互換性

{{Compat}}

## 関連情報

- [`visibilitychange`](/ja/docs/Web/API/Document/visibilitychange_event) イベント
- {{domxref("Beacon_API","ビーコン API", "", "true")}} 概要ページ
- [Don't lose user and app state, use Page Visibility](https://www.igvita.com/2015/11/20/dont-lose-user-and-app-state-use-page-visibility/) は、 `beforeunload`/`unload`ではなく、`visibilitychange`を使用する理由について詳しく説明しています。
- [Page Lifecycle API](https://developer.chrome.com/docs/web-platform/page-lifecycle-api/#developer-recommendations-for-each-state) は、ウェブアプリケーションでページのライフサイクル動作を処理するための最善の手法を提供します。
- [PageLifecycle.js](https://github.com/GoogleChromeLabs/page-lifecycle): ページのライフサイクル動作におけるクロスブラウザーでの不整合に対処する JavaScript ライブラリーです。
- [Back/forward cache](https://web.dev/articles/bfcache) は、バック/フォワードキャッシュとは何か、そして様々なページライフサイクルイベントに対するその意味について説明します。
---
title: "CryptoKey: type プロパティ"
short-title: type
slug: Web/API/CryptoKey/type
l10n:
  sourceCommit: acfe8c9f1f4145f77653a2bc64a9744b001358dc
---

{{APIRef("Web Crypto API")}}{{SecureContext_Header}}

**`type`** は {{DOMxRef("CryptoKey")}} インターフェイスの読み取り専用プロパティで、オブジェクトが表すキーの種類を示します。以下の値を示します。

- `"secret"`: このキーは{{Glossary("Symmetric-key cryptography", "対象鍵暗号")}}で使用する秘密鍵です。
- `"private"`: このキーは{{Glossary("Public-key cryptography", "非対称鍵暗号")}}の [`CryptoKeyPair`](/ja/docs/Web/API/CryptoKeyPair) の秘密鍵側です。
- `"public"`: このキーは{{Glossary("Public-key cryptography",


st tag="ol" class="list-decimal text-gray-500 dark:text-gray-400">

    List item one
    <List tag="ul" class="mt-2 space-y-1 ps-5">

You might feel like you are being really "organized" o

Nested navigation in UIs is a bad idea too, keep things as flat as possible.

Nesting tons of folders in your source code is also not helpful.

    </List>

    List item two
    <List tag="ul" class="mt-2 space-y-1 ps-5">

I'm not sure if we'll bother styling more than two levels deep.

Two is already too much, three is guaranteed to be a bad idea.

If you nest four levels deep you belong in prison.

    </List>

    List item three
    <List tag="ul" class="mt-2 space-y-1 ps-5 text-gray-500 dark:text-gray-400">

Again please don't nest lists if you want

Nobody wants to look at this.

I'm upset that we even have to bother styling this.

    </List>

</List>
```

## Description List

Create a description list by using the `tag="dl"` prop and set the term and name with the following example.

```svelte example

<List tag="dl" class="divide-y divide-gray-200 text-gray-900 dark:divide-gray-700  dark:text-white">

    <DescriptionList tag="dt" class="mb-1">Email address</DescriptionList>
    <DescriptionList tag="dd">yourname@flowbite.com</DescriptionList>

    <DescriptionList tag="dt" class="mb-1">Home address</DescriptionList>
    <DescriptionList tag="dd">92 Miles Drive, Newark, NJ 07103, California, USA</DescriptionList>

    <DescriptionList tag="dt" class="mb-1">Phone number</DescriptionList>
    <DescriptionList tag="dd">+00 123 456 789 / +12 345 678</DescriptionList>

</List>
```

## List with icon

Use this example to create a list of items with custom SVG icons instead of the default bullets.

```svelte example

<List tag="ul" class="mb-8 space-y-4 text-gray-500 dark:text-gray-400">

    <CheckOutline class="h-5 w-5 text-green-500 dark:text-green-400" />
    Individual configuration

    <CheckOutline class="h-5 w-5 text-green-500 dark:text-green-400" />
    No setup, or hidden fees

    <CheckOutline class="h-5 w-5 text-green-500 dark:text-green-400" />
    Team size: 1 developer

    <CheckOutline class="h-5 w-5 text-green-500 dark:text-green-400" />
    Premium support: 6 months</


(data: List<SDElement<P>>): Map<String, Any>

    class ScalarDescriptor<P> : SDDescriptor<P>() {
        override fun describeData(data: List<SDElement<P>>) = data.groupByKey { it }.mapValues { it.value.singleOrNull() ?: it.value }
    }

    class IdDescriptor<P> : SDDescriptor<P>() {
        override fun describeData(data: List<SDElement<P>>) = data.groupByKey { it }
    }

    object DateTimeStringDescriptor : SDDescriptor<Long>() {
        override fun describeData(data: List<SDElement<Long>>) = data.groupByKey(::milliTimeStampStringer)

        private fun milliTimeStampStringer(milliStamp: Long): String {
            return LocalDateTime.ofInstant(
                Instant.ofEpochMilli(milliStamp), TimeZone.getDefault().toZoneId()
            ).format(DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss"))
        }
    }

    object AggregatedDescriptor : SDDescriptor<Long>() {
        override fun describeData(data: List<SDElement<Long>>) =
            data.groupingBy { it.key }.fold(0L) { sum, element -> sum + element.statsData }
    }
}
typealias SimpleTimeDescriptor = SDDescriptor.IdDescriptor<Long>

private inline fun <P, R> List<SDElement<P>>.groupByKey(
    statDataMapper: (P) -> R,
): Map<String, List<R>> {
    val grouped: Map<String, MutableList<R>> = groupingBy { it.key }.aggregate { _, acc, element, _ ->
        val data = statDataMapper(element.statsData)
        acc?.apply { add(data) } ?: mutableListOf(data)
    }
    return grouped
}
/*
 *     The Certora Prover
 *     Copyright (C) 2025  Certora Ltd.
 *
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, version 3 of the License.
 *
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package statistics

import datastructures.stdcollections.*
import java.io.Serializable

sealed interface KeyValueStats<P: Serializable> : SDFeature<P>, Serializable {
    fun addKeyValue(key: String, value: P) = apply {
        /* statsdata keys must not contain '.' */
        val tag = key.replace(".", "_")
        extractedData.add(SDElement(tag, value))
    }
}

data class GeneralKeyValueStats<P : Serializable>(
    override val precedingKeys: List<SDFeatureKey> = listOf(),
    override val extractedData: MutableList<SDElement<P>> = mutableListOf(),
) : KeyValueStats<P> {
    constructor(vararg precedingKeys: SDFeatureKey) : this(precedingKeys = precedingKeys.toList())

    override val descriptor = SDDescriptor.IdDescriptor<P>()

    override fun fork(vararg moreKeys: SDFeatureKey): GeneralKeyValueStats<P> =
        copy(
            extractedData = extractedData.deepCopy(),
            precedingKeys = precedingKeys + moreKeys.toList()
        )
}

/**
 * A [SDFeature] similar to [GeneralKeyValueStats] except for [descriptor],
 * where it presents [extractedData] as a scalar value (i.e. [extractedData].first())
 * if [extractedData].size == 1
 **/
data


grey-300));
  --tag-color-hover: rgb(var(--grey-100));
  --tag-bg: rgba(var(--grey-50), 0.05);
  --tag-bg-hover: rgba(var(--grey-50), 0.05);
  --tag-prefix: rgba(var(--grey-50), 0.6);
  --tag-prefix-hover: rgb(var(--grey-50));
  --tag-onboarding-bg: var(--grey-900);
  --tag-onboarding-border: var(--grey-700);

  /* Story */
  --story-comments-bg: rgb(var(--grey-800));
  --story-comments-bg-top: rgba(var(--grey-800), 0);
  --story-comments-bg-bottom: rgba(var(--grey-800), 1);

  /* Select icon */
  --select-icon: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDE2TDYgMTBIMThMMTIgMTZaIiBmaWxsPSIjYzJjNmNhIi8+Cjwvc3ZnPg==);

  /* Reactions */
  --reaction-like-color: rgb(var(--red-500));
  --reaction-like-bg: rgba(var(--red-500), 0.1);
  --reaction-custom-color: rgb(var(--green-600));
  --reaction-custom-bg: rgb(var(--green-600), 0.1);
  --reaction-save-color: rgb(var(--indigo-500));
  --reaction-save-bg: rgba(var(--indigo-500), 0.1);
  --reaction-comment-color: rgb(var(--yellow-500));
  --reaction-comment-bg: rgba(var(--yellow-500), 0.1);

  /* Code */
  --code-inline-bg: rgb(var(--white), 0.1);

  /* Onboarding suggested people */
  --content-row-hover-bg: rgba(var(--base-20));
}

:root {
  /*
  Separating some variables here as these are the results
  of broader Crayons refactoring (see #15311) and I did not
  want to mix everything together.
  */

  /***********************************************
  ** Buttons *************************************
  ***********************************************/

  /* Buttons: Default */
  --btn-bg: transparent;
  --btn-bg-hover: rgba(var(--indigo-900), 0.75);
  --btn-color: rgb(var(--grey-300));
  --btn-color-hover: rgb(var(--indigo-300));

  --btn-current-bg: rgb(var(--grey-700));
  --btn-current-color: rgb(var(--grey-50));

  /* Buttons: Primary */
  --btn-primary-bg: rgb(var(--indigo-700));
  --btn-primary-bg-hover: rgb(var(--indigo-600));
  --btn-primary-color: rgba(var(--white), 0.9);
  --btn-primary-color-hover: rgb(var(--white));

  /* Buttons: Secondary */
  --btn-secondary-bg: rgba(var(--indigo-600), 0.4);
  --btn-secondary-bg-hover: rgb(var(--indigo-700));
  --btn-secondary-color: rgb(var(--indigo-200));
  --btn-secondary-color-hover: rgb(var(--white));

  /* Buttons: Destructive Default */
  --btn-destructive-bg: transparent;
  --btn-destructive-bg-hover: rgba(var(--red-500), 0.3);
  --btn-destructive-color: rgb(var(--red-400));
  --btn-destructive-color-hover: rgb(var(--red-300));

  /* Buttons: Destructive Primary */
  --btn-primary-destructive-bg: rgb(var(--red-


_pos = (0, 0);
        loop {
            if let Some(connections) = self.edges.connections(&current_pos) {
                let mut next_pos = None;
                for (connection, cost) in connections {
                    let current_cost = self
                        .nodes
                        .get(&current_pos)
                        .unwrap_or(&None)
                        .unwrap_or(100000);
                    println!("{:?}", cost);
                    println!("{:?}", connection);
                    let new_cost = current_cost + *cost as usize;
                    match self.nodes.get_mut(&connection).expect("node should exist") {
                        Some(x) => {
                            if *x > new_cost {
                                *x = new_cost
                            }
                        }
                        y => *y = Some(new_cost),
                    };
                    next_pos = Some(connection);
                }

                if Some(&self.endpoint) == next_pos {
                    break;
                }
                if let Some(next_pos) = next_pos {
                    current_pos = *next_pos;
                } else {
                    break;
                }
            } else {
                break;
            }
        }
    }

    pub fn draw(&self) {
        let (x, y) = self.endpoint;

        for i in 0..=x {
            for j in 0..=y {
                if let Some(Some(point)) = self.nodes.get(&(i, j)) {
                    print!("{: ^6}", point)
                } else {
                    print!("{: ^6}", "x")
                }
                print!("|")
            }
            println!("")
        }
    }

    pub fn endpoint_score(&self) -> Option<&usize> {
        if let Some(Some(score)) = self.nodes.get(&self.endpoint) {
            Some(score)
        } else {
            None
        }
    }
}

// #[derive(Debug)]
// pub struct Node {
//     label: (usize, usize),
//     visted: Option<usize>,
// }

// impl Node {
//     pub fn new(pair: Pair) -> Node {
//         Node {
//             label: pair,
//             visted: None,
//         }
//     }
// }

// #[derive(Debug)]
// pub struct Edge<'a> {
//     left: &'a Pair,
//     right: &'a Pair,
//     cost: u8,
// }

// impl<'a> Edge<'a> {
//     pub fn new(left: &'a Pair, right: &'a Pair, cost: u8) -> Edge<'a> {
//         Edge { left, right, cost }
//     }
// }

#[derive(Debug)]
pub struct Finder<'a> {
    map: &'a Map,
    route: Route,
    scores: BTreeMap<(usize, usize), usize>,
}

impl<'a> Finder<'a> {
    pub fn new(map: &'a Map) -> Finder<'a> {
        Finder {
            map,
            route: Route::new(),
            scores: BTreeMap::new(),
        }
    }
}

fn fetch_file_path() -> &'static str {
    if Path::new("src/input.txt").exists() {
        "src/input.txt"
    } else {
        "day15/src/input.txt"
    }
}

fn main() -> Result<(), Box<dyn std::error::Error>> {


BD}.ui.brown.card,.ui.brown.cards>.card,.ui.cards>.brown.card{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #A5673F,0 1px 3px 0 #D4D4D5}.ui.brown.card:hover,.ui.brown.cards>.card:hover,.ui.cards>.brown.card:hover{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #975b33,0 1px 3px 0 #BCBDBD}.ui.cards>.grey.card,.ui.grey.card,.ui.grey.cards>.card{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #767676,0 1px 3px 0 #D4D4D5}.ui.cards>.grey.card:hover,.ui.grey.card:hover,.ui.grey.cards>.card:hover{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #838383,0 1px 3px 0 #BCBDBD}.ui.black.card,.ui.black.cards>.card,.ui.cards>.black.card{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #1B1C1D,0 1px 3px 0 #D4D4D5}.ui.black.card:hover,.ui.black.cards>.card:hover,.ui.cards>.black.card:hover{box-shadow:0 0 0 1px #D4D4D5,0 2px 0 0 #27292a,0 1px 3px 0 #BCBDBD}.ui.one.cards{margin-left:0;margin-right:0}.ui.one.cards>.card{width:100%}.ui.two.cards{margin-left:-1em;margin-right:-1em}.ui.two.cards>.card{width:calc(50% - 2em);margin-left:1em;margin-right:1em}.ui.three.cards{margin-left:-1em;margin-right:-1em}.ui.three.cards>.card{width:calc(33.33333333% - 2em);margin-left:1em;margin-right:1em}.ui.four.cards{margin-left:-.75em;margin-right:-.75em}.ui.four.cards>.card{width:calc(25% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.five.cards{margin-left:-.75em;margin-right:-.75em}.ui.five.cards>.card{width:calc(20% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.six.cards{margin-left:-.75em;margin-right:-.75em}.ui.six.cards>.card{width:calc(16.66666667% - 1.5em);margin-left:.75em;margin-right:.75em}.ui.seven.cards{margin-left:-.5em;margin-right:-.5em}.ui.seven.cards>.card{width:calc(14.28571429% - 1em);margin-left:.5em;margin-right:.5em}.ui.eight.cards{margin-left:-.5em;margin-right:-.5em}.ui.eight.cards>.card{width:calc(12.5% - 1em);margin-left:.5em;margin-right:.5em;font-size:11px}.ui.nine.cards{margin-left:-.5em;margin-right:-.5em}.ui.nine.cards>.card{width:calc(11.11111111% - 1em);margin-left:.5em;margin-right:.5em;font-size:10px}.ui.ten.cards{margin-left:-.5em;margin-right:-.5em}.ui.ten.cards>.card{width:calc(10% - 1em);margin-left:.5em;margin-right:.5em}@media only screen and (max-width:767px){.ui.two.doubling.cards,.ui.two.doubling.cards .card{margin-left:0;margin-right:0}.ui.two.doubling.cards .card{width:100%}.ui.three.doubling.cards{margin-left:-1em;margin-right:-1em}.ui.three.doubling.cards .card{width:calc(50% - 2em)


data.html) {
                    if (console) {
                        console.error('Error occured.');
                    }
                    return;
                }
                var html = r.data.html;
                var parent_id = parseInt(r.data.parent_id, 10) || 0;
                var parent_item = parent_id ? form.parents('li:first') : content;
                var ul = $('ul.reviews-branch:first', parent_item);
                if (parent_id) {
                    ul.show().append(html);
                } else {
                    ul.show().prepend(html);
                }
                $('.reviews-count-text').text(r.data.review_count_str);
                $('.reviews-count').text(r.data.count);
                form.find('input[name=count]').val(r.data.count);
                clear(form, true);
                content.find('.write-review a').click();
                form_wrapper.hide();
                if (typeof success === 'function') {
                    success(r);
                }
            },
        'json')
        .error(function(r) {
            if (console) {
                console.error(r.responseText ? 'Error occured: ' + r.responseText : 'Error occured.');
            }
        });
    };

    function showErrors(form, errors) {
        for (var name in errors) {
            $('[name='+name+']', form).last().addClass('error').parent().append($('').text(errors[name]));
        }
    };

    function clear(form, clear_inputs) {
        clear_inputs = typeof clear_inputs === 'undefined' ? true : clear_inputs;
        $('.errormsg', form).remove();
        $('.error',    form).removeClass('error');
        $('.wa-captcha-refresh', form).click();
        if (clear_inputs) {
            $('input[name=captcha], textarea', form).val('');
            $('input[name=rate]', form).val(0);
            $('input[name=title]', form).val('');
            $('.rate', form).trigger('clear');
        }
    };

    function prepareAddingForm(review_id)
    {
        var self = this; // clicked link
        if (review_id) {
            self.parents('.actions:first').after(form_wrapper);
            $('.rate ', form).trigger('clear').parents('.review-field:first').hide();
        } else {
            self.parents('.write-review').after(form_wrapper);
            form.find('.rate').parents('.review-field:first').show();
        }
        clear(form, false);
        $('input[name=parent_id]', form).val(review_id);
        form_wrapper.show();
    };

    function addHotkeyHandler(item_selector, hotkey_name, handler) {
        var hotkey = hotkeys[hotkey_name];
        form.off('keydown', item_selector).on('keydown', item_selector,
            function(e) {
                if (e.keyCode == hotkey.key &&
                    e.altKey  == hotkey.alt &&
                    e.ctrlKey == hotkey.ctrl &&
                    e.shiftKey == hotkey.shift)
                {
                    return handler();
                }
            }
        );
    };
});/**
 * BxSlider v4.1 - Fully loaded, responsive content slider
 * http://bxslider.com
 *
 * Copyri


xff]

v_cvt_rpi_i32_f32 v5, v1 row_ror:1
// GFX11: encoding: [0xfa,0x18,0x0a,0x7e,0x01,0x21,0x01,0xff]

v_cvt_rpi_i32_f32 v5, v1 row_ror:15
// GFX11: encoding: [0xfa,0x18,0x0a,0x7e,0x01,0x2f,0x01,0xff]

v_cvt_rpi_i32_f32 v5, v1 row_share:0 row_mask:0xf bank_mask:0xf
// GFX11: encoding: [0xfa,0x18,0x0a,0x7e,0x01,0x50,0x01,0xff]

v_cvt_rpi_i32_f32 v5, v1 row_share:15 row_mask:0x0 bank_mask:0x1
// GFX11: encoding: [0xfa,0x18,0x0a,0x7e,0x01,0x5f,0x01,0x01]

v_cvt_rpi_i32_f32 v5, v1 row_xmask:0 row_mask:0x1 bank_mask:0x3 bound_ctrl:1 fi:0
// GFX11: encoding: [0xfa,0x18,0x0a,0x7e,0x01,0x60,0x09,0x13]

v_cvt_rpi_i32_f32 v255, -|v255| row_xmask:15 row_mask:0x3 bank_mask:0x0 bound_ctrl:0 fi:1
// GFX11: encoding: [0xfa,0x18,0xfe,0x7f,0xff,0x6f,0x35,0x30]

v_cvt_u16_f16 v5, v1 quad_perm:[3,2,1,0]
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x1b,0x00,0xff]

v_cvt_u16_f16 v5, v1 quad_perm:[0,1,2,3]
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0xe4,0x00,0xff]

v_cvt_u16_f16 v5, v1 row_mirror
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x40,0x01,0xff]

v_cvt_u16_f16 v5, v1 row_half_mirror
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x41,0x01,0xff]

v_cvt_u16_f16 v5, v1 row_shl:1
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x01,0x01,0xff]

v_cvt_u16_f16 v5, v1 row_shl:15
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x0f,0x01,0xff]

v_cvt_u16_f16 v5, v1 row_shr:1
// GFX11: encoding: [0xfa,0xa4,0x0a,0x7e,0x01,0x11,0x01,0xff]

v_cvt_u16_f16 v5, v1 row_shr:15
// GFX11: encoding: [0xfa,0xa4,0x0a,0x


& c <= /* \"Z\" */90 || c >= /* \"\\192\" */192 && c <= /* \"\\214\" */214 || c >= /* \"\\216\" */216 && c <= /* \"\\222\" */222) {\n    return c + 32 | 0;\n  } else {\n    return c;\n  }\n}\n\nfunction parse_format(fmt) {\n  var len = fmt.length;\n  if (len > 31) {\n    throw [\n          Caml_builtin_exceptions.invalid_argument,\n          \"format_int: format too long\"\n        ];\n  }\n  var f = {\n    justify: \"+\",\n    signstyle: \"-\",\n    filter: \" \",\n    alternate: false,\n    base: /* Dec */2,\n    signedconv: false,\n    width: 0,\n    uppercase: false,\n    sign: 1,\n    prec: -1,\n    conv: \"f\"\n  };\n  var _i = 0;\n  while(true) {\n    var i = _i;\n    if (i >= len) {\n      return f;\n    }\n    var c = fmt.charCodeAt(i);\n    var exit = 0;\n    if (c >= 69) {\n      if (c >= 88) {\n        if (c >= 121) {\n          exit = 1;\n        } else {\n          switch (c - 88 | 0) {\n            case 0 :\n                f.base = /* Hex */1;\n                f.uppercase = true;\n                _i = i + 1 | 0;\n                continue ;\n            case 13 :\n            case 14 :\n            case 15 :\n                exit = 5;\n                break;\n            case 12 :\n            case 17 :\n                exit = 4;\n                break;\n            case 23 :\n                f.base = /* Oct */0;\n                _i = i + 1 | 0;\n                continue ;\n            case 29 :\n                f.base = /* Dec */2;\n                _i = i + 1 | 0;\n                continue ;\n            case 1 :\n            case 2 :\n            case 3 :\n            case 4 :\n            case 5 :\n            case 6 :\n            case 7 :\n            case 8 :\n            case 9 :\n            case 10 :\n            case 11 :\n            case 16 :\n            case 18 :\n            case 19 :\n            case 20 :\n            case 21 :\n            case 22 :\n            case 24 :\n            case 25 :\n            case 26 :\n            case 27 :\n            case 28 :\n            case 30 :\n            case 31 :\n                exit = 1;\n                break;\n            case 32 :\n                f.base = /* Hex */1;\n                _i = i + 1 | 0;\n                continue ;\n            \n          }\n        }\n      } else if (c >= 72) {\n        exit = 1;\n      } else {\n        f.signedconv = true;\n        f.uppercase = true;\n        f.conv = String.fromCharCode(lowercase(c));\n        _i = i + 1 | 0;\n        continue ;\n      }\n    } else {\n      switch (c) {\n        case 35 :\n            f.alternate = true;\n            _i = i + 1 | 0;\n            continue ;\n        case 32 :\n        case 43 :\n            exit = 2;\n            break;\n        case 45 :\n            f.justify = \"-\";\n            _i = i + 1 | 0;\n            continue ;\n        case 46 :\n            f.prec = 0;\n


@include breakpoint(large) {
    @include xy-cell(3);
    display: block;
    float: right;

    .docs-sub-menu {
      font-size: 0.85rem;
      margin-top: 1rem;
    }

    .docs-menu-title {
      text-transform: uppercase;
      font-size: 0.75rem;
      color: $dark-gray;
      font-weight: bold;
      line-height: 1;
      padding-left: 0.9rem;
      margin-bottom: 0.5rem;
      border-top: 1px solid $medium-gray;
      margin-top: 1rem;
      padding-top: 1.5rem;
    }

    .docs-toc {
      width: 100%;
      padding-left: 4rem;
      padding-right: 1rem;
    }

    .docs-toc .active {
      background: #2199e8;
      color: white;
    }

    .docs-toc .docs-sub-menu:first-child .docs-menu-title {
      margin-top: 0;
      border-top: 0;
      padding-top: 0;
    }
  }
}

.kitchen-sink-grid {
  .grid-x {
    background: #d6ecfa;
    font-size: 12px;
    line-height: 2rem;
    margin-bottom: 1.5rem;

    .cell,:nth-child(odd) {
      background: #7bc1ef;
      color: #0a0a0a;
    }

    .cell:nth-child(even) {
      background: #1779ba;
      color: #fefefe;
    }
  }
}
@import "tailwindcss";
@import "tailwindcss/theme";
@import "tailwindcss/utilities";
@import "./styles/typography.css";
@import "./styles/colors.css";
@import "./styles/cursors.css";
@import "./styles/shadows.css";
@import "./styles/radius.css";
@import "./styles/borders.css";
@import "./styles/utilities.css";
@import "./styles/animations.css";

@plugin 'tailwindcss-animate';

@custom-variant dark (&:is(.dark *));

@theme {
	/* === Animation === */
	--animation-duration-fast: 150ms;
	--animation-duration-normal: 250ms;
	--animation-duration-slow: 400ms;
	--animation-easing-standard: cubic-bezier(0.16, 1, 0.3, 1);
	--animation-easing-linear: linear;
	--animation-easing-ease: ease;
	--animation-easing-ease-in: ease-in;
	--animation-easing-ease-out: ease-out;
	--animation-easing-ease-in-out: ease-in-out;

	/* ======= SPACING ======= */
	/* We rely on Tailwind's default spacing scale */
	/* ======= BREAKPOINTS ======= */
	/* Use desktop: to style desktop variants of properties */
	/* ======= Z-INDEX SCALE ======= */
	/*
     * Z-index scale uses semantic naming with base-10 values for clarity and maintainability
     * Each level has a specific purpose and a 10-point gap to allow for intermediate values when needed
     */
	--z-negative: -10; /* For elements that should be visually behind the page */
	--z-base: 0; /* Default z-index for most elements */
	--z-content: 10; /* Regular page content th