_tgz(filename, output),
        _ => unimplemented!(),
    }
}

fn extract_tgz(filename: &Path, output: &Path) {
    let file = fs::File::open(&filename).unwrap();
    let buf = io::BufReader::new(file);
    let tar = flate2::read::GzDecoder::new(buf);
    let mut archive = tar::Archive::new(tar);
    archive.unpack(output).unwrap();
}

fn extract_zip(filename: &Path, outpath: &Path) {
    let file = fs::File::open(&filename).unwrap();
    let buf = io::BufReader::new(file);
    let mut archive = zip::ZipArchive::new(buf).unwrap();
    for i in 0..archive.len() {
        let mut file = archive.by_index(i).unwrap();
        #[allow(deprecated)]
        let outpath = outpath.join(file.sanitized_name());
        if !(&*file.name()).ends_with('/') {
            println!(
                "File {} extracted to \"{}\" ({} bytes)",
                i,
                outpath.as_path().display(),
                file.size()
            );
            if let Some(p) = outpath.parent() {
                if !p.exists() {
                    fs::create_dir_all(&p).unwrap();
                }
            }
            let mut outfile = fs::File::create(&outpath).unwrap();
            io::copy(&mut file, &mut outfile).unwrap();
        }
    }
}

trait OnnxPrebuiltArchive {
    fn as_onnx_str(&self) -> Cow<str>;
}

#[derive(Debug)]
enum Architecture {
    X86,
    X86_64,
    Arm,
    Arm64,
}

impl FromStr for Architecture {
    type Err = String;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.to_lowercase().as_str() {
            "x86" => Ok(Architecture::X86),
            "x86_64" => Ok(Architecture::X86_64),
            "arm" => Ok(Architecture::Arm),
            "aarch64" => Ok(Architecture::Arm64),
            _ => Err(format!("Unsupported architecture: {}", s)),
        }
    }
}

impl OnnxPrebuiltArchive for Architecture {
    fn as_onnx_str(&self) -> Cow<str> {
        match self {
            Architecture::X86 => Cow::from("x86"),
            Architecture::X86_64 => Cow::from("x64"),
            Architecture::Arm => Cow::from("arm"),
            Architecture::Arm64 => Cow::from("arm64"),
        }
    }
}

#[derive(Debug)]
#[allow(clippy::enum_variant_names)]
enum Os {
    Windows,
    Linux,
    MacOs,
}

impl Os {
    fn archive_extension(&self) -> &'static str {
        match self {
            Os::Windows => "zip",
            Os::Linux => "tgz",
            Os::MacOs => "tgz",
        }
    }
}

impl FromStr for Os {
    type Err = String;

    fn from_str(s: &str) -> Result<Self, Self::Err> {
        match s.to_lowercase().as_str() {
            "windows" => Ok(Os::Windows),
            "macos" => Ok(Os::MacOs),
            "linux" => Ok(Os::Linux),
            _ => Err(format!("Unsupported os: {}", s)),
        }
    }
}

impl OnnxPrebuiltArchive for Os {
    fn as_onnx_str(&self) -> Cow<str> {
        match self {
            Os::Windows => Cow::from("win"),
            Os::Linux => Cow::from("linux"),
            Os::MacOs => Cow::from("osx"),
        }
    }
}

#[derive(Debug)]
enum Accelerat


+ 250, y=menu_pos[1] + 20, height=50)
    self.set_pos_on_frame()

def ress_on_beginning(self):
    from .show_menus import toggle_menu
    self.vertex_clear()
    ress_explorator(get_player())
    update_index(0)
    update_current_pos()
    toggle_menu(self, get_player(), self.treasure_font)
    self.ress_text = tk.Label(self.master, text = "Você morreu, restam " + str(get_player().getLives()) + " vidas", font=font.Font(family="Gabriola", size=24), bg="#CDA88E")
    self.ress_text.place(x=menu_pos[0] + 250, y=menu_pos[1] + 20, height=50)
    self.set_pos_on_frame()


1.03%] Hot key '"keySlice2514"' found so far with counter 4
[01.70%] Hot key '"keySlice0"' found so far with counter 6

-------- summary -------

Sampled 3006 keys in the keyspace!
hot key found with counter: 6	keyname: "keySlice0"
hot key found with counter: 4	keyname: "keySlice2838"
hot key found with counter: 4	keyname: "keySlice2669"
hot key found with counter: 4	keyname: "keySlice2340"
hot key found with counter: 4	keyname: "keySlice2943"
hot key found with counter: 4	keyname: "keySlice2462"
hot key found with counter: 4	keyname: "keySlice2275"
hot key found with counter: 4	keyname: "keySlice33"
hot key found with counter: 4	keyname: "keySlice2108"
hot key found with counter: 4	keyname: "keySlice2803"
hot key found with counter: 4	keyname: "keySlice2182"
hot key found with counter: 4	keyname: "keySlice2328"
hot key found with counter: 4	keyname: "keySlice2796"
hot key found with counter: 4	keyname: "keySlice2791"
hot key found with counter: 4	keyname: "keySlice2218"
hot key found with counter: 4	keyname: "keySlice2691"
`

var mockHotData6_0_8 = `Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.

# Scanning the entire keyspace to find hot keys as well as
# average sizes per key type.  You can use -i 0.1 to sleep 0.1 sec
# per 100 SCAN commands (not usually needed).

[00.00%] Hot key '"wo11"' found so far with counter 1
[00.00%] Hot key '"wo17"' found so far with counter 1
[00.00%] Hot key '"wo5"' found so far with counter 1
[00.00%] Hot key '"wo13"' found so far with counter 1
[00.00%] Hot key '"wo10"' found so far with counter 1
[00.00%] Hot key '"wo15"' found so far with counter 1
[00.00%] Hot key '"wo19"' found so far with counter 1
[00.00%] Hot key '"wo6"' found so far with counter 1
[00.00%] Hot key '"wo14"' found so far with counter 1
[00.00%] Hot key '"wo7"' found so far with counter 1
[00.00%] Hot key '"wo12"' found so far with counter 1
[55.00%] Hot key '"wo8"' found so far with counter 1
[55.00%] Hot key '"wo2"' found so far with counter 1
[55.00%] Hot key '"wo18"' found so far with counter 1
[55.00%] Hot key '"wo9"' found so far with counter 1
[55.00%] Hot key '"wo16"' found so far with counter 1
[55.00%] Hot key '"wo0"' found so far with counter 5

-------- summary -------

Sampled 20 keys in the keyspace!
hot key found with counter: 5	keyname: "wo0"
hot key found with counter: 1	keyname: "wo11"
`

var mockHotData7_0 = `Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.

# Scanning the entire keyspace to find hot keys as well as
# average sizes per key type.  You can use -i 0.1 to sleep 0.1 sec
# per 100 SCAN commands (not usually needed).

[00.00%] Hot key '"wo12"' found so far with counter 1
[00.00%] Hot key '"wo19"' found so far with counter 1
[00.00%] Hot key '"wo6"' found so far with counter 1
[00.00%] Hot key '"wo2"' found so far with counter 1
[00.00%] Hot key '"wo5"' found so far with counter 1
[00.00%] Hot key '"wo0"' found


}
		count -= len(vv.views[0])
		vv.RemoveFirst()
	}
}

// CapLength irreversibly reduces the length of the vectorised view.
func (vv *VectorisedView) CapLength(length int) {
	if length < 0 {
		length = 0
	}
	if vv.size < length {
		return
	}
	vv.size = length
	for i := range vv.views {
		v := &vv.views[i]
		if len(*v) >= length {
			if length == 0 {
				vv.views = vv.views[:i]
			} else {
				v.CapLength(length)
				vv.views = vv.views[:i+1]
			}
			return
		}
		length -= len(*v)
	}
}

// Clone returns a clone of this VectorisedView.
// If the buffer argument is large enough to contain all the Views of this VectorisedView,
// the method will avoid allocations and use the buffer to store the Views of the clone.
func (vv VectorisedView) Clone(buffer []View) VectorisedView {
	return VectorisedView{views: append(buffer[:0], vv.views...), size: vv.size}
}

// First returns the first view of the vectorised view.
func (vv VectorisedView) First() View {
	if len(vv.views) == 0 {
		return nil
	}
	return vv.views[0]
}

// RemoveFirst removes the first view of the vectorised view.
func (vv *VectorisedView) RemoveFirst() {
	if len(vv.views) == 0 {
		return
	}
	vv.size -= len(vv.views[0])
	vv.views = vv.views[1:]
}

// Size returns the size in bytes of the entire content stored in the vectorised view.
func (vv VectorisedView) Size() int {
	return vv.size
}

// ToView returns a single view containing the content of the vectorised view.
//
// If the vectorised view contains a single view, that view will be returned
// directly.
func (vv VectorisedView) ToView() View {
	if len(vv.views) == 1 {
		return vv.views[0]
	}
	u := make([]byte, 0, vv.size)
	for _, v := range vv.views {
		u = append(u, v...)
	}
	return u
}

// Views returns the slice containing the all views.
func (vv VectorisedView) Views() []View {
	return vv.views
}

// Append appends the views in a vectorised view to this vectorised view.
func (vv *VectorisedView) Append(vv2 VectorisedView) {
	vv.views = append(vv.views, vv2.views...)
	vv.size += vv2.size
}
package stack

// ElementMapper provides an identity mapping by default.
//
// This can be replaced to provide a struct that maps elements to linker
// objects, if they are not the same. An ElementMapper is not typically
// required if: Linker is left as is, Element is left as is, or Linker and
// Element are the same type.
type linkAddrEntryElementMapper struct{}

// linkerFor maps an Element to a Linker.
//
// This default implementation should be inlined.
//
//go:nosplit
func (linkAddrEntryElementMapper) linkerFor(elem *linkAddrEntry) *linkAddrEntry { return elem }

// List is an intrusive list. Entries can be added to or removed from the list
// in O(1) time and with no additional memory allocations.
//
// The zero value for List is an empty list ready to use.
//
// To iterate over a list (where l is a List):
//      for e := l.Front(); e != nil; e = e.Ne


ne;
  margin: -1px 0 0 0;
  color: #8a8a8a;
  font-weight: 500;
  padding: 8px 16px;
}
.list-header--material:not(:first-of-type) {
  border-top: none;
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12) 100%);
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
  .list-header--material:not(:first-of-type) {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12) 50%, transparent 50%);
  }
}
.list-header--material:not(:first-of-type) {
  padding-top: 16px;
}
/*~
  name: Material List with Checkboxes
  category: List
  elements: ons-list ons-list-item ons-input
  markup: |

            <input type="checkbox" id="checkbox3" class="checkbox__input checkbox--material__input">

Notifications

Allow notifications

            <input type="checkbox" id="checkbox4" class="checkbox__input checkbox--material__input" checked="checked">

Sound

Hangouts message

*/
/*~
  name: Material List with Thumbnails
  category: List
  markup: |

Lily

Very friendly cat

          <img class="


",
  "erikthebeast1#",
  "erinloveshorses",
  "erinlsiofaagasedsio12041977",
  "ernakulam",
  "erotika1",
  "erpzknc3",
  "errstart",
  "erskine1001",
  "erstad17",
  "escargot1!",
  "eschermetronome112",
  "esempio49",
  "esenshop",
  "eshita_2010",
  "eshitamishra_2010",
  "esp39(esp",
  "espelette",
  "espionage",
  "espionage3887..",
  "esquire1",
  "esquivel",
  "essence01",
  "essodora",
  "este4444",
  "estherma",
  "estosgringoslocos",
  "eternalsoul",
  "ethiopiaisagreatcountry",
  "ethneyR0senb1air2010",
  "etinArcadiaego",
  "eugandroxy",
  "eum89!MAK",
  "eunice12",
  "eureka12",
  "evangeline",
  "evceevce",
  "evergreen1990",
  "evergreen1992",
  "eversmile",
  "everymanforhimself",
  "everythingispermitted",
  "evilweasel6667627",
  "evjv1234",
  "evolone1",
  "ewb43667",
  "ewjhsdg1*",
  "executive",
  "executive500",
  "exitonly",
  "explorerx",
  "exsandohs1",
  "eyeloveewe",
  "ez2fly2highJPJ",
  "f(99Drxz",
  "f-esunaga",
  "f09ZN1O5F",
  "f09ZN1O5F/",
  "f123456789",
  "f1uffywand.akitty",
  "f2lollpll",
  "f3ElDZnDL*pU",
  "f3kk0ff*",
  "f4LL3nBY",
  "f4jj_iolaG_5618_aboralY",
  "f5n2kl@0",
  "f6jgh5ty7qazwsxedc1",
  "f6jgh5ty7qazwsxedc12",
  "fFhi9%^9%q34D",
  "fLORIDA83",
  "fLTR2009$$",
  "fORBIDDENDONUT!",
  "fR-26509",
  "fR-2650A",
  "fRa&R#6raZeNU6u6",
  "fSV.03dahn",
  "fX5kUQBQJkE0NgHV",
  "fa1da1sa1",
  "fa7rfdic",
  "faagase12041977",
  "faagasedsio12041977",
  "fabNAUF786&",
  "fabnauf_786",
  "fabregas0#",
  "facdinviataolimonada",
  "facebook",
  "facebookpepsi123",
  "fafofo756367!",
  "fahad12345",
  "fahad2000",
  "fahnestalk654321",
  "fairbanksmorseengine",
  "faisalabad",
  "faiskk12",
  "faithful",
  "fakecmu79",
  "fakepassword",
  "fallout1",
  "falloutgirl",
  "fallsview2411$",
  "familylove610981871384",
  "fandangle",
  "fanfan0420!",
  "fanfananing",
  "fangio300",
  "fantasy1",
  "fappingfapping0",
  "fappingfappingfapping",
  "faraazfarhan",
  "farcasraul92",
  "farheen12",
  "fart76knocker",
  "fart


/****************************************************************************
*
*                            Open Watcom Project
*
* Copyright (c) 2002-2022 The Open Watcom Contributors. All Rights Reserved.
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
*               DESCRIBE IT HERE!
*
****************************************************************************/

#include <string.h>
#include "layer0.h"
#include "util.h"
#include "reserr.h"
#include "wresrtns.h"

