eNode node = new TreeNode(5, 1);
        node.toLeaf(0.5);

        assertEquals(TreeNode.Type.LEAF, node.getType());
        assertEquals(5, node.predictNextNodeKey(features1).nodeId());
        assertEquals(5, node.predictNextNodeKey(features2).nodeId());
    }

    /** */
    @Test
    public void testPredictNextIdForTree() {
        TreeNode root = new TreeNode(1, 1);
        root.toConditional(0, 0.1);

        assertEquals(TreeNode.Type.CONDITIONAL, root.getType());
        assertEquals(2, root.predictNextNodeKey(features1).nodeId());
        assertEquals(3, root.predictNextNodeKey(features2).nodeId());
    }

    /** */
    @Test
    public void testPredictProba() {
        TreeNode root = new TreeNode(1, 1);
        List<TreeNode> leaves = root.toConditional(0, 0.1);
        leaves.forEach(leaf -> {
            leaf.toLeaf(leaf.getId().nodeId() % 2);
        });

        assertEquals(TreeNode.Type.CONDITIONAL, root.getType());
        assertEquals(0.0, root.predict(features1), 0.001);
        assertEquals(1.0, root.predict(features2), 0.001);
    }
}
/*
 * Copyright 2019 GridGain Systems, Inc. and Contributors.
 *
 * Licensed under the GridGain Community Edition License (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.gridgain.com/products/software/community-edition/gridgain-community-edition-license
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.apache.ignite.ml.tree.impurity.mse;

import java.util.Random;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * Tests for {@link MSEImpurityMeasure}.
 */
public class MSEImpurityMeasureTest {
    /** */
    @Test
    public void testImpurityOnEmptyData() {
        MSEImpurityMeasure impurity = new MSEImpurityMeasure(0, 0, 0, 0, 0, 0);

        assertEquals(0.0, impurity.impurity(), 1e-10);
    }

    /** */
    @Test
    public void testImpurityLeftPart() {
        // Test on left part [1, 2, 2, 1, 1, 1].
        MSEImpurityMeasure impurity = new MSEImpurityMeasure(8, 12, 6, 0, 0, 0);

        assertEquals(1.333, impurity.impurity(), 1e-3);
    }

    /** */
    @Test
    public void testImpurityRightPart() {
        // Test on right part [1, 2, 2, 1, 1, 1].
        MSEImpurityMeasure impurity = new MSEImpurityMeasure(0, 0, 0, 8, 12, 6);

        assertEquals(1.333, impurity.impurity(), 1e-3);
    }

    /** */
    @Test
    public void testImpurityLeftAndRightPart() {
        // Test on left part [1, 2, 2] and right part [1, 1, 1].
        MSEImpurityMeasure impurity = new MSEImpurityMeasure(5, 9, 3, 3, 3, 3);

        assertEquals(0.666, impurity.impurity(), 1e-3);
    }

    /** */
    @Test
    public void testAdd() {
        Random rnd = new Random(0);

        MSEImpurityMeasure a = new MSEImpurityMeasure(
            rnd.nextDouble(), rnd.nextDouble(), rnd.nextInt(), rnd.nextDouble(), rnd.nextDouble(), rnd.nextInt()
        );

        MSEImpurityMeasure b = new MSEImpurityMeasure(
            rnd.nextDouble(), rnd.nextDouble(), rnd.nextInt(), rnd.nextDouble(), rnd.nextDouble(), rnd.nextInt()
        );

        MSEImpurityMeasure c = a.add(b);

        assertEquals(a.get


       z,
		blobBytes:          blobBytes,
		challengeDigest:    challengeDigest,
	}

	proof, err := daBatch.blobDataProofForPICircuit()
	if err != nil {
		return nil, err
	}

	daBatch.blobDataProof = proof

	return daBatch, nil
}

// newDABatchV3WithProof is a constructor for daBatchV3 that allows directly passing blobDataProof.
func newDABatchV3WithProof(version CodecVersion, batchIndex, l1MessagePopped, totalL1MessagePopped, lastBlockTimestamp uint64,
	dataHash, parentBatchHash, blobVersionedHash common.Hash, skippedL1MessageBitmap []byte,
	blob *kzg4844.Blob, z *kzg4844.Point, blobBytes []byte, challengeDigest common.Hash, blobDataProof [2]common.Hash,
) *daBatchV3 {
	return &daBatchV3{
		daBatchV0: daBatchV0{
			version:                version,
			batchIndex:             batchIndex,
			l1MessagePopped:        l1MessagePopped,
			totalL1MessagePopped:   totalL1MessagePopped,
			dataHash:               dataHash,
			parentBatchHash:        parentBatchHash,
			skippedL1MessageBitmap: skippedL1MessageBitmap,
		},
		blobVersionedHash:  blobVersionedHash,
		lastBlockTimestamp: lastBlockTimestamp,
		blob:               blob,
		z:                  z,
		blobBytes:          blobBytes,
		challengeDigest:    challengeDigest,
		blobDataProof:      blobDataProof, // Set blobDataProof directly
	}
}

// Encode serializes the DABatchV3 into bytes.
func (b *daBatchV3) Encode() []byte {
	batchBytes := make([]byte, daBatchV3EncodedLength)
	batchBytes[daBatchOffsetVersion] = byte(b.version)
	binary.BigEndian.PutUint64(batchBytes[daBatchOffsetBatchIndex:daBatchV3OffsetL1MessagePopped], b.batchIndex)
	binary.BigEndian.PutUint64(batchBytes[daBatchV3OffsetL1MessagePopped:daBatchV3OffsetTotalL1MessagePopped], b.l1MessagePopped)
	binary.BigEndian.PutUint64(batchBytes[daBatchV3OffsetTotalL1MessagePopped:daBatchOffsetDataHash], b.totalL1MessagePopped)
	copy(batchBytes[daBatchOffsetDataHash:daBatchV3OffsetBlobVersionedHash], b.dataHash[:])
	copy(batchBytes[daBatchV3OffsetBlobVersionedHash:daBatchV3OffsetParentBatchHash], b.blobVersionedHash[:])
	copy(batchBytes[daBatchV3OffsetParentBatchHash:daBatchV3OffsetLastBlockTimestamp], b.parentBatchHash[:])
	binary.BigEndian.PutUint64(batchBytes[daBatchV3OffsetLastBlockTimestamp:daBatchV3OffsetBlobDataProof], b.lastBlockTimestamp)
	copy(batchBytes[daBatchV3OffsetBlobDataProof:daBatchV3OffsetBlobDataProof+kzgPointByteSize], b.blobDataProof[0].Bytes())
	copy(batchBytes[daBatchV3OffsetBlobDataProof+kzgPointByteSize:daBatchV3EncodedLength], b.blobDataProof[1].Bytes())
	return batchBytes
}

// Hash computes the hash of the serialized DABatch.
func (b *daBatchV3) Hash() common.Hash {
	bytes := b.Encode()
	return crypto.Keccak256Hash(bytes)
}

// blobDataProofForPICircuit computes the abi-encoded blob verification data.
func (b *daBatchV3) blobDataProofForPICircuit() ([2]common.Hash, error) {
	if b.blob == nil {
		return [2]common.Hash{}, errors.New("called blobDataProofForPICircuit with empty blob")
	}
	if b.z == nil {
		return [2]common.Hash{}, errors.New("called blobDataProofForPICircuit with empty z")
	}

	_, y, err


      UnboundedId {
            bytes: id.bytes,
            len: id.len,
        }
    }
}

impl From<InitialId> for UnboundedId {
    fn from(id: InitialId) -> Self {
        UnboundedId {
            bytes: id.bytes,
            len: id.len,
        }
    }
}

impl From<InitialId> for PeerId {
    fn from(id: InitialId) -> Self {
        PeerId {
            bytes: id.bytes,
            len: id.len,
        }
    }
}

// A LocalId may be converted to an InitialId, but InitialId has a higher
// minimum length, so conversion may not succeed.
impl TryFrom<LocalId> for InitialId {
    type Error = Error;

    #[inline]
    fn try_from(value: LocalId) -> Result<Self, Self::Error> {
        value.as_bytes().try_into()
    }
}

#[derive(Debug, PartialEq)]
pub enum Error {
    InvalidLength,
    InvalidLifetime,
}

impl Error {
    fn message(&self) -> &'static str {
        match self {
            Error::InvalidLength => "invalid connection id length",
            Error::InvalidLifetime => "invalid connection id lifetime",
        }
    }
}

impl core::fmt::Display for Error {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        write!(f, "{}", self.message())
    }
}

impl From<Error> for transport::Error {
    #[inline]
    fn from(error: Error) -> Self {
        Self::PROTOCOL_VIOLATION.with_reason(error.message())
    }
}

/// Information about the connection that may be used
/// when generating or validating connection IDs
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct ConnectionInfo<'a> {
    pub remote_address: SocketAddress<'a>,
}

impl<'a> ConnectionInfo<'a> {
    #[inline]
    #[doc(hidden)]
    pub fn new(remote_address: &'a inet::SocketAddress) -> Self {
        Self {
            remote_address: remote_address.into_event(),
        }
    }
}

/// Format for connection IDs
pub trait Format: 'static + Validator + Generator + Send {}

/// Implement Format for all types that implement the required subtraits
impl<T: 'static + Validator + Generator + Send> Format for T {}

/// A validator for a connection ID format
pub trait Validator {
    //= https://www.rfc-editor.org/rfc/rfc9000#section-10.3.2
    //# An endpoint that uses this design MUST
    //# either use the same connection ID length for all connections or
    //# encode the length of the connection ID such that it can be recovered
    //# without state.
    /// Validates a connection ID from a buffer
    ///
    /// Implementations should handle situations where the buffer will include extra
    /// data after the connection ID.
    ///
    /// Returns the length of the connection id if successful, otherwise `None` is returned.
    fn validate(&self, connection_info: &ConnectionInfo, buffer: &[u8]) -> Option<usize>;
}

impl Validator for usize {
    #[inline]
    fn validate(&self, _connection_info: &ConnectionInfo, buffer: &[u8]) -> Option<usize> {
        if buffer.len() >= *self {
            Some(*self)
        } else {
            None
        }
    }
}

/// A generator for a connection ID format
pub trait Generator {
    /// Generates a connection ID.
    ///
    /// Connection IDs MUST NOT contain any information that can be used by
    /// an external observer (that is, one that does not cooperate with the
    /// issuer) to correlate them with other connection IDs for the same
    /// connection.
    ///
    /// Each call to `generate` should produce a unique Connection ID,
    /// otherwise the endpoint may terminate.
    fn generate(&mut self, connection_info: &ConnectionInfo) -> LocalId;

    /// The maximum amount of time each generated connection ID should


SlotID());

	if (BN_cmp(bn_in, m_dh->p) >= 0)
		eWarning("[CI%d RCC] DHPM >= dh_p!!!", m_slot->getSlotID());

	BN_mod_exp(out, bn_in, m_dh->q, m_dh->p, ctx);
	if (BN_cmp(out, BN_value_one()) != 0)
		eWarning("[CI%d RCC] DHPM ^ dh_q mod dh_p != 1!!!", m_slot->getSlotID());

	BN_free(out);
	BN_CTX_free(ctx);
#endif

	int codes = 0;
	int ok = DH_check_pub_key(m_dh, bn_in, &codes);
	if (ok == 0)
		eDebug("[CI%d RCC] check_pub_key failed", m_slot->getSlotID());
	if (codes & DH_CHECK_PUBKEY_TOO_SMALL)
		eDebug("[CI%d RCC] too small public key", m_slot->getSlotID());
	if (codes & DH_CHECK_PUBKEY_TOO_LARGE)
		eDebug("[CI%d RCC] too large public key", m_slot->getSlotID());

	int gap = 256 - len;
	memset(m_dhsk, 0, gap);
	DH_compute_key(m_dhsk + gap, bn_in, m_dh);

	BN_free(bn_in);

	return 0;
}

bool eDVBCICcSession::check_dh_challenge()
{
	if (!m_ci_elements.valid(AUTH_NONCE))
		return false;

	if (!m_ci_elements.valid(CICAM_ID))
		return false;

	if (!m_ci_elements.valid(DHPM))
		return false;

	if (!m_ci_elements.valid(SIGNATURE_B))
		return false;

	compute_dh_key();
	generate_akh();

	m_akh_index = 5;

	eDebug("[CI%d RCC] writing...", m_slot->getSlotID());
	write_authdata(m_slot->getSlotID(), m_ci_elements.get_ptr(HOST_ID), m_dhsk, m_ci_elements.get_ptr(AKH));

	return true;
}

int eDVBCICcSession::generate_dh_key()
{
	uint8_t dhph[256];
	int len;
	unsigned int gap;
	BIGNUM *p, *g, *q;
	const BIGNUM *pub_key;

	m_dh = DH_new();

	p = BN_bin2bn(m_dh_p, sizeof(m_dh_p), 0);
	g = BN_bin2bn(m_dh_g, sizeof(m_dh_g), 0);
	q = BN_bin2bn(m_dh_q, sizeof(m_dh_q), 0);
	DH_set0_pqg(m_dh, p, q, g);
	DH_set_flags(m_dh, DH_FLAG_NO_EXP_CONSTTIME);

	DH_generate_key(m_dh);

	DH_get0_key(m_dh, &pub_key, NULL);
	len = BN_num_bytes(pub_key);
	if (len > 256)
	{
		eWarning("[CI%d RCC] too long public key", m_slot->getSlotID());
		return -1;
	}

#if 0
	// verify DHPH
	BN_CTX *ctx = BN_CTX_new();
	BIGNUM *out = BN_new();

	if (BN_cmp(BN_value_one(), m_dh->pub_key) >= 0)
		eWarning("[CI%d RCC] DHPH <= 1!!!", m_slot->getSlotID());
	if (BN_cmp(m_dh->pub_key, m_dh->p) >= 0)
		eWarning("[CI%d RCC] DHPH >= dh_p!!!", m_slot->getSlotID());
	BN_mod_exp(out, m_dh->pub_key, m_dh


prefixed buffer
     * @return a new buffer on the same underlying data that has skipped the
     *         size prefix
     */
    public static ByteBuffer removeSizePrefix(ByteBuffer bb) {
        ByteBuffer s = bb.duplicate();
        s.position(s.position() + SIZE_PREFIX_LENGTH);
        return s;
    }

}

/// @}
/*
 * Copyright 2019 Google Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.flatbuffers;

import java.nio.ByteBuffer;

/// @cond FLATBUFFERS_INTERNAL

/**
 * All vector access objects derive from this class, and add their own accessors.
 */
public class BaseVector {
  /** Used to hold the vector data position. */
  private int vector;
  /** Used to hold the vector size. */
  private int length;
  /** Used to hold the vector element size in table. */
  private int element_size;
  /** The underlying ByteBuffer to hold the data of the vector. */
  protected ByteBuffer bb;

  /**
   * Get the start data of a vector.
   *
   * @return Returns the start of the vector data.
   */
  protected int __vector() {
    return vector;
  }

  /**
   * Gets the element position in vector's ByteBuffer.
   *
   * @param j An `int` index of element into a vector.
   * @return Returns the position of the vector element in a ByteBuffer.
   */
  protected int __element(int j) {
    return vector + j * element_size;
  }

  /**
   * Re-init the internal state with an external buffer {@code ByteBuffer}, an offset within and
   * element size.
   *
   * This method exists primarily to allow recycling vector instances without risking memory leaks
   * due to {@code ByteBuffer} references.
   */
  protected void __reset(int _vector, int _element_size, ByteBuffer _bb) {
    bb = _bb;
    if (bb != null) {
      vector = _vector;
      length = bb.getInt(_vector - Constants.SIZEOF_INT);
      element_size = _element_size;
    } else {
      vector = 0;
      length = 0;
      element_size = 0;
    }
  }

  /**
   * Resets the internal state with a null {@code ByteBuffer} and a zero position.
   *
   * This method exists primarily to allow recycling vector instances without risking memory leaks
   * due to {@code ByteBuffer} references. The instance will be unusable until it is assigned
   * again to a {@code ByteBuffer}.
   */
  public void reset() {
    __reset(0, 0, null);
  }

  /**
   * Get the length of a vector.
   *
   * @return Returns the length of the vector.
   */
  public int length() {
    return length;
  }
}

/// @endcond
package com.mycompany.store.web.rest;

import com.mycompany.store.config.Constants;
import com.mycompany.store.StoreApp;
import com.mycompany.store.domain.Authority;
import com.mycompany.store.domain.User;
import com.mycompany.store.repository.AuthorityRepository;
import com.mycompany.store.repository.UserRepository;
import com.mycompany.store.security.AuthoritiesConstants;
import com.mycompany.store.service.MailService;
import com.mycompany.store.service.dto.UserDTO;
import com.mycompany.store.web.rest.errors.ExceptionTranslator;
import com.mycompany.store.web.rest.vm.KeyAndPasswordVM;
import com.mycompany.store.web.rest.vm.ManagedUs


## prim
import sys,heapq
input = sys.stdin.readline

def prim(start):
    heap = []
    visited = [0]*(V+1)
    heapq.heappush(heap,(0,start))
    suma = 0
    while heap:
        w,v = heapq.heappop(heap)
        if visited[v]:
            continue
        visited[v] = 1
        suma += w
        for nw,nv in graph[v]:
            if visited[nv]:
                pass
            heapq.heappush(heap,(nw,nv))
    return suma

V = int(input())
E = int(input())
graph = [[] for _ in range(V+1)]
for _ in range(E):
    a, b ,c = map(int,input().split())
    graph[a].append((c,b))
    graph[b].append((c,a))

print(prim(1))

##kruskal
# 대표차 찾기
def find_set(x):
    if parents[x] == x:
        return x
    parents[x] = find_set(parents[x])
    return parents[x]

# 대표자 저장 과정 (루트의 동일 여부로 판단)
def union(x,y):
    x = find_set(x)
    y = find_set(y)

    if x == y:
        return
    if x<y:
        parents[y] = x
    else:
        parents[x] = y

V = int(input())
E = int(input())
edge = []
for _ in range(E):
    a,b,c = map(int,input().split())
    edge.append([a,b,c])
# 가중치를 기준으로 오름차순정렬
edge.sort(key=lambda x:x[2])

# make set 과정
parents = [i for i in range(V+1)]

# 정점 방문 횟수 기록
cnt = 0
# 지나온 간선의 가중치 기록
suma = 0
# 찾을 수 있는 모든 최소 신장 트리의 경우의 수 찾기
for a,b,c, in edge:
    # 싸이클이 발생하지 않을때마다 실행
    if find_set(a) != find_set(b):
        cnt += 1
        suma += c
        union(a,b)
        # 최소 신장 트리를 구하면
        if cnt == V:
            break
print(suma)


LEENDIAN;
            }

            return (CORINFO_FIELD_ACCESSOR)(-1);
        }

        private bool isFieldStatic(CORINFO_FIELD_STRUCT_* fldHnd)
        {
            return HandleToObject(fldHnd).IsStatic;
        }

        private void getBoundaries(CORINFO_METHOD_STRUCT_* ftn, ref uint cILOffsets, ref uint* pILOffsets, BoundaryTypes* implicitBoundaries)
        {
            // TODO: Debugging
            cILOffsets = 0;
            pILOffsets = null;
            *implicitBoundaries = BoundaryTypes.DEFAULT_BOUNDARIES;
        }

        private void getVars(CORINFO_METHOD_STRUCT_* ftn, ref uint cVars, ILVarInfo** vars, ref bool extendOthers)
        {
            // TODO: Debugging

            cVars = 0;
            *vars = null;

            // Just tell the JIT to extend everything.
            extendOthers = true;
        }

        private void* allocateArray(UIntPtr cBytes)
        {
            return (void*)Marshal.AllocHGlobal((IntPtr)(void*)cBytes);
        }

        private void freeArray(void* array)
        {
            Marshal.FreeHGlobal((IntPtr)array);
        }

        private CORINFO_ARG_LIST_STRUCT_* getArgNext(CORINFO_ARG_LIST_STRUCT_* args)
        {
            return (CORINFO_ARG_LIST_STRUCT_*)((int)args + 1);
        }

        private CorInfoTypeWithMod getArgType(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args, CORINFO_CLASS_STRUCT_** vcTypeRet)
        {
            int index = (int)args;
            Object sigObj = HandleToObject((IntPtr)sig->pSig);

            MethodSignature methodSig = sigObj as MethodSignature;

            if (methodSig != null)
            {
                TypeDesc type = methodSig[index];

                CorInfoType corInfoType = asCorInfoType(type, vcTypeRet);
                return (CorInfoTypeWithMod)corInfoType;
            }
            else
            {
                LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj;
                TypeDesc type = locals[index].Type;

                CorInfoType corInfoType = asCorInfoType(type, vcTypeRet);

                return (CorInfoTypeWithMod)corInfoType | (locals[index].IsPinned ? CorInfoTypeWithMod.CORINFO_TYPE_MOD_PINNED : 0);
            }
        }

        private CORINFO_CLASS_STRUCT_* getArgClass(CORINFO_SIG_INFO* sig, CORINFO_ARG_LIST_STRUCT_* args)
        {
            int index = (int)args;
            Object sigObj = HandleToObject((IntPtr)sig->pSig);

            MethodSignature methodSig = sigObj as MethodSignature;
            if (methodSig != null)
            {
                TypeDesc type = methodSig[index];
                return ObjectToHandle(type);
            }
            else
            {
                LocalVariableDefinition[] locals = (LocalVariableDefinition[])sigObj;
                TypeDesc type = locals[index].Type;
                return ObjectToHandle(type);
            }
        }

        private CorInfoHFAElemType getHFAType(CORINFO_CLASS_STRUCT_* hClass)
        {
            var type = (DefType)HandleToObject(hClass);

            // See MethodTable::GetHFAType and Compiler::GetHfaType.
            return (type.ValueTypeShapeCharacteristics & ValueTypeShapeCharacteristics.AggregateMask) switch
            {
                ValueTypeShapeCharacteristics.Float32Aggregate => CorInfoHFAElemType.CORINFO_HFA_ELEM_FLOAT,
                ValueTypeShapeCharacteristics.Float64Aggregate => CorInfoHFAElemType.CORINFO_HFA_ELEM_DOUBLE,
                ValueTypeShapeCharacteristics.Vector64Aggregate => CorInfoHFAElemType.CORINFO_HFA_ELEM_VECTOR64,
                ValueTypeShapeCharacteristics.Vector128Aggregate => CorInfoHFAElemType.CORINFO_HFA_ELEM_VECTOR128,
                _ => CorInfoHFAElemType.


 .btn-#{$color}:not(.disabled):hover {
    @include btn-shadow(shade-color($value, 8%));
  }
}

[class*="btn-outline-"] {
  text-shadow: none;
}

// Indicators

.badge {
  &.bg-light {
    color: $dark;
  }
}

// Containers