ResNameOrOrdinal *WResIDToNameOrOrdinal( WResID *id )
/***************************************************/
{
    ResNameOrOrdinal *  newname;

    if( id->IsName ) {
        /* the one char in the ResNameOrOrdinal gives room for the '\0' */
        newname = WRESALLOC( sizeof( ResNameOrOrdinal ) + id->ID.Name.NumChars );
        if( newname == NULL ) {
            WRES_ERROR( WRS_MALLOC_FAILED );
        } else {
            memcpy( newname->name, id->ID.Name.Name, id->ID.Name.NumChars );
            newname->name[id->ID.Name.NumChars] = '\0';
        }
    } else {
        newname = WRESALLOC( sizeof( ResNameOrOrdinal ) );
        if( newname == NULL ) {
            WRES_ERROR( WRS_MALLOC_FAILED );
        } else {
            newname->ord.fFlag = 0xff;
            newname->ord.wOrdinalID = id->ID.Num;
        }
    }

    return( newname );
}

ResNameOrOrdinal *WResHelpIDToNameOrOrdinal( WResHelpID *id )
/***********************************************************/
{
    ResNameOrOrdinal *  newname;

    if( id->IsName ) {
        /* the one char in the ResNameOrOrdinal gives room for the '\0' */
        newname = WRESALLOC( sizeof( ResNameOrOrdinal ) + id->ID.Name.NumChars );
        if( newname == NULL ) {
            WRES_ERROR( WRS_MALLOC_FAILED );
        } else {
            memcpy( newname->name, id->ID.Name.Name, id->ID.Name.NumChars );
            newname->name[id->ID.Name.NumChars] = '\0';
        }
    } else {
        newname = WRESALLOC( sizeof( ResNameOrOrdinal ) );
        if( newname == NULL ) {
            WRES_ERROR( WRS_MALLOC_FAILED );
        } else {
            newname->ord.fFlag = 0xff;
            newname->ord.wOrdinalID = id->ID.Num;
        }
    }

    return( newname );
}


distribution and use of this software in source and binary forms,
with or without modification, are permitted provided that the
following conditions are met:

* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.

* Neither the name of the assimp team, nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission of the assimp team.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

----------------------------------------------------------------------
*/
/// \file   X3DImporter_Geometry3D.cpp
/// \brief  Parsing data from nodes of "Geometry3D" set of X3D.
/// \date   2015-2016
/// \author smal.root@gmail.com

#ifndef ASSIMP_BUILD_NO_X3D_IMPORTER

#include "X3DImporter.hpp"
#include "X3DImporter_Macro.hpp"

// Header files, Assimp.
#include <assimp/StandardShapes.h>