.card,
.list-group-item {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: inherit;
  }
}
@charset "UTF-8";/*!
 * Bootswatch v5.3.1 (https://bootswatch.com)
 * Theme: journal
 * Copyright 2012-2023 Thomas Park
 * Licensed under MIT
 * Based on Bootstrap
*//*!
 * Bootstrap  v5.3.1 (https://getbootstrap.com/)
 * Copyright 2011-2023 The Bootstrap Authors
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
 */@import url(https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;700&display=swap);:root,[data-bs-theme=light]{--bs-blue:#eb6864;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#e83e8c;--bs-red:#f57a00;--bs-orange:#fd7e14;--bs-yellow:#f5e625;--bs-green:#22b24c;--bs-teal:#20c997;--bs-cyan:#369;--bs-black:#000;--bs-white:#fff;--bs-gray:#777;--bs-gray-dark:#333;--bs-gray-100:#f8f9fa;--bs-gray-200:#eee;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#aaa;--bs-gray-600:#777;--bs-gray-700:#495057;--bs-gray-800:#333;--bs-gray-900:#222;--bs-primary:#eb6864;--bs-secondary:#aaa;--bs-success:#22b24c;--bs-info:#369;--bs-warning:#f5e625;--bs-danger:#f57a00;--bs-light:#f8f9fa;--bs-dark:#222;--bs-primary-rgb:235,104,100;--bs-secondary-rgb:170,170,170;--bs-success-rgb:34,178,76;--bs-info-rgb:51,102,153;--bs-warning-rgb:245,230,37;--bs-danger-rgb:245,122,0;--bs-light-rgb:248,249,250;--bs-dark-rgb:34,34,34;--bs-primary-text-emphasis:#5e2a28;--bs-secondary-text-emphasis:#444444;--bs-success-text-emphasis:#0e471e;--bs-info-text-emphasis:#14293d;--bs-warning-text-emphasis:#625c0f;--bs-danger-text-emphasis:#623100;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#fbe1e0;--bs-secondary-bg-subtle:#eeeeee;--bs-success-bg-subtle:#d3f0db;--bs-info-bg-subtle:#d6e0eb;--bs-warning-bg-subtle:#fdfad3;--bs-danger-bg-subtle:#fde4cc;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#f7c3c1;--bs-secondary-border-subtle:#dddddd;--bs-success-border-subtle:#a7e0b7;--bs-info-border-subtle:#adc2d6;--bs-warning-border-subtle:#fbf5a8;--bs-danger-border-subtle:#fbca99;--bs-light-border-subtle:#eee;


Class.MAGE_KNIGHT,
				CharacterClass.MAGE_KNIGHT_F,
				CharacterClass.EIRIKA_MASTER_LORD,
				CharacterClass.EPHRAIM_MASTER_LORD,
				CharacterClass.TARVOS,
				CharacterClass.MAELDUIN,
				CharacterClass.NONE,
				CharacterClass.NONE,
				CharacterClass.NONE // One placeholder for Eirika, one placeholder for Ephraim, and one terminator.
				));
	}

	public List<GBAFEClass> knightEffectivenessClasses() {
		return new ArrayList<GBAFEClass>(Arrays.asList(
				CharacterClass.GREAT_KNIGHT,
				CharacterClass.GREAT_KNIGHT_F,
				CharacterClass.KNIGHT,
				CharacterClass.KNIGHT_F,
				CharacterClass.GENERAL,
				CharacterClass.GENERAL_F,
				CharacterClass.NONE,
				CharacterClass.NONE,
				CharacterClass.NONE
				));
	}

	public List<GBAFEClass> cavalryEffectivenessClasses() {
		return new ArrayList<GBAFEClass>(Arrays.asList(
				CharacterClass.CAVALIER,
				CharacterClass.CAVALIER_F,
				CharacterClass.PALADIN,
				CharacterClass.PALADIN_F,
				CharacterClass.GREAT_KNIGHT,
				CharacterClass.GREAT_KNIGHT_F,
				CharacterClass.RANGER,
				CharacterClass.RANGER_F,
				CharacterClass.TROUBADOUR,
				CharacterClass.VALKYRIE,
				CharacterClass.MAGE_KNIGHT,
				CharacterClass.MAGE_KNIGHT_F,
				CharacterClass.EIRIKA_MASTER_LORD,
				CharacterClass.EPHRAIM_MASTER_LORD,
				CharacterClass.TARVOS,
				CharacterClass.MAELDUIN,
				CharacterClass.NONE,
				CharacterClass.NONE,
				CharacterClass.NONE
				));
	}

	public List<GBAFEClass> dragonEffectivenessClasses() {
		return new ArrayList<GBAFEClass>(Arrays.asList(
				CharacterClass.DRACOZOMBIE,
				CharacterClass.MANAKETE_2,
				CharacterClass.MANAKETE_F,
				CharacterClass.WYVERN_RIDER,
				CharacterClass.WYVERN_RIDER_F,
				CharacterClass.WYVERN_KNIGHT,
				CharacterClass.WYVERN_KNIGHT_F,
				CharacterClass.WYVERN_LORD,
				CharacterClass.WYVERN_LORD_F,
				CharacterClass.NONE,
				CharacterClass.NONE,
				CharacterClass.NONE
				));
	}

	public List<GBAFEClass> flierEffectivenessClasses() {
		return new ArrayList<GBAFEClass>(Arrays.asList(
				CharacterClass.PEGASUS_KNIGHT,
				CharacterClass.FALCON_KNIGHT,
				CharacterClass.WYVERN_KNIGHT,
				CharacterClass.WYVERN_KNIGHT_F,
				CharacterClass.WYVERN_RIDER,
				CharacterClass.WYVERN_RIDER_F,
				CharacterClass.WYVERN_LORD,
				CharacterClass.WYVERN_LORD_F,
				CharacterClass.GARGOYLE,
				CharacterClass.DEATHGOYLE,
				CharacterClass.MANAKETE_2,
				CharacterClass.MANAKETE_F,
				CharacterClass.DRACOZOMBIE,
				CharacterClass.NONE,
				CharacterClass.NONE,
				CharacterClass.NONE
				));
	}

	public List<GBAFEClass> myrmidonEffectivenessClasses() {
		return new ArrayList<GBAFEClass>(Arrays.asList(
				CharacterClass.MYRMIDON,
				CharacterClass.MYRMIDON_F,
				CharacterClass.SWORDMASTER,
				CharacterClass.SWORDMASTER_F,
				CharacterClass.MERCENARY,
				CharacterClass.MERCENARY_F,
				CharacterClass.HERO,
				C


--[[ Copyright (C) 2018-2019 The DMLab2D Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
]]

--[[ Asserts library.

All the following examples assume the following header.

```Lua
local asserts = require 'testing.asserts'
local args = require 'common.args'
```

## `asserts.that(target, matcher, msg)`

`matcher` must be a constraint from common.args library. Throws error if the
constraint does not match `target`. This is quite powerful and can be used
instead of most of the following assertion.

```Lua
asserts.that(5, args.all(args.gt(4), args.lt(10)))
asserts.shouldFail(asserts.that(5, args.all(args.gt(1), args.lt(4))))
```

## `asserts.EQ(target, expect, msg)`

Throws an error if *not* `target == expect`.

```Lua
asserts.EQ(5, 5)
asserts.shouldFail(asserts.EQ(5, 4))
```

## `asserts.NE(target, expect, msg)`

Throws an error if *not* `target ~= expect`.

```Lua
asserts.NE(5, 4)
asserts.shouldFail(asserts.NE(5, 5))
```

## `asserts.GT(target, expect, msg)`

Throws an error if *not* `target > expect`.

```Lua
asserts.GT(5, 4)
asserts.shouldFail(asserts.GT(5, 6))
```

## `asserts.GE(target, expect, msg)`

Throws an error if *not* `target >= expect`.

```Lua
asserts.GE(5, 5)
asserts.shouldFail(asserts.GE(5, 6))
```

## `asserts.LT(target, expect, msg)`

Throws an error if *not* `target < expect`.

```Lua
asserts.LT(4, 5)
asserts.shouldFail(asserts.LT(5, 4))
```

## `asserts.LE(target, expect, msg)`

Throws an error if *not* `target <= expect`.

```Lua
asserts.LE(3, 4)
asserts.shouldFail(asserts.LE(5, 3))
```

## `asserts.hasSubstr(source, substr, msg)`

Throws an error if `source` *does not* contain `substr` as a substring.

```Lua
asserts.hasSubstr('My string is here', 'is her')
asserts.shouldFail(
    function() asserts.hasSubstr('My string is here', 'not there') end)
```

## `asserts.tablesEQ(target, expect, msg)`

Throws an error if values of nested table `target` *do not* match `expected`.

```Lua
asserts.tablesEQ({5, a = {b = 10}}, {5, a = {b = 8}})
asserts.shouldFail(asserts.tablesEQ({5, a = {b = 8}}, {5, a = {b = 8, c = 8}}))
```

## `asserts.tablesNE(target, expect, msg)`

Throws an error if values of nested table `target` *do* match `expected`.

```Lua
asserts.tablesNE({5, a = {b = 10}}, {5, a = {b = 8, c = 8}})
asserts.shouldFail(asserts.tablesNE({5, a = {b = 8}}, {5, a = {b = 8}}))
```

## `asserts.shouldFail(fn, substrings...)`

Throws an error if calling fn *does not* raise an error. And if `substrings` are
specified that error must contain each substring in its entirety.
]]

local args =


agnification factor
    bool Create(int width, int height, const wxDC& dc);

    // Create a bitmap with a scale factor, width and height are multiplied with that factor
    bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale);

    // virtual bool Create( WXHICON icon) ;
    virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
    virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const;

    wxBitmapRefData *GetBitmapData() const
        { return (wxBitmapRefData *)m_refData; }

    // copies the contents and mask of the given (colour) icon to the bitmap
    virtual bool CopyFromIcon(const wxIcon& icon);

    int GetWidth() const;
    int GetHeight() const;
    int GetDepth() const;
    void SetWidth(int w);
    void SetHeight(int h);
    void SetDepth(int d);
    void SetOk(bool isOk);

#if wxUSE_PALETTE
    wxPalette* GetPalette() const;
    void SetPalette(const wxPalette& palette);
#endif // wxUSE_PALETTE

    wxMask *GetMask() const;
    void SetMask(wxMask *mask) ;

    static void InitStandardHandlers();

    // raw bitmap access support functions, for internal use only
    void *GetRawData(wxPixelDataBase& data, int bpp);
    void UngetRawData(wxPixelDataBase& data);

    // these functions are internal and shouldn't be used, they risk to
    // disappear in the future
    bool HasAlpha() const;
    void UseAlpha();

    // returns the 'native' implementation, a GWorldPtr for the content and one for the mask
    WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const;

    // returns a CGImageRef which must released after usage with CGImageRelease
    CGImageRef CreateCGImage() const ;

#if wxOSX_USE_COCOA
    // returns an autoreleased version of the image
    WX_NSImage GetNSImage() const;
#endif
#if wxOSX_USE_IPHONE
    // returns an autoreleased version of the image
    WX_UIImage GetUIImage() const;
#endif
    // returns a IconRef which must be retained before and released after usage
    IconRef GetIconRef() const;
    // returns a IconRef which must be released after usage
    IconRef CreateIconRef() const;
    // get read only access to the underlying buffer
    void *GetRawAccess() const ;
    // brackets to the underlying OS structure for read/write access
    // makes sure that no cached images will be constructed until terminated
    void *BeginRawAccess() ;
    void EndRawAccess() ;

    double GetScaleFactor() const;
protected:
    virtual wxGDIRefData *CreateGDIRefData() const;
    virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
};

#endif // _WX_BITMAP_H_


ised_tri_mesh.point(*v_it);
			m_vertices_kd_tree.push_back(glm::vec3(center_position_temp[0], center_position_temp[1], center_position_temp[2]));
		}

		m_flann_kd_tree = shen::Geometry::EasyFlann(m_vertices_kd_tree);

		FaceNeighborType face_neighbor_type = kVertexBased;

		getAllFaceNeighbor(m_noised_tri_mesh, m_all_face_neighbor, face_neighbor_type, false);
		getFaceArea(m_noised_tri_mesh, m_face_area);
		getFaceCentroid(m_noised_tri_mesh, m_face_centroid);

		meshVisualization(m_noised_mesh_visual_data, m_noised_tri_mesh);
		meshVisualization(m_denoised_mesh_visual_data, m_noised_tri_mesh);
	}
	else
	{
		OpenMesh::IO::read_mesh(m_gt_tri_mesh, file_name);

		int new_num_faces = m_gt_tri_mesh.n_faces();
		if (m_num_faces == 0)
		{
			m_num_faces = new_num_faces;
		}
		else
		{
			if (new_num_faces != m_num_faces)
			{
				std::cout << "Not Match!" << std::endl;
				return;
			}
		}
		std::cout << "\tNumber of faces: " << m_num_faces << std::endl;

		m_current_file_name = file_name;
		int start = m_current_file_name.find_last_of('/');
		int end = m_current_file_name.find_last_of('.');
		m_model_name = m_current_file_name.substr(start + 1, end - start - 1);

		m_is_have_gt = true;

		m_is_gt = true;
		m_is_noise = false;
		m_is_denoised = false;

		m_data_manager->setOriginalMesh(m_gt_tri_mesh);

		m_gt_tri_mesh.request_face_normals();
		m_gt_tri_mesh.request_vertex_normals();
		m_gt_tri_mesh.update_normals();

		m_center = OpenMesh::Vec3d(0., 0., 0.);
		for (TriMesh::VertexIter v_it = m_gt_tri_mesh.vertices_begin(); v_it != m_gt_tri_mesh.vertices_end(); v_it++)
		{
			OpenMesh::Vec3d center_position_temp = m_gt_tri_mesh.point(*v_it);
			m_center += center_position_temp;
		}
		m_center /= int(m_gt_tri_mesh.n_vertices());

		m_max = 0;
		for (TriMesh::VertexIter v_it = m_gt_tri_mesh.vertices_begin(); v_it != m_gt_tri_mesh.vertices_end(); v_it++)
		{
			OpenMesh::Vec3d position_temp = m_gt_tri_mesh.point(*v_it) - m_center;
			for (int i = 0; i < 3; i++)
			{
				double temp_max = abs(position_temp[i]);
				if (temp_max > m_max)
				{
					m_max = temp_max;
				}
			}
		}

		m_gt_mesh_visual_data = new GLfloat[3 * 9 * m_num_faces];

		for (TriMesh::VertexIter v_it = m_gt_tri_mesh.vertices_begin(); v_it != m_gt_tri_mesh.vertices_end(); v_it++)
		{
			m_gt_tri_mesh.point(*v_it) -= m_center;
			m_gt_tri_mesh.point(*v_it) /= m_max


removeClickHandler(event) {
    Element backdrop;
    if (event.target.classes.contains('q-b-overlay-backdrop')) {
      backdrop = event.target;
    } else if (event.target.classes.contains('q-b-overlay-backdrop-close')) {
      backdrop = event.target.parent;
    }
    if (backdrop != null && backdrop.contains(getShadowRoot('b-overlay').query('.q-overlay'))) {
      event.preventDefault();
      _updateState(State.DEACTIVE);
    }
  }

  _updateState(var state) {
    this.state = state;
    if (this.state == State.ACTIVE) {
      this._show();
    } else {
      this._hide();
    }
  }

  void _show() {
    this._backdrop.style.display = 'block';
    // the attribute elementTimestamp represents the time the popover was activated which is important for 2 reasons
    // * identify the overlay in the dom
    // * find out which layer/element to close on esc
    // this implmentation assumes that multiple elements can't be activated at the exact same millisecond
    this.elementTimestamp = new DateTime.now().millisecondsSinceEpoch.toString();
    var hideFuture = _escapeHandler.addWidget(int.parse(elementTimestamp));
    hideFuture.then((_) {
      _updateState(State.DEACTIVE);
    });
    querySelector("html").classes.add('overlay-backdrop-active');
    this.clickSubscription = document.onClick.listen(null);
    this.clickSubscription.onData(this._removeClickHandler);
    this.touchSubscription = document.onTouchStart.listen(null);
    this.touchSubscription.onData(this._removeClickHandler);
    this.dispatchEvent(new CustomEvent("show"));
  }

  void _hide() {
    this._backdrop.style.display = 'none';
    _escapeHandler.removeWidget(int.parse(elementTimestamp));
    // the element is deactive and we give it 0 as timestamp to make sure
    // you can't find it by getting the max of all elements with the data attribute
    this.elementTimestamp = "0";
    if (this.clickSubscription != null) { try { this.clickSubscription.cancel(); } on StateError {}; }
    if (this.touchSubscription != null) { try { this.touchSubscription.cancel(); } on StateError {}; }
    List<Element> backdrops = querySelectorAll('.q-b-overlay-backdrop');
    // TODO check for visible getter in the future, see https://code.google.com/p/dart/issues/detail?id=6526
    Iterable<Element> visibleBackdrops = backdrops.where((Element backdrop) => backdrop.style.display != 'none');
    if (visibleBackdrops.length == 0) {
      // to reenable scrolling we reset the body's style attribute (but only if we are hiding the last overlay)
      querySelector("html").classes.remove('overlay-backdrop-active');
    }
    this.dispatchEvent(new CustomEvent("hide"));
  }
}import 'package:gazachat/core/shared/enums/type_of_chats.dart';
import 'package:gazachat/features/chat/data/models/chat_message_model.dart';
import 'package:json_annotation/json_annotation.dart';
part 'user_chat_model.g.dart';

@JsonSerializable()
class UserChat {
  final String username2P;
  final String uuid2P;
  final bool isFavorite;
  final bool isBlocked;
  final TypeOfChats typeOfChat;
  final bool isPinned;
  final List<ChatMessage> messages;

  UserChat({
    required this.username2P,
    required this.uuid2P,
    this.isFavorite = false,
    this.isBlocked = false,
    this.isPinned = false,
    this.m


Text":"generate a tiggering event URL","external":false,"refSections":[{"refs":[{"id":"ref-for-generate-a-tiggering-event-url"}],"title":"3. Triggering of Click Attribution"}],"url":"#generate-a-tiggering-event-url"},
"generate-an-attribution-report-url": {"dfnID":"generate-an-attribution-report-url","dfnText":"generate an attribution report URL","external":false,"refSections":[{"refs":[{"id":"ref-for-generate-an-attribution-report-url"}],"title":"5. Receiving Attribution Reports"}],"url":"#generate-an-attribution-report-url"},
"optional-trigger-priority": {"dfnID":"optional-trigger-priority","dfnText":"optional trigger priority","external":false,"refSections":[{"refs":[{"id":"ref-for-optional-trigger-priority"}],"title":"3. Triggering of Click Attribution"},{"refs":[{"id":"ref-for-optional-trigger-priority\u2460"}],"title":"5. Receiving Attribution Reports"}],"url":"#optional-trigger-priority"},
"six-bit-decimal-value": {"dfnID":"six-bit-decimal-value","dfnText":"six-bit decimal value","external":false,"refSections":[{"refs":[{"id":"ref-for-six-bit-decimal-value"}],"title":"1.2. Terminology"},{"refs":[{"id":"ref-for-six-bit-decimal-value\u2460"}],"title":"8. N-bit decimal values"}],"url":"#six-bit-decimal-value"},
"trigger-data": {"dfnID":"trigger-data","dfnText":"trigger data","external":false,"refSections":[{"refs":[{"id":"ref-for-trigger-data"}],"title":"1.2. Terminology"},{"refs":[{"id":"ref-for-trigger-data\u2460"}],"title":"1.3. A High Level Scenario"},{"refs":[{"id":"ref-for-trigger-data\u2461"}],"title":"3. Triggering of Click Attribution"}],"url":"#trigger-data"},
"triggering-event": {"dfnID":"triggering-event","dfnText":"triggering event","external":false,"refSections":[{"refs":[{"id":"ref-for-triggering-event"}],"title":"1.3. A High Level Scenario"},{"refs":[{"id":"ref-for-triggering-event\u2460"}],"title":"3. Triggering of Click Attribution"},{"refs":[{"id":"ref-for-triggering-event\u2461"},{"id":"ref-for-triggering-event\u2462"}],"title":"9. Modern Triggering of Attribution"}],"url":"#triggering-event"},
};

document.addEventListener("DOMContentLoaded", ()=>{
    genAllDfnPanels();

    document.body.addEventListener("click", (e) => {
        // If not handled already, just hide all dfn panels.
        hideAllDfnPanels();
    });
});

window.addEventListener("resize", () => {
    // Pin any visible dfn panel
    queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el));
});

function genAllDfnPanels() {
    for(const panelData of Object.values(dfnPanelData)) {
        const dfnID = panelData.dfnID;
        const dfn = document.getElementById(dfnID);
        if(!dfn) {
            console.log(`Can't find dfn#${dfnID}.`, panelData);
            continue;
        }
        dfn.panelData = panelData;
        insertDfnPopupAction(dfn);
    }
}

function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) {
    const dfnPanel = mk.aside({
        class: "dfn-panel on",
        id: `infopanel-for-${dfnID}`,
        "data-for": dfnID,
        "aria-labelled-by":`infopaneltitle-for-${dfnID}`,
        }


icon-32"></use></svg>
Mmr<wbr/>Api
Ref: https://github.com/paritytech/polkadot-sdk/blob/0e49ed72aa365475e30069a5c30e251a009fdacf/substrate/primitives/merkle-mountain-range/src/lib.rs#L423-L426

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Nomination<wbr/>Pools<wbr/>Api
Ref: https://github.com/paritytech/polkadot-sdk/blob/bc53b9a03a742f8b658806a01a7bf853cb9a86cd/substrate/frame/nomination-pools/runtime-api/src/lib.rs#L26-L41

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Offchain<wbr/>Worker<wbr/>Api
Ref: https://github.com/paritytech/polkadot-sdk/blob/bc53b9a03a742f8b658806a01a7bf853cb9a86cd/substrate/primitives/offchain/src/lib.rs#L25-L37

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Parachain<wbr/>Host
Ref https://github.com/paritytech/polkadot-sdk/blob/a84dd0dba58d51503b8942360aa4fb30a5a96af5/polkadot/primitives/src/runtime_api.rs#L129-L134

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Runtime<wbr/>Apis

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Session<wbr/>Keys
Ref: https://github.com/paritytech/polkadot-sdk/blob/43415ef58c143b985e09015cd000dbd65f6d3997/substrate/primitives/session/src/runtime_api.rs#L21-L31

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Staking<wbr/>Api
Ref: https://github.com/paritytech/polkadot-sdk/blob/00b85c51dfbc0fecbb8a4dd3635d4c177a6527a6/substrate/frame/staking/runtime-api/src/lib.rs#L25-L33

<svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-32"></use></svg>
Tagged<wbr/>Transaction<wbr/>Queue
Ref: https://github.com/paritytech/polkadot-sdk/blob/bc53b9a03a742f8b658806a01a7bf853cb9a86cd/subs


t, result.InstructionHashes)

	// ------------------------------------------------------------------------
	// 3. Invoke a second "addProof" (second instruction)
	// ------------------------------------------------------------------------

	signature, err = signer.Sign(rootHash[1]) // == index
	require.NoError(t, err)

	index = uint32(1)
	indexBuf = make([]byte, 4)
	binary.LittleEndian.PutUint32(indexBuf, uint32(index))

	ctx, err = cl.CreateTransaction(byzcoin.Instruction{
		InstanceID: myID,
		Invoke: &byzcoin.Invoke{
			ContractID: byzcoin.ContractDeferredID,
			Command:    "addProof",
			Args: []byzcoin.Argument{
				{
					Name:  "identity",
					Value: identityBuf,
				},
				{
					Name:  "signature",
					Value: signature,
				},
				{
					Name:  "index",
					Value: indexBuf,
				},
			},
		},
		SignerCounter: []uint64{4},
	})
	require.NoError(t, err)
	require.Nil(t, ctx.FillSignersAndSignWith(signer))

	atr, err = cl.AddTransactionAndWait(ctx, 10)
	require.NoError(t, err)

	proposedTransaction.Instructions[1].SignerIdentities = append(proposedTransaction.Instructions[1].SignerIdentities, identity)
	proposedTransaction.Instructions[1].Signatures = append(proposedTransaction.Instructions[1].Signatures, signature)

	result, err = cl.GetDeferredDataAfter(myID, &atr.Proof.Latest)
	require.NoError(t, err)

	require.Equal(t, result.ProposedTransaction.Instructions.Hash(), proposedTransaction.Instructions.Hash())
	require.Equal(t, len(result.ProposedTransaction.Instructions), 2)
	require.Equal(t, result.ExpireBlockIndex, expireBlockIndexInt)
	require.NotEmpty(t, result.ProposedTransaction.Instructions[1].SignerIdentities)
	require.Equal(t, len(result.ProposedTransaction.Instructions[1].SignerIdentities), 1)
	// This test won't work. But by using Equal() will.
	// require.Equal(t, result.ProposedTransaction.Instructions[0].SignerIdentities[0], identity)
	require.True(t, identity.Equal(&result.ProposedTransaction.Instructions[1].SignerIdentities[0]))

	require.NotEmpty(t, result.ProposedTransaction.Instructions[1].Signatures)
	require.Equal(t, len(result.ProposedTransaction.Instructions[1].Signatures), 1)
	require.Equal(t, result.ProposedTransaction.Instructions[1].Signatures[0], signature)
	// Default MaxNumExecution should be 1
	require.Equal(t, result.MaxNumExecution, uint64(1))

	require.NotEmpty(t, result.InstructionHashes)

	// ------------------------------------------------------------------------
	// 4. Invoke an "execRoot" command
	// ------------------------------------------------------------------------

	ctx, err = cl.CreateTransaction(byzcoin.Instruction{
		InstanceID: myID,
		Invoke: &byzcoin.Invoke{
			ContractID: byzcoin.ContractDeferredID,
			Command:    "execProposedTx",
		},
		SignerCounter: []uint64{5},
	})
	require.NoError(t, err)
	require.Nil(t, ctx.FillSignersAndSignWith(signer))

	_, err = cl.AddTransactionAndWait(ctx, 10)
	require.Error(t, err)
}