namespace Assimp
{

// <Box
// DEF=""       ID
// USE=""       IDREF
// size="2 2 2" SFVec3f [initializeOnly]
// solid="true" SFBool  [initializeOnly]
// />
// The Box node specifies a rectangular parallelepiped box centred at (0, 0, 0) in the local coordinate system and aligned with the local coordinate axes.
// By default, the box measures 2 units in each dimension, from -1 to +1. The size field specifies the extents of the box along the X-, Y-, and Z-axes
// respectively and each component value shall be greater than zero.
void X3DImporter::ParseNode_Geometry3D_Box()
{
    std::string def, use;
    bool solid = true;
    aiVector3D size(2, 2, 2);
    CX3DImporter_NodeElement* ne( nullptr );

	MACRO_ATTRREAD_LOOPBEG;
		MACRO_ATTRREAD_CHECKUSEDEF_RET(def, use);
		MACRO_ATTRREAD_CHECK_REF("size", size, XML_ReadNode_GetAttrVal_AsVec3f);
		MACRO_ATTRREAD_CHECK_RET("solid", solid, XML_ReadNode_GetAttrVal_AsBool);
	MACRO_ATTRREAD_LOOPEND;

	// if "USE" defined then find already defined element.
	if(!use.empty())
	{
		MACRO_USE_CHECKANDAPPLY(def, use, ENET_Box, ne);
	}
	else
	{
		// create and if needed - define new geometry object.
		ne = new CX3DImporter_NodeElement_Geometry3D(CX3DImporter_NodeElement::ENET_Box, NodeElement_Cur);
		if(!def.empty()) ne->ID = def;

		GeometryHelper_MakeQL_RectParallelepiped(size, ((CX3DImporter_NodeElement_Geometry3D*)ne)->Vertices);// get


lliseconds. "
      "Here we test that the initial state is persisted, "
      "and then that the state and the persistence occur when they should.", () async {
    //
    List<String> results = [];

    await setupPersistorAndLocalDb(
      throttle: null,
      saveDuration: duration(430),
    );

    var storeTester = await createStoreTester();

    String result = writeStateAndDb(storeTester, localDb);
    results.add(result);

    int count = 0;
    Completer completer = Completer();

    Timer.periodic(duration(120), (timer) {
      storeTester.dispatch(ChangeNameAction(count.toString()));

      String result = writeStateAndDb(storeTester, localDb);
      results.add(result);

      count++;
      if (count == 16) {
        timer.cancel();
        completer.complete();
      }
    });

    await completer.future;

    printResults(results);

    expect(
        results.join(),
        "(state:John, db: John)" // It starts with state and db in the initial state: John.
        "(state:0, db: John)" // Changed the state in 120 millis. Started saving state 0 (will finish: 120+430=550 millis).
        "(state:1, db: John)" // Changed the state in 240 millis.
        "(state:2, db: John)" // Changed state in 360 millis.
        "(state:3, db: John)" // Changed state in 480 millis. Started saving state 3 in 275 millis (will finish: 550+430=980 millis).
        "(state:4, db: 0)" // Changed state in 600 millis.
        "(state:5, db: 0)" // Changed state in 720 millis.
        "(state:6, db: 0)" // Changed state in 840 millis.
        "(state:7, db: 0)" // Changed state in 960 millis. Started saving state 7 in 490 millis (will finish: 980+430=1410 millis).
        "(state:8, db: 3)" // Changed state in 1080 millis.
        "(state:9, db: 3)" // Changed state in 1200 millis.
        "(state:10, db: 3)" // Changed state in 1320 millis. Started saving state 10 in 705 millis (will finish: 1410+430=1840 millis).
        "(state:11, db: 7)" // Changed state in 1440 millis.
        "(state:12, db: 7)" // Changed state in 1560 millis.
        "(state:13, db: 7)" // Changed state in 1680 millis.
        "(state:14, db: 7)" // Changed state in 1800 millis.
        "(state:15, db: 10)"); // Changed state in 1920 millis. Started saving state 15 in 920 millis (will finish: 1840+430 millis).
  });

  test(
      "Pausing then resuming: "
      "There is no throttle. "
      "Each save takes 430 milliseconds. "
      "The state is changed each 120 milliseconds. "
      "We pause the persistor at 600 millis (state: 4), and resume it at 1440 millis (state: 11). "
      "Here we test that the initial state is persisted, "
      "and then that the state and the persistence occur when they should.", () async {
    //
    List<String> results = [];

    await setupPersistorAndLocalDb(
      throttle: null,
      saveDuration: duration(430),
    );

    var storeTester = await createStoreTester();

    String result = writeStateAndDb(storeTester, localDb);
    results.add(result);

    int count = 0;
    Completer completer = Completer();

    Timer.periodic(duration(120), (timer) {
      storeTester.dispatch(ChangeNameAction(count.toString()));

      String result = writeStateAndDb(storeTester, localDb);
      results.


133
00135         void SetMotorSpeed(float32 speed);
00136
00138         float32 GetMotorSpeed() const;
00139
00141         void SetMaxMotorForce(float32 force);
00142         float32 GetMaxMotorForce() const { return m_maxMotorForce; }
00143
00145         float32 GetMotorForce(float32 inv_dt) const;
00146
00148         void Dump();
00149
00150 protected:
00151         friend class b2Joint;
00152         friend class b2GearJoint;
00153         b2PrismaticJoint(const b2PrismaticJointDef* def);
00154
00155         void InitVelocityConstraints(const b2SolverData& data);
00156         void SolveVelocityConstraints(const b2SolverData& data);
00157         bool SolvePositionConstraints(<span class="


%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
@-webkit-keyframes preloader-spin {
  100% {
    -webkit-transform: rotate(360deg);
  }
}
@keyframes preloader-spin {
  100% {
    transform: rotate(360deg);
  }
}
/* === Pull To Refresh === */
.pull-to-refresh-layer {
  position: absolute;
  position: relative;
  margin-top: -44px;
  left: 0;
  top: 0;
  width: 100%;
  height: 44px;
}
.pull-to-refresh-layer .preloader {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
  visibility: hidden;
}
.pull-to-refresh-layer .pull-to-refresh-arrow {
  width: 13px;
  height: 20px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -6px;
  margin-top: -10px;
  background: no-repeat center;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2026%2040'%3E%3Cpolygon%20points%3D'9%2C22%209%2C0%2017%2C0%2017%2C22%2026%2C22%2013.5%2C40%200%2C22'%20fill%3D'%238c8c8c'%2F%3E%3C%2Fsvg%3E");
  background-size: 13px 20px;
  z-index: 10;
  -webkit-transform: rotate(0deg) translate3d(0, 0, 0);
  transform: rotate(0deg) translate3d(0, 0, 0);
  -webkit-transition-duration: 300ms;
  transition-duration: 300ms;
}
.pull-to-refresh-content.pull-to-refresh-no-navbar {
  margin-top: -44px;
  height: -webkit-calc(100% + 44px);
  height: -moz-calc(100% + 44px);
  height: calc(100% + 44px);
}
.pull-to-refresh-content.pull-to-refresh-no-navbar .pull-to-refresh-layer {
  margin-top: 0;
}
.pull-to-refresh-content.transitioning,
.pull-to-refresh-content.refreshing {
  -webkit-transition-duration: 400ms;
  transition-duration: 400ms;
}
.pull-to-refresh-content:not(.refreshing) .pull-to-refresh-layer .preloader {
  -webkit-animation: none;
  animation: none;
}
.pull-to-refresh-content.refreshing {
  -webkit-transform: translate3d(0, 44px, 0);
  transform: translate3d(0, 44px, 0);
}
.pull-to-refresh-content.refreshing .pull


ാധനാ ക്രമങ്ങള് ഞങ്ങള്‍ക്ക് കാണിച്ചുതരികയും, ഞങ്ങളുടെ പശ്ചാത്താപം സ്വീകരിക്കുകയും ചെയ്യേണമേ. തീര്‍ച്ചയായും നീ അത്യധികം പശ്ചാത്താപം സ്വീകരിക്കുന്നവനും കരുണാനിധിയുമാകുന്നു"
  },
  {
    "surah_number": 2,
    "verse_number": 129,
    "content":
        "ഞങ്ങളുടെ രക്ഷിതാവേ, അവര്‍ക്ക് (ഞങ്ങളുടെ സന്താനങ്ങള്‍ക്ക്) നിന്റെ ദൃഷ്ടാന്തങ്ങള് ഓതികേള്‍പിച്ചു കൊടുക്കുകയും, വേദവും വിജ്ഞാനവും അഭ്യസിപ്പിക്കുകയും, അവരെ സംസ്കരിക്കുകയും ചെയ്യുന്ന ഒരു ദൂതനെ അവരില് നിന്നു തന്നെ നീ നിയോഗിക്കുകയും ചെയ്യേണമേ. തീര്‍ച്ചയായും നീ പ്രതാപവാനും അഗാധജ്ഞാനിയുമാകുന്നു."
  },
  {
    "surah_number": 2,
    "verse_number": 130,
    "content":
        "സ്വന്തം ആത്മാവിനെ മൂഢമാക്കിയവനല്ലാതെ മറ്റാരാണ് ഇബ്രാഹീമിന്റെ മാര്‍ഗത്തോട് വിമുഖത കാണിക്കുക? ഇഹലോകത്തില് അ


/**
** @file common.h - mruby common platform definition"
**
** See Copyright Notice in mruby.h
*/

#ifndef MRUBY_COMMON_H
#define MRUBY_COMMON_H

#ifdef __APPLE__
  #ifndef __TARGETCONDITIONALS__
  #include "TargetConditionals.h"
  #endif
#endif

#ifdef __cplusplus
#ifdef MRB_USE_CXX_ABI
#define MRB_BEGIN_DECL
#define MRB_END_DECL
#else
# define MRB_BEGIN_DECL extern "C" {
# define MRB_END_DECL }
#endif
#else
/** Start declarations in C mode */
# define MRB_BEGIN_DECL
/** End declarations in C mode */
# define MRB_END_DECL
#endif

#include <sys/types.h>
#if defined _MSC_VER
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif

/**
 * Shared compiler macros
 */
MRB_BEGIN_DECL

/** Declare a function that never returns. */
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L
# define mrb_noreturn _Noreturn
#elif defined __GNUC__ && !defined __STRICT_ANSI__
# define mrb_noreturn __attribute__((noreturn))
#elif defined _MSC_VER
# define mrb_noreturn __declspec(noreturn)
#else
# define mrb_noreturn
#endif

/** Mark a function as deprecated. */
#if defined __GNUC__ && !defined __STRICT_ANSI__
# define mrb_deprecated __attribute__((deprecated))
#elif defined _MSC_VER
# define mrb_deprecated __declspec(deprecated)
#else
# define mrb_deprecated
#endif

/** Declare a function as always inlined. */
#if defined _MSC_VER && _MSC_VER < 1900
# ifndef __cplusplus
#  define inline __inline
# endif
#endif
#define MRB_INLINE static inline

/** Declare a public MRuby API function. */
#ifndef MRB_API
#if defined(MRB_BUILD_AS_DLL)
#if defined(MRB_CORE) || defined(MRB_LIB)
# define MRB_API __declspec(dllexport)
#else
# define MRB_API __declspec(dllimport)
#endif
#else
# define MRB_API extern
#endif
#endif

/** Declare mingw versions */
#if defined(__MINGW32__) || defined(__MINGW64__)
# include <_mingw.h>
# if defined(__MINGW64_VERSION_MAJOR)
#  define MRB_MINGW64_VERSION  (__MINGW64_VERSION_MAJOR * 1000 + __MINGW64_VERSION_MINOR)
# elif defined(__MINGW32_MAJOR_VERSION)
#  define MRB_MINGW32_VERSION  (__MINGW32_MAJOR_VERSION * 1000 + __MINGW32_MINOR_VERSION)
# endif
# if defined(__MINGW32__) && !defined(__MINGW64__)
#   define MRB_MINGW32_LEGACY
# endif
#endif

MRB_END_DECL

#endif  /* MRUBY_COMMON_H */


GFX12: encoding: [0x7c,0x00,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_b16 v1, off, s0 offset:-64
// GFX12: encoding: [0x00,0x00,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0xc0,0xff,0xff]

scratch_load_d16_b16 v1, off, s0 offset:64
// GFX12: encoding: [0x00,0x00,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_b16 v1, v0, off offset:-64
// GFX12: encoding: [0x7c,0x00,0x08,0xed,0x01,0x00,0x02,0x00,0x00,0xc0,0xff,0xff]

scratch_load_d16_b16 v1, v0, off offset:64
// GFX12: encoding: [0x7c,0x00,0x08,0xed,0x01,0x00,0x02,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_b16 v1, v0, s0 offset:-64
// GFX12: encoding: [0x00,0x00,0x08,0xed,0x01,0x00,0x02,0x00,0x00,0xc0,0xff,0xff]

scratch_load_d16_b16 v1, v0, s0 offset:64
// GFX12: encoding: [0x00,0x00,0x08,0xed,0x01,0x00,0x02,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_b16 v1, v2, s1
// GFX12: encoding: [0x01,0x00,0x08,0xed,0x01,0x00,0x02,0x00,0x02,0x00,0x00,0x00]

scratch_load_d16_hi_b16 v1, off, off offset:-64
// GFX12: encoding: [0x7c,0xc0,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0xc0,0xff,0xff]

scratch_load_d16_hi_b16 v1, off, off offset:64
// GFX12: encoding: [0x7c,0xc0,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_hi_b16 v1, off, s0 offset:-64
// GFX12: encoding: [0x00,0xc0,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0xc0,0xff,0xff]

scratch_load_d16_hi_b16 v1, off, s0 offset:64
// GFX12: encoding: [0x00,0xc0,0x08,0xed,0x01,0x00,0x00,0x00,0x00,0x40,0x00,0x00]

scratch_load_d16_hi_b16 v1, v0, off offset:-64
// GFX12: encoding: [0x7c,0xc0,0x08,0xed,0x01,0x00,0x02,0x00,0x00,0xc


appsv1.StatefulSet{
		ObjectMeta: metav1.ObjectMeta{
			Name:      "etcd",
			Namespace: r.gw.Namespace,
		},
		Spec: appsv1.StatefulSetSpec{
			Replicas: lo.ToPtr[int32](1),
			PersistentVolumeClaimRetentionPolicy: &appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy{
				WhenDeleted: appsv1.DeletePersistentVolumeClaimRetentionPolicyType,
				WhenScaled:  appsv1.RetainPersistentVolumeClaimRetentionPolicyType,
			},
			Selector: &metav1.LabelSelector{
				MatchLabels: etcdLabels,
			},
			PodManagementPolicy: appsv1.ParallelPodManagement,
			ServiceName:         "etcd-headless",
			UpdateStrategy: appsv1.StatefulSetUpdateStrategy{
				Type: appsv1.RollingUpdateStatefulSetStrategyType,
			},
			Template: corev1.PodTemplateSpec{
				ObjectMeta: metav1.ObjectMeta{
					Labels: etcdLabels,
				},
				Spec: corev1.PodSpec{
					Affinity: &corev1.Affinity{
						PodAntiAffinity: &corev1.PodAntiAffinity{
							PreferredDuringSchedulingIgnoredDuringExecution: []corev1.WeightedPodAffinityTerm{
								{
									Weight: 1,
									PodAffinityTerm: corev1.PodAffinityTerm{
										TopologyKey: "kubernetes.io/hostname",
										LabelSelector: &metav1.LabelSelector{
											MatchLabels: etcdLabels,
										},
										Namespaces: []string{r.gw.Namespace},
									},
								},
							},
						},
					},
					SecurityContext: &corev1.PodSecurityContext{
						FSGroup: lo.ToPtr[int64](1001),
					},
					Containers: []corev1.Container{
						{
							Name:            "etcd",
							Image:           "docker.io/bitnami/etcd:3",
							ImagePullPolicy: corev1.PullIfNotPresent,
							SecurityContext: &corev1.SecurityContext{
								RunAsNonRoot: lo.ToPtr(true),
								RunAsUser:    lo.ToPtr[int64](1001),
							},
							Ports: []corev1.ContainerPort{
								{
									Name:          "client",
									ContainerPort: 2379,
									Protocol:      corev1.ProtocolTCP,
								},
								{
									Name:          "peer",
									ContainerPort: 2380,
									Protocol:      corev1.ProtocolTCP,
								},
							},
							Env: []corev1.EnvVar{
								{
									Name: "MY_POD_IP",
									ValueFrom: &corev1.EnvVarSource{
										FieldRef: &corev1.ObjectFieldSelector{
											FieldPath: "status.podIP",
										},
									},
								},
								{
									Name: "MY_POD_NAME",
									ValueFrom: &corev1.EnvVarSource{
										FieldRef: &corev1.ObjectFieldSelector{
											FieldPath: "metadata.name",
										},
									},
								},
								{
									Name:  "MY_STS_NAME",
									Value: "etcd",
								},
								{
									Name:  "ETCDCTL_API",
									Value: "3",
								},
								{
									Name:  "ETCD_ON_K8S",
									Value: "yes",
								},
								{
									Name:  "ETCD_START_FROM_SNAPSHOT",
									Value: "no",
								},
								{


: role } });
}

// When compiling TS to JS and bundling with rollup, the line numbers and file names in error messages change
// This utility uses source maps to get the line numbers and file names of the original, TS source code
export const loop = ErrorMapper.wrapLoop(() => {
  logGameTime();
  logEnergyAvailable();
  clearMemory();

  let harvesters: Creep[] = getCreeps('harvester'),
    builders: Creep[] = getCreeps('builder'),
    upgraders: Creep[] = getCreeps('upgrader'),
    spawn: StructureSpawn | null = getSpawn('Spawn1');

  if (spawn) {
    let containers = findStorageContainers(spawn),
      harvesterPop = containers.length > 2 ? containers.length : 2,
      upgraderPop = containers.length > 2 ? 2 : 1,
      builderPop = containers.length > 2 ? 2 : 1;

    if (harvesters.length < harvesterPop) {
      spawnCreep('Harvester', 'harvester', [WORK, CARRY, MOVE], spawn);
    } else if (upgraders.length < upgraderPop) {
      spawnCreep('Upgrader', 'upgrader', [WORK, CARRY, MOVE], spawn);
    } else if (builders.length < builderPop) {
      spawnCreep('Builder', 'builder', [WORK, CARRY, MOVE], spawn);
    }

    if (spawn.spawning) {
      let spawningCreep: Creep = Game.creeps[spawn.spawning.name];
      spawn.room.visual.text(
        '🛠' + spawningCreep.memory.role,
        spawn.pos.x + 1,
        spawn.pos.y,
        { align: 'left', opacity: 0.8 });
    }

    let tower: StructureTower = findTowers(spawn)[0];
    if (tower) {
      let closestDamagedStructure = tower.pos.findClosestByRange(FIND_STRUCTURES, {
        filter: (structure) => structure.hits < structure.hitsMax &&
          structure.structureType !== STRUCTURE_WALL
      });
      if (closestDamagedStructure) {
        tower.repair(closestDamagedStructure);
      }

      let closestHostile = tower.pos.findClosestByRange(FIND_HOSTILE_CREEPS);
      if (closestHostile) {
        tower.attack(closestHostile);
      }
    }
  }

  for (let name in Game.creeps) {
    let creep = Game.creeps[name];
    if (creep.memory.role == 'harvester') {
      roleHarvester.run(creep);
    }
    if (creep.memory.role == 'upgrader') {
      roleUpgrader.run(creep);
    }
    if (creep.memory.role == 'builder') {
      roleBuilder.run(creep);
    }
  }
});
import fs from 'node:fs'
import path from 'node:path'

import type { Position } from 'acorn'
import type { Point } from 'unist'

import type { NormalPosition } from './types'

export const last = <T>(items: T[] | readonly T[]) =>
  // eslint-disable-next-line unicorn/prefer-at -- FIXME: Node 16.6+ required
  items && items[items.length - 1]

export const arrayify = <T, R = T extends Array<infer S> ? S : T>(
  ...args: T[]
) =>
  args.reduce<R[]>((arr, curr) => {
    arr.


nse.get('done', False):
                        break
                except json.JSONDecodeError:
                    continue

        clean_answer = response_text.replace("<|end_of_text|>", "").strip()

        # ذخیره جواب در کش
        cache[user_input_normalized] = {
            "question": user_input,
            "answer": clean_answer,
            "embedding": user_embedding
        }

        return jsonify({
            "original_input": user_input,
            "answers": [{
                "input": user_input,
                "matched_question": best_match["question"] if best_match else "پاسخی یافت نشد",
                "answer": clean_answer or 'پاسخ موجود نیست',
                "similarity": float(max_similarity),
                "source": "model"
            }]
        })

    except Exception as e:
        return jsonify({"error": "خطای داخلی سرور", "details": str(e)}), 500

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8080)


d *, size_t,
    struct lwp *);
void linux_setregs(struct lwp *, struct exec_package *, vaddr_t);
#ifdef EXEC_AOUT
int exec_linux_aout_makecmds(struct lwp *, struct exec_package *);
int linux_aout_copyargs(struct lwp *, struct exec_package *,
    struct ps_strings *, char **, void *);
#endif
void linux_trapsignal(struct lwp *, ksiginfo_t *);
int linux_usertrap(struct lwp *, vaddr_t, void *);
int linux_lwp_setprivate(struct lwp *, void *);

void linux_e_proc_exec(struct proc *, struct exec_package *);
void linux_e_proc_fork(struct proc *, struct lwp *, int);
void linux_e_proc_exit(struct proc *);
void linux_e_lwp_fork(struct lwp *, struct lwp *);
void linux_e_lwp_exit(struct lwp *);

#ifdef EXEC_ELF32
int linux_elf32_probe(struct lwp *, struct exec_package *, void *,
    char *, vaddr_t *);
int linux_elf32_copyargs(struct lwp *, struct exec_package *,
    struct ps_strings *, char **, void *);
int linux_elf32_signature(struct lwp *, struct exec_package *,
        Elf32_Ehdr *, char *);
#ifdef LINUX_GCC_SIGNATURE
int linux_elf32_gcc_signature(struct lwp *l,
        struct exec_package *, Elf32_Ehdr *);
#endif
#ifdef LINUX_DEBUGLINK_SIGNATURE
int linux_elf32_debuglink_signature(struct lwp *l,
        struct exec_package *, Elf32_Ehdr *);
#endif
#ifdef LINUX_ATEXIT_SIGNATURE
int linux_elf32_atexit_signature(struct lwp *l,
        struct exec_package *, Elf32_Ehdr *);
#endif
#endif
#ifdef EXEC_ELF64
int linux_elf64_probe(struct lwp *, struct exec_package *, void *,
    char *, vaddr_t *);
int linux_elf64_copyargs(struct lwp *, struct exec_package *,
    struct ps_strings *, char **, void *);
int linux_elf64_signature(struct lwp *, struct exec_package *,
        Elf64_Ehdr *, char *);
#ifdef LINUX_GCC_SIGNATURE
int linux_elf64_gcc_signature(struct lwp *l,
        struct exec_package *, Elf64_Ehdr *);
#endif
#ifdef LINUX_DEBUGLINK_SIGNATURE
int linux_elf64_debuglink_signature(struct lwp *l,
        struct exec_package *, Elf64_Ehdr *);
#endif
#ifdef LINUX_ATEXIT_SIGNATURE
int linux_elf64_atexit_signature(struct lwp *l,
        struct exec_package *, Elf64_Ehdr *);
#endif
#endif
__END_DECLS
#endif /* !_KERNEL */

#endif /* !_LINUX_EXEC_H */


    Self (
            E::Fqk::one() / self.0,
            E::Fqk::one() / self.1,
            E::Fqk::one() / self.2,
            E::Fqk::one() / self.3
        )
    }
}
impl<E: PairingEngine> Sub<ComT<E>> for ComT<E> {
    type Output = Self;

    #[inline]
    fn sub(self, other: Self) -> Self {
        Self (
            self.0 * (E::Fqk::one() / other.0),
            self.1 * (E::Fqk::one() / other.1),
            self.2 * (E::Fqk::one() / other.2),
            self.3 * (E::Fqk::one() / other.3)
        )
    }
}
impl<E: PairingEngine> SubAssign<ComT<E>> for ComT<E> {

    #[inline]
    fn sub_assign(&mut self, other: Self) {
        *self = Self (
            self.0 * (E::Fqk::one() / other.0),
            self.1 * (E::Fqk::one() / other.1),
            self.2 * (E::Fqk::one() / other.2),
            self.3 * (E::Fqk::one() / other.3)
        );
    }
}
impl<E: PairingEngine> From<Matrix<E::Fqk>> for ComT<E> {
    fn from(mat: Matrix<E::Fqk>) -> Self {
        assert_eq!(mat.len(), 2);
        assert_eq!(mat[0].len(), 2);
        assert_eq!(mat[1].len(), 2);
        Self (
            mat[0][0],
            mat[0][1],
            mat[1][0],
            mat[1][1]
        )
    }
}
impl<E: PairingEngine> Sum for ComT<E> {
    fn sum<I: Iterator<Item=Self>>(iter: I) -> Self {
        iter.fold(
            Self::zero(),
            |a,b| a + b,
        )
    }
}

impl<E: PairingEngine> B<E> for ComT<E> {}
impl<E: PairingEngine> BT<E, Com1<E>, Com2<E>> for ComT<E> {
    #[inline]
    fn pairing(x: Com1<E>, y: Com2<E>) -> ComT<E> {
        ComT::<E>(
            // TODO: OPTIMIZATION -- If either element is 0 (G1 / G2), just output 1 (Fqk)
            E::pairing::<E::G1Affine, E::G2Affine>(x.0.clone(), y.0.clone()),
            E::pairing::<E::G1Affine, E::G2Affine>(x.0.clone(), y.1.clone()),
            E::pairing::<E::G1Affine, E::G2Affine>(x.1.clone(), y.0.clone()),
            E::pairing::<E::G1Affine, E::G2Affine>(x.1.clone(), y.1.clone()),
        )
    }

    fn as_matrix(&self) -> Matrix<E::Fqk> {
        vec![
            vec![ self.0, self.1 ],
            vec![ self.2, self.3 ]
        ]
    }

    #[inline]
    fn linear_map_PPE(z: &E::Fqk) -> Self {
        Self (
            E::Fqk::one(),
            E::Fqk::one(),
            E::Fqk::one(),
            z.clone()
        )
    }

    #[inline]
    fn linear_map_MSG1(z: &E::G1Affine, key: &CRS<E>) -> Self {
        Self::pairing(Com1::<E>::linear_map(z), Com2::<E>::scalar_linear_map(&E::Fr::one(), key))
    }

    #[inline]
    fn linear_map_MSG2


    final hours = duration.inHours;
    final minutes = duration.inMinutes.remainder(60);
    final seconds = duration.inSeconds.remainder(60);
    return '${hours.toString().padLeft(2, '0')}:${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}';
  }

  void disposeExpirationTimer() {
    _timer?.cancel();
    remainingTime = null;
    formattedRemainingTime = '';
    expirationTime = null;
  }

  void dispose() {
    disposeExpirationTimer();
  }
}
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/monero/monero.dart';
import 'package:cake_wallet/utils/exception_handler.dart';
import 'package:cake_wallet/decred/decred.dart';
import 'package:cake_wallet/view_model/unspent_coins/unspent_coins_item.dart';
import 'package:cake_wallet/wownero/wownero.dart';
import 'package:cw_core/balance.dart';
import 'package:cw_core/transaction_history.dart';
import 'package:cw_core/transaction_info.dart';
import 'package:cw_core/unspent_coin_type.dart';
import 'package:cw_core/unspent_coins_info.dart';
import 'package:cw_core/unspent_transaction_output.dart';
import 'package:cw_core/utils/print_verbose.dart';
import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/cupertino.dart';
import 'package:hive/hive.dart';
import 'package:collection/collection.dart';
import 'package:mobx/mobx.dart';

part 'unspent_coins_list_view_model.g.dart';

class UnspentCoinsListViewModel = UnspentCoinsListViewModelBase with _$UnspentCoinsListViewModel;

abstract class UnspentCoinsListViewModelBase with Store {
  UnspentCoinsListViewModelBase({
    required this.wallet,
    required Box<UnspentCoinsInfo> unspentCoinsInfo,
    this.coinTypeToSpendFrom = UnspentCoinType.any,
  })  : _unspentCoinsInfo = unspentCoinsInfo,
        items = ObservableList<UnspentCoinsItem>(),
        _originalState = {};

  @observable
  WalletBase<Balance, TransactionHistoryBase<TransactionInfo>, TransactionInfo> wallet;
  final Box<UnspentCoinsInfo> _unspentCoinsInfo;
  final UnspentCoinType coinTypeToSpendFrom;

  @observable
  ObservableList<UnspentCoinsItem> items;

  final Map<String, Map<String, dynamic>> _originalState;

  @observable
  bool isDisposing = false;

  @computed
  bool get isAllSelected => items.every((element) => element.isFrozen || element.isSending);

  Future<void> initialSetup() async {
    await _updateUnspents();
    _storeOriginalState();
  }

  void _storeOriginalState() {
    _originalState.clear();
    for (final item in items) {
      _originalState[item.hash] = {
        'isFrozen': item.isFrozen,
        'note': item.note,
        'isSending': item.isSending,
      };
    }
  }

  bool _hasAdjustableFieldChanged(UnspentCoinsItem item) {
    final original = _originalState[item.hash];
    if (original == null) return false;
    return original['isFrozen'] != item.isFrozen ||
        original['note'] != item.note ||
        original['isSending'] != ite


.kaggle_id }}" title="Kaggle">
            {% endif %}
            {%- if site.lastfm_id -%}

            {% endif %}
            {%- if site.spotify_id -%}

            {% endif %}
            {%- if site.pinterest_id -%}

            {% endif %}
            {%- if site.unsplash_id -%}

            {% endif %}
            {%- if site.instagram_id -%}

            {% endif %}
            {%- if site.facebook_id -%}

            {% endif %}
            {%- if site.youtube_id -%}

            {% endif %}
            {%- if site.discord_id -%}

            {% endif %}
            {%- if site.zotero_username -%}

            {% endif %}
            {%- if site.rss_icon -%}

            {% endif %}
            {%- if site.wechat_qr -%}

            {% include scripts/wechatModal.html %}
            {% endif %}
<!doctype html>

    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + React + TS</title>

    {% assign publications = data[1] | sort: 'releaseDate' | reverse %}
    {% for content in publications %}

        <div class="col-xs-2 cl-sm-2 col-md


 <polygon fill="#000000" points="63 7 70 7 70 27 78 18 86.75 18 77 28.5 86.375 41 78 41 70 30 70 41 63 41"></polygon>
              <path d="M37,18 L43,18 L43,21.375 C43.947,19.572 47.037,17.7 50.5,17.7 C57.713,17.7 59,21.957 59,28.125 L59,41 L52,41 L52,29.625 C52,26.969 52.152,23.8 48.5,23.8 C44.8,23.8 44,26.636 44,29.625 L44,41 L37,41 L37,18 Z" fill="#000000"></path>
              <path d="M29.5,6.125 C31.813,6.125 33.875,8.189 33.875,10.5 C33.875,12.811 31.813,14.875 29.5,14.875 C27.19,14.875 25.125,12.811 25.125,10.5 C25.125,8.189 27.19,6.125 29.5,6.125 L29.5,6.125 Z M26,41 L33,41 L33,18 L26,18 L26,41 Z" fill="#000000"></path>
              <polygon fill="#000000" points="0 7 7 7 7 34 22 34 22 41 0 41"></polygon>
            </g>
          </g>
        </g>
        <g class="logo-28dp">
          <g class="dpi-1">
            <g class="inbug" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
              <path d="M25.375,0 L2.625,0 C1.175,0 0,1.175 0,2.625 L0,25.375 C0,26.825 1.175,28 2.625,28 L25.375,28 C26.825,28 28,26.825 28,25.375 L28,2.625 C28,1.175 26.825,0 25.375,0" class="bug-text-color" fill="#FFFFFF" transform="translate(82.000000, 0.000000)"></path>
              <path d="M107.375,0 L84.625,0 C83.175,0 82,1.175 82,2.625 L82,25.375 C82,26.825 83.175,28 84.625,28 L107.375,28 C108.825,28 110,26.825 110,25.375 L110,2.625 C110,1.175 108.825,0 107.375,0 Z M101.0137,9.875 C98.9227,9.875 97.4487,11.025 96.8747,12.025 L96.8747,10 L92.9997,10 L92.9997,24 L96.9997,24 L96.9997,17.375 C96.9997,15.603 97.6627,13.875 99.6497,13.875 C101.4667,13.875 101.9997,14.965 101.9997,16.875 L101.9997,24 L105.9997,24 L105.9997,14.975 C105.9997,11.75 104.2917,9.875 101.0137,9.875 Z M86,24 L90,24 L90,10 L86,10 L86,24 Z M88,3.665 C86.71,3.665 85.665,4.71 85.665,6 C85.665,7.29 86.71,8.335 88,8.335 C89.29,8.335 90.335,7.29 90.335,6 C90.335,4.71 89.29,3.665 88,3.665 Z" class="background" fill="#0073B0"></path>
            </g>
            <g class="linkedin-text">
              <path d="M78,24 L74,24 L74,22 L73.846,22 C73.231,


        {
            this.weights = inWeights;
            max = inWeights.Sum();
            float current = 0;
            cutoffs = new float[inWeights.Length];
            for (int i = 0; i < inWeights.Length; i++)
            {
                cutoffs[i] = current + inWeights[i];
                current += inWeights[i];
            }
        }

        private WeightedRandomCollection()
        {
        }

        public T GetNext(Random random)
		{
			var val = (float)(random.NextDouble() * max);
			for (int i = 0; i < cutoffs.Length; i++)
			{
				if (val < cutoffs[i])
					return items[i];
			}
			return items[items.Length - 1];
		}

        public WeightedRandomCollection<T> Clone() => new WeightedRandomCollection<T>()
        {
            items = items.ShallowCopy(),
            cutoffs = cutoffs.ShallowCopy(),
            max = max,
        };
    }
}


00\xccj&i4\
pP\xe9>\x1ad\x15`\xaf\xd2M\x98\xb5\x9d\x03\x80\
Y\xfd\xde\x01\xbc\xb6t\x13\x0ds\xb0$\x0fR6\xab\
\x91\x03\x80Y\xfd>T\xba\x81\x06Z\x13\xd8\xb4t\x13\
fm\xe6\x00`V#I\xcb\x01[\x96\xee\xa3\xa1\xbc\
&\x80Y\x8d\x1c\x00\xcc\xea\xf5n\xbc\xde\xffH\xbdS\
\xd2\xbc\xa5\x9b0k+\x07\x00\xb3z\xbd\xabt\x03\x0d\
6\x0e\xd8\xa1t\x13fm\xe5\x00`V\x13I\xcb\x00\
\xeb\x94\xee\xa3\xe1\xb6/\xdd\x80Y[9\x00\x98\xd5g\
\x9b\xd2\x0d\xb4\x80WN4\xab\x89\x03\x80Y}\xb6*\
\xdd@\x0b\xbcZ\xd2\x8a\xa5\x9b0k#\x07\x00\xb3\xfa\
lQ\xba\x81\x96\xf0\xebhV\x03\x07\x00\xb3\x1aH\x9a\
\x9f\xb4\xa2\x9d\xf5\xce\xe3(\xccj\xe0\x00`V\x8f\xd5\
\xf0v\xdb\xb9\xacV\xba\x01\xb36r\x000\xab\x87O\
Z\xf9\xf8\xb54\xab\x81\x03\x80Y=|\xd2\xcag\x95\
j;e3\xcb\xc8\x01\xc0\xac\x1eK\x95n\xa0E\xc6\
\x00\x8b\x95n\xc2\xacm\x1c\x00\xcc\xea\xb1`\xe9\x06Z\
\xc6\xaf\xa7Yf\x0e\x00f\xf5X\xa0t\x03-\xe3\x00\
`\x96\x99\x03\x80Y=|\xc2\xca\xcb\xaf\xa7Yf\x0e\
\x00f\xf5\x18S\xba\x81\x96\xf1 @\xb3\xcc\x1c\x00\xcc\
\xea\xf1l\xe9\x06Zfb\xe9\x06\xcc\xda\xc6\x01\xc0\xac\
\x1e>a\xe5\xe5\xd7\xd3,3\x07\x00\xb3z<S\xba\
\x81\x96q\x000\xcb\xcc\x01\xc0\xac\x1e\xe3K7\xd02\
\x13J7`\xd66\x0e\x00f\xf5\xb8\xbbt\x03-\xf2\
XD<]\xba\x09\xb3\xb6q\x000\xab\xc7\x9fK7\
\xd0\x22~-\xcdj\xe0\x00`V\x0f\x9f\xb4\xf2\xf1k\
iV\x03\x07\x00\xb3z<\x84\x07\xae\xe5rW\xe9\x06\
\xcc\xda\xc8\x01\xc0\xac\x06\x11!\xe0\xf7\xa5\xfbh\x89k\
J7`\xd6F\x0e\x00f\xf5\xf9M\xe9\x06Z\xe0\x19\
\xe0\xfa\xd2M\x98\xb5\x91\x03\x80Y}./\xdd@\x0b\
\x5c\x19\x11/\x97n\xc2\xac\x8d\x1c\x00\xcc\xeas\x13\xe0\
\xe9k\xbd\xf1U\x14\xb3\x9a8\x00\x98\xd5$\x22&\x01\
g\x97\xee\xa3\xc1\x04\x9cY\xba\x09\xb3\xb6r\x000\xab\
\xd7\xc9\xa5\x1bh\xb0\xab\x22\xe2\xde\xd2M\x98\xb5\x95\x03\
\x80Y\xbd~\x0b<P\xba\x89\x86rx2\xab\x91\x03\
\x80Y\x8d\x22b\x0a>\x91\x8d\xc4\xf3\xc0\x19\xa5\x9b0\
k3\x07\x00\xb3\xfa\x1dK:\xa1\xd9\xf0\xfd(\x22\xbc\
\xa1\x92Y\x8d\x1c\x00\xccj\x16\x11\x8f\x00?)\xddG\
\x83\xbc\x0c\x1c]\xba\x09\xb3\xb6s\x000\xeb\x8f\xaf\x92\
Nl6{?\x89\x88\xbf\x97n\xc2\xac\xed\x1c\x00\xcc\
\xfa \x22\xee\x07\xfe\xb7t\x1f\x0d\xf0\x02),\x99Y\
\xcd\x1c\x00\xcc\xfa\xe7`\xe0\xf1\xd2M\x0c\xb8\xafE\xc4\
=\xa5\x9b0\xeb\x02\x07\x00\xb3>\x89\x88'\x80/\x96\
\xeec\x80\xfd\x1d8\xaat\x13f]\x11\xa5\x1b0\xeb\
\x12I\xa3H\xbb\x04nT\xba\x97\x01\xb4sD\x5cX\
\xba\x09\xb3\xae\xf0\x15\x00\xb3>\xaa\xd6\x05x\x170\xa1\
t/\x03\xe68\x9f\xfc\xcd\xfa\xcbW\x00\xcc\x0a\x90\xf4\
N\xe0\xe7\xa5\xfb\x18\x10\xb7\x03\x1bE\x84\xd7J0\xeb\
#_\x010+ \x22~\x01\x9cX\xba\x8f\x01\xf0,\
\xb0\xa7O\xfef\xfd\xe7\x00`V\xce\x01\xc0\xd5\xa5\x9b\
(h2\xf0\xae\x88\xb8\xb3t#f]\xe4\x00`V\
H\xf5\xadwg\xe0\x96\xd2\xbd\x14\xf2\xa9\x888\xb7t\
\x13f]\xe5\x00`VPD<\x0d\xec\x08\xdcW\xb8\
\x95~;$\x22\xbeS\xba\x09\xb3.s\x000+,\
\x22\xfe\x01l\x0bte\x01\x9c\xc3#\xe2\xf0\xd2M\x98\
u\x9dg\x01\x98\x0d\x08IK\x01\x97\x00\xeb\x97\xee\xa5\
&\x02>\x1b\x11\xde\xe8\xc7l\x008\x00\x98\x0d\x10I\
\xe3\x80s\x81-J\xf7\x92\xd9\x0b\xc0\xfe\xd5\xec\x073\
\x1b\x00\xbe\x05`6@\xaa1\x01\xdb\x02_\x06\xa6\x14\
n'\x97\xbf\x03[\xfa\xe4o6X|\x05\xc0l@\
I\xda\x99\xb4\x83\xe0b\x85[\xe9\xc5\xd9\xc0\xfb\x22b\
|\xe9F\xcc\xcc\xcc\x1aC\xd2\xab$\x9d\xad\xe6yT\
\xd2\xfe\xa5_?33\xb3F\x93\xb4\xb3\xa4{\x0a\x9f\
\xd4\x87c\x8a\xa4\x93$-^\xfa5333k\x05\
I\xf3J:X\xd2cEO\xf13w\xb1$\xefr\
hffV\x07I\xf3K:P\xd2\x83e\xcf\xf7\xff\
\xefW\x92\xdeX\xfau133\xeb\x04I\xf3H\xda\
[\xd2E\x92&\xf5\xf9\xa4\xff\x80\xa4#%\xadQ\xfa\
u0\xb3\x91\xf1,\x00\xb3\x16\x90\xb44\xb07iY\
\xe1M\x81yk8\xcc\xdd\xc0e\xc0i\xc0o\x22\xa2\
-\xd3\x14\xcd\xcc\xcc\x9aO\xd2XI[J\xfar\x86\
o\xfa7Kz\xaf\xa4\x15K\xff^fff\xaf \
i.I\x8bL\xf7\x18S\xba\xa7A )2\x04\x00\
\xaf\xd9o\xd6R\xfe\xa0\xb4\x81&)\x80\x95\x805\x81\
\xb5\xaa\x7f~\x15\xb0\x02i\x81\x9c\x85\x81\xf9\x87x\xde\
\x8b\xc0D\xe0\x11\xd2Jt\x0f\x01\x7f\x06n\x07n\xaf\
6\xe01\x9b\xa5\xea\xfd\xb70\xb0\x000W\xf5?O\
\x02\xc6G\xc4\x84b\x8d\x99e\xe0\x00`\x03E\xd2\xdc\
\xc0\x06\xc0f\xc0\xe6\xa4\xfb\xd9\x8b\x8c\xa0\xd4\xd8\xea\xb1\
8\xb0\xf6\x10\xc7y\x00\xb8\xbaz\x5c\x12\x11]\xd9\x89\
\xcff\xa0\xb4\xff\xc2\xfa\xa4\x90\xb9\x0e)d\xae\x00,\
\x0f\x8c\x9b\xc5\xf3&\x03O\x01\x0f\x93B\xe6\x03\xc0]\
\xc0\x1d\xa4\x90\xf9H\xad\x8d\x9b\xf5\xc8\x83\x00\xad8I\
\xab\x03o\x07\xb6\x036\xa2\x9e\x01l\xb3s'p>\
\xf0\xf3\x88\xb8\xb9\xc0\xf1\xb3\xab\xbe\xbd\xf6:P\xef\x88\
\x88\xf8R\x8e~\x06\x85\xa4\xf9I\xef\xb5\xad\x807\x93\
\x02\xe2\xe8\x1a\x0eu/pU\xf5\xb8:\x22\xee\xaa\xe1\
\x18f#\xe6\x00`EHZ\x0fxG\xf5X\xb3p\
;3\xba\x0d8\x09\xf8\xdf\x88x\xbct3#\xe5\x00\
0\x8d\xa4\x85\x80=\x80\xdd\x81-\x81y\x0a\xb4\xf1O\
\xe0J\xd2\xfe\x08\x17\xfa\x16\x82\x99u\x86\xd2\xba\xf6\x87\
I\xfa[\x86\xc1i\xfd\xf0\xbc\xa4\xe3%\xad[\xfa\xb5\
\x1


ing_quality(&self) -> Option<MappingQuality> {
        self.mapping_quality
    }

    /// Returns the associated reference sequence of the mate.
    ///
    /// # Examples
    ///
    /// ```
    /// use noodles_sam::{self as sam, header::ReferenceSequences, AlignmentRecord};
    /// let record = sam::Record::default();
    /// let reference_sequences = ReferenceSequences::default();
    /// assert!(record.mate_reference_sequence(&reference_sequences).is_none());
    /// ```
    fn mate_reference_sequence<'rs>(
        &self,
        reference_sequences: &'rs ReferenceSequences,
    ) -> Option<io::Result<&'rs ReferenceSequence>> {
        get_reference_sequence(reference_sequences, self.mate_reference_sequence_name())
    }

    fn mate_alignment_start(&self) -> Option<Position> {
        self.mate_position()
    }

    fn template_length(&self) -> i32 {
        self.template_length
    }

    fn quality_scores(&self) -> &QualityScores {
        &self.quality_scores
    }
}

fn get_reference_sequence<'rs>(
    reference_sequences: &'rs ReferenceSequences,
    reference_sequence_name: Option<&ReferenceSequenceName>,
) -> Option<io::Result<&'rs ReferenceSequence>> {
    reference_sequence_name.map(|name| {
        reference_sequences.get(name.as_str()).ok_or_else(|| {
            io::Error::new(
                io::ErrorKind::InvalidData,
                "invalid reference sequence name",
            )
        })
    })
}

impl Default for Record {
    fn default() -> Self {
        Self {
            read_name: None,
            flags: Flags::UNMAPPED,
            reference_sequence_name: None,
            position: None,
            mapping_quality: None,
            cigar: Cigar::default(),
            mate_reference_sequence_name: None,
            mate_position: None,
            template_length: 0,
            sequence: Sequence::default(),
            quality_scores: QualityScores::default(),
            data: Data::default(),
        }
    }
}

impl fmt::Display for Record {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        let qname = self
            .read_name()
            .map(|name| name.as_ref())
            .unwrap_or(NULL_FIELD);

        let rname = self
            .reference_sequence_name()
            .map(|name| name.as_str())
            .unwrap_or(NULL_FIELD);

        let pos = self.position().map(i32::from).unwrap_or(position::UNMAPPED);

        let mapq = self
            .mapping_quality()
            .map(u8::from)
            .unwrap_or(mapping_quality::MISSING);

        let rnext = self
            .mate_reference_sequence_name()
            .map(|mate_reference_sequence_name| {
                if let Some(reference_sequence_name) = self.reference_sequence_name() {
                    if mate_reference_sequence_name == reference_sequence_name {
                        return EQ_FIELD;
                    }
                }

                mate_reference_sequence_name.as_str()
            })
            .unwrap_or(NULL_FIELD);

        let pnext = self
            .mate_position()
            .map(i32::from)
            .unwrap_or(position::UNMAPPED);

        write!(
            f,
            "{qname}\t{flag}\t{rname}\t{pos}\t{mapq}\t{cigar}\t{rnext}\t{pnext}\t{tlen}\t{seq}\t{qual}",
            qname = qname,
            flag = u16::from(self.flags()),
            rname = r


bestBlockHeaderMeta.Height)
	if err != nil {
		sm.logger.Errorf("failed to convert block height to int32: %v", err)
		return // add return to prevent continuing with invalid height
	}

	if sm.headersFirstMode {
		sm.logger.Infof("Resetting header sync state at height %d with hash %v",
			bestBlockHeightInt32, bestBlockHeader.Hash())

		sm.resetHeaderState(bestBlockHeader.Hash(), bestBlockHeightInt32)
	}

	sm.startSync()
}

// handleTxMsg handles transaction messages from all peers.
func (sm *SyncManager) handleTxMsg(tmsg *txMsg) {
	ctx, _, _ := tracing.Tracer("SyncManager").Start(sm.ctx, "handleTxMsg",
		tracing.WithHistogram(prometheusLegacyNetsyncHandleTxMsg),
		tracing.WithDebugLogMessage(sm.logger, "handling transaction message for %s from %s", tmsg.tx.Hash(), tmsg.peer),
	)

	peer := tmsg.peer

	state, exists := sm.peerStates.Get(peer)
	if !exists {
		sm.logger.Warnf("Received tx message from unknown peer %s", peer)
		return
	}

	// NOTE: BitcoinJ, and possibly other wallets, don't follow the spec of
	// sending an inventory message and allowing the remote peer to decide
	// whether or not they want to request the transaction via a getdata
	// message.  Unfortunately, the reference implementation permits
	// unrequested data, so it has allowed wallets that don't follow the
	// spec to proliferate.  While this is not ideal, there is no check here
	// to disconnect peers for sending unsolicited transactions to provide
	// interoperability.
	txHash := tmsg.tx.Hash()

	// Ignore transactions that we have already rejected.  Do not
	// send a reject message here because if the transaction was already
	// rejected, the transaction was unsolicited.
	if _, exists = sm.rejectedTxns.Get(*txHash); exists {
		sm.logger.Debugf("Ignoring unsolicited previously rejected transaction %v from %s", txHash, peer)
		return
	}

	// Validate the transaction using the validation service
	buf := bytes.NewBuffer(make([]byte, 0, tmsg.tx.MsgTx().SerializeSize()))
	_ = tmsg.tx.MsgTx().Serialize(buf)

	btTx, err := bt.NewTxFromBytes(buf.Bytes())
	if err != nil {
		sm.logger.Errorf("Failed to create transaction from bytes: %v", err)
		return
	}

	var txMeta *meta.Data

	timeStart := time.Now()
	// passing in block height 0, which will default to utxo store block height in validator
	txMeta, err = sm.validationClient.Validate(ctx, btTx, 0)

	prometheusLegacyNetsyncHandleTxMsgValidate.Observe(float64(time.Since(timeStart).Microseconds()) / 1_000_000)

	// Remove transaction from request maps. Either the mempool/chain
	// already knows about it and as such we shouldn't have any more
	// instances of trying to fetch it, or we failed to insert and thus
	// we'll retry next time we get an inv.
	state.requestedTxns.Delete(*txHash)
	sm.requestedTxns.Delete(*txHash)

	if err != nil {
		if errors.Is(err, errors.ErrTxMissingParent) || errors.Is(err, errors.ErrTxLocked) {
			// this is an orphan transaction, we will accept it when the parent comes in
			// first check if the transaction already exists in the orphan pool, otherwise add it
			if _, orphanTxExists := sm.orphanTxs.Get(*txHash); !orphanTxExists {
				sm.logger.Debugf("orphan transaction %v added from %s", txHash, peer)

				// create a map of the parents of the transaction for faster lookups
				txParents := txmap.NewSyncedMap[chainhash.Hash, struct{}]()
				for _, input := range tmsg.tx.MsgTx().TxIn {
					txPar


xc.Pan.Memory);
					Set(xc, Channel_Flag.Pan_Slide);

					xc.Pan.Slide = Common.Lsn(fxP) - Common.Msn(fxP);
					break;
				}

				// Pan slide (XM volume column)
				case Effects.Fx_PanSl_NoMem:
				{
					Set(xc, Channel_Flag.Pan_Slide);

					xc.Pan.Slide = Common.Lsn(fxP) - Common.Msn(fxP);
					break;
				}

				// Pan slide w/ fine pan (IT)
				case Effects.Fx_It_PanSlide:
				{
					Set(xc, Channel_Flag.Pan_Slide);

					if (fxP != 0)
					{
						if (Common.Msn(fxP) == 0xf)
						{
							xc.Pan.Slide = 0;
							xc.Pan.FSlide = Common.Lsn(fxP);
						}
						else if (Common.Lsn(fxP) == 0xf)
						{
							xc.Pan.Slide = 0;
							xc.Pan.FSlide = -Common.Msn(fxP);
						}
						else
						{
							Set(xc, Channel_Flag.Pan_Slide);
							xc.Pan.Slide = Common.Lsn(fxP) - Common.Msn(fxP);
							xc.Pan.FSlide = 0;
						}
					}
					break;
				}

				// Multi retrig
				case Effects.Fx_Multi_Retrig:
				{
					Effect_Memory_S3M(m, xc, ref fxP);

					if (fxP != 0)
					{
						xc.Retrig.Val = Common.Lsn(fxP);
						xc.Retrig.Type = Common.Msn(fxP);
					}

					if (note != 0)
						xc.Retrig.Count = xc.Retrig.Val + 1;

					xc.Retrig.Limit = 0;

					Set(xc, Channel_Flag.Retrig);
					break;
				}

				// Tremor
				case Effects.Fx_Tremor:
				{
					Effect_Memory(m, xc, ref fxP, ref xc.Tremor.Memory);

					xc.Tremor.Up = Common.Msn(fxP);
					xc.Tremor.Down = Common.Lsn(fxP);

					if (Common.Is_Player_Mode_Ft2(m))
						xc.Tremor.Count |= 0x80;
					else
					{
						if (xc.Tremor.Up == 0)
							xc.Tremor.Up++;

						if (xc.Tremor.Down == 0)
							xc.Tremor.Down++;
					}

					Set(xc, Channel_Flag.Tremor);
					break;
				}

				// Extra fine portamento
				case Effects.Fx_Xf_Porta:
				{
					h = Common.Msn(fxP);
					fxP &= 0x0f;

					switch (h)
					{
						// Extra fine portamento up
						case Effects.Xx_Xf_Porta_Up:
						{
							Effect_Memory(m, xc, ref fxP, ref xc.Fine_Porta.Xf_Up_Memory);
							Do_Fx_Xf_Porta_Up(xc, fxP);
							break;
						}

						// Extra fine portamento down
						case Effects.Xx_Xf_Porta_Dn:
						{
							Effect_Memory(m, xc, ref fxP, ref xc.Fine_Porta.Xf_Dn_Memory);
							Do_Fx_Xf_Porta_Dn(xc, fxP);
							break;
						}
					}
					break;
				}

				case Effects.Fx_Surround:
				{
					xc.Pan.Surround = fxP != 0;
					break;
				}

				// Play forward/backward
				case Effects.Fx_Reverse:
				{
					lib.virt.LibXmp_Virt_Reverse(chn, fxP != 0);
					break


jRC16PCQSFQX_CntrIvrjC13PCQSFQX_NaabgC16PSK_EraqreQrivprEX10PSK_Zngevk:
nop
.text
.globl b__MA24PCQS_FgernzPbagragCnefre13NqqCnguBowrpgRvo
.type b__MA24PCQS_FgernzPbagragCnefre13NqqCnguBowrpgRvo,%function
b__MA24PCQS_FgernzPbagragCnefre13NqqCnguBowrpgRvo:
nop
.text
.globl b__MA9PCJY_Rqvg7BaPyrneREX14PCIG_JbeqCynprF2_
.type b__MA9PCJY_Rqvg7BaPyrneREX14PCIG_JbeqCynprF2_,%function
b__MA9PCJY_Rqvg7BaPyrneREX14PCIG_JbeqCynprF2_:
nop
.text
.globl b__pzfUnaqyrRkgenPunaaryf
.type b__pzfUnaqyrRkgenPunaaryf,%function
b__pzfUnaqyrRkgenPunaaryf:
nop
.text
.globl b_bcw_zngevk_vairefvba_s
.type b_bcw_zngevk_vairefvba_s,%function
b_bcw_zngevk_vairefvba_s:
nop
.text
.globl b_SCQS_FgehpgRyrzrag_TrgGvgyr
.type b_SCQS_FgehpgRyrzrag_TrgGvgyr,%function
b_SCQS_FgehpgRyrzrag_TrgGvgyr:
nop
.data
.globl b__MGI11PON_SbagZnc
.type b__MGI11PON_SbagZnc,%object
b__MGI11PON_SbagZnc:
.space __SIZEOF_POINTER__
.text
.weak b__MAFg3__16irpgbeVAF_4cnveVA5skpeg10OlgrFgevatRF3_RRAF_9nyybpngbeVF4_RRR21__chfu_onpx_fybj_cnguVF4_RRiBG_
.type b__MAFg3__16irpgbeVAF_4cnveVA5skpeg10OlgrFgevatRF3_RRAF_9nyybpngbeVF4_RRR21__chfu_onpx_fybj_cnguVF4_RRiBG_,%function
b__MAFg3__16irpgbeVAF_4cnveVA5skpeg10OlgrFgevatRF3_RRAF_9nyybpngbeVF4_RRR21__chfu_onpx_fybj_cnguVF4_RRiBG_:
nop
.text
.globl b__MA13PCJY_YvfgPgey9ErNeenatrRv
.type b__MA13PCJY_YvfgPgey9ErNeenatrRv,%function
b__MA13PCJY_YvfgPgey9ErNeenatrRv:
nop
.text
.globl b__MA14PCJY_FpebyyOne15BaCbfOhggbaYOHcREX13PSK_CGrzcyngrVsR
.type b__MA14PCJY_FpebyyOne15BaCbfOhggbaYOHcREX13PSK_CGrzcyngrVsR,%function
b__MA14PCJY_FpebyyOne15BaCbfOhggbaYOHcREX13PSK_CGrzcyngrVsR:
nop
.text
.globl b__MAX14PCQS_GrkgFgngr11TrgGrkgZbqrRi
.type b__MAX14PCQS_GrkgFgngr11TrgGrkgZbqrRi,%function
b_


model__.modeldata.attribs.query.hasModelAttrib('north')) {
        //     north = __model__.modeldata.attribs.query.getModelAttribVal('north') as Txy;
        // }
    }
    // TODO
    // TODO
    // --- Error Check ---

    const sensor_oris_dirs_tjs: [THREE.Vector3, THREE.Vector3][] = _rayOrisDirsTjs(__model__, origins, 0.01);
    const [mesh_tjs, idx_to_face_i]: [THREE.Mesh, number[]] = createSingleMeshTjs(__model__, ents_arrs);
    limits = Array.isArray(limits) ? limits : [0, limits];
    // get the direction vectors
    const ray_dirs_tjs: THREE.Vector3[] = _skyRayDirsTjs(detail);
    // run the simulation
    const weighted: boolean = method === _ESkyMethod.WEIGHTED;
    const results: number[] = _calcExposure(sensor_oris_dirs_tjs, ray_dirs_tjs, mesh_tjs, limits, weighted);
    // cleanup
    mesh_tjs.geometry.dispose();
    (mesh_tjs.material as THREE.Material).dispose();
    // return the result
    return { 'exposure': results };

}
function _skyRayDirsTjs(detail: number): THREE.Vector3[] {
    const hedron_tjs: THREE.IcosahedronGeometry = new THREE.IcosahedronGeometry(1, detail + 2);
    // calc vectors
    const vecs: THREE.Vector3[] = [];
    for (const vec of hedron_tjs.vertices) {
        // vec.applyAxisAngle(YAXIS, Math.PI / 2);
        if (vec.z > -1e-6) {
            vecs.push(vec);
        }
    }
    //console.log("num rays = ", vecs.length);
    return vecs;
}
// ================================================================================================
export enum _ESolarMethod {
    DIRECT_WEIGHTED = 'direct_weighted',
    DIRECT_UNWEIGHTED = 'direct_unweighted',
    INDIRECT_WEIGHTED = 'indirect_weighted',
    INDIRECT_UNWEIGHTED = 'indirect_unweighted'
}
/**
 * Calculate an approximation of the solar exposure factor, for a set sensors positioned at specfied locations.
 * The solar exposure factor for each sensor is a value between 0 and 1, where 0 means that it has no exposure
 * and 1 means that it has maximum exposure.
 * ~
 * The calculation takes into account the geolocation and the north direction of the model.
 * Geolocation is specified by a model attributes as follows:
 * @geolocation={'longitude':123,'latitude':12}.
 * North direction is specified by a model attribute as follows, using a vector:
 * @north==[1,2]
 * If no north direction is specified, then [0,1] is the default (i.e. north is in the direction of the y-axis);
 * ~
 * Each sensor has a location and direction, specified using either rays or planes.
 * The direction of the sensor specifies what is infront and what is behind the sensor.
 * For each sensor, only exposure infront of the sensor is calculated.
 * ~
 * The exposure is calculated by shooting rays in reverse.
 * from the sensor origin to a set of points on the sky dome.
 * If the rays hits an obstruction, then the sky dome is obstructed..
 * If the ray hits no obstructions, then the sky dome is not obstructed.
 * ~
 * The exposure factor at each sensor point is calculated as follows:
 * 1) Shoot rays to all sky dome points.
 * 2) If the ray hits an obstruction, assign a wight of 0 to that ray.
 * 3) If a ray does not hit any obstructions, assign a weight between 0 and 1, depending on the incidence angle.
 * 4) Calculate the total solar expouse by adding up the weights for all rays.
 * 5) Divide by the maximum possible solar exposure for an unobstructed sensor.
 * ~
 * The solar exposure calculation takes into account th


rom pyecharts.charts import Radar

data = [{"value": [4, -4, 2, 3, 0, 1], "name": "预算分配"}]
c_schema = [
    {"name": "销售", "max": 4, "min": -4},
    {"name": "管理", "max": 4, "min": -4},
    {"name": "技术", "max": 4, "min": -4},
    {"name": "客服", "max": 4, "min": -4},
    {"name": "研发", "max": 4, "min": -4},
    {"name": "市场", "max": 4, "min": -4},
]
c4 = (
    Radar()
    .set_colors(["#4587E7"])
    .add_schema(
        schema=c_schema,
        shape="circle",
        center=["50%", "50%"],
        radius="80%",
        angleaxis_opts=opts.AngleAxisOpts(
            min_=0,
            max_=360,
            is_clockwise=False,
            interval=5,
            axistick_opts=opts.AxisTickOpts(is_show=False),
            axislabel_opts=opts.LabelOpts(is_show=False),
            axisline_opts=opts.AxisLineOpts(is_show=False),
            splitline_opts=opts.SplitLineOpts(is_show=False),
        ),
        radiusaxis_opts=opts.RadiusAxisOpts(
            min_=-4,
            max_=4,
            interval=2,
            splitarea_opts=opts.SplitAreaOpts(
                is_show=True, areastyle_opts=opts.AreaStyleOpts(opacity=1)
            ),
        ),
        polar_opts=opts.PolarOpts(),
        splitarea_opt=opts.SplitAreaOpts(is_show=False),
        splitline_opt=opts.SplitLineOpts(is_show=False),
    )
    .add(
        series_name="预算",
        data=data,
        areastyle_opts=opts.AreaStyleOpts(opacity=0.1),
        linestyle_opts=opts.LineStyleOpts(width=1),
    )
)

import swanlab

swanlab.init(
    project="echarts-test",
    experiment_name="radar",
    public=True,
)

swanlab.log(
    {
        "Radar - Basic_radar_chart": c1,
        "Radar - Radar_selected_mode": c2,
        "Radar - Radar_air_quality": c3,
        "Radar - Radar_angle_radius_axisr": c4
    }
)


我自己了解我自己？还真会有。听完今天的课，你可以试一试在朋友圈做个调查：朋友们，请用三个关键字评价我。。

调查，尤其是匿名调查，可以帮助你认知：盲目的自我。

### 第二，秘密的自我。

别人不知道，你却知道的自己。

很多人喜欢选择性埋藏，或者否定这部分的自我。那怎么把它挖出来呢？

在纸上，用10分钟写下20句“我有……不为人知的一面”，想到什么写什么。写完后，藏好，用三天的时间对照观察自己的言行。

三天后，删掉20句中最不像的10句，换10句不重复的。三天后，再换10句。再过三天后，挑出前5。

这就是你“秘密的自我”。

### 第三，公开的自我。

别人知道，你也知道的自己。

比如，我长得比较瘦；他长得比较帅；李雷逻辑思维能力特别棒；韩梅梅口才特别好，等等。

但是，有时你以为秘密的自我，其实是公开的自我。比如，有同学觉得自己“闷骚”。你和你兄弟，或者闺蜜说说看。他（她）可能会哈哈大笑：“闷”这个字，我真没看出来。

### 第四，未知的自我。

别人不知道，你也不知道的自己。

了解这部分的自我，可以借助一些专业测评工具。

有多少人知道自己的智商是多少？不要在网上随便找题，去专门的机构测一下。

我一直以为自己智商挺高的。后来我真去测了一次，非常沮丧。我知道，我只能靠颜值了。然后我又照了照镜子，决定，还是靠勤奋吧。

有多少人知道自己的性格的？不要在网上随便找题，也去专门的机构测一下，比如MBTI。

关于自我认知，还要提醒大家两点：自我认知的刻度性，动态性。

你问100个人，你勤奋吗？估计90个人会说自己穷得只剩勤奋了。勤奋这个东西，是有刻度的。6点起床的，可能比8点起床的勤奋；4点起床的，可能比6点起床的勤奋。你要基于比较，得出自我认知。

你说，我真不擅长演讲。但是随着练习，你就会讲得越来越好。这些自我认知，是动态变化的。

遇到困难时，很多人说：做自己。一帆风顺时，很多人说：做


        self.stream.wave.update(Some(WaveStream::new(w)));
    }

    fn restart_noise(&self, n: Noise) {
        self.stream.noise.update(Some(NoiseStream::new(n)));
    }

    fn update_volume(&self) {
        self.stream.enable.set(self.enable);
        self.stream.tone1.volume.set(self.get_volume(0));
        self.stream.tone2.volume.set(self.get_volume(1));
        self.stream.wave.volume.set(self.get_volume(2));
        self.stream.noise.volume.set(self.get_volume(3));
    }

    fn get_volume(&self, id: u8) -> usize {
        let mask = 1 << id;
        let v1 = if self.so_mask & mask != 0 {
            self.so1_volume
        } else {
            0
        };
        let v2 = if self.so_mask & (mask << 4) != 0 {
            self.so2_volume
        } else {
            0
        };
        v1 + v2
    }
}

struct Unit<T> {
    stream: Arc<Mutex<Option<T>>>,
    volume: Arc<AtomicUsize>,
}

impl<T> Clone for Unit<T> {
    fn clone(&self) -> Self {
        Self {
            stream: self.stream.clone(),
            volume: self.volume.clone(),
        }
    }
}

impl<T> Unit<T> {
    fn new() -> Self {
        Self {
            stream: Arc::new(Mutex::new(None)),
            volume: Arc::new(AtomicUsize::new(0)),
        }
    }
}

impl<T: Stream> Unit<T> {
    fn on(&self) -> bool {
        self.stream.lock().is_some()
    }

    fn update(&self, s: Option<T>) {
        *self.stream.lock() = s;
    }

    fn next(&self, rate: u32) -> (u16, u16) {
        (
            self.stream
                .lock()
                .as_mut()
                .map(|s| s.next(rate))
                .unwrap_or(0),
            self.volume.get() as u16,
        )
    }
}

#[derive(Clone)]
struct MixerStream {
    tone1: Unit<ToneStream>,
    tone2: Unit<ToneStream>,
    wave: Unit<WaveStream>,
    noise: Unit<NoiseStream>,
    enable: Arc<AtomicBool>,
}

impl MixerStream {
    fn new() -> Self {
        Self {
            tone1: Unit::new(),
            tone2: Unit::new(),
            wave: Unit::new(),
            noise: Unit::new(),
            enable: Arc::new(AtomicBool::new(false)),
        }
    }

    fn volume(&self, amp: u16, vol: u16) -> u16 {
        amp * vol
    }
}

impl Stream for MixerStream {
    fn max(&self) -> u16 {
        // volume max = 7 * 2 = 14
        // amplitude max = 15
        // total volume max = 14 * 15 * 4 = 840
        // * 3 to soften the sound
        840 * 3
    }

    fn next(&mut self, rate: u32) -> u16 {
        if self.enable.get() {
            let mut vol = 0;

            let (t, v) = self.tone1.next(rate);
            vol += self.volume(t, v);
            let (t, v) = self.tone2.next(rate);
            vol += self.volume(t, v);
            let (t, v) = self.wave.next(rate);
            vol += self.volume(t, v);
            let (t, v) = self.noise.next(rate);
            vol += self.volume(t, v) / 2; // Soften the noise

            assert!(vol <= 840, "vol = {}", vol);

            vol
        } else {


60px 10px 0px 40px;}.sfregionTxt{line-height:26px;font-size:14px}.sfregionBuy{margin:40px 10px 0px 180px;}#store-selector .close,#store-selector_sfv .close,#store-selector1 .close{background:url(../images/index_icon_new.png) no-repeat -245px -33px;display:none;height:18px;left:345px; top:40px;position:absolute;width:18px;z-index:2;}#store-selector .tips{line-height:24px;color:red;padding:0 3px 0 0;}#store-selector.hover .content,#store-selector.hover .close,#store-selector_sfv.hover .content,#store-selector_sfv.hover .close,#store-selector1.hover .content,#store-selector1.hover .close{display:block;}#store-selector.hover .close,#store-selector_sfv.hover .close,#store-selector1.hover .close{cursor:pointer;}#store-selector .content,#store-selector_sfv .content,#store-selector1 .content{background:none repeat scroll 0 0 #FFFFFF;border:1px solid #CECBCE;box-shadow:0 0 5px #DDDDDD;display:none;left:-45px;padding:15px;position:absolute;top:25px;width:390px;}#store-selector .juli1{left:-250px;}#store-selector .juli2{left:140px;}.m,.mt,.mc{overflow:hidden;}.mt{cursor:default;}#store-selector1{height:24px;margin-right:3px;}#store-selector1 .text{height:22px;line-height:22px; overflow:hidden;}#store-selector1 .area-list{padding:5px 0 0 0;}#store-selector1 .area-list li{line-height:20px;height:20px;padding:2px 0;width:60px;overflow:hidden;}#store-selector1 .close{left:100px;}#store-selector1 .SF-stock ul.tab{padding:0;}#store-selector1.hover .content{width:300px;}#store-selector1 .content{left:-205px}input.submit1{font-size:12px;background-color:#6c9c0a;color:#fff;border:none;margin:0px 0px 0px 0px;padding:0px 4px 0px 4px;height:22px;line-height:22px;cursor:pointer;vertical-align:middle;vertical-align:baseline\9;}input.submit1:hover{background:url(../images/productinfo.png) repeat-x 0 -124px;}.window{width:350px;border:3px solid #e6e6e6;position:absolute;margin-left:-150px;margin-top:-150px;top:50%;left:50%;background:#fff;}.window .content{padding:20px 12px 12px 12px;text-align:center;line-height:24px;font-size:14px;}.window .titlehead{background-color:#f5f5f5;height:31px;line-height:31px;border:0 none;}.window h3{width:150px;float:left;margin:0px;padding:0px 0px 0px 16px;font-size:14px;color:#565656;font-family:微软雅黑;}.window h3 img{border:0px;padding:0px;margin:0px;}.ac_results{padding:0px;border:1px solid #dadada;background-color:white;overflow:hidden;z-index:102;}.ac_results ul{width:100%;list-style-position:outside;list-style:none;padding:0;margin:0;}.ac_results li{margin:0px;padding:2px 5px;cursor:pointer;display:block;/*if width will be 100% horizontal scrollbar will apearwhen scroll mode will be used*//*width:100%;*/font:menu;font-family:aria


CurveNodes.keys) {
      var rawCurveNode = rawCurveNodes[nodeID];

      if (RegExp(r'S|R|T|DeformPercent').hasMatch(rawCurveNode["attrName"])) {
        var curveNode = {
          "id": rawCurveNode["id"],
          "attr": rawCurveNode["attrName"],
          "curves": {},
        };

        curveNodesMap[curveNode["id"]] = curveNode;
      }
    }

    return curveNodesMap;
  }

  // parse nodes in FBXTree.Objects.AnimationCurve and connect them up to
  // previously parsed AnimationCurveNodes. Each AnimationCurve holds data for a single animated
  // axis ( e.g. times and values of x rotation)
  parseAnimationCurves(curveNodesMap) {
    var rawCurves = fbxTree.Objects["AnimationCurve"];

    // TODO: Many values are identical up to roundoff error, but won't be optimised
    // e.g. position times: [0, 0.4, 0. 8]
    // position values: [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.23538335023477e-7, 93.67518615722656, -0.9982695579528809, 7.235384487103147e-7, 93.67520904541016, -0.9982695579528809]
    // clearly, this should be optimised to
    // times: [0], positions [7.23538335023477e-7, 93.67518615722656, -0.9982695579528809]
    // this shows up in nearly every FBX file, and generally time array is length > 100

    for (var nodeID in rawCurves.keys) {
      var animationCurve = {
        "id": rawCurves[nodeID]["id"],
        "times": rawCurves[nodeID]["KeyTime"]["a"]
            .map(convertFBXTimeToSeconds)
            .toList(),
        "values": rawCurves[nodeID]["KeyValueFloat"]["a"],
      };

      var relationships = connections[animationCurve["id"]];

      if (relationships != null) {
        var animationCurveID = relationships["parents"][0]["ID"];
        var animationCurveRelationship =
            relationships["parents"][0]["relationship"];

        if (RegExp(r'X').hasMatch(animationCurveRelationship)) {
          curveNodesMap[animationCurveID]["curves"]['x'] = animationCurve;
        } else if (RegExp(r'Y').hasMatch(animationCurveRelationship)) {
          curveNodesMap[animationCurveID]["curves"]['y'] = animationCurve;
        } else if (RegExp(r'Z').hasMatch(animationCurveRelationship)) {
          curveNodesMap[animationCurveID]["curves"]['z'] = animationCurve;
        } else if (RegExp(r'd|DeformPercent')
                .hasMatch(animationCurveRelationship) &&
            curveNodesMap.has(animationCurveID)) {
          curveNodesMap[animationCurveID]["curves"]['morph'] = animationCurve;
        }
      }
    }
  }

  // parse nodes in FBXTree.Objects.AnimationLayer. Each layers holds references
  // to various AnimationCurveNodes and is referenced by an AnimationStack node
  // note: theoretically a stack can have multiple layers, however in practice there always seems to be one per stack
  Map parseAnimationLayers(curveNodesMap) {
    var rawLayers = fbxTree.Objects["AnimationLayer"];
    Map layersMap = {};

    for (var nodeID in rawLayers.keys) {
      var layerCurveNodes = [];

      var connection = connections[int.parse(nodeID.toString())];

      if (connection != null) {
        // all the animationCurveNodes used in the layer
        var children = connection["children"];

        children.asMap().forEach((i, child) {
          if (curveNodesMap.containsKey(child["ID"])) {
            var curveNode = curveNodesMap[child["ID"]];

            // check that the curves are defined for at least one axis, otherwise ignore the curveNode
            if (curveNode["curves"]["x"] != null ||
                curveNode["curves"]["y"] != null ||
                curveNode["curves"]["z"] != null) {
              var modelID = connections[chil


),b.xc(4772," mdi mdi-lumx\n        "),b.Ob(),b.xc(4773,"\n        "),b.Pb(4774,"div",12),b.xc(4775,"\n            "),b.Lb(4776,"i",952),b.xc(4777," mdi mdi-magnet\n        "),b.Ob(),b.xc(4778,"\n        "),b.Pb(4779,"div",12),b.xc(4780,"\n            "),b.Lb(4781,"i",953),b.xc(4782," mdi mdi-magnet-on\n        "),b.Ob(),b.xc(4783,"\n        "),b.Pb(4784,"div",12),b.xc(4785,"\n            "),b.Lb(4786,"i",954),b.xc(4787," mdi mdi-magnify\n        "),b.Ob(),b.xc(4788,"\n        "),b.Pb(4789,"div",12),b.xc(4790,"\n            "),b.Lb(4791,"i",955),b.xc(4792," mdi mdi-magnify-minus\n        "),b.Ob(),b.xc(4793,"\n        "),b.Pb(4794,"div",12),b.xc(4795,"\n            "),b.Lb(4796,"i",956),b.xc(4797," mdi mdi-magnify-plus\n        "),b.Ob(),b.xc(4798,"\n        "),b.Pb(4799,"div",12),b.xc(4800,"\n            "),b.Lb(4801,"i",957),b.xc(4802," mdi mdi-mail-ru\n        "),b.Ob(),b.xc(4803,"\n        "),b.Pb(4804,"div",12),b.xc(4805,"\n            "),b.Lb(4806,"i",958),b.xc(4807," mdi mdi-map\n        "),b.Ob(),b.xc(4808,"\n        "),b.Pb(4809,"div",12),b.xc(4810,"\n            "),b.Lb(4811,"i",959),b.xc(4812," mdi mdi-map-marker\n        "),b.Ob(),b.xc(4813,"\n        "),b.Pb(4814,"div",12),b.xc(4815,"\n            "),b.Lb(4816,"i",960),b.xc(4817," mdi mdi-map-marker-circle\n        "),b.Ob(),b.xc(4818,"\n        "),b.Pb(4819,"div",12),b.xc(4820,"\n            "),b.Lb(4821,"i",961),b.xc(4822," mdi mdi-map-marker-minus\n        "),b.Ob(),b.xc(4823,"\n        "),b.Pb(4824,"div",12),b.xc(4825,"\n            "),b.Lb(4826,"i",962),b.xc(4827," mdi mdi-map-marker-multiple\n        "),b.Ob(),b.xc(4828,"\n        "),b.Pb(4829,"div",12),b.xc(4830,"\n            "),b.Lb(4831,"i",963),b.xc(4832," mdi mdi-map-marker-off\n        "),b.Ob(),b.xc(4833,"\n        "),b.Pb(4834,"div",12),b.xc(4835,"\n            "),b.Lb(4836,"i",964),b.xc(4837," mdi mdi-map-marker-plus\n        "),b.Ob(),b.xc(4838,"\n        "),b.Pb(4839,"div",12),b.xc(4840,"\n            "),b.Lb(4841,"i",965),b.xc(4842," mdi mdi-map-marker-radius\n        "),b.Ob(),b.xc(4843,"\n


${WIDGET_TYPE_VALIDATION_ERROR}: URL`],
        parsed: "https://www.example.com",
      },
      {
        isValid: false,
        messages: [`${WIDGET_TYPE_VALIDATION_ERROR}: URL`],
        parsed: "https://www.example.com",
      },
    ];

    inputs.forEach((input, index) => {
      const result = validate(config, input, DUMMY_WIDGET);
      expect(result).toStrictEqual(expected[index]);
    });
  });
  it("correctly validates array when default is given", () => {
    const inputs = [undefined, null, ""];
    const config = {
      type: ValidationTypes.ARRAY,
      params: {
        required: true,
        unique: true,
        default: [],
      },
    };
    const expected = {
      isValid: true,
      parsed: [],
    };
    inputs.forEach((input) => {
      const result = validate(config, input, DUMMY_WIDGET);
      expect(result).toStrictEqual(expected);
    });
  });

  it("correctly validates uniqueness of keys in array objects", () => {
    const config = {
      type: ValidationTypes.ARRAY,
      params: {
        children: {
          type: ValidationTypes.OBJECT,
          params: {
            allowedKeys: [
              {
                name: "label",
                type: ValidationTypes.TEXT,
                params: {
                  default: "",
                  required: true,
                  unique: true,
                },
              },
              {
                name: "value",
                type: ValidationTypes.TEXT,
                params: {
                  default: "",
                  unique: true,
                },
              },
            ],
          },
        },
      },
    };
    const input = [
      { label: "Blue", value: "" },
      { label: "Green", value: "" },
      { label: "Red", value: "red" },
    ];
    const expected = {
      isValid: false,
      parsed: [],
      messages: [
        "Duplicate values found for the following properties, in the array entries, that must be unique -- label,value.",
      ],
    };

    const result = validate(config, input, DUMMY_WIDGET);
    expect(result).toStrictEqual(expected);
  });

  it("correctly validates TableProperty", () => {
    const inputs = [
      "a",
      ["a", "b"],
      "x",
      ["a", "b", "x"],
      ["a", "b", "x", "y"],
    ];
    const config = {
      type: ValidationTypes.TABLE_PROPERTY,
      params: {
        type: ValidationTypes.TEXT,
        params: {
          allowedValues: ["a", "b", "c"],
          default: "a",
        },
      },
    };
    const expected = [
      {
        isValid: true,
        parsed: "a",
      },
      {
        isValid: true,
        parsed: ["a", "b"],
      },
      {
        isValid: false,
        parsed: "a",
        messages: ["Disallowed value: x"],
      },
      {
        isValid: false,
        parsed: "a",
        messages: ["Disallowed value: x"],


add r0, r0, r7
	bl ov08_02224C48
	cmp r0, #1
	bne _02224DD0
	ldr r0, [sp, #0xc]
	cmp r0, #0
	beq _02224DD0
	ldrb r0, [r5, #9]
	strb r0, [r5, #0xa]
	b _02224DD4
_02224DD0:
	mov r0, #0xff
	strb r0, [r5, #0xa]
_02224DD4:
	strb r4, [r5, #9]
	add r3, sp, #0x10
	ldrb r0, [r3]
	str r0, [sp]
	ldrb r1, [r3, #3]
	ldrb r2, [r3, #1]
	ldrb r3, [r3, #2]
	ldr r0, [r5]
	bl ov12_0226BAFC
	ldr r0, _02224E24 ; =0x000005DC
	bl PlaySE
_02224DEE:
	mov r0, #0
	add sp, #0x14
	mvn r0, r0
	pop {r4, r5, r6, r7, pc}
_02224DF6:
	ldr r0, _02224E20 ; =gSystem
	ldr r1, [r0, #0x48]
	mov r0, #1
	tst r0, r1
	beq _02224E06
	add sp, #0x14
	ldrb r0, [r5, #9]
	pop {r4, r5, r6, r7, pc}
_02224E06:
	mov r0, #2
	tst r1, r0
	beq _02224E1A
	ldr r0, _02224E28 ; =0x000005DD
	bl PlaySE
	mov r0, #1
	add sp, #0x14
	mvn r0, r0
	pop {r4, r5, r6, r7, pc}
_02224E1A:
	sub r0, r0, #3
	add sp, #0x14
	pop {r4, r5, r6, r7, pc}
	.balign 4, 0
_02224E20: .word gSystem
_02224E24: .word 0x000005DC
_02224E28: .word 0x000005DD
	thumb_func_end ov08_02224C94

	.rodata

_02224E2C:
	.byte 0x00, 0x02, 0x04, 0x01
	.byte 0x03, 0x05, 0x00, 0x00

ov08_02224E34: ; 0x02224E34
	.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
	.byte 0x01, 0x00, 0x00, 0x00

ov08_02224E44: ; 0x02224E44
	.byte 0x98, 0xBF, 0x00, 0xCF, 0x00, 0x27, 0xB8, 0xFF, 0x98, 0xBF, 0xD8, 0xFF
	.byte 0xFF, 0x00, 0x00, 0x00

ov08_02224E54: ; 0x02224E54
	.byte 0x08, 0x8F, 0x08, 0xF7, 0x98, 0xBF, 0x00, 0x67, 0x98, 0xBF, 0x68, 0xCF
	.byte 0x98, 0xBF, 0xD8, 0xFF, 0xFF, 0x00, 0x00, 0x00

ov08_02224E68: ; 0x02224E68
	.byte


争。往复之作，民病寒热，疟泄、聋瞑、呕吐、上怫、肿色变。
初之气，地气迁，风胜乃摇，寒乃去，候乃大温，草木早荣。寒来不杀，温病乃起，其病气怫于上，血溢目赤，咳逆头痛、血崩、胁满、肤腠中疮。
二之气，火反郁，白埃四起，云趋雨府，风不胜湿，雨乃零，民乃康。其病热郁于上，咳逆呕吐，疮发于中，胸嗌不利，头痛身热，昏愦脓疮。
三之气，天政布，炎暑至，少阳临上，雨乃涯。民病热中，聋瞑、血溢、脓疮、咳、呕、鼽、衄、渴、嚏欠、喉痹、目赤、善暴死。
四之气，凉乃至，炎暑间化，白露降。民气和平，其病满，身重。
五之气，阳乃去，寒乃来，雨乃降，气门乃闭，刚木早凋。民避寒邪，君子周密。
终之气，地气正，风乃至，万物反生，雾雾以行，其病关闭不禁，心痛，阳气不藏而咳。
抑其运气，赞所不胜。必折其郁气，先取化源，暴过不生，苛疾不起，故岁宜咸辛宜酸，渗之泄之，渍之发之，观气寒温以调其过。同风热者多寒化，异风热者少寒化，用热远热，用温远温，用寒远寒，用凉远凉，食宜同法，此其道也。有假者反之，反是者病之阶也。
帝曰：善。太阴之政奈何？岐伯曰：丑未之纪也。
太阴、少角、太阳，清热胜复同，同正宫，丁丑、丁未、其运风、清热。少角（初正）、太征、少宫、太商、少羽（终）。
太阴、少征、太阳，寒雨胜复同，癸丑、癸未，其运热、寒雨。少征、太宫、少商、太羽（终）、太角。
太阴、少宫、太阳，风清胜复同，同正宫，己丑太一天符、己未太一天符，其运雨、风清。少宫、太商、少羽（终）、少角、（初）、太征。
太阴、少商、


      if (0 != (flags & MHD_USE_IPv6))
	socket_fd = create_socket (daemon,
				   PF_INET6, SOCK_STREAM, 0);
      else
	socket_fd = create_socket (daemon,
				   PF_INET, SOCK_STREAM, 0);
      if (MHD_INVALID_SOCKET == socket_fd)
	{
#if HAVE_MESSAGES
          MHD_DLOG (daemon,
                    "Call to socket failed: %s\n",
                    MHD_socket_last_strerr_ ());
#endif
	  goto free_and_fail;
	}

      /* Apply the socket options according to listening_address_reuse. */
      if (0 == daemon->listening_address_reuse)
        {
          /* No user requirement, use "traditional" default SO_REUSEADDR,
           and do not fail if it doesn't work */
          if (0 > setsockopt (socket_fd,
                              SOL_SOCKET,
                              SO_REUSEADDR,
#if WINDOWS
                              (const char*)&on, sizeof (on)))
#else
                              (void*)&on, sizeof (on)))
#endif
          {
#if HAVE_MESSAGES
            MHD_DLOG (daemon,
                      "setsockopt failed: %s\n",
                      MHD_socket_last_strerr_ ());
#endif
          }
        }
      else if (daemon->listening_address_reuse > 0)
        {
          /* User requested to allow reusing listening address:port.
           * Use SO_REUSEADDR on Windows and SO_REUSEPORT on most platforms.
           * Fail if SO_REUSEPORT does not exist or setsockopt fails.
           */
#ifdef _WIN32
          /* SO_REUSEADDR on W32 has the same semantics
             as SO_REUSEPORT on BSD/Linux */
          if (0 > setsockopt (socket_fd,
                              SOL_SOCKET,
                              SO_REUSEADDR,
                              (const char*)&on, sizeof (on)))
            {
#if HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "setsockopt failed: %s\n",
                        MHD_socket_last_strerr_ ());
#endif
              goto free_and_fail;
            }
#else
#ifndef SO_REUSEPORT
#ifdef LINUX
/* Supported since Linux 3.9, but often not present (or commented out)
   in the headers at this time; but 15 is reserved for this and
   thus should be safe to use. */
#define SO_REUSEPORT 15
#endif
#endif
#ifdef SO_REUSEPORT
          if (0 > setsockopt (socket_fd,
                              SOL_SOCKET,
                              SO_REUSEPORT,
                              (void*)&on, sizeof (on)))
            {
#if HAVE_MESSAGES
              MHD_DLOG (daemon,
                        "setsockopt failed: %s\n",
                        MHD_socket_last_strerr_ ());
#endif
              goto free_and_fail;
            }
#else
          /* we're supposed to allow address:port re-use, but
             on this platform we cannot; fail hard */
#if HAVE_MESSAGES
          MHD_DLOG (daemon,
                    "Cannot allow listening address reuse: SO_REUSEPORT not defined\n");
#endif
          goto free_and_fail;
#endif
#endif
        }
      else /* if (daemon->listening_address_reuse < 0) */
        {
          /* User requested to disallow reusing listening address:port.
           * Do nothing except for Windows where SO_EXCLUSIVEADDRUSE
           * is used. Fail if it does not exist or setsock


"Named_Snaps/Chronicles of the Sword (Spain) (Disc 1).png",
  "Named_Snaps/Chronicles of the Sword (Spain) (Disc 2).png",
  "Named_Snaps/Chronicles of the Sword (USA) (Disc 1).png",
  "Named_Snaps/Chronicles of the Sword (USA) (Disc 2).png",
  "Named_Snaps/Chrono Cross (Japan, Asia) (Disc 1).png",
  "Named_Snaps/Chrono Cross (Japan, Asia) (Disc 2).png",
  "Named_Snaps/Chrono Cross (USA) (Disc 1).png",
  "Named_Snaps/Chrono Cross (USA) (Disc 2).png",
  "Named_Snaps/Chrono Cross (USA).png",
  "Named_Snaps/Chrono Trigger (Japan).png",
  "Named_Snaps/Cina - Crimini nella Citta Proibita (Italy).png",
  "Named_Snaps/Cindy's Caribbean Holiday (Europe).png",
  "Named_Snaps/Cindy's Fashion World (Europe).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-1-dan - Tengoku ni Ikenai Papa (Japan) (Disc 1) (Joukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-1-dan - Tengoku ni Ikenai Papa (Japan) (Disc 2) (Chuukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-1-dan - Tengoku ni Ikenai Papa (Japan) (Disc 3) (Gekan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-2-dan - Interceptor (Japan) (Disc 1) (Joukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-2-dan - Interceptor (Japan) (Disc 2) (Chuukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-2-dan - Interceptor (Japan) (Disc 3) (Gekan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-3-dan - Arashigaoka (Japan) (Disc 1) (Joukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-3-dan - Arashigaoka (Japan) (Disc 2) (Chuukan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-3-dan - Arashigaoka (Japan) (Disc 3) (Gekan).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-4-dan - Boy's Life (Japan) (Disc 1).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-4-dan - Boy's Life (Japan) (Disc 2).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-4-dan - Boy's Life (Japan) (Disc 3).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-4-dan - Boy's Life (Japan) (Disc 4).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-5-dan - Zombie (Japan) (Disc 1).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-5-dan - Zombie (Japan) (Disc 2).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-5-dan - Zombie (Japan) (Disc 3).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-5-dan - Zombie (Japan) (Disc 4).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-6-dan - Ai no Hate ni (Japan) (Disc 1).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-6-dan - Ai no Hate ni (Japan) (Disc 2).png",
  "Named_Snaps/Cinema Eikaiwa Series Dai-6-dan - Ai no Hate ni


CLUSTER, BlockAmethystCluster.class); //584
        register(LARGE_AMETHYST_BUD, BlockAmethystBudLarge.class); //585
        register(MEDIUM_AMETHYST_BUD, BlockAmethystBudMedium.class); //586
        register(SMALL_AMETHYST_BUD, BlockAmethystBudSmall.class); //587
        register(TUFF, BlockTuff.class); //588
        register(TINTED_GLASS, BlockGlassTinted.class); //589
        register(MOSS_CARPET, BlockMossCarpet.class); //590
        register(SMALL_DRIPLEAF, BlockDripleafSmall.class); //591
        register(AZALEA, BlockAzalea.class); //592
        register(FLOWERING_AZALEA, BlockAzaleaFlowering.class); //593
        register(GLOW_FRAME, BlockItemFrameGlow.class); //594
        register(COPPER_BLOCK, BlockCopper.class); //595
        register(EXPOSED_COPPER, BlockCopperExposed.class); //596
        register(WEATHERED_COPPER, BlockCopperWeathered.class); //597
        register(OXIDIZED_COPPER, BlockCopperOxidized.class); //598
        register(WAXED_COPPER, BlockCopperWaxed.class); //599
        register(WAXED_EXPOSED_COPPER, BlockCopperExposedWaxed.class); //600
        register(WAXED_WEATHERED_COPPER, BlockCopperWeatheredWaxed.class); //601
        register(CUT_COPPER, BlockCopperCut.class); //602
        register(EXPOSED_CUT_COPPER, BlockCopperCutExposed.class); //603
        register(WEATHERED_CUT_COPPER, BlockCopperCutWeathered.class); //604
        register(OXIDIZED_CUT_COPPER, BlockCopperCutOxidized.class); //605
        register(WAXED_CUT_COPPER, BlockCopperCutWaxed.class); //606
        register(WAXED_EXPOSED_CUT_COPPER, BlockCopperCutExposedWaxed.class); //607
        register(WAXED_WEATHERED_CUT_COPPER, BlockCopperCutWeatheredWaxed.class); //608
        register(CUT_COPPER_STAIRS, BlockStairsCutCopper.class); //609
        register(EXPOSED_CUT_COPPER_STAIRS, BlockStairsCutCopperExposed.class); //610
        register(WEATHERED_CUT_COPPER_STAIRS, BlockStairsCutCopperWeathered.class); //611
        register(OXIDIZED_CUT_COPPER_STAIRS, BlockStairsCutCopperOxidized.class); //612
        register(WAXED_CUT_COPPER_STAIRS, BlockStairsCutCopperWaxed.class); //613
        register(WAXED_EXPOSED_CUT_COPPER_STAIRS, BlockStairsCutCopperExposedWaxed.class); //614
        register(WAXED_WEATHERED_CUT_COPPER_STAIRS, BlockStairsCutCopperWeatheredWaxed.class); //615
        register(CUT_COPPER_SLAB, BlockSlabCutCopper.class); //616
        register(EXPOSED_CUT_COPPER_SLAB, BlockSlabExposedCutCopper.class); //617
        register(WEATHERED_CUT_COPPER_SLAB, BlockSlabWeatheredCutCopper.class); //618
        register(OXIDIZED_CUT_COPPER_SLAB, BlockSlabOxidizedCutCopper.class); //619
        register(WAXED_CUT_COPPER_SLAB, BlockSlabCutCopperWaxed.class); //620
        register(WAXED_EXPOSED_CUT_COPPER_SLAB, BlockSlabExposedCutCoppe


    // sqlite - https://github.com/xerial/sqlite-jdbc
    runtimeOnly("org.xerial:sqlite-jdbc:3.50.3.0")
    // ktorm - https://www.ktorm.org/
    implementation("org.ktorm:ktorm-core:4.1.1") {
        exclude(group = "org.jetbrains.kotlin")
    }
    implementation("org.ktorm:ktorm-support-sqlite:4.1.1") {
        exclude(group = "org.jetbrains.kotlin")
    }

    compileOnly("com.google.errorprone:error_prone_annotations:2.41.0")
    compileOnly("org.jspecify:jspecify:1.0.0")
    compileOnly("org.slf4j:slf4j-api:2.0.17")

    // 目前仅用作参考

    // byte-buddy - https://github.com/raphw/byte-buddy
    testImplementation("net.bytebuddy:byte-buddy:1.17.7")
    testImplementation("net.bytebuddy:byte-buddy-agent:1.17.7")

    // jte - https://github.com/casid/jte
    testImplementation("gg.jte:jte:3.2.1")
    testCompileOnly("gg.jte:jte-kotlin:3.2.1")

    // pebble - https://github.com/PebbleTemplates/pebble
    testImplementation("io.pebbletemplates:pebble:3.2.4") {
        exclude(group = "org.slf4j", module = "slf4j-api")
    }

    // 用于工具代码（src/test/tool）

    // jackson-csv - https://github.com/FasterXML/jackson-dataformats-text/tree/master/csv
    testImplementation("com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.20.0") {
        exclude(group = "com.fasterxml.jackson.core")
    }
}

sourceSets {
    main {
        java.srcDirs("src/main/java", "src/main/kotlin", "src/main/gen")
        resources.srcDirs("src/main/resources")
    }
    test {
        java.srcDirs("src/test/java", "src/test/kotlin")
        java.srcDirs("src/test/tool") // tool codes (e.g., CwtConfigGenerator) (NOTE: cannot move to another source set)
        java.srcDirs("src/test/unused") // unused codes (NOTE: cannot move to another source set)
        resources.srcDirs("src/test/resources")
    }
}

kotlin {
    jvmToolchain(21)
    compilerOptions {
        jvmTarget = JvmTarget.JVM_21
        freeCompilerArgs.addAll(
            listOf(
                "-Xjvm-default=all",
                "-Xinline-classes",
                "-opt-in=kotlin.RequiresOptIn",
                "-opt-in=kotlin.ExperimentalStdlibApi",
            )
        )
    }
}

intellijPlatform {
    pluginConfiguration {
        id = properties("pluginId")
        name = properties("pluginName")
        version = properties("pluginVersion")

        description = projectDir.resolve("DESCRIPTION.md").readText().let(::markdownToHTML)

        // local variable for configuration cache compatibility
        val changelog = project.changelog
        // Get the latest available change notes from the changelog file
        changeNotes = properties("pluginVersion").map { pluginVersion ->
            with(changelog) {
                @Suppress("UNCHECKED_CAST")
                fun handleChangelogItem(changelogItem: Changelog.Item) {
                    val items = changelogItem.javaClass.getDeclaredField("items").also { it.trySetAccessible() }.get(changelogItem)
                        as? MutableMap<String, Set<String>> ?: return
                    items.keys.forEach { key ->