func TestDeferred_DefaultExpireBlockIdx(t *testing.T) {
	// Here we invoke a deferred contract without giving an expire block index.
	// We expect then the block index to be the default value we use, which is
	// `current_blockIdx + 50`. In this case, current_blockIdx equals 0.

	// ---------------------------


rride
    public boolean updateTagById(TagDTO tag) {
        List<Condition> conditions = buildBasicCondition(tag.getAppId());
        conditions.add(TABLE.ID.eq(ULong.valueOf(tag.getId())));
        int affected = context.update(Tag.TAG)
            .set(TABLE.NAME, tag.getName())
            .set(TABLE.LAST_MODIFY_USER, tag.getLastModifyUser())
            .set(TABLE.DESCRIPTION, tag.getDescription())
            .where(conditions).limit(1).execute();
        if (affected == 1) {
            return true;
        } else if (affected <= 0) {
            log.error("Error while updating tag. Affected row lower than 1.|{}", tag);
            return false;
        } else {
            // affected >= 2
            log.error("Error while updating tag. Affected more than one row!|{}", tag);
            return false;
        }
    }

    private List<Condition> buildBasicCondition(Long appId) {
        List<Condition> conditions = new ArrayList<>();
        conditions.add(TABLE.APP_ID.eq(ULong.valueOf(appId)));
        return conditions;
    }

    private List<TagDTO> listTagsByConditions(List<Condition> conditions) {
        Result<Record> result =
            context.select(ALL_FIELDS).from(Tag.TAG).where(conditions).fetch();
        List<TagDTO> resultTags = new ArrayList<>();
        if (result.size() > 0) {
            result.forEach(record -> resultTags.add(record.into(TagDTO.class)));
        }
        return resultTags;
    }

    @Override
    public List<TagDTO> listTags(TagDTO tagQuery) {
        List<Condition> conditions = buildSearchCondition(tagQuery);
        Result<Record> result =
            context.select(ALL_FIELDS).from(Tag.TAG)
                .where(conditions).orderBy(TABLE.ROW_UPDATE_TIME.desc()).fetch();
        List<TagDTO> tags = new ArrayList<>();
        if (result.size() > 0) {
            result.forEach(record -> tags.add(record.into(TagDTO.class)));
        }
        return tags;
    }

    @Override
    public PageData<TagDTO> listPageTags(TagDTO tagQuery, BaseSearchCondition baseSearchCondition) {
        long count = getTagsPageCount(tagQuery);
        if (count == 0) {
            return PageData.emptyPageData(baseSearchCondition.getStart(), baseSearchCondition.getLength());
        }

        List<Condition> conditions = buildSearchCondition(tagQuery);
        int start = baseSearchCondition.getStartOrDefault(0);
        int length = baseSearchCondition.getLengthOrDefault(10);
        List<OrderField<?>> orderFields = buildOrderFields(baseSearchCondition);
        Result<Record> result = context.select(ALL_FIELDS).from(Tag.TAG)
            .where(conditions).orderBy(orderFields)
            .limit(start, length).fetch();
        List<TagDTO> tags = result.size() > 0 ? result.map(this::extractRecord) : Collections.emptyList();
        return new PageData<>(start, length, count, tags);
    }

    private long getTagsPageCount(TagDTO tagQuery) {
        List<Condition> conditions = buildSearchCondition(tagQuery);
        Long count = context.selectCount().from(TABLE).where(conditions).fetchOne(0, Long.class);
        return count == null ? 0 : count;
    }

    private List<Condition> buildSearchCondition(TagDTO tagQuery) {
        List<Condition> conditions = new ArrayList<>();
        conditions.add(TABLE.APP_ID.eq(ULong.valueOf(tagQuery.getAppId())));
        if (StringUtils.isNotBlank(tagQuery.getName())) {
            String likePattern = "%" + tagQuery.getName() + "%";
            conditions.add(TABLE.NAME.like(likePattern));
        }


i> Archives</button> <button class="btn btn-xs btn-default" ng-click="showCustomChooseFileModal()"> Custom</button> <button class="btn btn-xs btn-success" ng-click="saveChoosedFiles()" ng-disabled="!isAnyFileSelected()" translate>Confirm</button> <button class="btn btn-xs btn-default" ng-click="cancelChooseFiles()" translate>Cancel</button>

<input id="{{\'node_\' + file.nodePath}}" type="checkbox" ng-disabled="!task || !task.files || task.files.length <= 1 || (task.status !== \'waiting\' && task.status !== \'paused\')" ng-model="file.selected" ng-indeterminate="file.partialSelected" ng-change="setSelectedNode(file)">

<input id="{{\'file_\' + file.index}}" type="checkbox" ng-disabled="!task || !task.files || task.files.length <= 1 || (task.status !== \'waiting\' && task.status !== \'paused\')" ng-model="file.selected" ng-change="setSelectedFile(true)">

<span ng-class="{\'progress-lower\': file.completePercent < 50}" ng-bind="(file.completePercent | percent: 2) + \'%\'">

Add


 = describe('Heal targeting behavior', () => {

    const rows = 4;
    const cols = Math.floor(Math.random() * 6) + 1;
    const Board = new BoardModel(rows, cols);
    const firstTeamHealer = new HealTargetUnit(Board.getTeam1[0].getId);
    const secondTeamHealer = new HealTargetUnit(Board.getTeam2[0].getId);

    it('If all team have full hp then targets must be an empty array', () => {
        expect(firstTeamHealer.getTargets(Board)).toEqual([]);
        expect(secondTeamHealer.getTargets(Board)).toEqual([]);
    });

    it('Can heal only damaged units', () => {
        let targets = [];
        for (let i of Board.getTeam1) {
            const random = Math.floor(Math.random() * 2);
            if(random === 0) {
                i.takeDamage(10);
                targets.push(i.getId);
            }
        }
        expect(firstTeamHealer.getTargets(Board)).toEqual(targets);
    });

});
import { Platform } from '@angular/cdk/platform';
import { DOCUMENT } from '@angular/common';
import { Inject, Injectable } from '@angular/core';

import type { NzSafeAny } from 'ng-zorro-antd/core/types';

export interface CookieOptions {
  path?: string;
  domain?: string;
  /**
   * Expiration time, `number` is seconds
   *
   * 过期时间，`number` 类型表示秒数
   */
  expires?: number | Date | string;
  secure?: boolean;
  HttpOnly?: boolean;
  SameSite?: boolean | 'lax' | 'strict' | 'none';
}

/**
 * A set of simple Cookie manipulation classes.
 *
 * 一组简单的 Cookie 操作类。
 */
@Injectable({ providedIn: 'root' })
export class CookieService {
  private get doc(): Document {
    return this._doc || document;
  }

  /**
   * Original cookie value
   *
   * 原始Cookie值
   */
  get cookie(): string {
    return this.platform.isBrowser ? this.doc.cookie : '';
  }

  constructor(
    @Inject(DOCUMENT) private _doc: NzSafeAny,
    private platform: Platform
  ) {}

  /**
   * Get all cookie key-value pairs
   *
   * 获取所有Cookie键值对
   */
  getAll(): { [key: string]: string } {
    const ret: { [key: string]: string } = {};
    const arr = this.cookie.split('; ');
    for (let i = 0; i < arr.length; i++) {
      const cookie = arr[i];
      const index = cookie.indexOf('=');
      if (index > 0) {
        const name = decodeURIComponent(cookie.substring(0, index));
        if (ret[name] == null) {
          ret[name] = decodeURIComponent(cookie.substring(index + 1));
        }
      }
    }
    return ret;
  }

  /**
   * Get the value of given cookie `key`
   *
   * 获取指定 `key` 的值
   */
  get(key: string): string | undefined {
    return this.getAll()[key];
  }

  /**
   * Sets a value for given cookie key
   *
   * 设置指定 Cookie 键的值
   */
  put(key: string, value: string, options?: CookieOptions): void {
    if (!this.platform.isBrowser) {
      return;
    }
    const opt = { path: '/', ...options };
    if (typeof opt.expires === 'number') {
      opt.expires = new Date(+new Date() + opt.expires * 1e3);
    }
    if (typeof opt.expires !== 'string') {
      opt.exp


-- Cokeline integration test
local buffer = require('bufferin.buffer')
local config = require('bufferin.config')

print('==========================================')
print('Cokeline Integration Test Start')
print('==========================================')

-- Initialize settings (with cokeline plugin detection)
config.setup({
    sync_buffer_order = true,
    persist_buffer_order = false,
})

local conf = config.get()
print('Detected plugin: ' .. tostring(conf._detected_plugin))

-- Create test files
local test_files = {}
for i = 1, 4 do
    local file = '/tmp/cokeline_test_' .. i .. '.txt'
    local f = io.open(file, 'w')
    f:write('Cokeline integration test content ' .. i)
    f:close()
    vim.cmd('edit ' .. file)
    table.insert(test_files, file)
end

print('Test files created: ' .. #test_files .. ' files')

-- Basic buffer retrieval test
print('\n=== Basic Buffer Retrieval Test ===')
local buffers = buffer.get_buffers()
print('Retrieved buffer count: ' .. #buffers)
for i, buf in ipairs(buffers) do
    print(string.format('  %d: bufnr=%d, name=%s', i, buf.bufnr, buf.display_name))
end

-- Check if Cokeline is available
local has_cokeline, cokeline_buffers = pcall(require, 'cokeline.buffers')
print('\n=== Cokeline Availability Check ===')
print('Cokeline available: ' .. tostring(has_cokeline))

if has_cokeline then
    print('Cokeline.buffers module is available')

    -- Get current buffer order from Cokeline
    local cokeline_valid_buffers = cokeline_buffers.get_valid_buffers()
    print('Cokeline buffer count: ' .. #cokeline_valid_buffers)

    print('Cokeline buffer order:')
    for i, cok_buf in ipairs(cokeline_valid_buffers) do
        print(string.format('  %d: bufnr=%d', i, cok_buf.number))
    end

    -- Buffer movement test
    print('\n=== Cokeline Buffer Movement Test ===')
    if #buffers >= 2 then
        print('Bufferin buffer order before move:')
        for i, buf in ipairs(buffers) do
            print(string.format('  %d: %s (bufnr=%d)', i, buf.display_name, buf.bufnr))
        end

        print('\nMoving 1st buffer to 2nd position...')
        local success = buffer.move_buffer(1, 2, buffers)
        print('move_buffer result: ' .. tostring(success))

        if success then
            -- Check state after mov


1.016 1.31233-.35984 2.68816-.35984zm-.254 9.50384q.84667.0 1.50284-.381.65616-.40217.93133-1.16417v-1.16417h-2.26483l-2.032 1.3335q0 .635.48683 1.016.508.35984 1.37583.35984z" /><path id="path1103" style="font-style:normal;font-variant:normal;font-weight:700;font-stretch:normal;font-family:Montserrat;-inkscape-font-specification:'Montserrat Bold';opacity:1;fill:url(#linearGradient1170);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.26458332" d="m146.21928 251.19492q2.13783.0 3.38667 1.27 1.27 1.24884 1.27 3.76767v6.51933h-3.302v-6.01133q0-1.35467-.5715-2.01083-.55034-.67734-1.5875-.67734-1.16417.0-1.8415.762-.67734.74084-.67734 2.2225v5.715h-3.302v-6.01133l-2.159-2.68817q-1.143.0-1.82033.762-.67733.74084-.67733 2.2225v5.715h-3.302v-11.38766h3.15383v1.31233q.635-.71967 1.54517-1.10067.93133-.381 2.032-.381 1.2065.0 2.18016.48684.97367.46566 1.56634 1.37583.6985-.889 1.75683-1.37583 1.0795-.48684 2.3495-.48684z" /><path id="path1105" style="font-style:normal;font-variant:normal;font-weight:700;font-stretch:normal;font-family:Montserrat;-inkscape-font-specification:'Montserrat Bold';opacity:1;fill:url(#linearGradient1172);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:.26458332" d="m157.6668 262.92126q-1.41816.0-2.77283-.33867-1.35467-.35983-2.159-.889l1.10067-2.37067q.762.48684 1.8415.80434 1.0795.29633 2.11666.29633l2.0955-1.03717q0-.48683-.5715-.6985-.5715-.21166-1.75683-.35983-1.397-.21167-2.30717-.48683-.91016-.27517-1.5875-.97367-.65616-.6985-.65616-1.98967.0-1.0795.61383-1.905.635-.84666 1.82033-1.31233 1.2065-.46567 2.83634-.46567 1.2065.0 2.39183.27517 1.2065.254 1.98967.71967l-1.10067 2.3495q-1.50283-.84667-3.28083-.84667-1.05834.0-1.5875.29633-.52917.29634-.52917.762.0.52917.5715.74084.5715.21166 1.82033.40216 1.397.23284 2.286.508.889.254 1.54517.9525.65617.6985.65617 1.94734.0 1.05833-.635 1.88383t-1.86267 1.29117q-1.2065.4445-2.87867.4445z" /></g><rect ry="1.3393987" y="198.56728" x="58.576443" height="2.6787975" width="15.238855" id="rect1046" style="opacity:1;fill:#2880c1;fill-opacity:1;fill-rule:


s.mNextElement.setBackground(2130837774, 2130837516, 2130837516);
    addElement(this.mNextElement, i);
    this.mNextElement.setOnElementClickListener(this);
    this.mNextElement.expandHotPot(j);
    this.mScheduleElement = new ButtonViewElement(paramContext);
    this.mScheduleElement.setBackground(2130837783, 2130837522);
    addElement(this.mScheduleElement, i);
    this.mScheduleElement.setOnElementClickListener(this);
    this.mScheduleElement.expandHotPot(j);
    this.mDownloadElement = new ButtonViewElement(paramContext);
    this.mDownloadElement.setBackground(2130837763, 2130837514);
    addElement(this.mDownloadElement, i);
    this.mDownloadElement.setOnElementClickListener(this);
    this.mDownloadElement.expandHotPot(j);
    PlayerAgent.getInstance().addMediaEventListener(this);
    int k = PlayerAgent.getInstance().getCurrentPlayStatus();
    if (InfoManager.getInstance().root().currentPlayMode() == RootNode.PlayMode.FMPLAY)
      if (InfoManager.getInstance().root().isOpenFm())
        this.mPlayElement.setState(AbsPlayButtonElement.State.PAUSE);
    while (true)
    {
      InfoManager.getInstance().root().mDownLoadInfoNode.registerListener(this);
      return;
      this.mPlayElement.setState(AbsPlayButtonElement.State.PLAY);
      continue;
      if ((k == 30583) || (k == 0) || (k == 1))
        this.mPlayElement.setState(AbsPlayButtonElement.State.PLAY);
      else if (k == 4096)
        this.mPlayElement.setState(AbsPlayButtonElement.State.PAUSE);
      else if (k == 8192)
        this.mPlayElement.setState(AbsPlayButtonElement.State.ERROR);
      else if ((k == 4101) || (k == 4098))
        this.mPlayElement.setState(AbsPlayButtonElement.State.BUFFER);
    }
  }

  private void download()
  {
    QTMSGManage.getInstance().sendStatistcsMessage("downloadclick", "playview");
    ChannelNode localChannelNode1 = InfoManager.getInstance().root().getCurrentPlayingChannelNode();
    if (localChannelNode1 != null)
    {
      if (!localChannelNode1.isMusicChannel())
        break label45;
      Toast.makeText(getContext(), "该节目暂时无法下载", 0).show();
    }
    label45:
    do
    {
      return;
      if (localChannelNode1.isDownloadChannel())
      {
        ChannelNode localChannelNode2 = ChannelHelper.getInstance().getChannel(localChannelNode1.channelId, 1);
        if ((localChannelNode2 != null) && (!localChannelNode2.hasEmptyProgramSchedule()))
        {
          ControllerManager.getInstance().redirectToBatchDownloadView(localChannelNode2, false, true);
          return;
        }
      }
    }
    while (localChannelNode1.hasEmptyProgramSchedule());
    ControllerManager.getInstance().redirectToBatchDownloadView(localChannelNode1, false, true);
  }

  private void openSchedule()
  {
    dispatchActionEvent("showSchedule", null);
  }

  private void playNext()
  {
    Node localNode1 = InfoManager.getInstance().root().getCurrentPlayingNode();
    if ((localNode1 != null) && (localNode1.nextSibling != null))
      if ((localNode1.nextSibling.nodeName.equalsIgnoreCase("program")) && (((ProgramNode)localNode1.nextSibling).getCurrPlayStatus() != 2));
    Node localNode2;
    do
    {
      ChannelNode localChannelNode;
      do
      {
        do
        {
          return;


*
 *
The function transforms a single-channel disparity map to a 3-channel image
 * representing a 3D surface. That is, for each pixel (x,y) andthe
 * corresponding disparity d=disparity(x,y), it computes:

 *
 *
[X Y Z W]^T = Q *[x y disparity(x,y) 1]^T
 * _3dImage(x,y) = (X/W, Y/W, Z/W)

 *
 *
The matrix Q can be an arbitrary 4 x 4 matrix (for
 * example, the one computed by "stereoRectify"). To reproject a sparse set of
 * points {(x,y,d),...} to 3D space, use "perspectiveTransform".

 *
 * @param disparity Input single-channel 8-bit unsigned, 16-bit signed, 32-bit
 * signed or 32-bit floating-point disparity image.
 * @param _3dImage Output 3-channel floating-point image of the same size as
 * disparity. Each element of _3dImage(x,y) contains
 * 3D coordinates of the point (x,y) computed from the disparity
 * map.
 * @param Q 4 x 4 perspective transformation matrix that can be
 * obtained with "stereoRectify".
 * @param handleMissingValues Indicates, whether the function should handle
 * missing values (i.e. points where the disparity was not computed). If
 * handleMissingValues=true, then pixels with the minimal disparity
 * that corresponds to the outliers (see :ocv:funcx:"StereoBM.operator()") are
 * transformed to 3D points with a very large Z value (currently set to 10000).
 * @param ddepth The optional output array depth. If it is -1, the
 * output image will have CV_32F depth. ddepth can
 * also be set to CV_16S, CV_32S or CV_32F.
 *
 * @see org.opencv.calib3d.Calib3d.reprojectImageTo3D
 */
    public static void reprojectImageTo3D(Mat disparity, Mat _3dImage, Mat Q, boolean handleMissingValues, int ddepth)
    {

        reprojectImageTo3D_0(disparity.nativeObj, _3dImage.nativeObj, Q.nativeObj, handleMissingValues, ddepth);

        return;
    }

/**
 *
Reprojects a disparity image to 3D space.

 *
 *
The function transforms a single-channel disparity map to a 3-channel image
 * representing a 3D surface. That is, for each pixel (x,y) andthe
 * corresponding disparity d=disparity(x,y), it computes:

 *
 *
[X Y Z W]^T = Q *[x y disparity(x,y) 1]^T
 * _3dImage(x,y) = (X/W, Y/W, Z/W)

 *
 *
The matrix Q can be an arbitrary 4 x 4 matrix (for
 * example, the one computed by "stereoRectify"). To reproject a sparse set of
 * points {(x,y,d),...} to 3D space, use "perspectiveTransform".

 *
 * @param disparity Input single-channel


# coding=utf-8
# Copyright 2022 The SimREC Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import math

import torch
import torch.optim.lr_scheduler as lr_scheduler

def StepLR(
    optimizer: torch.optim.Optimizer,
    warmup_epochs: int,
    epochs: int,
    decay_epochs: int,
    lr_decay_rate: float,
    n_iter_per_epoch: int,
):
    t, T = warmup_epochs * n_iter_per_epoch, epochs * n_iter_per_epoch
    def lr_func(step):
                coef = 1.
                if step<=t:
                    coef=float(step)/float(t+1)
                else:
                    for i,deps in enumerate(decay_epochs):
                        if step>=deps * n_iter_per_epoch:
                            coef=lr_decay_rate**(i+1)
                return coef
    scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lr_func)
    return scheduler

def CosineDecayLR(
    optimizer: torch.optim.Optimizer,
    epochs: int,
    n_iter_per_epoch: int,
):
    scheduler = lr_scheduler.CosineAnnealingLR(optimizer, T_max=epochs * n_iter_per_epoch)
    return scheduler

def WarmupCosineLR(
    optimizer: torch.optim.Optimizer,
    warmup_epochs: int,
    epochs: int,
    warmup_lr: float,
    base_lr: float,
    min_lr: float,
    n_iter_per_epoch: int,
):
    t, T = warmup_epochs * n_iter_per_epoch, epochs * n_iter_per_epoch
    n_t=0.5
    warm_step_lr=(base_lr - warmup_lr) / t
    lr_func = lambda step: ( step*warm_step_lr + warmup_lr) / base_lr if step < t \
        else (min_lr + n_t * (base_lr - min_lr) * (1 + math.cos(math.pi * (step - t) / (T - t)))) / base_lr
    scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lr_func)
    return scheduler


lue(){return this.$$.ctx[0]}set value(e){this.$$set({value:e}),y()}get type(){return this.$$.ctx[1]}set type(e){this.$$set({type:e}),y()}get selected(){return this.$$.ctx[2]}set selected(e){this.$$set({selected:e}),y()}}export{fe as default};
//# sourceMappingURL=Example-DjYs0ESq.js.map
/* empty css                                                        */import{U as Q,I as X}from"./Upload-D7JK_RiJ.js";const{SvelteComponent:Y,append:B,attr:_,detach:Z,init:x,insert:ee,noop:W,safe_not_equal:te,svg_element:q}=window.__gradio__svelte__internal;function le(a){let e,l,t,i,s;return{c(){e=q("svg"),l=q("path"),t=q("path"),i=q("line"),s=q("line"),_(l,"d","M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z"),_(t,"d","M19 10v2a7 7 0 0 1-14 0v-2"),_(i,"x1","12"),_(i,"y1","19"),_(i,"x2","12"),_(i,"y2","23"),_(s,"x1","8"),_(s,"y1","23"),_(s,"x2","16"),_(s,"y2","23"),_(e,"xmlns","http://www.w3.org/2000/svg"),_(e,"width","100%"),_(e,"height","100%"),_(e,"viewBox","0 0 24 24"),_(e,"fill","none"),_(e,"stroke","currentColor"),_(e,"stroke-width","2"),_(e,"stroke-linecap","round"),_(e,"stroke-linejoin","round"),_(e,"class","feather feather-mic")},m(n,r){ee(n,e,r),B(e,l),B(e,t),B(e,i),B(e,s)},p:W,i:W,o:W,d(n){n&&Z(e)}}}class ne extends Y{constructor(e){super(),x(this,e,null,le,te,{})}}const{SvelteComponent:ie,append:F,attr:v,detach:se,init:ae,insert:oe,noop:j,safe_not_equal:re,svg_element:A}=window.__gradio__svelte__internal;function ce(a){let e,l,t;return{c(){e=A("svg"),l=A("path"),t=A("path"),v(l,"fill","currentColor"),v(l,"d","M12 2c-4.963 0-9 4.038-9 9c0 3.328 1.82 6.232 4.513 7.79l-2.067 1.378A1 1 0 0 0 6 22h12a1 1 0 0 0 .555-1.832l-2.067-1.378C19.18 17.232 21 14.328 21 11c0-4.962-4.037-9-9-9zm0 16c-3.859 0-7-3.141-7-7c0-3.86 3.141-7 7-7s7 3.14 7 7c0 3.859-3.141 7-7 7z"),v(t,"fill","currentColor"),v(t,"d","M12 6c-2.757 0-5 2.243-5 5s2.243 5 5 5s5-2.243 5-5s-2.


}
		else if (numSelf == numSelfReloading)
		{
			// we're done... relinquish the flag
			ai->friend_setTurretSync(TURRET_INVALID);
			return WAIT_INDEFINITELY;
		}
		else
		{
			// we're not ready, but not reloading either, so retain the flag and wait
			return WAIT_INDEFINITELY;
		}
	}
	else
	{
		// someone else has it, so just wait.
		return WAIT_INDEFINITELY;
	}
}
#endif

//----------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------

//----------------------------------------------------------------------------------------------------------
StateReturnType TurretAIAimTurretState::onEnter()
{
	// don't set the "turret-rotate" bit here; wait and see if we really turn or not.
#ifdef INTER_TURRET_DELAY
	m_extraDelay = 0;
#endif
	return STATE_CONTINUE;
}

//-------------------------------------------------------------------------------------------------
/**
 * Rotate our turret to point at the machine's goal
 */
StateReturnType TurretAIAimTurretState::update()
{
	//DEBUG_LOG(("TurretAIAimTurretState frame %d: %08lx\n",TheGameLogic->getFrame(),getTurretAI()->getOwner()));

	TurretAI* turret = getTurretAI();
	Object* obj = turret->getOwner();
	AIUpdateInterface* ai = obj->getAIUpdateInterface();
	if( !ai )
	{
		return STATE_FAILURE;
	}

	Object* enemy;
	AIUpdateInterface* enemyAI=NULL;
	Coord3D enemyPosition;
	Bool preventing = false;
	TurretTargetType targetType =  turret->friend_getTurretTarget(enemy, enemyPosition);
	Object *enemyForDistanceCheckOnly = enemy;	// Note: Do not use this anywhere except for the range check.

	Bool nothingInRange = false;
	switch (targetType)
	{
		case TARGET_NONE:
		{
			return STATE_FAILURE;
		}

		case TARGET_OBJECT:
		{
			Bool isPrimaryEnemy = (enemy && enemy == ai->getGoalObject());
			// if the enemy is gone, or we're out of range, or it changed teams, the attack is over
			Bool ableToAttackTarget = obj->isAbleToAttack();
			if (ableToAttackTarget)
			{
				// srj sez: since we have already acquired this target, we should use
				// the CONTINUED attack tests, not the new ones.
				CanAttackResult result = obj->getAbleToAttackSpecificObject(
							turret->isForceAttacking() ? ATTACK_CONTINUED_TARGET_FORCED : ATTACK_CONTINUED_TARGET,
							enemy,
							ai->getLastCommandSource()
						);
				ableToAttackTarget = result == ATTACKRESULT_POSSIBLE || result == ATTACKRESULT_POSSIBLE_AFTER_MOVING;
			}

			nothingInRange = !turret->friend_isAnyWeaponInRangeOf(enemy);
			if (enemy == NULL || !ableToAttackTarget ||
					(!isPrimaryEnemy && nothingInRange) ||
					enemy->getTeam() != turret->friend_getVictimInitialTeam()
			)
			{
				if (turret->friend_getTargetWasSetByIdleMood())
				{
					turret->setTurretTargetObject(NULL, FALSE);
				}
				return STATE_FAILURE;
			}

			// aim turret towards enemy (turret angle is relative to its parent object)
			if (enemy->isKindOf(KINDOF_BRIDGE))
			{
				// Special case - bridges have two attackable points at either end.
				TBridgeAttackInfo info;
				TheTerrainLogic->getBridgeAttackPoints(enemy, &info);
				Real distSqr = ThePartitionManager->getDistanceSquared( obj, &info.attackPoint1, FROM_BOUNDINGSPHERE_3D


��럼인 경우 '
        'formatter 가 적용 되어야 한다.',
        () {
          final column = PlutoColumn(
            title: 'column',
            field: 'column',
            applyFormatterInEditing: true,
            readOnly: false,
            type: PlutoColumnType.select(['one', 'two', 'three']),
            formatter: (s) => '$s changed',
          );

          expect(
            column.formattedValueForDisplayInEditing('original'),
            'original changed',
          );
        },
      );

      test(
        'readOnly 가 false 여도 formatter 가 있고 time 타입 컬럼인 경우 '
        'formatter 가 적용 되어야 한다.',
        () {
          final column = PlutoColumn(
            title: 'column',
            field: 'column',
            applyFormatterInEditing: true,
            readOnly: false,
            type: PlutoColumnType.time(),
            formatter: (s) => '$s changed',
          );

          expect(
            column.formattedValueForDisplayInEditing('original'),
            'original changed',
          );
        },
      );

      test(
        'readOnly 가 false 여도 formatter 가 있고 date 타입 컬럼인 경우 '
        'formatter 가 적용 되어야 한다.',
        () {
          final column = PlutoColumn(
            title: 'column',
            field: 'column',
            applyFormatterInEditing: true,
            readOnly: false,
            type: PlutoColumnType.date(),
            formatter: (s) => '$s changed',
          );

          expect(
            column.formattedValueForDisplayInEditing('original'),
            'original changed',
          );
        },
      );

      test(
        'formatter 가 있고 readOnly 컬럼인 경우 applyFormatterInEditing 가 false 면 '
        'formatter 가 적용 되지 않아야 한다.',
        () {
          final column = PlutoColumn(
            title: 'column',
            field: 'column',
            applyFormatterInEditing: false,
            readOnly: true,
            type: PlutoColumnType.text(),
            formatter: (s) => '$s changed',
          );

          expect(
            column.formattedValueForDisplayInEditing('original'),
            'original',
          );
        },
      );
    });
  });
}
import 'dart:async';

import 'package:pluto_grid/pluto_grid.dart';
import 'package:rxdart/rxdart.dart';

class PlutoGridEventManager {
  final PlutoGridStateManager stateManager;

  PlutoGridEventManager({
    required this.stateManager,
  });

  final PublishSubject<PlutoGridEvent> _subject =
      PublishSubject<PlutoGridEvent>();

  PublishSubject<PlutoGridEvent> get subject => _subject;

  late final StreamSubscription _subscription;

  StreamSubscription get subscription => _subscription;

  void dispose() {
    _subscription.cancel();

    _subject.close();
  }

  void init() {
    final normalStream = _subject.stream.where((event) => event.type.isNormal);

    final throttleLeadingStream = _subject.stream
        .where((event) => event.type.isThrottleLeading)
        .transform(
          ThrottleStreamTransformer(
            (_) => TimerStream<PlutoGridEvent>(_, _.duration as Duration),
            trailing: false,
            leading: true,
          ),
        );

    final throttleTrailingStream = _subject.stream
        .where((event) => event.type.isThrottleTrailing)
        .transform(
          ThrottleStreamTransformer(
            (_) => TimerStream<PlutoGridEvent>(_, _.duration as Duration),
            trailing: true,


adedContent{margin-bottom:5px;}
        #cboxLoadingOverlay{background:url(colorbox/loading_background.png) no-repeat center center;}
        #cboxLoadingGraphic{background:url(colorbox/loading.gif) no-repeat center center;}
        #cboxTitle{position:absolute; bottom:-25px; left:0; text-align:center; width:100%; font-weight:bold; color:#7C7C7C;}
        #cboxCurrent{position:absolute; bottom:-25px; left:58px; font-weight:bold; color:#7C7C7C;}

        #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{position:absolute; bottom:-29px; background:url(colorbox/controls.png) no-repeat 0px 0px; width:23px; height:23px; text-indent:-9999px;}
        #cboxPrevious{left:0px; background-position: -51px -25px;}
        #cboxPrevious:hover{background-position:-51px 0px;}
        #cboxNext{left:27px; background-position:-75px -25px;}
        #cboxNext:hover{background-position:-75px 0px;}
        #cboxClose{right:0; background-position:-100px -25px;}
        #cboxClose:hover{background-position:-100px 0px;}

        .cboxSlideshow_on #cboxSlideshow{background-position:-125px 0px; right:27px;}
        .cboxSlideshow_on #cboxSlideshow:hover{background-position:-150px 0px;}
        .cboxSlideshow_off #cboxSlideshow{background-position:-150px -25px; right:27px;}
        .cboxSlideshow_off #cboxSlideshow:hover{background-position:-125px 0px;}
/**
These styles apply site-wide.
*/

html, body {
    margin: 0 auto;
    padding: 0;
    background-color: #f7f7f7;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

#top {
    padding: 0.5rem;
    min-height: 50px;
    width: 100%;
    background: #353A61;
    font-size: 0.75rem;
    color: #faeeaf;
    text-align: center;
}

#top a {
    color: #faeeaf;
    border-bottom: 1px dotted #faeeaf;
}

#top a[target="_blank"]:after {
    content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAEumlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS41LjAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iCiAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIKICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIKICAgIHhtbG5zOn


perties` objet comme paramètre. Cet objet doit avoir une `dst` propriété avec une `Boolean` valeur. A `true` valeur indique que l'heure avancée est en vigueur à la date donnée, et `false` indique qu'il ne l'est pas.

Le paramètre entrant `date` doit être de type`Date`.

S'il y a une erreur de lecture de la date, puis le `errorCallback` s'exécute. Code attendu de l'erreur est`GlobalizationError.UNKNOWN_ERROR`.

### Plates-formes supportées

  * Amazon Fire OS
  * Android
  * BlackBerry 10
  * Firefox OS
  * iOS
  * Windows Phone 8
  * Windows 8
  * Windows
  * Navigateur

### Exemple

Au cours de l'été, et si le navigateur est défini sur un fuseau horaire la DST-activé, il doit afficher une boîte de dialogue contextuelle avec un texte semblable à `dst: true` :

    navigator.globalization.isDayLightSavingsTime (new Date(), fonction (date) {alert ('dst: "+ date.dst + « \n »);}, function () {alert ('erreur d'obtention names\n');}) ;

## navigator.globalization.numberToString

Renvoie un nombre mis en forme comme une chaîne selon les préférences de l'utilisateur du client.

    navigator.globalization.numberToString (nombre, successCallback, errorCallback, options) ;

### Description

Retourne la chaîne mise en forme de nombre à la `successCallback` avec un `properties` objet comme paramètre. Cet objet doit avoir une `value` propriété avec une `String` valeur.

S'il y a une erreur de mise en forme le nombre, puis le `errorCallback` s'exécute avec un `GlobalizationError` objet comme paramètre. Code attendu de l'erreur est`GlobalizationError.FORMATTING_ERROR`.

Le `options` paramètre est facultatif, et ses valeurs par défaut sont :

    {type:'decimal'}

Le `options.type` peut être « decimal », « % » ou « monnaie ».

### Plates-formes supportées

  * Amazon Fire OS
  * Android
  * BlackBerry 10
  * iOS
  * Windows Phone 8
  * Windows 8
  * Windows
  * Navigateur

### Exemple

Lorsque le navigateur est configuré pour la `en_US` locale, cela permet d'afficher une boîte de dialogue contextuelle avec un texte semblable à `number: 3.142` :

    navigator.globalization.numberToString (3.1415926, fonction (nombre) {alert (' nombre: "+ number.value + « \n »);}, function () {alert ('erreur d'obtention number\n');}, {type:'decimal'}) ;

### Bizarreries de Windows

  * Windows 8.0 ne supporte pas le nombre arrondi, donc les valeurs ne seront pas arrondis automatiquement.

  * Sur la partie fractionnaire de 8.1 de Windows et Windows Phone 8.1 sont tronqués au lieu d'arrondi en cas de `percent` type number donc le nombre de chiffres fractionnaires est défini sur 0.

  * `percent`les numéros ne sont pas regroupés qu'ils ne peuvent pas être analysés dans stringToNumber si regroupés.

### Bizarreries navigateur

  * type de `currency` n'est pas pris en charge.

## navigator.globalization.stringToDate

Analyse une date mise en forme sous forme de chaîne, selon les préférences de l'utilisateur et du calendrier en utilisant le fuseau horaire du client, du client et retourne l'objet date correspondante.

    navigator.globalization.stringToDate (dateString


* not be used for new products.
   *

   *
   * string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE];
   *
   * @return The bytes for productCategory.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getProductCategoryBytes() {
    java.lang.Object ref = productCategory_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      productCategory_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PRODUCT_LABELS_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.vision.v1p3beta1.Product.KeyValue> productLabels_;

  /**
   *
   *
   *

   * Key-value pairs that can be attached to a product. At query time,
   * constraints can be specified based on the product_labels.
   *
   * Note that integer values can be provided as strings, e.g. "1199". Only
   * strings with integer values can match a range-based restriction which is
   * to be supported soon.
   *
   * Multiple values can be assigned to the same key. One product may have up to
   * 100 product_labels.
   *

   *
   * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5;
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.vision.v1p3beta1.Product.KeyValue> getProductLabelsList() {
    return productLabels_;
  }

  /**
   *
   *
   *

   * Key-value pairs that can be attached to a product. At query time,
   * constraints can be specified based on the product_labels.
   *
   * Note that integer values can be provided as strings, e.g. "1199". Only
   * strings with integer values can match a range-based restriction which is
   * to be supported soon.
   *
   * Multiple values can be assigned to the same key. One product may have up to
   * 100 product_labels.
   *

   *
   * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5;
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder>
      getProductLabelsOrBuilderList() {
    return productLabels_;
  }

  /**
   *
   *
   *

   * Key-value pairs that can be attached to a product. At query time,
   * constraints can be specified based on the product_labels.
   *
   * Note that integer values can be provided as strings, e.g. "1199". Only
   * strings with integer values can match a range-based restriction which is
   * to be supported soon.
   *
   * Multiple values can be assigned to the same key. One product may have up to
   * 100 product_labels.
   *

   *
   * repeated .google.cloud.vision.v1p3beta1.Product.KeyValue product_labels = 5;
   */
  @java.lang.Override
  public int getProductLabelsCount() {
    return productLabels_.size();
  }

  /**
   *
   *
   *

   * Key-value pairs that can be attached to a product. At query time,
   * constraints can be specified based on the product_labels.
   *
   * Note that integer values can be provided as strings, e.g. "1199". Only
   * strings with integer values can match a range-based restriction which


}

export function removeABI(items: ABI.Item[]) {
  for (const item of items) {
    savedABIs.add(item);
    if (!item.name) {
      return;
    }
    const signature = sha3(
      `${item.name}(${item.inputs!.map(typeStringify).join(",")})`
    )!;
    if (item.type === "event") {
      methodIDs.delete(signature.slice(2));
    } else {
      methodIDs.delete(signature.slice(2, 10));
    }
  }
}

export function getMethodIDs() {
  return new Map(methodIDs);
}

export interface DecodedMethod {
  name: string;
  params: DecodedMethodParam[];
}

export interface DecodedMethodParam {
  name: string;
  type: string;
  value?: any;
}

export function decodeMethod(data: string): DecodedMethod | undefined {
  const methodID = data.slice(2, 10);
  const item = methodIDs.get(methodID);
  if (!item) {
    return;
  }
  const { name, inputs } = item;
  let decoded = coder.decodeParameters(inputs!, data.slice(10));
  const params: DecodedMethodParam[] = [];
  for (let i = 0; i < decoded.__length__; i++) {
    const { name, type } = inputs![i];
    params.push({
      name,
      type,
      value: ((value: string | string[]) => {
        if (/^u?int/.test(type)) {
          if (Array.isArray(value)) {
            return value.map((_) => new BN(_).toString());
          } else {
            return new BN(value).toString();
          }
        } else if (/^address/.test(type)) {
          if (Array.isArray(value)) {
            return value.map((_) => _.toLowerCase());
          } else {
            return value.toLowerCase();
          }
        }
        return;
      })(decoded[i]),
    });
  }
  return { name: name!, params };
}

export interface LogItem {
  transactionIndex: string;
  logIndex: string;
  blockNumber: string;
  transactionHash: string;
  blockHash: string;
  data: string;
  topics: string[];
  address: string;
}

export function decodeLogs(logs: LogItem[]) {
  logs = logs.filter((log) => log.topics.length > 0);
  return logs.map(({ topics, data, address }) => {
    const methodID = topics[0].slice(2);
    const method = methodIDs.get(methodID);
    if (!method) {
      return;
    }
    const logData = data;
    let dataIndex = 0;
    let topicsIndex = 1;
    let dataTypes: string[] = [];
    method.inputs?.map((input) => {
      if (!input.indexed) {
        dataTypes.push(input.type);
      }
    });
    const decodedData = coder.decodeParameters(dataTypes, logData.slice(2));
    // Loop topic and data to get the params
    const events = method.inputs?.map(({ name, type, indexed }) => {
      let params: DecodedMethodParam = { name, type, value: "" };
      if (indexed) {
        params.value = topics[topicsIndex];
        topicsIndex++;
      } else {
        params.value = decodedData[dataIndex];
        dataIndex++;
      }
      if (type === "address") {
        params.value = params.value.toLowerCase();
        // 42 because len(0x) + 40
        if (params.value.length > 42) {
          let toRemove = params.value.length - 42;
          let temp = params.value.split("");
          temp.splice(2, toRemove);
          params.value = temp.join("");
        }
      }
      if (/^uint256|uint8|int$/.test(type)) {
        // ensure to remove leading 0x for hex numbers
        if (typeof params.value === "s


     this.USERFORM_LABEL.Font = new System.Drawing.Font(_mainForm.GuiFont, 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.USERFORM_LABEL.Location = new System.Drawing.Point(10, 9);
            this.USERFORM_LABEL.Name = "USERFORM_LABEL";
            this.USERFORM_LABEL.Size = new System.Drawing.Size(239, 31);
            this.USERFORM_LABEL.TabIndex = 1;
            this.USERFORM_LABEL.Text = "Select or Create Profile";
            //
            // DESKTOPMODE_CHECKBOX
            //
            this.DESKTOPMODE_CHECKBOX.AutoSize = true;
            this.DESKTOPMODE_CHECKBOX.Font = new System.Drawing.Font(_mainForm.GuiFont, 12F);
            this.DESKTOPMODE_CHECKBOX.Location = new System.Drawing.Point(15, 110);
            this.DESKTOPMODE_CHECKBOX.Name = "DESKTOPMODE_CHECKBOX";
            this.DESKTOPMODE_CHECKBOX.Size = new System.Drawing.Size(136, 28);
            this.DESKTOPMODE_CHECKBOX.TabIndex = 33;
            this.DESKTOPMODE_CHECKBOX.Text = "Desktop Mode";
            this.DESKTOPMODE_CHECKBOX.UseVisualStyleBackColor = true;
            //
            // DESKTOPMODEEDIT_CHECKBOX
            //
            this.DESKTOPMODEEDIT_CHECKBOX.AutoSize = true;
            this.DESKTOPMODEEDIT_CHECKBOX.Font = new System.Drawing.Font(_mainForm.GuiFont, 12F);
            this.DESKTOPMODEEDIT_CHECKBOX.Location = new System.Drawing.Point(15, 161);
            this.DESKTOPMODEEDIT_CHECKBOX.Name = "DESKTOPMODEEDIT_CHECKBOX";
            this.DESKTOPMODEEDIT_CHECKBOX.Size = new System.Drawing.Size(136, 28);
            this.DESKTOPMODEEDIT_CHECKBOX.TabIndex = 116;
            this.DESKTOPMODEEDIT_CHECKBOX.Text = "Desktop Mode";
            this.DESKTOPMODEEDIT_CHECKBOX.UseVisualStyleBackColor = true;
            //
            // ProfileForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(315, 450);
            this.Controls.Add(this.USERFORM_LABEL);
            this.Controls.Add(this.MainTab);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.MaximizeBox = false;
            this.Name = "ProfileForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "ProfileForm";
            this.MainTab.ResumeLayout(false);
            this.ProfilesTab.ResumeLayout(false);
            this.ProfilesTab.PerformLayout();
            this.CreateTab.ResumeLayout(false);
            this.CreateTab.PerformLayout();
            this.EditTab.ResumeLayout(false);
            this.EditTab.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TabControl MainTab;
        private System.Windows.Forms.TabPage ProfilesTab;
        private System.Windows.Forms.TabPage CreateTab;
        private System.Windows.Forms.Label USERFORM_LABEL;
        private System.Windows.Forms.Label NEWUSER_LABEL;
        private System.Windows.Forms.Button RESET_BUTTON;
        private System.Windows.Forms.Button CREATE_BUTTON;
        private System.Windows.Forms.TextBox USERNAME_TEXTBOX;
        private System.Windows


'done' && workerTile.vectorTile) {
                // this seems like a missing case where cache control is lost? see #3309
                return workerTile.parse(workerTile.vectorTile, this.layerIndex, this.availableImages, this.actor);
            }
        });
    }
    /**
     * Implements {@link WorkerSource#abortTile}.
     */
    abortTile(params) {
        return performance.__awaiter(this, void 0, void 0, function* () {
            const loading = this.loading;
            const uid = params.uid;
            if (loading && loading[uid] && loading[uid].abort) {
                loading[uid].abort.abort();
                delete loading[uid];
            }
        });
    }
    /**
     * Implements {@link WorkerSource#removeTile}.
     */
    removeTile(params) {
        return performance.__awaiter(this, void 0, void 0, function* () {
            if (this.loaded && this.loaded[params.uid]) {
                delete this.loaded[params.uid];
            }
        });
    }
}

class RasterDEMTileWorkerSource {
    constructor() {
        this.loaded = {};
    }
    loadTile(params) {
        return performance.__awaiter(this, void 0, void 0, function* () {
            const { uid, encoding, rawImageData, redFactor, greenFactor, blueFactor, baseShift } = params;
            const width = rawImageData.width + 2;
            const height = rawImageData.height + 2;
            const imagePixels = performance.isImageBitmap(rawImageData) ?
                new performance.RGBAImage({ width, height }, yield performance.getImageData(rawImageData, -1, -1, width, height)) :
                rawImageData;
            const dem = new performance.DEMData(uid, imagePixels, encoding, redFactor, greenFactor, blueFactor, baseShift);
            this.loaded = this.loaded || {};
            this.loaded[uid] = dem;
            return dem;
        });
    }
    removeTile(params) {
        const loaded = this.loaded, uid = params.uid;
        if (loaded && loaded[uid]) {
            delete loaded[uid];
        }
    }
}

var geojsonRewind = rewind$1;

function rewind$1(gj, outer) {
    var type = gj && gj.type, i;

    if (type === 'FeatureCollection') {
        for (i = 0; i < gj.features.length; i++) rewind$1(gj.features[i], outer);

    } else if (type === 'GeometryCollection') {
        for (i = 0; i < gj.geometries.length; i++) rewind$1(gj.geometries[i], outer);

    } else if (type === 'Feature') {
        rewind$1(gj.geometry, outer);

    } else if (type === 'Polygon') {
        rewindRings(gj.coordinates, outer);

    } else if (type === 'MultiPolygon') {
        for (i = 0; i < gj.coordinates.length; i++) rewindRings(gj.coordinates[i], outer);
    }

    return gj;
}

function rewindRings(rings, outer) {
    if (rings.length === 0) return;

    rewindRing(rings[0], outer);
    for (var i = 1; i < rings.length; i++) {
        rewindRing(rings[i], !outer);
    }
}

function rewindRing(ring, dir) {
    var area = 0, err = 0;
    for (var i = 0, len = ring.length, j = len - 1; i < len; j = i++) {
        var k = (ring[i][0] - ring[j][0]) * (ring[j][1] + ring[i][1]);
        var m = area + k;
        err += Math.abs(area) >= Math.abs(k) ? area - m + k : k - m + area;
        area = m;
    }
    if (area + err >= 0 !== !!dir) ring.reverse();
}

var rewind$2 = /*@__PURE__*/performance.getDefaultExportFromCjs(geojsonRewind);

const toGeoJSON = performance.vectorTile.VectorTileFeature.prototype.toGeoJSON;
let FeatureWrapper$1 = class FeatureWrapper {
    constructor(feature) {
        this._feature = feature;
        this.extent = performance.EXTENT;
        this.type = feature.type;
        this.properties = feature.tags;
        // If the feature has a top-level `id` property, copy it over, but only
        // if


fold_right`, and to have read the [primer]
    //! (@ref monadic-folds) on monadic folds.
    //!
    //! `monadic_fold_right<M>` is a right-associative monadic fold. Given a
    //! structure containing `x1, ..., xn`, a function `f` and an optional
    //! initial state, `monadic_fold_right<M>` applies `f` as follows
    //! @code
    //!     // with state
    //!     (f(x1, -) | (f(x2, -) | (f(x3, -) | (... | f(xn, state)))))
    //!
    //!     // without state
    //!     (f(x1, -) | (f(x2, -) | (f(x3, -) | (... | f(xn-1, xn)))))
    //! @endcode
    //!
    //! where `f(xk, -)` denotes the partial application of `f` to `xk`,
    //! and `|` is just the operator version of the monadic `chain`.
    //! It is worth noting that the order in which the binary function should
    //! expect its arguments is reversed from `monadic_fold_left<M>`.
    //!
    //! When the structure is empty, one of two things may happen. If an
    //! initial state was provided, it is lifted to the given Monad and
    //! returned as-is. Otherwise, if the no-state version of the function
    //! was used, an error is triggered. When the stucture contains a single
    //! element and the no-state version of the function was used, that
    //! single element is lifted into the given Monad and returned as is.
    //!
    //!
    //! Signature
    //! ---------
    //! Given a `Monad` `M`, a `Foldable` `F`, an initial state of tag `S`,
    //! and a function @f$ f : T \times S \to M(S) @f$, the signatures of
    //! `monadic_fold_right<M>` are
    //! \f[
    //!     \mathtt{monadic\_fold\_right}_M :
    //!         F(T) \times S \times (T \times S \to M(S)) \to M(S)
    //! \f]
    //!
    //! for the version with an initial state, and
    //! \f[
    //!     \mathtt{monadic\_fold\_right}_M :
    //!         F(T) \times (T \times T \to M(T)) \to M(T)
    //! \f]
    //!
    //! for the version without an initial state.
    //!
    //! @tparam M
    //! The Monad representing the monadic context in which the fold happens.
    //! The return type of `f` must be in that Monad.
    //!
    //! @param xs
    //! The structure to fold.
    //!
    //! @param state
    //! The initial value used for folding. If the structure is empty, this
    //! value is lifted in to the `M` Monad and then returned as-is.
    //!
    //! @param f
    //! A binary function called as `f(x, state)`, where `state` is the result
    //! accumulated so far and `x` is an element in the structure. The
    //! function must return its result inside the `M` Monad.
    //!
    //!
    //! Example
    //! -------
    //! @include example/monadic_fold_right.cpp
#ifdef BOOST_HANA_DOXYGEN_INVOKED
    template <typename M>
    constexpr auto monadic_fold_right = [](auto&& xs[, auto&& state], auto&& f) -> decltype(auto) {
        return tag-dispatched;
    };
#else
    template <typename T, typename = void>
    struct monadic_fold_right_impl : monadic_fold_right_impl<T, when<true>> { };

    template <typename M>
    struct monadic_fold_right_t;

    template <typename M>
    constexpr monadic_fold_right_t<M> monadic_fold_right{};
#endif
BOOST_HANA_NAMESPACE_END

#endif // !BOOST_HANA_FWD_MONADIC_FOLD_RIGHT_HPP
/*!
@file
Forward declare