Subversion Repositories wpShopGermany4

Compare Revisions

Ignore whitespace Rev 8321 → Rev HEAD

/mods/mod_ordercondition/overview_top.phtml
11,7 → 11,7
<?php foreach ($this->view['wpsg_mod_ordercondition']['data'] as $oc) { ?>
<div class="wpsg_agb" id="wpsg_agb_<?php echo $oc['id']; ?>">
<label>
<input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" />
<input type="checkbox" value="1" name="wpsg_mod_ordercondition[<?php echo $oc['id']; ?>]" required />
<?php if (strlen($oc['text']) < $minLength) { ?>
<?php echo $oc['text']; ?>
<?php } else { ?>
/mods/mod_downloadprodukte/produkt_addedit_sidebar.phtml
9,39 → 9,10
<script type="text/javascript">
/* <![CDATA[ */
 
jQuery(document).ready(function() {
 
<?php if ($this->get_option('wpsg_classicupload') != '1') { ?>
new AjaxUpload(
"upload_produktfile_button", {
name: "wpsg_mod_downloadprodukte_file",
action: "<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file",
onSubmit: function(file, extension) {
jQuery('#produktfiles_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
},
onComplete: function(file, response) {
//alert(response);
if (response == '1')
{
//jQuery("#produktfiles_target").html('lalal');
jQuery("#produktfiles_target").load("<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&cmd=produktfiles_list&edit_id=<?php echo $_REQUEST['edit_id']; ?>&noheader=1");
}
else
{
alert(response);
}
}
}
);
<?php } ?>
} );
 
/**
* Wird beim löschen einer Datei aufgerufen
*/
 
function wpsg_remove_file(strFile)
{
 
63,7 → 34,7
return false;
}
/* ]]> */
</script>
 
/mods/mod_ticket/settings_edit.phtml
0,0 → 1,159
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 26.10.23
* @time: 18:55
*/
namespace wpsgTicket;
$arTicketTemplates = TicketTemplate::find();
 
$arFontVue = [];
foreach ($this->view['arFonts'] as $font_code => $font_label) {
 
$arFontVue[] = ['code' => $font_code, 'label' => $font_label];
 
}
?>
 
<div id="wpsg_ticket_modul">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#tab1" role="tab" data-toggle="tab"><?php echo __('Einstellungen', 'wpsg'); ?></a></li>
<li role="presentation" class=""><a href="#tab2" role="tab" data-toggle="tab"><?php echo __('Templates', 'wpsg'); ?></a></li>
<li role="presentation" style="float:right;"><a href="#tab5" role="tab" data-toggle="tab"><?php echo __('Info / Hilfe', 'wpsg'); ?></a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="tab1">
<p>
<?php echo __('Beim Wechsel einer Bestellung auf einen der folgenden Bestellzuständen wird einmalig eine E-Mail mit den Tickets versendet.', 'wpsg'); ?>
</p>
<?php
$wpsg_mod_ticket_orderstate_send = Plugin::getInstance()->getSendOrderState();
?>
<select id="wpsg_mod_ticket_orderstate_send" multiple="multiple" size="5" style="border:1px solid black; width:100%;">
<?php foreach ($this->arStatus as $status_key => $status_label) { ?>
<option
<?php echo ((in_array($status_key, $wpsg_mod_ticket_orderstate_send))?'selected="selected"':''); ?>
value="<?php echo $status_key; ?>"><?php echo $status_label; ?></option>
<?php } ?>
</select>
<hr />
<p>
<?php echo __('Bei folgenden Bestellzuständen gilt ein Ticket als "aktiv" sofern es noch nicht entwertet wurde.', 'wpsg'); ?>
</p>
<?php
$wpsg_mod_ticket_orderstate_active = Plugin::getInstance()->getActiveOrderState();
?>
<select id="wpsg_mod_ticket_orderstate_active" multiple="multiple" size="5" style="border:1px solid black; width:100%;">
<?php foreach ($this->arStatus as $status_key => $status_label) { ?>
<option
<?php echo ((in_array($status_key, $wpsg_mod_ticket_orderstate_active))?'selected="selected"':''); ?>
value="<?php echo $status_key; ?>"><?php echo $status_label; ?></option>
<?php } ?>
</select>
</div>
<div role="tabpanel" class="tab-pane" id="tab2">
<?php echo $this->render(WPSG_PATH_VIEW.'/mods/mod_ticket/settings_edit_templates.phtml'); ?>
</div>
<div role="tabpanel" class="tab-pane" id="tab5">
TODO
</div>
</div>
<div v-if="loading" class="loading_layer">
<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />
</div>
</div>
 
<style>
.items-center { justify-content:center; }
.items-start { justify-content:start; }
.flex { display:flex; }
.justify-between { justify-content:space-between; }
.mb-4 { margin-bottom:1rem; }
.gap-2 { gap:0.5rem; }
.text-center { text-align:center; }
#wpsg_ticket_modul .control-label { padding-top:0; font-size:1em; }
.checkbox_row { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:1rem; margin-bottom:0.5rem; }
.checkbox_row input { margin:0; }
#wpsg_ticket_modul { position:relative; }
#wpsg_ticket_modul a { text-decoration:none; position:relative; }
#wpsg_ticket_modul select.template_select { width:200px; }
#wpsg_ticket_modul > .loading_layer { position:absolute; left:0; top:0; width:100%; height:100%; transition:all 0.1s; display:flex; align-items:center; justify-content:center; background-color:rgba(255, 255, 255, 0.75); }
#wpsg_ticket_modul .field_table { width:100%; border-top:1px solid #dddddd; border-left:1px solid #dddddd; border-right:1px solid #dddddd; font-size:12px; }
#wpsg_ticket_modul .field_table td { padding:1px 5px; }
#wpsg_ticket_modul .field_table tbody > tr:first-child > * { padding-top:1rem; }
#wpsg_ticket_modul .field_table tbody > tr:last-child > * { padding-bottom:1rem; }
#wpsg_ticket_modul .field_table th { padding:1px 5px; }
#wpsg_ticket_modul .field_table tr > * { background-color:#f9f9f9; }
#wpsg_ticket_modul .field_table tr:nth-child(4) > * { border-bottom:1px solid #dddddd; padding-bottom:1rem; }
#wpsg_ticket_modul .field_table .w-1 { width:100px; font-size:12px; }
#wpsg_ticket_modul .field_table .w-2 { width:200px; font-size:12px; }
#wpsg_ticket_modul_template .head { width:100%; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #DDDDDD; margin-bottom:1rem; padding-bottom:1rem; }
#wpsg_ticket_modul_template .head select { width:300px; }
#wpsg_ticket_modul_template .head div { flex-grow:1; }
#wpsg_ticket_modul_template .wpsg_field_wrap_template_name { display:flex; justify-content:space-between; align-items:center; padding-right:10px !important; }
#wpsg_ticket_modul_template .wpsg_field_wrap_template_name > div { gap:1rem; display:flex; justify-content:flex-start; align-items:center; }
#wpsg_ticket_modul_template .template td.col_bg,
#wpsg_ticket_modul_template .template td.col_align { width:50px; text-align:center; }
#wpsg_ticket_modul_template .template tr td { vertical-align:middle; }
#wpsg_ticket_modul_template .template tr td:last-child { text-align:right; }
#wpsg_ticket_modul_template .template tr td:last-child .wpsg-glyphicon { margin-right:0; }
#wpsg_ticket_modul_template .uploadstate { display:flex; justify-content:flex-start; align-items:center; }
#wpsg_ticket_modul_template .uploadstate > img { margin-right:1rem; }
#wpsg_ticket_modul_template .file_wrap { display:flex; justify-content:space-between; align-items:center; }
#wpsg_ticket_modul_template .file_wrap .file { display:flex; gap:1rem; justify-content:flex-end; align-items:center; }
#wpsg_ticket_modul_template .file_wrap .file .wpsg-glyphicon { margin-right:8px; }
#wpsg_ticket_modul_template .label-copy { display:flex; justify-content:space-between; }
#wpsg_ticket_modul_template .label-copy .glyphicon { font-size:14px; }
#wpsg_ticket_modul_template .col_w0 { width:50px; }
#wpsg_ticket_modul_template .col_w1 { width:100px; }
#wpsg_ticket_modul_template .col_w1 select,
#wpsg_ticket_modul_template .col_w1 input { width:100% !important; }
</style>
 
<script type="module">
const wpsgSettings = {
baseUrl: '<?php echo WPSG_URL; ?>'
};
import { ticket_settings_edit } from '<?php echo WPSG_URL; ?>mods/mod_ticket/assets/js/wpsg_modul.js';
ticket_settings_edit(wpsgSettings, '<?php echo \admin_url('admin-ajax.php'); ?>', <?php echo json_encode([
'arTemplates' => $arTicketTemplates,
'arFonts' => $arFontVue,
'label' => [
'copyTemplateConfirm' => __('Sind Sie sich sicher, dass sie das Template kopieren möchten?', 'wpsg'),
'removeFieldConfirm' => __('Sind Sie sich sicher, dass sie das Feld löschen möchten?', 'wpsg'),
'newTemplate' => __('Bitte die Bezeichnung des neuen Templates angeben.', 'wpsg'),
'error_noTemplateName' => __('Bitte eine Bezeichnung angeben', 'wpsg')
]
]); ?>);
</script>
/mods/mod_kundenverwaltung/edit.phtml
3,7 → 3,9
/**
* Template für die Bearbeitung eines Kunden im Backend
*/
 
$oCustomer = wpsg_customer::getInstance(intval($_REQUEST['edit_id']??0));
?>
<div class="wpsg_customer" id="wpsg-bs">
 
57,11 → 59,16
<?php echo wpsg_drawForm_Input('vname', __('Vorname', 'wpsg'), @$this->view['data']['vname']); ?>
<?php } ?>
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
<?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime(@$this->view['data']['geb']), true), array('autocomplete' => false, 'datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Input('geb', __('Geburtsdatum', 'wpsg'), wpsg_formatTimestamp(strtotime($this->view['data']['geb']??''), true), array('autocomplete' => false, 'datepicker' => true, 'hint' => __('Format: TT.MM.JJJJ', 'wpsg'))); ?>
<?php } ?>
<?php if ($this->view['pflicht']['email'] != '2') { ?>
<?php echo wpsg_drawForm_Input('email', __('E-Mail', 'wpsg'), @$this->view['data']['email']); ?>
<?php } ?>
<?php if ($oCustomer->getEMailEInvoice() !== null) { ?>
<?php echo wpsg_drawForm_Input('email_einvoice', __('E-Mail für eRechnung', 'wpsg'), $oCustomer->getEMailEInvoice()); ?>
<?php } ?>
<?php if ($this->view['pflicht']['firma'] != '2') { ?>
<?php echo wpsg_drawForm_Input('firma', __('Firma', 'wpsg'), @$this->view['data']['firma']); ?>
<?php } ?>
/mods/mod_productvars/overview_row.phtml
13,7 → 13,7
<?php if ($this->view['$bPicture'] == true) { ?>class="titlep"><?php } else { ?>class="title"><?php } ?>
<?php echo __($pv['name'], 'wpsg'); ?><?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>
</div>
<div class="valuel">
<div class="value">
<?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
<?php if ($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']] == 'not_set') { ?>
<?php echo __('Nicht angegeben', 'wpsg'); ?>
32,10 → 32,6
<?php echo nl2br(wpsg_hspc($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']])); ?>
<?php } ?>
</div>
<div class="dummyr">
<?php echo __('&nbsp;'); ?>
</div>
</div>
<?php } ?>
<?php } ?>
/mods/mod_ticket/ticket_mail.phtml
0,0 → 1,21
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 03.12.23
* @time: 13:12
*/
namespace wpsgTicket;
/** @var \wpsg_order $oOrder */
$oOrder = $this->view['oOrder'];
/** @var int[] $arTicketBookingIDSend */
$arTicketBookingIDSend = $this->view['arTicketBookingIDSend'];
?>Hallo <?php echo $oOrder->getCustomer()->getFirstname().' '.$oOrder->getCustomer()->getName(); ?>
 
Hiermit erhalten Sie im Anhang Ihre Tickets aus der Bestellung <?php echo $oOrder->getNr(); ?>.
/mods/mod_rechnungen/order_view_orderdata_after.phtml
97,7 → 97,14
<input type="checkbox" name="wpsg_rechnungen_sendmail" value="1" id="invoice_sendmail" checked="checked" />
<label for="invoice_sendmail"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
<input type="email" name="wpsg_rechnungen_email" value="<?php echo $oCustomer->getEMail(); ?>" />
<input type="email" name="wpsg_rechnungen_email" value="<?php
$mail = $oCustomer->getEMailEInvoice();
if ($mail === null) $mail = $oCustomer->getEMail();
echo $mail;
?>" />
<input type="checkbox" name="wpsg_rechnungen_faelligkeit" value="1" id="invoice_faelligkeit" checked="checked" />
<label for="invoice_faelligkeit"><?php echo __('Fälligkeit anzeigen', 'wpsg'); ?></label>
182,9 → 189,15
let el_invoice_wpsg_rechnungen_preview = document.getElementById('invoice_wpsg_rechnungen_preview');
let el_invoice_wpsg_rechnungen_submit = document.getElementById('invoice_wpsg_rechnungen_submit');
let submit = false;
function check_invoice_amount(event) {
if (submit === true) return;
submit = true;
let ok = false;
for (let el_checkbox of document.getElementsByClassName('wpsg_check_amount_invoice')) {
202,7 → 215,7
}
if (ok) {
 
if (event.target.getAttribute("id") === 'invoice_wpsg_rechnungen_submit') {
window.setTimeout(function() { location.href = '<?php
215,6 → 228,8
} else {
submit = false;
alert('<?php echo __('Bitte mindestens ein Produkt auswählen!', 'wpsg'); ?>');
event.stopPropagation();
263,7 → 278,14
<input type="checkbox" name="storno_send" id="storno_send" value="1" />
<label for="storno_send"><?php echo __('E-Mail an Kunden senden', 'wpsg'); ?></label>
<input type="email" name="storno_mail" value="<?php echo $oCustomer->getEMail(); ?>" />
<input type="email" name="storno_mail" value="<?php
$mail = $oCustomer->getEMailEInvoice();
if ($mail === null) $mail = $oCustomer->getEMail();
echo $mail;
?>" />
<input type="checkbox" id="storno_shippay" name="storno_shippay" value="1" id="invoice_shippay" <?php
/mods/mod_prepayment/order_done.phtml
7,6 → 7,7
//wpsg_debug($this->view['wpsg_mod_prepayment']['subject']);
?>
 
<?php echo wpsg_translate(__('Sie haben die Zahlungsart "Vorkasse" gewählt. Überweisen Sie daher den Rechnungsbetrag von #1# auf folgendes Konto:', 'wpsg'), wpsg_ff($this->view['basket']['arCalculation']['sum']['topay_brutto'], $this->get_option('wpsg_currency'))); ?>
<br /><br />
<?php echo wpsg_translate(__('Kontoinhaber: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber'))); ?><br />
15,21 → 16,168
<?php echo wpsg_translate(__('BIC-/SWIFT-Code: #1#', 'wpsg'), $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_swift'))); ?>
<br /><br />
<?php echo wpsg_translate(__('Bitte als Betreff angeben: "#1#"', 'wpsg'), $this->view['wpsg_mod_prepayment']['subject']); ?>
<br /><br />
 
<?php if (isset($this->view['wpsg_mod_prepayment']['subject'])) { ?>
<p>
<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
</p>
<?php
require_once WPSG_PATH_LIB.'phpgirocode.class.php';
$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 8, PhpGirocode::OUTPUT_BASE64));
echo '<img src="data:image/png;base64,'.$img.'" />';
<?php return; if ( isset($this->view['wpsg_mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true) ) { ?>
 
<?php require_once WPSG_PATH_LIB.'phpgirocode.class.php'; ?>
 
<?php if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') { ?>
?>
<!-- Girocode und QR-Rechnung -->
 
<?php
try {
$img = array();
$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
?>
<div class="wpsg_mod_prepayment_info_wrap">
<?php foreach ($img as $i) { ?>
<div class="wpsg_mod_prepayment_info">
<div class="wpsg_mod_prepayment_info_left">
<div class="wpsg_mod_prepayment_info_left_qr-download">
<h4><?php echo wpsg_translate(__($i['title'], 'wpsg')); ?></h4>
<?php if (isset($i['filepath'])) { ?><a title="Downloadlink für die QR-Rechnung" target="_blank" href="<?php echo $this->callMod('wpsg_mod_prepayment', 'getFrontendLink', [$i['order_id']]); ?>"><i class="fa fa-download" aria-hidden="true"></i></a><?php } ?>
</div>
<br />
<?php echo '<img class="wpsg_mod_prepayment_info_left_qrcodeimg" src="data:image/png;base64,'.$i['hash'].'" />'; ?>
<br />
<div class="wpsg_mod_prepayment_info_left_wrap">
<div class="wpsg_mod_prepayment_info_left_currency">
<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
<?php echo $this->get_option('wpsg_currency'); ?>
</div>
<div class="wpsg_mod_prepayment_info_left_amount">
<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
<?php echo sprintf("%.2f", $i['invoiceAmount']); ?>
</div>
</div>
</div>
<div class="wpsg_mod_prepayment_info_right">
<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
<?php if (!empty($i['referenceNumber'])) { ?>
<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
<?php echo $i['referenceNumber']; ?><br />
<?php } ?>
<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
<?php echo $i['additionalInformation']; ?><br />
<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
<?php echo $i['customerdata']['vname'].' '.$i['customerdata']['name']; ?><br />
<?php echo $i['customerdata']['strasse'].' '.$i['customerdata']['nr']; ?><br />
<?php echo $i['customerdata']['plz'].' '.$i['customerdata']['ort']; ?><br />
</div>
</div>
<?php } ?>
</div>
 
<?php } catch (\Exception $e) { wpsg_debug($e); } ?>
 
<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') { ?>
 
<!-- Girocode (EPC) -->
 
<p>
<?php echo __('Wenn Ihre Banking-App Girocode unterstützt, können Sie diesen QRCode scannen.', 'wpsg'); ?>
</p>
 
<?php
$img = array();
$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 
?>
 
<div class="wpsg_mod_prepayment_girocode">
<div class="wpsg_mod_prepayment_girocode_left" >
<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
<br />
<?php echo '<img class="wpsg_mod_prepayment_girocode_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
<br>
<div class="wpsg_mod_prepayment_girocode_left_wrap">
<div class="wpsg_mod_prepayment_girocode_left_currency">
<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
<?php echo $this->get_option('wpsg_currency'); ?>
</div>
<div class="wpsg_mod_prepayment_girocode_left_amount">
<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
</div>
</div>
</div>
<div class="wpsg_mod_prepayment_girocode_right">
<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
<?php if (!empty($img['referenceNumber'])) { ?>
<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
<?php echo $img['referenceNumber']; ?><br />
<?php } ?>
<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
<?php echo $img['additionalInformation']; ?><br />
<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
</div>
</div>
 
<?php } else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') { ?>
 
<!-- QR-Rechnung (SWISS) -->
 
<?php
 
$img = array();
$img = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 10, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
?>
<div class="wpsg_mod_prepayment_qrrechnung">
<div class="wpsg_mod_prepayment_qrrechnung_left">
<h4><?php echo wpsg_translate(__($img['title'], 'wpsg')); ?></h4>
<br />
<?php echo '<img class="wpsg_mod_prepayment_qrrechnung_left_qrcodeimg" src="data:image/png;base64,'.$img['hash'].'" />'; ?>
<br>
<div class="wpsg_mod_prepayment_qrrechnung_left_wrap">
<div class="wpsg_mod_prepayment_qrrechnung_left_currency">
<h4><?php echo wpsg_translate(__('Währung', 'wpsg')); ?></h4>
<?php echo $this->get_option('wpsg_currency'); ?>
</div>
<div class="wpsg_mod_prepayment_qrrechnung_left_amount">
<h4><?php echo wpsg_translate(__('Betrag', 'wpsg')); ?></h4>
<?php echo sprintf("%.2f", $img['invoiceAmount']); ?>
</div>
</div>
</div>
<div class="wpsg_mod_prepayment_qrrechnung_right">
<h4><?php echo wpsg_translate(__('Konto / Zahlbar an', 'wpsg')); ?></h4>
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_iban')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_mod_prepayment_kinhaber')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_street')); ?><br />
<?php echo $this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_zip')).' '.$this->replaceUniversalPlatzhalter($this->get_option('wpsg_shopdata_city')); ?><br />
<?php if (!empty($img['referenceNumber'])) { ?>
<h4><?php echo wpsg_translate(__('Referenz', 'wpsg')); ?></h4>
<?php echo $img['referenceNumber']; ?><br />
<?php } ?>
<h4><?php echo wpsg_translate(__('Zusätzliche Informationen', 'wpsg')); ?></h4>
<?php echo $img['additionalInformation']; ?><br />
<h4><?php echo wpsg_translate(__('Zahlbar durch', 'wpsg')); ?></h4>
<?php echo $img['customerdata']['vname'].' '.$img['customerdata']['name']; ?><br />
<?php echo $img['customerdata']['strasse'].' '.$img['customerdata']['nr']; ?><br />
<?php echo $img['customerdata']['plz'].' '.$img['customerdata']['ort']; ?><br />
</div>
</div>
 
<?php } ?>
<?php } ?>
/mods/mod_deliverynote/order_view_content.phtml
134,7 → 134,7
function wpsg_mod_deliverynote_checkProducts()
{
 
if (jQuery('.wpsg_mod_deliverynote_product:checked').length <= 0)
if (jQuery('.wpsg_mod_deliverynote_product_i:checked').length <= 0)
{
 
alert('<?php echo __('Bitte mindestens ein Produkt für den Lieferschein wählen', 'wpsg'); ?>');
146,7 → 146,7
 
var arProductKeys = Array();
jQuery('.wpsg_mod_deliverynote_product:checked').each(function() {
jQuery('.wpsg_mod_deliverynote_product_i:checked').each(function() {
arProductKeys.push(jQuery(this).val());
153,6 → 153,7
} );
 
jQuery('#wpsg_mod_deliverynote_productindexes').val(arProductKeys.join(','));
 
}
 
/mods/mod_klarna/gfx/klarna.svg
0,0 → 1,0
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="40.4494" viewBox="0 0 100 40.4494"><defs><style>.cls-1{fill:#ffb3c7;}</style></defs><g id="Lager_2" data-name="Lager 2"><g id="Layer_1" data-name="Layer 1"><rect class="cls-1" width="100" height="40.4494" rx="11.7384"/><path d="M80.0772,17.7235a6.194,6.194,0,1,0,0,10.2373v.75h3.5145V16.9727H80.0772Zm-3.1964,8.1388a3.0243,3.0243,0,1,1,3.1849-3.02A3.1059,3.1059,0,0,1,76.8808,25.8623Z"/><rect x="28.2027" y="11.7416" width="3.678" height="16.9694"/><path d="M64.1542,16.6569a4.2694,4.2694,0,0,0-3.62,1.6383V16.9733h-3.5V28.711h3.5421V22.5424a2.4754,2.4754,0,0,1,2.6383-2.6591c1.5447,0,2.4325.9228,2.4325,2.6348V28.711h3.5107V21.2464C69.1577,18.5146,66.9857,16.6569,64.1542,16.6569Z"/><path d="M43,17.7235a6.194,6.194,0,1,0,0,10.2373v.75h3.5145V16.9727H43Zm-3.1965,8.1388a3.0243,3.0243,0,1,1,3.1845-3.02A3.1058,3.1058,0,0,1,39.8034,25.8623Z"/><path d="M51.9513,18.5017V16.9728H48.353V28.7111h3.606v-5.48c0-1.8491,2.0042-2.843,3.3949-2.843.014,0,.0276.0014.0417.0015V16.9735A4.3821,4.3821,0,0,0,51.9513,18.5017Z"/><path d="M87.323,24.5476a2.2059,2.2059,0,1,0,2.206,2.2059A2.2057,2.2057,0,0,0,87.323,24.5476Z"/><path d="M25.6675,11.7384H21.8558a9.7488,9.7488,0,0,1-3.9412,7.8678l-1.51,1.131,5.8513,7.9792h4.8106l-5.3837-7.342A13.5049,13.5049,0,0,0,25.6675,11.7384Z"/><rect x="12.1204" y="11.7384" width="3.8185" height="16.9773"/></g></g></svg>
/mods/mod_klarna/order_view_afterpayment.phtml
0,0 → 1,31
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 04.03.24
* @time: 16:38
*/
namespace wpsgKlarna;
$oOrder = \wpsg_order::getInstance(intval($this->view['data']['id']));
$client_token = $oOrder->getMeta('wpsg_mod_klarna_client_token', false, '');
$session_id = $oOrder->getMeta('wpsg_mod_klarna_session_id', false, '');
$authorization_token = $oOrder->getMeta('wpsg_mod_klarna_authorization_token', false, '');
$klarna_order_id = $oOrder->getMeta('wpsg_mod_klarna_order_id', false, '');
$capture_id = $oOrder->getMeta('wpsg_mod_klarna_capture_id', false, '');
 
?>
 
<br />
<?php if ($client_token !== '') { echo wpsg_drawForm_Input('', __('Klarna ClientToken', 'wpsg'), $client_token, ['readonly' => true]); } ?>
<?php if ($session_id !== '') { echo wpsg_drawForm_Input('', __('Klarna SessionID', 'wpsg'), $session_id, ['readonly' => true]); } ?>
<?php if ($authorization_token !== '') { echo wpsg_drawForm_Input('', __('Klarna AuthorizationToken', 'wpsg'), $authorization_token, ['readonly' => true]); } ?>
<?php if ($klarna_order_id !== '') { echo wpsg_drawForm_Input('', __('Klarna OrderId', 'wpsg'), $klarna_order_id, ['readonly' => true]); } ?>
<?php if ($capture_id !== '') { echo wpsg_drawForm_Input('', __('Klarna CaptureId', 'wpsg'), $capture_id, ['readonly' => true]); } ?>
 
 
/mods/mod_klarna/settings_edit.phtml
1,25 → 1,58
<?php
 
/**
* Template für die Einstellungen des Klarna Moduls
*/
 
?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_bezeichnung', __('Bezeichnung', 'wpsg'), $this->get_option('wpsg_mod_klarna_bezeichnung'), array('help' => 'wpsg_mod_klarna_bezeichnung')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_aktiv', __('Aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv'), array('help' => 'wpsg_mod_klarna_aktiv')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_aktiv_from', __('Aktiv ab Betrag', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv_from'), array('help' => 'wpsg_mod_klarna_aktiv_from')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_aktiv_to', __('Aktiv bis Betrag', 'wpsg'), $this->get_option('wpsg_mod_klarna_aktiv_to'), array('help' => 'wpsg_mod_klarna_aktiv_to')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_merchantID', __('Händler ID (Merchant ID)', 'wpsg'), $this->get_option('wpsg_mod_klarna_merchantID'), array('help' => 'wpsg_mod_klarna_merchantID')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sharedSecret', __('Geheimnis', 'wpsg'), $this->get_option('wpsg_mod_klarna_sharedSecret'), array('help' => 'wpsg_mod_klarna_sharedSecret')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_sandbox', __('Sandboxmodus', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox'), array('help' => 'wpsg_mod_klarna_sandbox')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_gebuehr', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_klarna_gebuehr'), true), array('help' => 'wpsg_mod_klarna_gebuehr','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_mwst', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_klarna_mwst'), array('help' => 'wpsg_mod_klarna_mwst')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_mwstland', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_mwstland'), array('help' => 'wpsg_mod_klarna_mwstland')); ?>
<br />
<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_success', __('Erfolgsseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_klarna_success'), array('help' => 'wpsg_mod_klarna_success')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_error', __('Fehlerseite', 'wpsg'), $this->view['pages'], $this->get_option('wpsg_mod_klarna_error'), array('help' => 'wpsg_mod_klarna_error')); ?>
 
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 04.03.24
* @time: 11:56
*/
namespace wpsgKlarna;
?>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_active', __('Zahlungsart für neue Bestellungen aktiv', 'wpsg'), $this->get_option('wpsg_mod_klarna_active'), ['help' => 'wpsg_mod_klarna_active']); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_admin_active', __('Zahlungsart nur für Admins aktiv', 'wpsgPayone'), $this->get_option('wpsg_mod_klarna_admin_active'), ['help' => 'wpsg_mod_klarna_admin_active']); ?>
 
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_user', __('API Benutzername', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_user'), ['help' => 'wpsg_mod_klarna_api_user']); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_api_password', __('API Passwort', 'wpsg'), $this->get_option('wpsg_mod_klarna_api_password'), ['help' => 'wpsg_mod_klarna_api_password']); ?>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox'), ['help' => 'wpsg_mod_klarna_sandbox']); ?>
 
<div id="wpsg_mod_klarna_sandbox_layer">
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sandbox_user', __('(Sandbox) API Benutzername', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox_user'), ['help' => 'wpsg_mod_klarna_sandbox_user']); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_sandbox_password', __('(Sandbox) API Passwort', 'wpsg'), $this->get_option('wpsg_mod_klarna_sandbox_password'), ['help' => 'wpsg_mod_klarna_sandbox_password']); ?>
</div>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_debug', __('API Anfragen im Bestellprotokoll protokollieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_debug'), ['help' => 'wpsg_mod_klarna_debug']); ?>
 
<br />
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_checkout', __('Zahlungen im Checkout vorauthorisieren', 'wpsg'), $this->get_option('wpsg_mod_klarna_checkout'), array('help' => 'wpsg_mod_klarna_checkout')); ?>
 
<br />
 
<script>
const el_wpsg_mod_klarna_sandbox = document.getElementById('wpsg_mod_klarna_sandbox');
const el_wpsg_mod_klarna_sandbox_layer = document.getElementById('wpsg_mod_klarna_sandbox_layer');
el_wpsg_mod_klarna_sandbox.addEventListener('change', (event) => {
if (event.target.checked) el_wpsg_mod_klarna_sandbox_layer.style.display = 'block';
else el_wpsg_mod_klarna_sandbox_layer.style.display = 'none';
});
el_wpsg_mod_klarna_sandbox.dispatchEvent(new Event('change'));
</script>
 
<br />
 
<?php echo wpsg_drawForm_Input('wpsg_mod_klarna_fee', __('Gebühr', 'wpsg'), wpsg_ff($this->get_option('wpsg_mod_klarna_fee'), true), array('help' => 'wpsg_mod_klarna_fee','unit' => $this->get_option('wpsg_currency').' / %')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_klarna_tax_key', __('Mehrwertsteuersatz', 'wpsg'), wpsg_tax_groups(), $this->get_option('wpsg_mod_klarna_tax_key'), array('help' => 'wpsg_mod_klarna_tax_key')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_klarna_notaxcountry', __('Keine MwSt. wenn Land steuerfrei', 'wpsg'), $this->get_option('wpsg_mod_klarna_notaxcountry'), array('help' => 'wpsg_mod_klarna_notaxcountry')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_klarna_hint', __('Hinweistext', 'wpsg'), $this->get_option('wpsg_mod_klarna_hint'), array('help' => 'wpsg_mod_klarna_hint')); ?>
/mods/mod_productvars/basket_row.phtml
11,7 → 11,7
<div class="title">
<?php echo __($pv['name'], 'wpsg'); ?><?php if ($pv['pflicht'] == '1') { ?><span class="wpsg_required">*</span><?php } ?>
</div>
<div class="valuel">
<div class="value">
<?php if ($pv['typ'] == '1') { // Auswahlfeld ?>
<select class="<?php echo ((in_array("wpsg_mod_productvars_".$pv['id']."_".$this->view['wpsg_mod_productvars']['p']['product_index'], (array)$this->view['error']))?'wpsg_error':''); ?>" name="wpsg_mod_productvars[<?php echo $pv['id']; ?>][<?php echo $this->view['wpsg_mod_productvars']['p']['product_index']; ?>]">
<option value="not_set"><?php echo __('Bitte wählen', 'wpsg'); ?></option>
31,6 → 31,5
class="<?php echo ((in_array("wpsg_mod_productvars_".$pv['id']."_".$this->view['wpsg_mod_productvars']['p']['product_index'], (array)$this->view['error']))?'wpsg_error':''); ?>"><?php echo @wpsg_hspc($this->view['wpsg_mod_productvars']['p']['wpsg_mod_productvars'][$pv['id']]); ?></textarea>
<?php } ?>
</div>
 
</div>
<?php } ?>
/mods/mod_printshop/producttemplate.phtml
66,7 → 66,7
<?php /* URL für die Lightbox */ ?>
<?php $att = wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(800, 600), false); ?>
<a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
<a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> data-fslightbox="<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>">
 
<?php echo wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false, array()); ?>
/mods/mod_prepayment/mail_html.phtml
30,4 → 30,54
<td><?php echo __('Betreff', 'wpsg'); ?>:</td>
<td style="text-align:right;"><?php echo wpsg_translate(__('#1#', 'wpsg'), $this->view['mod_prepayment']['subject']); ?></td>
</tr>
</table>
<?php
if (isset($this->view['mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true)) {
 
require_once WPSG_PATH_LIB.'phpgirocode.class.php';
 
echo '<tr><td>'.__('Zahlen via QR Code', 'wpsg').':</td></tr>';
if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') {
 
$qrcodes = array();
$qrcodes = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
foreach ($qrcodes as $qr) {
 
if ($qr['title'] == 'QR-Rechnung') echo '<tr style="margin-top:25px;" >';
else echo '<tr>';
echo '<td>'.__($qr['title'], 'wpsg').'</td>';
echo '<td style="float:right;"><img style="max-width:120px;" width="120" height="120" src="data:image/png;base64,'.$qr['hash'].'" alt="qrcode" /></td>';
echo '</tr>';
 
}
 
} else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') {
 
$qrcode = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
echo '
<tr>
<td>'.__($qrcode['title'], 'wpsg').':</td>
<td style="float:right;" alt="qrcode">'.$qrcode['hash'].'</td>
</tr>
';
 
} else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') {
 
$qrcode = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_BASE64, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 
echo '
<tr>
<td>'.__($qrcode['title'], 'wpsg').':</td>
<td style="float:right;" alt="qrcode">'.$qrcode['hash'].'</td>
</tr>
';
 
}
}
 
?>
</table>
/mods/mod_legaltexts/form_haendlerbund.phtml
8,17 → 8,45
 
<style type="text/css">
.wphb_clear { clear:both; }
.wphb_form_field { width:770px; margin-bottom:5px; }
.wphb_form_field .wphb_form_left { line-height:24px; font-weight:bold; width:350px; float:left; }
.wphb_form_field .wphb_form_right { width:420px; float:left; position:relative; line-height:28px; }
.wphb_form_field .wphb_form_right select, .wphb_form_field .wphb_form_right input { width:95%; }
.wphb_form_field .wphb_form_right input.checkbox { width:auto !important; float:left; margin-left:2px; margin-top:5px; }
.wphb_form_field .wphb_form_right p { padding:4px 0px 4px 6px; margin:0px; }
.wphb_form { padding:10px; }
.wphb_date { float:right; padding-right:5%; }
.wphb_hinweis { font-style:italic; }
.wphb_form_field {
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
.wphb_form_field input {
width: 100%;
}
.wphb_form_left {
width: 50% !important;
flex-grow: 0;
flex-shrink: 0;
}
.wphb_form_right {
width: 50% !important;
flex-grow: 0;
flex-shrink: 0;
}
 
.wphb_table {
width: 100%;
border-spacing: 0px;
border-collapse: collapse;
}
.wphb_table input {
min-height: unset !important;
}
.wphb_table select {
width: 100%;
}
.col0 {
width: 50%;
}
.col1 {
width: 50%;
}
 
</style>
 
<?php if ($this->view['wpsg_mod_legaltexts']['form'] == false) { ?>
/mods/mod_rechnungen/html/e_invoice_app.html
0,0 → 1,20
<div class="e_invoice_app" :class="{'open': open === true}" @mouseout="open = false">
<div class="handler" @click.prevent.stop="open = !open">
{{trans('E-Rechnungsdaten anhängen')}}
</div>
<div class="layer" @mouseover="open = true" @mouseout="open = false">
<div class="inner">
<template v-for="(profile, key) of data.arProfile">
<a
:class="{
'default': data.default_profile === intVal(key)
}"
target="_blank"
:href="profile.url"
>
{{profile.label}}
</a>
</template>
</div>
</div>
</div>
/mods/mod_rechnungen/js/e_invoice_app.module.js
0,0 → 1,25
import { createApp } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js';
 
export async function initEInvoiceApp(element, data) {
 
const template = await fetch(data.template_url).then(response => response.text());
 
const App = {
data() {
 
return {
data: data,
open: false
}
 
},
methods: {
intVal: function(value) { console.log(value); return parseInt(value); },
trans: function(strDefault) { return strDefault; }
},
template: template
};
 
createApp(App).mount(element);
 
}
/mods/mod_rechnungen/order_view.phtml
3,6 → 3,8
/**
* Template für die Rechnungsmodulansicht innerhalb der Bestellansicht
*/
use horstoeko\zugferd\ZugferdProfiles;
use wpsg\mod_invoice\eInvoice;
 
?>
23,7 → 25,7
$oInvoice = \wpsg\wpsg_invoice::getInstance($r['id']);
?>
<div>
<?php echo $oInvoice->getDate(true); ?>
</div>
30,17 → 32,52
<div>
<?php echo $oInvoice->getNr(true); ?>
</div>
<div style="text-align:right;">
<div>
<div id="e_invoice_app_<?php echo $oInvoice->getId(); ?>"></div>
<script type="module">
import { initEInvoiceApp } from '<?php echo wpsg_ShopController::getShop()->getRessourceURL('mods/mod_rechnungen/js/e_invoice_app.module.js'); ?>';
 
initEInvoiceApp(document.getElementById('e_invoice_app_<?php echo $oInvoice->getId(); ?>'), {
'invoice_id': <?php echo $oInvoice->getId(); ?>,
'template_url': '<?php echo wpsg_ShopController::getShop()->getRessourceURL('mods/mod_rechnungen/html/e_invoice_app.html'); ?>',
'default_profile': <?php echo intval(wpsg_ShopController::getShop()->get_option('wpsg_mod_rechnungen_einvoice')); ?>,
'arProfile': <?php echo json_encode([
100 + ZugferdProfiles::PROFILE_MINIMUM => ['label' => __('EN16931 Minimum', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_MINIMUM)],
100 + ZugferdProfiles::PROFILE_BASIC => ['label' => __('EN16931 Basic', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASIC)],
100 + ZugferdProfiles::PROFILE_BASICWL => ['label' => __('EN16931 Basic WL', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_BASICWL)],
100 + ZugferdProfiles::PROFILE_EN16931 => ['label' => __('EN16931 Comfort', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EN16931)],
100 + ZugferdProfiles::PROFILE_EXTENDED => ['label' => __('EN16931 Extended', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_EXTENDED)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG => ['label' => __('EN16931 XRechnung 1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => ['label' => __('EN16931 XRechnung 2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => ['label' => __('EN16931 XRechnung 2.1', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_1)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => ['label' => __('EN16931 XRechnung 2.2', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_2)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => ['label' => __('EN16931 XRechnung 2.3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_2_3)],
100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => ['label' => __('EN16931 XRechnung 3', 'wpsg'), 'url' => eInvoice::buildUrl($oInvoice->getId(), ZugferdProfiles::PROFILE_XRECHNUNG_3)]
]); ?>
});
</script>
</div>
<div style="text-align:right; white-space:nowrap;">
 
<?php /*
<a target="_blank" href="<?php
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=rebuildadmin', 'wpsg-mod_invoice-order_ajax-rebuildadmin-'.$_REQUEST['edit_id']);
?>" style="color:red;"><?php echo __('Neu erstellen', 'wpsg'); ?></a>
*/ ?>
<a target="_blank" onclick="if (!confirm('<?php echo __('Sind Sie sicher, dass Sie eine Kopie dieser Rechnung/Rechnungskorrektur erneut an den Kunden senden möchten?', 'wpsg'); ?>')) return false;" href="<?php
if ($r['o_id'] == '0') {
// Multirechnung
$r_o_ids = array_map('intval', explode(',', $r['o_ids']));
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$r_o_ids[0].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$r_o_ids[0]);
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$_REQUEST['edit_id']);
} else {
// normale Rechnung
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$this->view['data']['id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$this->view['data']['id']);
echo wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&mod=wpsg_mod_rechnungen&noheader=1&action=ajax&edit_id='.$_REQUEST['edit_id'].'&r_id='.$r['id'].'&do=copy', 'wpsg-mod_invoice-order_ajax-copy-'.$_REQUEST['edit_id']);
}
 
?>"><?php echo ' &nbsp;'.__("Kopie senden", "wpsg"); ?></a>&nbsp;
48,6 → 85,8
</div>
<?php } ?>
</div>
59,6 → 98,22
<style>
#wpsg_mod_rechnungen_order_view .grid { display:grid; width:100%; grid-template-columns:150px 1fr 100px; row-gap:0.25rem; }
#wpsg_mod_rechnungen_order_view .grid { display:grid; width:100%; grid-template-columns:150px 1fr 250px 150px; row-gap:0.5rem; column-gap:1rem; align-items:center; }
.e_invoice_app { position:relative; user-select:none;
& > .handler { border:1px solid black; padding:0.25rem 0.5rem; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; width:100%; cursor:pointer; background-color:white; position:relative;
&:after { width:0; height:0; border-top:5px solid transparent; border-bottom:5px solid transparent; border-left:5px solid #2c699e; content:' '; position:absolute; right:5px; top:50%; transform:translateY(-50%); transition:all 0.4s; }
}
& > .layer { position:absolute; max-height:0; overflow:hidden; width:100%; transition:all 0.4s; z-index:1;
& > .inner { border:1px solid black; padding:0.25rem 0.5rem; margin-top:-1px; display:flex; flex-direction:column; gap:0.25rem; background-color:white;
& > a:not(:last-child) { border-bottom:1px solid black; }
& > a.default { font-weight:bold; }
}
}
&.open {
& > .layer { max-height:500px; }
& > .handler:after { transform:translateY(-50%) rotate(90deg); }
}
}
</style>
/mods/mod_rechnungen/settings_edit.phtml
4,6 → 4,8
* Template für die Einstellungen des Rechnungen Moduls
*/
 
use horstoeko\zugferd\ZugferdProfiles;
?>
 
<div>
182,6 → 184,47
</div>
<div id="tab3" role="tabpanel" class="tab-pane" >
 
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_einvoice', __('E-Rechnung', 'wpsg'), [
0 => __('Keine E-Rechnungsdaten erzeugen', 'wpsg'),
100 + ZugferdProfiles::PROFILE_MINIMUM => __('EN16931 Minimum', 'wpsg'),
100 + ZugferdProfiles::PROFILE_BASIC => __('EN16931 Basic', 'wpsg'),
100 + ZugferdProfiles::PROFILE_BASICWL => __('EN16931 Basic WL', 'wpsg'),
100 + ZugferdProfiles::PROFILE_EN16931 => __('EN16931 Comfort', 'wpsg'),
100 + ZugferdProfiles::PROFILE_EXTENDED => __('EN16931 Extended', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG => __('EN16931 XRechnung 1', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2 => __('EN16931 XRechnung 2', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_1 => __('EN16931 XRechnung 2.1', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_2 => __('EN16931 XRechnung 2.2', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG_2_3 => __('EN16931 XRechnung 2.3', 'wpsg'),
100 + ZugferdProfiles::PROFILE_XRECHNUNG_3 => __('EN16931 XRechnung 3', 'wpsg'),
], $this->get_option('wpsg_mod_rechnungen_einvoice'), ['help' => 'wpsg_mod_rechnungen_einvoice']); ?>
<p style="line-height:normal; margin-bottom:1rem; margin-top:1rem; display:none; font-style:italic;" id="wpsg_mod_rechnungen_einvoice_description"><?php echo __('Die Platzhalter können bei den Formatfeldern und dem Dateinamen verwendet werden. Der Platzhalter %nr% sollte dabei immer Verwendung finden.', 'wpsg'); ?></p>
<script>
const eInvoiceProfileDev = <?php echo json_encode(ZugferdProfiles::PROFILEDEF); ?>;
const el_wpsg_mod_rechnungen_einvoice_description = document.getElementById('wpsg_mod_rechnungen_einvoice_description');
document.getElementById('wpsg_mod_rechnungen_einvoice').addEventListener('change', ev => {
if (eInvoiceProfileDev[ev.target.value] !== undefined) {
el_wpsg_mod_rechnungen_einvoice_description.innerText = eInvoiceProfileDev[ev.target.value].description;
el_wpsg_mod_rechnungen_einvoice_description.style.display = 'block';
} else {
el_wpsg_mod_rechnungen_einvoice_description.style.display = 'hidden';
}
});
document.getElementById('wpsg_mod_rechnungen_einvoice').dispatchEvent(new Event('change'));
</script>
<?php echo wpsg_drawForm_Input('wpsg_rechnungen_url', __('URL Benachrichtigung', 'wpsg'), $this->get_option('wpsg_rechnungen_url'), array('help' => 'wpsg_rechnung_url')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_rechnungen_auto', __('Rechnungserstellung', 'wpsg'), array(
'0' => __('Manuell', 'wpsg'),
/mods/mod_rechnungen/copymail.phtml
1,13 → 1,13
<?php
/*
* Template für die Rechnungskopie
**/
 
/*
* Template für die Rechnungskopie
*/
/** @var wpsg_order $oOrder */
$oOrder = wpsg_order::getInstance($this->view['order']['id']);
 
$arPflicht = $this->loadPflichtFeldDaten();
$arTitle = explode('|', $arPflicht['anrede_auswahl']);
 
?><?php echo wpsg_translate(__('Hallo #1# #2# #3#,', 'wpsg'), @$arTitle[$this->view['basket']['checkout']['title']], $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?>
?><?php echo wpsg_translate(__('Hallo #1# #2# #3#,', 'wpsg'), $oOrder->getInvoiceTitle(), $oOrder->getInvoiceFirstName(), $oOrder->getInvoiceName()); ?>
<?php if (isset($this->view['rnr'])) { ?>
<?php echo __("hiermit erhalten Sie die Kopie der Rechnung", "wpsg"); ?> <?php echo $this->view['rnr']; ?>.
/mods/mod_rechnungen/invoice_pdf.phtml
940,7 → 940,7
} else {
$pdf->Output($oInvoice->getFilePath(), 'F');
if (($this->view['rebuild']??false) === false) $pdf->Output($oInvoice->getFilePath(), 'F');
// Hier wird der Dateiname an FPD übergeben. Er soll sich aus der Rechnungsnummer ergeben, auch wenn das Dokument über die ID gespeichert ist.
if ($this->view['output'] === true) $pdf->Output($this->view['filename_out'], 'I');
/mods/mod_paypalapi/settings_edit.phtml
59,7 → 59,15
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_aktiv', __('PayPal für neue Bestellungen erlauben', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_aktiv'), array('help' => 'wpsg_shippay_activ')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_aktiv', __('PayPal Plus aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_aktiv'), array('help' => 'wpsg_mod_paypalapi_plus_aktiv')); ?>
<?php /*
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_giropay_aktiv', __('GiroPay aktivieren', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_aktiv'), array('help' => 'wpsg_mod_paypalapi_giropay_aktiv ')); ?>
 
<div id="wpsg_mod_paypalapi_giropay_aktiv_layer">
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_giropay_name', __('Bezeichnung (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_name'), array('help' => 'wpsg_shippay_name')); ?>
<?php echo wpsg_drawForm_Textarea('wpsg_mod_paypalapi_giropay_hint', __('Hinweistext (GiroPay)', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_giropay_hint'), array('help' => 'wpsg_shippay_hint')); ?>
</div>
*/ ?>
 
<div class="wpsg_mod_paypalapi_plus_aktiv_layer wpsg_mod_paypalapi_plus_aktiv_layer_1">
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_plus_basket', __('Zahlungsauswahl im Warenkorb', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_plus_basket'), array('help' => 'wpsg_mod_paypalapi_plus_basket')); ?>
</div>
78,14 → 86,15
</div>
 
<div class="wpsg_mod_paypalapi_plus_inaktiv">
- <?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
-
-</div>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_autostart', __('Zahlung sofort starten', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_autostart'), array('help' => 'wpsg_shippay_paystart')); ?>
</div>
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypalapi_paypalexpress_details', __('Warenkorbdetails übertragen', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_paypalexpress_details'), array('help' => 'wpsg_mod_paypalapi_paypalexpress_details')); ?>
 
<br />
 
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_label', __('Bezeichnung im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_label'), array('help' => 'wpsg_mod_paypalapi_experience_label', 'hint' => __('Max. 127 Zeichen', 'wpsg'))); ?>
 
<?php echo wpsg_drawForm_Input('wpsg_mod_paypalapi_experience_logo', __('URL für ein Logo im PayPal Zahlungsinterface', 'wpsg'), $this->get_option('wpsg_mod_paypalapi_experience_logo'), array('help' => 'wpsg_mod_paypalapi_experience_logo', 'hint' => __('gif|png|jpg, Max. 190x60', 'wpsg'))); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_paypalapi_experience_locale_code', __('Sprache im PayPal Zahlungsinterface', 'wpsg'), array(
'DE' => __('Deutsch', 'wpsg'),
174,4 → 183,41
} );
 
const el_wpsg_mod_paypalapi_plus_aktiv = document.getElementById('wpsg_mod_paypalapi_plus_aktiv');
//const el_wpsg_mod_paypalapi_giropay_aktiv = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv');
//const el_wpsg_mod_paypalapi_giropay_aktiv_layer = document.getElementById('wpsg_mod_paypalapi_giropay_aktiv_layer');
el_wpsg_mod_paypalapi_plus_aktiv.addEventListener('change', event => {
if (el_wpsg_mod_paypalapi_plus_aktiv.checked) {
//el_wpsg_mod_paypalapi_giropay_aktiv.disabled = true;
//el_wpsg_mod_paypalapi_giropay_aktiv.checked = false;
} else {
//el_wpsg_mod_paypalapi_giropay_aktiv.disabled = false;
}
});
 
/*
el_wpsg_mod_paypalapi_giropay_aktiv.addEventListener('change', event => {
if (el_wpsg_mod_paypalapi_giropay_aktiv.checked) {
el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'block';
} else {
el_wpsg_mod_paypalapi_giropay_aktiv_layer.style.display = 'none';
}
});*/
el_wpsg_mod_paypalapi_plus_aktiv.dispatchEvent(new Event('change'));
//el_wpsg_mod_paypalapi_giropay_aktiv.dispatchEvent(new Event('change'));
</script>
/mods/mod_paypalapi/checkout2_inner_prebutton.phtml
0,0 → 1,60
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 09.06.24
* @time: 12:04
*/
namespace wpsg;
?>
 
<?php echo GiroPayPalAPI::getInstance()->integrateSDK(); ?>
 
<script>
paypal.PaymentFields({
fundingSource: paypal.FUNDING.GIROPAY,
style: {
variables: {},
rules: {},
},
onInit: (data, actions) => {
const form = document.querySelector("form#wpsg_checkout_form");
form.addEventListener("submit", (e) => {
const formData = new FormData(form);
const paymentSource = formData.get("wpsg[checkout][payment]");
if (paymentSource === '10_1') {
 
e.preventDefault();
 
actions.validate().then((valid) => {
 
if (valid) {
 
window.location.href = '<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPaySet', [], true); ?>';
 
}
 
});
 
}
 
});
 
},
fields: {
name: {
value: "<?php echo ($_SESSION['wpsg']['checkout']['vname']??'').' '.($_SESSION['wpsg']['checkout']['name']??''); ?>"
},
},
}).render("#giropay-container");
</script>
/mods/mod_paypalapi/gfx/giropay.svg
0,0 → 1,0
<svg width="75px" height="32px" viewBox="0 0 75 32" version="1.1" xmlns="http:&#x2F;&#x2F;www.w3.org&#x2F;2000&#x2F;svg"><title>logo giropay</title><desc>Created with Sketch.</desc><defs><polygon id="path-1" points="0 0.017902439 46.0918699 0.017902439 46.0918699 19.8373984 0 19.8373984"></polygon><polygon id="path-3" points="0 19.9821138 46.0918699 19.9821138 46.0918699 0.162601626 0 0.162601626"></polygon></defs><g id="SPB_&amp;_AltPay_NewAssets" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="matrix(1.614571, 0, 0, 1.614571, -161.457123, -256.816772)"><g id="logo-giropay" transform="translate(100.000000, 159.000000)"><g id="Group-3" transform="translate(0.000000, 0.144715)"><mask id="mask-2" fill="#FFFFFF"><polygon points="0 0.017902439 46.0918699 0.017902439 46.0918699 19.8373984 0 19.8373984" transform="matrix(1, 0, 0, 1, 0, 0)"></polygon></mask><g id="Clip-2"></g><path d="M0,3.5735122 C0,1.60977236 1.5998374,0.017902439 3.57349593,0.017902439 L42.5182114,0.017902439 C44.4918699,0.017902439 46.0918699,1.60977236 46.0918699,3.5735122 L46.0918699,16.2818049 C46.0918699,18.2455447 44.4918699,19.8374146 42.5182114,19.8374146 L3.57349593,19.8374146 C1.5998374,19.8374146 0,18.2455447 0,16.2818049 L0,3.5735122 Z" id="Fill-1" fill="#003a7d" mask="url(#mask-2)"></path></g><path d="M1.46738211,3.84021138 L1.46738211,16.3065528 C1.46738211,17.5338699 2.46738211,18.5288293 3.70087805,18.5288293 L24.1036423,18.5288293 L24.1036423,1.61793496 L3.70087805,1.61793496 C2.46738211,1.61793496 1.46738211,2.61289431 1.46738211,3.84021138" id="Fill-4" fill="#ffffff"></path><path d="M5.67102439,10.0205528 C5.67102439,9.34152846 6.00582114,8.77730081 6.64663415,8.77730081 C7.42126829,8.77730081 7.74630894,9.39892683 7.74630894,9.95356098 C7.74630894,10.7187642 7.25866667,11.235187 6.64663415,11.235187 C6.13004878,11.235187 5.67102439,10.795187 5.67102439,10.0205528 Z M9.41053659,7.57226016 L7.8515122,7.57226016 L7.8515122,8.47112195 L7.8324878,8.47112195 C7.46907317,7.85908943 6.87606504,7.45746341 6.13964228,7.45746341 C4.59021138,7.45746341 3.8921626,8.56689431 3.8921626,10.0491707 C3.8921626,11.5221789 4.74321951,12.5550244 6.11102439,12.5550244 C6.79964228,12.5550244 7.37346341,12.2872195 7.78468293,11.7038049 L7.80370732,11.7038049 L7.80370732,11.9716098 C7.80370732,12.9472195 7.26826016,13.4158374 6.27362602,13.4158374 C5.55622764,13.4158374 5.11622764,13.2628293 4.59021138,13.0046179 L4.50419512,14.3626667 C4.90582114,14.5060813 5.58500813,14.6782764 6.40744715,14.6782764 C8.41590244,14.6782764 9.41053659,14.0182764 9.41053659,11.9716098 L9.41053659,7.57226016 Z" id="Fill-6" fill="#ED1C24"></path><mask id="mask-4" fill="#FFFFFF"><polygon points="0 19.9821138 46.0918699 19.9821138 46.0918699 0.162601626 0 0.162601626" transform="matrix(1, 0, 0, 1, 0, 0)"></polygon></mask><g id="Clip-9"></g><path d="M10.5985366,6.75918699 L12.32,6.75918699 L12.32,5.49674797 L10.5985366,5.49674797 L10.5985366,6.75918699 Z M10.598374,12.5549593 L12.3198374,12.5549593 L12.3198374,7.57219512 L10.598374,7.57219512 L10.598374,12.5549593 Z" id="Fill-8" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M17.1133333,7.51479675 C16.9411382,7.48617886 16.7307317,7.45739837 16.5299187,7.45739837 C15.7839024,7.45739837 15.3534959,7.85918699 15.0570732,8.4904065 L15.0380488,8.4904065 L15.0380488,7.57219512 L13.4694309,7.57219512 L13.4694309,12.5549593 L15.1910569,12.5549593 L15.1910569,10.4508943 C15.1910569,9.47544715 15.6404878,8.89203252 16.4439024,8.89203252 C16.6447154,8.89203252 16.835935,8.89203252 17.0273171,8.94943089 L17.1133333,7.51479675 Z" id="Fill-10" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M20.0773496,11.4647154 C19.2835285,11.4647154 18.9583252,10.804878 18.9583252,10.0682927 C18.9583252,9.32243902 19.2835285,8.66243902 20.0773496,8.66243902 C20.8711707,8.66243902 21.196374,9.32243902 21.196374,10.0682927 C21.196374,10.804878 20.8711707,11.4647154 20.0773496,11.4647154 M20.0773496,12.6697561 C21.7223902,12.6697561 22.9752358,11.7133333 22.9752358,10.0682927 C22.9752358,8.41382114 21.7223902,7.45739837 20.0773496,7.45739837 C18.4323089,7.45739837 17.1794634,8.41382114 17.1794634,10.0682927 C17.1794634,11.7133333 18.4323089,12.6697561 20.0773496,12.6697561" id="Fill-11" fill="#ED1C24" mask="url(#mask-4)"></path><path d="M29.3757073,10.0110244 C29.3757073,10.8048455 28.9836748,11.3500488 28.3332683,11.3500488 C27.7594472,11.3500488 27.2812358,10.8048455 27.2812358,10.0780163 C27.2812358,9.332 27.7020488,8.77720325 28.3332683,8.77720325 C29.0026992,8.77720325 29.3757073,9.35102439 29.3757073,10.0110244 Z M25.5597724,14.5633821 L27.2812358,14.5633821 L27.2812358,11.856878 L27.3002602,11.856878 C27.6254634,12.4498862 28.2758699,12.6697236 28.8783089,12.6697236 C30.360748,12.6697236 31.1545691,11.4456585 31.1545691,9.97265041 C31.1545691,8.76777236 30.399122,7.45736585 29.0218862,7.45736585 C28.2376585,7.45736585 27.5106667,7.77297561 27.166439,8.47118699 L27.147252,8.47118699 L27.147252,7.5721626 L25.5597724,7.5721626 L25.5597724,14.5633821 Z" id="Fill-12" fill="#ffffff" mask="url(#mask-4)"></path><path d="M33.505252,10.9769919 C33.505252,10.4987805 33.9642764,10.3169919 34.5476911,10.3169919 C34.8059024,10.3169919 35.0546829,10.3361789 35.2745203,10.3457724 C35.2745203,10.929187 34.8633008,11.5221951 34.2128943,11.5221951 C33.8112683,11.5221951 33.505252,11.3212195 33.505252,10.9769919 Z M36.9769593,12.5550407 C36.900374,12.1628455 36.8813496,11.770813 36.8813496,11.3786179 L36.8813496,9.52317073 C36.8813496,8.00252033 35.7815122,7.45747967 34.5094797,7.45747967 C33.7730569,7.45747967 33.1322439,7.56268293 32.5202114,7.81130081 L32.5488293,8.97813008 C33.0270407,8.7103252 33.5816748,8.60512195 34.1364715,8.60512195 C34.7580976,8.60512195 35.2650894,8.78674797 35.2745203,9.46577236 C35.0546829,9.42756098 34.7485041,9.39894309 34.4711057,9.39894309 C33.5530569,9.39894309 31.8984228,9.58056911 31.8984228,11.1013821 C31.8984228,12.1820325 32.7784228,12.6698374 33.7634634,12.6698374 C34.4711057,12.6698374 34.9493171,12.392439 35.3415122,11.770813 L35.3606992,11.770813 C35.3606992,12.0290244 35.3893171,12.2872358 35.3989106,12.5550407 L36.9769593,12.5550407 Z" id="Fill-13" fill="#ffffff" mask="url(#mask-4)"></path><path d="M37.750748,14.5634634 C38.1045691,14.6398862 38.4583902,14.6782602 38.8218049,14.6782602 C40.3998537,14.6782602 40.7728618,13.463626 41.2606667,12.2107805 L43.0873333,7.5722439 L41.3658699,7.5722439 L40.3426179,10.8239512 L40.3234309,10.8239512 L39.2522114,7.5722439 L37.3967642,7.5722439 L39.414813,12.6698049 C39.2904228,13.1098049 38.9653821,13.3584228 38.5445691,13.3584228 C38.3053821,13.3584228 38.0949756,13.3296423 37.8655447,13.2532195 L37.750748,14.5634634 Z" id="Fill-14" fill="#ffffff" mask="url(#mask-4)"></path></g></g></svg>
/mods/mod_paypalapi/order_done_giropay.phtml
0,0 → 1,80
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 13.06.24
* @time: 14:59
*/
namespace wpsg;
$client_id = $this->view['clientId']??null;
 
?>
 
<?php if ($client_id !== null) { ?>
<p><?php echo __('Die Bestellung ist bei uns eingegangen, bitte begleichen Sie den offenen Betrag mit giroPAy über folgenden Button.', 'wpsg'); ?></p>
<script src="https://sandbox.paypal.com/sdk/js?client-id=<?php echo $client_id; ?>&components=buttons,payment-fields,marks,funding-eligibility&enable-funding=giropay&currency=EUR"></script>
<div id="giropay-btn"></div>
<script>
paypal.Buttons({
fundingSource: paypal.FUNDING.GIROPAY,
style: {
label: "pay",
},
createOrder() {
return fetch('<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCreateOrder', [
'order_id' => intval($_REQUEST['order_id'])
], true); ?>', {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: null,
})
.then((response) => response.json())
.then((order) => order.id);
},
onApprove(data) {
 
console.log('onApprove');
return fetch('<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayApproveOrder', [], true); ?>', {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
orderID: data.orderID
})
})
.then((response) => response.json())
.then((orderData) => {
//console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
//const transaction = orderData.purchase_units[0].payments.captures[0];
//console.log('Transaction Status:', transaction.status);
//console.log('Transaction ID:', transaction.id);
location.reload();
});
},
onCancel(data, actions) { console.log(`Order Canceled - ID: ${data.orderID}`); },
onError(err) { console.error(err); }
}).render("#giropay-btn");
</script>
<?php } else { ?>
 
<p><?php echo __('Den Betrag haben wir mittels GiroPay dankend erhalten.', 'wpsg'); ?></p>
 
<?php }
/mods/mod_paypalapi/overview_button.phtml
0,0 → 1,89
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 13.06.24
* @time: 14:48
*/
namespace wpsg;
?>
 
<?php GiroPayPalAPI::getInstance()->integrateSDK(); ?>
 
 
<div style="width:300px; float:right;">
<div id="giropay-btn"></div>
</div>
 
<script>
paypal.Buttons({
fundingSource: paypal.FUNDING.GIROPAY,
style: {
label: "pay",
},
createOrder() {
const form = document.getElementById('wpsg_form');
if (form.checkValidity()) {
return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCreateOrderFromSession', [ ], true); ?>", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: { }
})
.then((response) => response.json())
.then((order) => order.id);
 
} else form.reportValidity();
},
onApprove(data) {
return fetch("<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayApproveOrder', [], true); ?>", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
orderID: data.orderID
})
})
.then((response) => response.json())
.then((orderData) => {
location.href = orderData.order_done_url;
// Successful capture! For dev/demo purposes:
// console.log('Capture result', orderData, JSON.stringify(orderData, null, 2));
// const transaction = orderData.order_paypal.purchase_units[0].payments.captures[0];
//console.log('Transaction Status:', transaction.status);
//console.log('Transaction ID:', transaction.id);
});
},
onCancel(data, actions) {
console.log(`Order Canceled - ID: ${data.orderID}`);
location.href = '<?php echo $this->getUrl(\wpsg_ShopController::URL_BASKET, 'wpsg_mod_paypalapi', 'giroPayCancelOrder', [], true); ?>';
},
onError(err) {
<?php if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugModus') === "1") { ?>console.error(err);<?php } ?>
}
}).render("#giropay-btn");
</script>
/mods/mod_productvariants/settings_edit.phtml
22,7 → 22,18
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_productvariants_price', __('Preis der Variation direkt anzeigen'), $this->get_option('wpsg_mod_productvariants_price')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_detailview', __('Erweiterte Variantenanzeige aktivieren', 'wpsg'), $this->get_option('wpsg_vp_detailview'), array('help' => 'wpsg_vp_detailview')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_replaceanr', __('Produktartikelnummer ersetzen', 'wpsg'), $this->get_option('wpsg_vp_replaceanr'), array('hint' => __('Ersetzt die Produktartikelnummer durch die zusammengesetzte Artikelnummern der Varianten.', 'wpsg'), 'help' => 'wpsg_vp_replaceanr')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_product_stock_nocalc', __('Produktbestand nach Kauf nicht berechnen', 'wpsg'), $this->get_option('wpsg_vp_product_stock_nocalc'), [
'hint' => __('Ist diese Option aktiv, so bildet sich der Bestand im Produkt bei Variantenprodukten nicht aus den Varianten neu sondern wird einfach reduziert.', 'wpsg'), 'help' => 'wpsg_vp_product_stock_nocalc'
]); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_product_stock_varinotchange', __('Produktbestand in Varianten nicht verringern', 'wpsg'), $this->get_option('wpsg_vp_product_stock_varinotchange'), [
'hint' => __('Ist diese Option aktiv, so wird bei Kauf der Bestand in den Varianten nicht verringert.', 'wpsg'), 'help' => 'wpsg_vp_product_stock_varinotchange'
]); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_vp_product_stock_display', __('Produktbestand statt Variantenbestand anzeigen', 'wpsg'), $this->get_option('wpsg_vp_product_stock_display'), [
'hint' => __('Ist diese Option aktiv, so wird im nur der Produktbestand im Produkttemplate (Frontend) angezeigt..', 'wpsg'), 'help' => 'wpsg_vp_product_stock_display'
]); ?>
</div>
</div>
 
/mods/mod_productvariants/frontend.js
18,6 → 18,7
'success': function(data) {
jQuery('#wpsg_produktform_' + template_index).replaceWith(data);
if (typeof refreshFsLightbox === 'function') refreshFsLightbox();
}
} );
/mods/mod_productvariants/produkt_addedit_content.phtml
148,19 → 148,13
</div>
</div>
<?php $GLOBALS['wpsg_vue_3.2.47_loaded'] = ($GLOBALS['wpsg_vue_3.2.47_loaded']??0) + 1; if ($GLOBALS['wpsg_vue_3.2.47_loaded'] <= 1) { ?>
<script src="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/views/js/vue-3.2.47.global.min.js'; ?>"></script>
<?php } ?>
<script>
<script type="module">
(() => {
 
const ref = Vue.ref;
const computed = Vue.computed;
const onMounted = Vue.onMounted;
 
const app = Vue.createApp({
import { ref, createApp, onMounted, computed } from '<?php echo plugin_dir_url(__FILE__); ?>/../../../js/vue.esm-browser.js';
document.addEventListener('DOMContentLoaded', () => {
const app = createApp({
setup() {
 
const product_id = ref(<?php echo $oProduct->getId(); ?>);
418,7 → 412,7
 
});
 
})();
});
</script>
/mods/mod_stock/product_addedit_content.phtml
4,6 → 4,9
* Template für die Integration des Lagerbestandes in die Produktverwaltung
*/
 
/** @var wpsg_product $oProduct */
$oProduct = $this->view['oProduct'];
?>
 
<?php echo wpsg_drawForm_AdminboxStart(__('Lagerbestand', 'wpsg')); ?>
25,7 → 28,42
 
<br />
 
<div class="info"><?php echo __('Lagerbestand = Bestand(Variante 1) + Bestand(Variante 2) + Bestand(Variante X)','wpsg'); ?></div>
<?php if ($this->hasMod('wpsg_mod_productvariants')) { ?>
<?php echo wpsg_drawForm_Select('meta[wpsg_vp_product_stock_nocalc]', __('Produktbestand nach Kauf', 'wpsg'), [
'0' => wpsg_translate(
__('Voreinstellung (#1#)', 'wpsg'),
(($this->get_option('wpsg_vp_product_stock_nocalc') === '1')?'nicht berechnen':'berechnen')
),
'2' => __('berechnen'),
'1' => __('nicht berechnen')
], $oProduct->getMeta('wpsg_vp_product_stock_nocalc'), [
'hint' => __('Ist hier "berechnen" eingestellt, wird beim Ändern des Bestandes einer Variante der Bestand im Produkt aus den Varianten ermittelt. (Lagerbestand im Produkt = Bestand(Variante 1) + Bestand(Variante 2) + ... )', 'wpsg')
]); ?>
<?php echo wpsg_drawForm_Select('meta[wpsg_vp_product_stock_varinotchange]', __('Produktbestand in Varianten nicht verringern', 'wpsg'), [
'0' => wpsg_translate(
__('Voreinstellung (#1#)', 'wpsg'),
(($this->get_option('wpsg_vp_product_stock_varinotchange') === '1')?'nicht verringern':'verringern')
),
'2' => __('verringern'),
'1' => __('nicht verringern')
], $oProduct->getMeta('wpsg_vp_product_stock_varinotchange'), [
'hint' => __('Ist hier "nicht verringern" aktiviert, so wird der Bestand in der Variante beim Kauf nicht reduziert.', 'wpsg')
]); ?>
<?php echo wpsg_drawForm_Select('meta[wpsg_vp_product_stock_display]', __('Produktbestand oder Variantenbestand anzeigen', 'wpsg'), [
'0' => wpsg_translate(
__('Voreinstellung (#1#)', 'wpsg'),
(($this->get_option('wpsg_vp_product_stock_display') === '1')?'Produktbestand':'Variantenbestand')
),
'2' => __('Variantenbestand'),
'1' => __('Produktbestand')
], $oProduct->getMeta('wpsg_vp_product_stock_display'), [
'hint' => __('Bestimmt ob der Variantenbestand (Produktbestand + Variantenbestand) oder nur der Produktbestand im Frontend angezeigt werden soll.', 'wpsg')
]); ?>
<?php } ?>
 
<?php /* Mailbenachrichtigung beim Erreichen des Minimalbestandes des Produktes */ ?>
<?php if ($this->get_option('wpsg_mod_stock_minstockproduct') == '1') { ?>
/mods/mod_relatedproducts/list.phtml
9,16 → 9,39
<?php if (sizeof($this->view['wpsg_mod_relatedproducts']['data']) <= 0) { ?>
<p><?php echo __('Noch keine Produkte zugeordnet', 'wpsg'); ?></p>
<?php } else { ?>
<?php foreach ($this->view['wpsg_mod_relatedproducts']['data'] as $p) { ?>
<span id="wpsg_rp_<?php echo $p['id']; ?>">
<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproduct['.$p['id'].']', '<a href="'.wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$p['product_id'], 'wpsg-product-edit-'.$p['product_id']).'">'.$p['name'].'</p>', $this->view['wpsg_mod_relatedproducts']['arTemplates'], $p['template'], array('icon' => 'wpsg_icon_remove glyphicon glyphicon-trash')); ?>
</span>
<div class="wpsg_clear"></div>
<div id="wpsg_mod_relatedproduct_list">
<?php foreach ($this->view['wpsg_mod_relatedproducts']['data'] as $p) { ?>
<div class="order_item">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-bar-expand" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M3.646 10.146a.5.5 0 0 1 .708 0L8 13.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708m0-4.292a.5.5 0 0 0 .708 0L8 2.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708M1 8a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 1 8"/>
</svg>
<span id="wpsg_rp_<?php echo $p['id']; ?>">
<?php echo wpsg_drawForm_Select('wpsg_mod_relatedproduct['.$p['id'].']', '<a href="'.wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$p['product_id'], 'wpsg-product-edit-'.$p['product_id']).'">'.$p['name'].'</a>', $this->view['wpsg_mod_relatedproducts']['arTemplates'], $p['template'], array('icon' => 'wpsg_icon_remove glyphicon glyphicon-trash')); ?>
</span>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
 
<script type="text/javascript">
<style>
#wpsg_mod_relatedproduct_list { display:flex; flex-direction:column; gap:5px;
& > .order_item { display:block; position:relative; cursor:pointer !important;
& > svg { display:none; width:16px; height:16px; left:0; top:50%; transform:translateY(-50%); position:absolute; cursor:pointer !important; }
&:hover > svg { display:block; }
.form-group { margin-top:0; margin-bottom:0;
& > * { cursor:pointer;
a { display:inline; }
}
& > label { display:flex; justify-content:flex-end; }
}
}
}
</style>
 
<script>
 
jQuery('#relatedproducts_list a.wpsg_icon_remove').on('click', function() {
 
var rel_id = jQuery(this).parents('span').attr('id').replace(/wpsg_rp_/, '');
39,5 → 62,13
return false;
} );
jQuery(document).ready(function() {
jQuery("#wpsg_mod_relatedproduct_list").sortable({
}).disableSelection();
 
});
 
</script>
/mods/mod_ticket/basket_row.phtml
0,0 → 1,21
<?php
 
/**
* Template für die Integration der Produktvariablen innerhalb des Warenkorbs
*/
 
namespace wpsgTicket;
/** @var Ticket $oTicket */
$oTicket = $this->view['oTicket'];
?>
 
<div class="product_info">
<div class="title">
<?php echo __('Datum', 'wpsg'); ?>
</div>
<div class="value">
<?php echo $oTicket->getLabel(); ?>
</div>
</div>
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/mods/mod_ticket/order_view.phtml
0,0 → 1,125
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 03.12.23
* @time: 15:14
*/
namespace wpsgTicket;
/** @var \wpsg_order $oOrder */
$oOrder = \wpsg_order::getInstance(intval($this->view['data']['id']));
$data = [];
foreach ($oOrder->getOrderProducts() as $oOrderProduct) {
if (intval($oOrderProduct->getMeta('ticket_id', false, 0)) > 0) {
for ($amount_index = 0; $amount_index < $oOrderProduct->getAmount(); $amount_index++) {
$oTicketBooking = TicketBooking::getInstanceByBookingKey(TicketBooking::encodeBookingKey($oOrderProduct->getId(), $amount_index));
$data[] = $oTicketBooking->toJSON();
}
}
}
?>
 
<?php echo wpsg_drawForm_AdminboxStart(__('Ticketbuchungen', 'wpsg')); ?>
<div id="order_view_app">
<table>
<thead>
<tr>
<th class="col_ticket"><?php echo __('Ticket', 'wpsg'); ?></th>
<th class="col_product"><?php echo __('Ticket Produkt', 'wpsg'); ?></th>
<th class="col_date"><?php echo __('Datum / Zeitraum', 'wpsg'); ?></th>
<th class="col_state"><?php echo __('Status', 'wpsg'); ?></th>
</tr>
</thead>
<tbody v-for="(row, i) in data">
<tr>
<td class="col_ticket">
<a :href="row.urls.pdf" target="_blank">{{row.label}}</a>
</td>
<td class="col_product">
<a :href="row.urls.product_edit">{{row.ticket_product_label}}</a>
</td>
<td class="col_date">{{row.ticket_data.label}}</td>
<td class="col_state">
<span :class="{'text-red': row.state_code === <?php echo TicketBooking::STATUS_UNAVAILABLE; ?>, 'text-green': row.state_code === <?php echo TicketBooking::STATUS_AVAILABLE; ?>}">{{row.state_label}}</span>
<span v-if="row.is_send" :title="row.is_send_tooltip" class="ml-4 glyphicon glyphicon-send text-green"></span>
</td>
</tr>
<template v-if="row.arProductVars.length > 0">
<template v-for="(pv_data, pv_id) of row.arProductVars">
<tr>
<td colspan="2">
{{pv_data['name']}}:
</td>
<td colspan="2">
{{pv_data['value']}}
</td>
</tr>
</template>
</template>
</tbody>
</table>
<br />
<div class="flex items-center gap-2">
<a href="<?php echo \add_query_arg([
'action' => 'wpsg_ticket',
'ticket_action' => 'export',
'order_id' => $oOrder->getId()
], \admin_url('admin-ajax.php')); ?>" target="_blank" class="button"><?php echo __('Terminübersicht exportieren', 'wpsg'); ?></a>
<a href="<?php echo \add_query_arg([
'action' => 'wpsg_ticket',
'ticket_action' => 'resend',
'order_id' => $oOrder->getId()
], \admin_url('admin-ajax.php')); ?>" class="button"><?php echo __('Tickets per E-Mail an Kunden versenden', 'wpsg'); ?></a>
</div>
</div>
<style>
#order_view_app table { width:100%; }
#order_view_app table tr td { padding:0.25rem 0.5rem 0.25rem 0; border-bottom:1px solid #DEDEDE; }
#order_view_app table tr th { border-bottom:1px solid black; }
#order_view_app .text-red { color:red; }
#order_view_app .text-green { color:green; }
#order_view_app .flex { display:flex; }
#order_view_app .items-center { align-items:center; }
#order_view_app .ml-4 { margin-left:1rem; }
#order_view_app .gap-2 { gap:0.5rem; }
</style>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
<script type="module">
const wpsgSettings = {
baseUrl: '<?php echo WPSG_URL; ?>'
};
import { order_view } from '<?php echo WPSG_URL; ?>mods/mod_ticket/assets/js/wpsg_order_view.js';
order_view(wpsgSettings, <?php echo json_encode([
'order_id' => $oOrder->getId(),
'data' => $data,
'ajax_url' => \admin_url('admin-ajax.php')
]); ?>);
</script>
/mods/mod_ticket/order_view_row.phtml
0,0 → 1,41
<?php
 
/**
* Anzeige des Variantennamens in der Bestellverwaltung
*/
 
namespace wpsgTicket;
$i = $this->view['i'];
$p = $this->view['p'];
 
/** @var Ticket $oTicket */
$oTicket = $this->view['oTicket'];
/** @var \wpsg_order_product $oOrderProduct */
$oOrderProduct = $this->view['oOrderProduct'];
?>
 
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_cell_name">
<?php echo __('Datum', 'wpsg'); ?>:
</td>
<td class="wpsg_cell_ticket text-right" colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
<?php echo $oTicket->getLabel(); ?>
</td>
</tr>
<tr class="wpsg_<?php echo (($i % 2 == 0)?'odd':'even'); ?>">
<td class="wpsg_cell_name">
<?php if ($p['amount'] > 1) { ?>
<?php echo __('Tickets', 'wpsg'); ?>:
<?php } else { ?>
<?php echo __('Ticket', 'wpsg'); ?>:
<?php } ?>
</td>
<td class="wpsg_cell_ticket text-right" colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?4:3); ?>">
<?php for ($i = 0; $i < $p['amount']; $i ++) { ?>
<a target="_blank" href="<?php echo $oTicket->getTicketPublicURL($oOrderProduct->getId(), $i); ?>">Ticket #<?php echo $i + 1; ?></a>
<?php } ?>
</td>
</tr>
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/mods/mod_ticket/product_addedit_content.phtml
0,0 → 1,526
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 14.10.23
* @time: 07:56
*/
namespace wpsgTicket;
$oProduct = \wpsg_product::getInstance($this->view['data']['id']);
\wpsg_drawForm_AdminboxStart(__('Ticketprodukt', 'wpsg'));
$arTicketTemplate = [];
foreach (TicketTemplate::find([], null, true) as $oTicketTemplate) $arTicketTemplate[$oTicketTemplate->getId()] = $oTicketTemplate->getLabel();
?>
 
<script type="module">
import { product_addedit_content } from '<?php echo WPSG_URL; ?>mods/mod_ticket/assets/js/wpsg_ticket.js';
const wpsgSettings = {
baseUrl: '<?php echo WPSG_URL; ?>'
};
product_addedit_content(wpsgSettings, <?php echo $oProduct->getId(); ?>, '<?php echo \admin_url('admin-ajax.php'); ?>');
</script>
 
<?php echo wpsg_drawForm_Checkbox('meta[ticket_product]', __('Produkt ist ein Ticket Produkt', 'wpsg'), $oProduct->getMeta('ticket_product', false, '0')); ?>
 
<hr />
 
<div id="wpsg_ticket_product" style="display:none;">
<?php echo wpsg_drawForm_Select('meta[ticket_template]', __('Ticket Template', 'wpsg'), $arTicketTemplate, $oProduct->getMeta('ticket_template', false, '0')); ?>
<template v-if="mounted">
<br />
<div class="flex justify-between">
<div class="flex gap-2 items-center">
<a href="#" @click.prevent="addSerialevent" class="button"><?php echo __('Neuen Serientermin definieren', 'wpsg'); ?></a>
<a href="#" @click.prevent="addEvent" class="button"><?php echo __('Neuen Einzeltermin anlegen', 'wpsg'); ?></a>
<a href="<?php echo \add_query_arg([
'action' => 'wpsg_ticket',
'ticket_action' => 'export',
'ticket_product_id' => $oProduct->getId()
], \admin_url('admin-ajax.php')); ?>" target="_blank" class="button"><?php echo __('Terminübersicht exportieren', 'wpsg'); ?></a>
</div>
<a href="/wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_ticket"><?php echo __('Zur Modulkonfiguration', 'wpsg'); ?></a>
</div>
<br />
<div class="nav nav-tabs">
<li :class="{'active': tab === 2}"><a @click.prevent="tab = 2" href="#"><?php echo __('Serientermine', 'wpsg'); ?></a></li>
<li :class="{'active': tab === 1}"><a @click.prevent="tab = 1" href="#"><?php echo __('Termine', 'wpsg'); ?></a></li>
<li :class="{'active': tab === 3}"><a @click.prevent="tab = 3" href="#"><?php echo __('Belegungsansicht', 'wpsg'); ?></a></li>
</div>
<div class="tab-content">
<div v-if="tab === 1" class="ticket_list">
<div class="head">
<div class="tablenav">
<div class="flex justify-between items-center grow pr-4">
<label>
<input type="checkbox" v-model="data.filter.hideInactive" @change="reload" /><span><?php echo __('Nur buchbare Termine anzeigen', 'wpsg'); ?></span>
</label>
<select style="width:200px;" v-if="data_serial.items.length > 0" v-model.number="data.filter.autoticket_id" @change="load()">
<option :value="0"><?php echo __('Alle', 'wpsg'); ?></option>
<template v-for="(st, i) of data_serial.items">
<option :value="st.id">{{st.label}}</option>
</template>
</select>
</div>
<span class="tablenav-pages" v-if="data.pager.count > 0">
<span class="displaying-num">{{data.pager.count}} Tickets</span>
<span class="pagination-links">
<a href="#" @click.prevent="goPage(1)" class="tablenav-pages-navspan button" :class="{'disabled': data.pager.page <= 1}">«</a>
<a href="#" @click.prevent="goPage(data.pager.page - 1)" class="tablenav-pages-navspan button" :class="{'disabled': data.pager.page <= 1}">‹</a>
<span class="paging-input">
<span class="tablenav-paging-text">
<span class="total-pages">{{data.pager.page}}</span>
&nbsp;von&nbsp;
<span class="total-pages">{{data.pager.pages}}</span>
</span>
</span>
<a href="#" @click.prevent="goPage(data.pager.page + 1)" class="next-page button" :class="{'disabled': data.pager.page >= data.pager.pages}">›</a>
<a href="#" @click.prevent="goPage(data.pager.pages)" class="last-page button" :class="{'disabled': data.pager.page >= data.pager.pages}">»</a>
</span>
</span>
</div>
</div>
<div class="content" v-if="data.items.length > 0">
<table>
<thead>
<tr>
<th class="col_date"><?php echo __('Datum', 'wpsg'); ?></th>
<th class="col_order"><?php echo __('Bestellungen', 'wpsg'); ?></th>
<th class="col_slots"><?php echo __('Slots', 'wpsg'); ?></th>
<th class="col_state"><?php echo __('Status', 'wpsg'); ?></th>
</tr>
</thead>
<tbody v-for="(t, i) of data.items">
<tr>
<td class="col_date">{{t.label}}</td>
<td class="col_order"></td>
<td class="col_slots">
{{t.slots_used}} / {{t.slots}}
</td>
<td class="col_state">
<div class="inner">
<span v-if="t.state === 1" class="active"><?php echo __('aktiv', 'wpsg'); ?></span>
<span v-else-if="t.state === 2" class="inactive"><?php echo __('inaktiv', 'wpsg'); ?></span>
<span> / </span>
<span v-if="t.booking_state === 1" class="text-green"><?php echo __('buchbar', 'wpsg'); ?></span>
<span v-else-if="t.booking_state === 2" class="text-red">
<span v-if="t.slots_used >= t.slots_available">
<?php echo __('ausgebucht', 'wpsg'); ?>
</span>
<span v-else>
<?php echo __('ausgelaufen', 'wpsg'); ?>
</span>
</span>
</div>
</td>
</tr>
<tr>
<td class="col_action">
<div class="inner">
<a href="#" @click.prevent="changeTerminState(t)">
<span v-if="t.state === 1"><?php echo __('deaktivieren', 'wpsg'); ?></span>
<span v-else-if="t.state === 2"><?php echo __('aktivieren', 'wpsg'); ?></span>
</a>
<span> | </span>
<a href="#" @click.prevent="deleteTicket(t)"><?php echo __('löschen', 'wpsg'); ?></a>
</div>
</td>
<td class="col_order" colspan="2">
<template v-if="t.order.length > 10">
{{t.order.length}} Bestellungen
</template>
<span v-else class="flex flex-wrap gap-4">
<span v-for="(o, i2) of t.order"><a :href="o.order_link">{{o.order_nr}}</a> ({{o.amount}})</span>
</span>
</td>
<td>
<template v-if="t.autoticket_id > 0">
<a title="<?php echo __('Termine dieses Serientermins anzeigen', 'wpsg'); ?>" href="#" @click.prevent="display_autoTermin(t.autoticket_id)"><?php echo __('Serientermin'); ?> #{{t.autoticket_id}}</a>
</template>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div v-if="tab === 2" class="ticket_serial ticket_list">
<div class="head">
<div class="tablenav">
<div></div>
<span class="tablenav-pages" v-if="data_serial.pager.count > 0">
<span class="displaying-num">{{data_serial.pager.count}} Serientermine</span>
<span class="pagination-links">
<a href="#" @click.prevent="goSerialPage(1)" class="tablenav-pages-navspan button" :class="{'disabled': data_serial.pager.page <= 1}">«</a>
<a href="#" @click.prevent="goSerialPage(data_serial.pager.page - 1)" class="tablenav-pages-navspan button" :class="{'disabled': data_serial.pager.page <= 1}">‹</a>
<span class="paging-input">
<span class="tablenav-paging-text">
<span class="total-pages">{{data_serial.pager.page}}</span>
&nbsp;von&nbsp;
<span class="total-pages">{{data_serial.pager.pages}}</span>
</span>
</span>
<a href="#" @click.prevent="goSerialPage(data_serial.pager.page + 1)" class="next-page button" :class="{'disabled': data_serial.pager.page >= data_serial.pager.pages}">›</a>
<a href="#" @click.prevent="goSerialPage(data_serial.pager.pages)" class="last-page button" :class="{'disabled': data_serial.pager.page >= data_serial.pager.pages}">»</a>
</span>
</span>
</div>
</div>
<div class="content" v-if="data_serial.items.length > 0">
<table>
<thead>
<tr>
<th class="col_date"><?php echo __('Datum', 'wpsg'); ?></th>
<th class="col_tickets"><?php echo __('Termine', 'wpsg'); ?></th>
<th class="col_state"><?php echo __('Status', 'wpsg'); ?></th>
</tr>
</thead>
<tbody v-for="(t, i) of data_serial.items">
<tr>
<td class="col_date">
<a href="#" title="<?php echo __('Termine dieses Serientermins anzeigen', 'wpsg'); ?>" @click.prevent="display_autoTermin(t.id)">{{t.label}}</a>
</td>
<td class="col_tickets">{{t.count_tickets}}</td>
<td class="col_state">
<div class="inner">
<span v-if="t.state === 1" class="active"><?php echo __('aktiv', 'wpsg'); ?></span>
<span v-else-if="t.state === 2" class="inactive"><?php echo __('inaktiv', 'wpsg'); ?></span>
</div>
</td>
</tr>
<tr>
<td class="col_action">
<div class="inner">
<a href="#" @click.prevent="editTicket(t)">
<?php echo __('bearbeiten', 'wpsg'); ?>
</a>
<span> | </span>
<a href="#" @click.prevent="changeTerminState(t)">
<span v-if="t.state === 1"><?php echo __('deaktivieren', 'wpsg'); ?></span>
<span v-else-if="t.state === 2"><?php echo __('aktivieren', 'wpsg'); ?></span>
</a>
<span> | </span>
<a href="#" @click.prevent="deleteTicket(t)"><?php echo __('löschen', 'wpsg'); ?></a>
</div>
</td>
<td class="col_order" colspan="2">
<template v-if="t.order.length > 10">
{{t.order.length}} Bestellungen
</template>
<span v-else class="flex flex-wrap gap-4">
<span v-for="(o, i2) of t.order"><a :href="o.order_link">{{o.order_nr}}</a> ({{o.amount}})</span>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div v-if="tab === 3" class="ticket_cal relative">
<div class="flex">
<div id="calendar" ref="ref_calendar"></div>
<div v-if="arOccupancy && day_selected" class="occupancy_view">
<template v-for="(t, i) of arOccupancy[day_selected].arTicket">
<h3>
<span><?php echo __('Ticket', 'wpsg'); ?> #{{t.id}} {{t.label}}</span>
<span>{{t.slots}} <?php echo __('Slots', 'wpsg'); ?></span>
</h3>
<ul>
<template v-for="(o, j) of t.order">
<li>
<a :href="o.order_link"><?php echo __('Bestellung', 'wpsg'); ?> {{o.order_nr}} / {{o.order_invoice_name}}</a>
<span>{{o.amount}} <?php echo __('Slots', 'wpsg'); ?></span>
</li>
</template>
</ul>
</template>
</div>
</div>
<div v-if="cal_loading" class="loading_layer">
<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />
</div>
</div>
</div>
<div class="dialog" v-if="dialog_add">
<form class="inner" @submit.stop.prevent="dialog_submit">
<div class="head">
<span><?php echo __('Neue Termine', 'wpsg'); ?></span>
<a href="#" @click.prevent="closeDialog">X</a>
</div>
<div class="content">
<div class="form_col">
<div class="form_field">
<label>
<?php echo __('Start', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center">
<input type="date" v-model="dialog_add.from_date" required="required" />
<input type="time" v-model="dialog_add.from_time" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Ende', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center">
<input type="date" v-model="dialog_add.to_date" />
<input type="time" v-model="dialog_add.to_time" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Anzahl Slots', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center">
<input type="number" min="1" max="100" v-model="dialog_add.slots" />
</div>
</div>
<p style="max-width:500px; padding-top:1rem;">
<?php echo __('Ein Termin kann so oft gebucht/bestellt werden wie freie Slots verfügbar sind und er in der Zukunft liegt. Ein Termin kann über mehrere Tage gehen, dann wird der gesammte Zeitraum gebucht. Wird eine Startzeit angegeben, muss auch eine Endzeit angegeben werden', 'wpsg'); ?>
</p>
</div>
</div>
<div class="foot">
<input type="submit" class="button button-primary" value="<?php echo __('Termin anlegen', 'wpsg'); ?>" />
</div>
</form>
</div>
<div class="dialog" v-if="serial">
<form class="inner" @submit.stop.prevent="submitSerial">
<div class="head">
<span v-if="serial.id > 0"><?php echo __('Serientermin bearbeiten', 'wpsg'); ?></span>
<span v-else><?php echo __('Neuen Serientermin definieren', 'wpsg'); ?></span>
<a href="#" @click.prevent="closeSerialDialog">X</a>
</div>
<div class="content">
<div class="form_col">
<div class="form_field">
<label><?php echo __('Bezeichnung (optional)', 'wpsg'); ?></label>
<div>
<input type="text" v-model="serial.label" style="width:275px;" />
</div>
</div>
<div class="form_field">
<label><?php echo __('Kurztext (Kalender)', 'wpsg'); ?></label>
<div>
<input type="text" v-model="serial.label_short" style="width:275px;" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Zeitraum', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center justify-between grow">
<input type="date" v-model="serial.from_date" required style="width:125px;" />
<span>-</span>
<input type="date" v-model="serial.to_date" required style="width:125px;" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Uhrzeit (optional)', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center justify-between grow">
<input type="time" v-model="serial.event_data.from_time" style="width:125px;" />
<span>-</span>
<input type="time" v-model="serial.event_data.to_time" style="width:125px;" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Slots', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center">
<input type="number" v-model.number="serial.event_data.slots" style="width:275px;" />
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Tage im voraus planen', 'wpsg'); ?>
</label>
<div class="flex gap-2 items-center">
<select v-model.number="serial.days_future" class="w-full" style="width:275px;">
<option value="30">30</option>
<option value="60">60</option>
<option value="90">90</option>
</select>
</div>
</div>
<div class="form_field">
<label>
<?php echo __('Wochentage', 'wpsg'); ?>
</label>
<div class="weekday_wrap">
<label v-for="i in 7">
<div>
<template v-if="i === 1">Mo</template>
<template v-if="i === 2">Die</template>
<template v-if="i === 3">Mi</template>
<template v-if="i === 4">Do</template>
<template v-if="i === 5">Fr</template>
<template v-if="i === 6">Sa</template>
<template v-if="i === 7">So</template>
</div>
<div>
<input type="checkbox" @change="setWeekDay($event, i - 1)" :checked="serial.days.includes(i - 1)" />
</div>
</label>
</div>
</div>
<div v-if="serial.id > 0">
<br />
<?php echo __('Eine Bearbeitung des Serientermins wirkt sich nur auf', 'wpsg'); ?><br />
<?php echo __('zukünftige Termine dieses Serientermins aus.', 'wpsg'); ?>
</div>
</div>
</div>
<div class="foot">
<input v-if="serial.id > 0" type="submit" class="button button-primary" value="<?php echo __('Serientermin speichen', 'wpsg'); ?>" />
<input v-else type="submit" class="button button-primary" value="<?php echo __('Serientermin + Termine anlegen', 'wpsg'); ?>" />
</div>
</form>
</div>
<div v-if="loading" class="loading_layer">
<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />
</div>
</template>
</div>
 
<style>
#wpsg_ticket_product .occupancy_view { padding-left:2rem; flex-grow:1;
h3 { padding:0; display:flex; justify-content:space-between; align-items:flex-start; margin:1.5rem 0 1rem 0;
* { font-size:14px; font-weight:bold; line-height:1.5rem; }
}
ul { padding-left:1.5rem; font-size:14px;
li { list-style:disc; display:flex; align-items:flex-start; justify-content:space-between; position:relative;
&:before { content:'-'; position:absolute; margin-left:-1rem; }
}
}
pre { white-space:break-spaces; }
}
#wpsg_ticket_product .flex { display:flex; }
#wpsg_ticket_product .items-center { align-items:center; }
#wpsg_ticket_product .justify-between { justify-content:space-between; }
#wpsg_ticket_product .grow { flex-grow:1; }
#wpsg_ticket_product .pr-4 { padding-right:1rem; }
#wpsg_ticket_product label { margin-bottom:0; }
#wpsg_ticket_product .dialog { position:fixed; left:0; top:0; height:100dvh; width:100dvw; background-color:rgba(0, 0, 0, 0.75); z-index:99999; display:flex; justify-content:center; align-items:center; }
#wpsg_ticket_product .dialog > .inner { background-color:white; border:1px solid black; min-width:500px; min-height:275px; display:flex; flex-direction:column; }
#wpsg_ticket_product .dialog > .inner > .head { padding:1rem 2rem; border-bottom:1px solid black; font-weight:bold; font-size:1em; display:flex; align-items:center; justify-content:space-between; }
#wpsg_ticket_product .dialog > .inner > .head a { color:black; font-weight:bold; font-size:1.5em; }
#wpsg_ticket_product .dialog > .inner > .head a:hover { text-decoration:none !important; }
#wpsg_ticket_product .dialog > .inner > .content { padding:1rem 2rem; flex-grow:1; }
#wpsg_ticket_product .dialog > .inner > .foot { padding:1rem 2rem; }
#wpsg_ticket_product .dialog > .inner .form_field { display:flex; align-items:center; justify-content:flex-start; }
#wpsg_ticket_product .dialog > .inner .form_field label { width:200px; }
#wpsg_ticket_product .dialog > .inner .form_col { display:flex; flex-direction:column; gap:0.5rem; }
#wpsg_ticket_product .ticket_list { display:flex; flex-direction:column; }
#wpsg_ticket_product .ticket_list .head .tablenav { display:flex; justify-content:space-between; align-items:center; padding-top:0;}
#wpsg_ticket_product .ticket_list .head .tablenav label { display:flex; justify-content:flex-start; align-items:center; gap:0.5rem; font-weight:normal; }
#wpsg_ticket_product .ticket_list .head .tablenav label input { margin:0; }
#wpsg_ticket_product .ticket_list .head .tablenav-pages { display:flex; align-items:center; justify-content:flex-start; margin:0; }
#wpsg_ticket_product .ticket_list .head .pagination-links { display:flex; align-items:center; justify-content:flex-start; gap:0.5rem; }
#wpsg_ticket_product .ticket_list .content { border:1px solid #c3c4c7; padding:0; }
#wpsg_ticket_product .ticket_list .content table { width:100%; }
#wpsg_ticket_product .ticket_list .content table thead tr th { border-bottom:1px solid #c3c4c7; }
#wpsg_ticket_product .ticket_list .content table > * > tr > * { padding:3px 5px 0px 5px; text-align:center; }
#wpsg_ticket_product .ticket_list .content table > * > tr > *:first-child { text-align:left; }
#wpsg_ticket_product .ticket_list .content table > * > tr > *:last-child { text-align:right; }
#wpsg_ticket_product .ticket_list .content table > * > tr > .col_action { padding-top:0; padding-bottom:3px; }
#wpsg_ticket_product .ticket_list .content table > * > tr > .col_action > .inner { display:flex; gap:0.5rem; justify-content:flex-start; align-items:center; flex-wrap:wrap; }
#wpsg_ticket_product .ticket_list .content table > * > tr > .col_date { width:250px; }
#wpsg_ticket_product .ticket_list .content table > * > tr > .col_order { text-align:left; padding-bottom:3px; }
#wpsg_ticket_product .ticket_list .content table > * > tr > .col_state .inner { display:flex; justify-content:flex-end; align-items:center; gap:0.5rem; }
#wpsg_ticket_product .ticket_list .content table > *:nth-child(even) > tr > * { background-color:#f6f7f7; }
#wpsg_ticket_product .ticket_list .content table .inactive,
#wpsg_ticket_product .text-red { color:red; }
#wpsg_ticket_product .ticket_list .content table .active,
#wpsg_ticket_product .text-green { color:green; }
#wpsg_ticket_product .flex { display:flex; }
#wpsg_ticket_product .grow { flex-grow:1; }
#wpsg_ticket_product .flex-wrap { flex-wrap:wrap; }
#wpsg_ticket_product .gap-2 { gap:0.5rem; }
#wpsg_ticket_product .gap-4 { gap:1rem; }
#wpsg_ticket_product .relative { position:relative; }
#wpsg_ticket_product { position:relative; padding:1rem 0; }
#wpsg_ticket_product .loading_layer { position:absolute; left:0; top:0; width:100%; height:100%; transition:all 0.1s; display:flex; align-items:center; justify-content:center; background-color:rgba(255, 255, 255, 0.75); }
#wpsg_ticket_product .ticket_cal { all:initial !important; font-family:'Arial' !important; }
#wpsg_ticket_product .ticket_cal * { font-family:'Arial' !important; }
#wpsg_ticket_product .ticket_cal .vanilla-calendar-week__day { font-size:12px !important; }
#wpsg_ticket_product .vanilla-calendar-month,
#wpsg_ticket_product .vanilla-calendar-year { font-size:14px !important; font-family:'Arial' !important; }
#wpsg_ticket_product .vanilla-calendar-days { column-gap:15px; }
#wpsg_ticket_product .vanilla-calendar-days { row-gap:0.5rem; }
#wpsg_ticket_product .vanilla-calendar-day__btn { font-size:1rem; }
#wpsg_ticket_product .vanilla-calendar-day__btn:not(.vanilla-calendar-day__btn_disabled) { background-color:#fde047; color:black; }
#wpsg_ticket_product .vanilla-calendar-day__btn.full { background-color:green; color:white; }
#wpsg_ticket_product .weekday_wrap { display:flex; flex-grow:1; justify-content:space-between; align-items:flex-start; }
#wpsg_ticket_product .weekday_wrap > label { display:flex; flex-direction:column; gap:0.125rem; width:initial !important; margin-bottom:0 !important; }
</style>
 
<script>
const el_ticket_product = document.getElementById('metaticket_product');
const el_wpsg_ticket_product = document.getElementById('wpsg_ticket_product');
const el_basket_multiple = document.getElementById('basket_multiple');
el_ticket_product.addEventListener('change', (event) => {
if (event.target.checked) {
 
el_basket_multiple.disabled = true;
el_basket_multiple.selectedIndex = 2;
wpsg_ticket_product.style.display = 'block';
} else {
el_basket_multiple.disabled = false;
wpsg_ticket_product.style.display = 'none';
}
});
el_ticket_product.dispatchEvent(new Event('change'));
</script>
 
<?php
\wpsg_drawForm_AdminboxEnd();
/mods/mod_ticket/produkttemplate.phtml
0,0 → 1,255
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 21.10.23
* @time: 15:42
*/
namespace wpsgTicket;
/** @var \wpsg_product $oProduct */
$oProduct = $this->view['oProduct'];
$product_key = $this->view['data']['product_key'];
/** @var TicketProduct $oTicketProduct */
$oTicketProduct = TicketProduct::getInstance($oProduct->getId());
TicketProduct::$enqueTicket = true;
$arTicket = $oTicketProduct->getAvailableTickets();
if (sizeof($arTicket) <= 0) { wpsg_debug(__('Keine Tickets verfügbar', 'wpsg')); return; }
$arProductVars = false;
if ($this->hasMod('wpsg_mod_productvars')) {
$arProductVars = array_values($this->callMod('wpsg_mod_productvars', 'getAllProductVars', [$oTicketProduct->getProductId()]));
foreach ($arProductVars as $k => $v) $arProductVars[$k]['value'] = '';
}
$json_data = [
'template_index' => $this->getTemplateIndex(),
'ajax_url' => \admin_url('admin-ajax.php'),
'product_id' => $oProduct->getId(),
'product_key' => $product_key,
'price' => $oProduct->getPrice($product_key, \wpsg_ShopController::getShop()->getFrontendTaxview()),
'product_vars' => $arProductVars
];
if ($this->hasMod('wpsg_mod_productvariants')) {
if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProductKey', [$product_key])) {
$product_id = $this->getProduktID($product_key);
$json_data['vp_data'] = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$product_id, true, true, true]);
$json_data['vp_info'] = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$product_key]);
foreach ($json_data['vp_data'] as $k => $v) {
foreach ($v['arVariation'] as $k2 => $v2) {
$simulated_product_key = $this->callMod('wpsg_mod_productvariants', 'getSimulatedVariKey', array($this->view['data']['product_key'], $v['id'], $v2['variation_id']));
$attachmentID = $this->imagehandler->getAttachmentID($simulated_product_key);
$json_data['vp_data'][$k]['arVariation'][$k2]['img'] = \wp_get_attachment_image($attachmentID, 'thumbnail');
}
}
}
}
?>
 
<div class="wpsg_ticket_product">
<div style="display:none;" class="json_data"><?php echo base64_encode(json_encode($json_data)); ?></div>
<template v-if="mounted">
 
<div v-if="layer_msg" class="layer_msg">
<div class="inner">
<div class="msg">{{layer_msg}}</div>
<div class="button_wrap">
<a class="wp-element-button" href="#" @click.prevent="layer_msg = undefined;"><?php echo __('OK', 'wpsg'); ?></a>
<a class="wp-element-button" href="<?php echo \wpsg_ShopController::getShop()->getURL(\wpsg_ShopController::URL_BASKET); ?>"><?php echo __('Zum Warenkorb', 'wpsg'); ?></a>
</div>
</div>
</div>
<div class="wpsg_produkt wpsg_product_name">
<?php if (!$this->titleDisplayed) { ?>
<h1 class="wpsg_producttitle"><?php echo $oProduct->getProductName(); ?></h1>
<h2 class="wpsg_productdetailtitle"><?php echo $this->view['data']['detailname']; ?></h2>
<?php } ?>
<?php $this->callMods('product_top_afterheadline', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
</div>
<?php $this->callMods('product_top', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
<?php /* Block für die Produktbilder START */ ?>
<?php
/* Das ist das primäre Anzeigebild des Produktes (AttachmentID) */
$arAttachmentID = $this->imagehandler->getAttachmentID($this->view['data']['product_key']);
/* Array mit allen AttachmentIDs der Produktbilder */
$arAttachmentIDsAll = $this->imagehandler->getAttachmentIDs($this->view['data']['product_id']);
?>
<div class="product_top">
<?php if (sizeof($arAttachmentIDsAll) > 0) { ?>
<div class="wpsg_productimages">
<div class="wpsg_produkt_produktbilder">
<?php if (sizeof($arAttachmentIDsAll) > 0) { for ($i = 0; $i < sizeof($arAttachmentIDsAll); $i ++) { ?>
<?php /* URL für die Lightbox */ ?>
<?php $att = \wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(800, 600), false); ?>
<meta itemprop="image" content="<?php echo $att[0]; ?>" />
<a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> data-fslightbox="<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $oProduct->getProductName(); ?>" href="<?php echo $att[0]; ?>">
<?php echo \wp_get_attachment_image($arAttachmentIDsAll[$i], array(600, 600), false, array()); ?>
</a>
<?php } } ?>
</div>
</div>
<?php } ?>
<?php /* Block für die Produktbilder ENDE */ ?>
<div class="product_top_content">
 
<?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
<div class="wpsg_product_information_short">
<div class="wpsg_produkt_additional_information">
<div itemprop="description" class="wpsg_produkt_shortdescription">
<span><?php echo $this->view['data']['beschreibung']; ?></span>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
<?php if (strlen(trim($this->view['data']['longdescription'])) > 0) { ?>
<div class="wpsg_product_information_long">
<span><?php echo $this->view['data']['longdescription']; ?></span>
</div>
<?php } ?>
<div class="calendar_wrap">
<div ref="ref_calendar"></div>
</div>
<div v-if="data.product_vars" class="variant_wrap">
<template v-for="(pv, i) of data.product_vars">
<div class="variant_row">
<span>{{pv.name}}</span>
<span>
<template v-if="pv.typ === '1'"><!-- Auswahl -->
<select v-model="pv.value" :required="pv.pflicht === '1'" :name="'wpsg_mod_productvars[' + pv.id + ']'">
<option value=""><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
<option v-for="(option, i) of pv.auswahl.split('|')" :value="option">
{{option}}
</option>
</select>
</template>
<template v-else-if="pv.typ === '2'"><!-- Textzeile -->
<input type="text" v-model="pv.value" :required="pv.pflicht === '1'" :name="'wpsg_mod_productvars[' + pv.id + ']'" />
</template>
<template v-else-if="pv.typ === '4'"><!-- Textfeld -->
<textarea v-model="pv.value" :required="pv.pflicht === '1'" :name="'wpsg_mod_productvars[' + pv.id + ']'"></textarea>
</template>
<template v-else-if="pv.typ === '3'"><!-- Checkbox -->
<input type="checkbox" value="1" v-model="pv.value" :required="pv.pflicht === '1'" :name="'wpsg_mod_productvars[' + pv.id + ']'" />
</template>
</span>
</div>
</template>
</div>
<div v-if="data.vp_data" class="variant_wrap">
<template v-for="(vp, i) of data.vp_data">
<div v-if="(vp.deleted + vp.count_variation) !== 1" class="variant_row">
<span>{{vp.name}}</span>
<span>
<select v-if="vp.type == '<?php echo \wpsg_mod_productvariants::TYPE_SELECT; ?>'" @change="setVari(vp.id, $event.target.value)">
<template v-for="(o, j) of vp.arVariation">
<option v-if="o.active" :value="o.variation_id" :checked="((data.vp_info[vp.id]['vari_id'] === o.id)?'checked':'')">
{{o.name}} <?php if ($this->get_option('wpsg_mod_productvariants_price') === '1') { ?>(+ {{ff(o.price)}} <?php echo $this->get_option('wpsg_currency'); ?>)<?php } ?>
</option>
</template>
</select>
<div v-else-if="vp.type == '<?php echo \wpsg_mod_productvariants::TYPE_RADIO; ?>'" class="radio_wrap">
<template v-for="(o, j) of vp.arVariation">
<label class="radio" v-if="o.active">
<input type="radio" :value="o.variation_id" :name="vp.id + 'radio'" v-if="data.vp_info[vp.id]['vari_id'] === o.id" checked="checked" />
<input v-else type="radio" :value="o.id" :name="vp.id + 'radio'" @change.prevent="setVari(vp.id, o.id)" />
<span>{{o.name}} <?php if ($this->get_option('wpsg_mod_productvariants_price') === '1') { ?>(+ {{ff(o.price)}} <?php echo $this->get_option('wpsg_currency'); ?>)<?php } ?></span>
</label>
</template>
</div>
<div v-else-if="vp.type == '<?php echo \wpsg_mod_productvariants::TYPE_IMAGE; ?>'" class="image_wrap">
<template v-for="(o, j) of vp.arVariation">
<div class="image" v-if="o.active" :class="{'act': o.set}" @click="setVari(vp.id, o.variation_id)">
<div v-html="o.img"></div>
</div>
</template>
</div>
</span>
</div>
</template>
</div>
<div class="no_event" v-if="ticket === undefined">
<?php echo __('Bitte einen Termin im Kalender wählen.', 'wpsg'); ?>
</div>
<template v-else>
<div class="mt-8 flex justify-between items-center">
<div>
<strong><?php echo __('Ausgewählter Termin: ', 'wpsg'); ?></strong>{{ticket.label}}
</div>
<div>
<?php if ($this->view['oProduct']->canDisplayPrice()) { ?>
<span class="price">{{ff(data.price)}} <?php echo $this->get_option('wpsg_currency'); ?></span>
<?php } ?>
</div>
</div>
<div class="ticket_selection">
<span>
<input v-if="ticket.slots !== 1" type="number" min="1" :max="ticket.slots" v-model="ticket.amount" />
</span>
<button type="submit" class="wp-element-button" :class="computedButtonClass">
{{computedButtonText}}
</button>
</div>
</template>
<div v-if="loading" class="loading_layer">
<!--<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />-->
</div>
</template>
</div>
/mods/mod_ticket/qrScanner.phtml
0,0 → 1,221
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 13.11.23
* @time: 19:11
*/
namespace wpsgTicket;
?>
 
<div id="qr_scanner_app" style="display:none; padding-right:2rem; padding-top:2rem; max-height:400px;">
<div id="reader" style="width:500px;"></div>
<div id="ticket_dialog" v-if="ticket_dialog">
<div class="inner">
<div v-if="ticket_dialog.loading" class="loading_layer">
<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />
</div>
<div class="head">
<div class="flex justify-between items-center">
<div class="flex items-center justify-start">
TicketBuchung #{{ticket_dialog.booking_id}}
<div class="button_wrap">
<a @click="ticket_dialog.tab = 1" :class="{'active': ticket_dialog.tab === 1}"><?php echo __('Informationen', 'wpsg'); ?></a>
<a @click="ticket_dialog.tab = 2" :class="{'active': ticket_dialog.tab === 2}"><?php echo __('Protokoll', 'wpsg'); ?></a>
<a :href="ticket_dialog.urls.pdf" target="_blank"><?php echo __('PDF', 'wpsg'); ?></a>
<!--<a @click="ticket_dialog.tab = 3" :class="{'active': ticket_dialog.tab === 3}"><?php echo __('RAW', 'wpsg'); ?></a>-->
</div>
</div>
<div class="flex flex-items-center justify-end">
<div :class="'state ' + 'state' + ticket_dialog.state_code">
{{ticket_dialog.state_label}}
</div>
<a @click.prevent="hideDialg">X</a>
</div>
</div>
</div>
<div class="content">
<template v-if="ticket_dialog.tab === 1">
<div class="grid-cols-2 grid">
<div>
<div class="form_row">
<div class="form_label"><?php echo __('Ticket-Produkt', 'wpsg'); ?></div>
<div class="form_value">
<a :href="ticket_dialog.urls.product_edit">{{ticket_dialog.ticket_product_label}}</a>
</div>
</div>
<div class="form_row">
<div class="form_label"><?php echo __('Datum/Zeitraum', 'wpsg'); ?></div>
<div class="form_value" :class="{'text-red': ticket_dialog.time_raised}">{{ticket_dialog.ticket_data.label}}</div>
</div>
<div class="form_row">
<div class="form_label"><?php echo __('Kaufpreis', 'wpsg'); ?></div>
<div class="form_value">{{ticket_dialog.order_product_price_ff}}</div>
</div>
</div>
<div>
<div class="form_row">
<div class="form_label"><?php echo __('Bestellnummer', 'wpsg'); ?></div>
<div class="form_value">
<a :href="ticket_dialog.urls.order_edit">{{ticket_dialog.order_nr}}</a>
</div>
</div>
<div class="form_row">
<div class="form_label"><?php echo __('Bestellstatus', 'wpsg'); ?></div>
<div class="form_value" :class="{
'text-red': !ticket_dialog.wpsg_mod_ticket_orderstate_active.includes(ticket_dialog.order_state),
'text-green': ticket_dialog.wpsg_mod_ticket_orderstate_active.includes(ticket_dialog.order_state)
}">{{ticket_dialog.order_state_label}}</div>
</div>
<div class="form_row">
<div class="form_label"><?php echo __('Käufer', 'wpsg'); ?></div>
<div class="form_value">{{ticket_dialog.order_title}} {{ticket_dialog.order_firstname}} {{ticket_dialog.order_lastname}}</div>
</div>
</div>
</div>
<br />
<div class="form_row form_row_1_4">
<div class="form_label"><?php echo __('Ticket-Status', 'wpsg'); ?></div>
<div class="form_value">
<span class="text-red" v-if="ticket_dialog.state_code === <?php echo TicketBooking::STATUS_UNAVAILABLE; ?>">
{{ticket_dialog.revoke_text}}
</span>
<span class="text-green" v-if="ticket_dialog.state_code === <?php echo TicketBooking::STATUS_AVAILABLE; ?>">
<?php echo __('Gültig', 'wpsg'); ?>
</span>
</div>
</div>
<br />
<div v-if="ticket_dialog.sibling.length > 0">
<strong><?php echo __('Zusammengkaufte Tickets', 'wpsg'); ?> ({{ticket_dialog.sibling.length}} Stück)</strong>
<table>
<thead>
<tr>
<td><?php echo __('Buchung', 'wpsg'); ?></td>
<td><?php echo __('Datum/Zeitraum', 'wpsg'); ?></td>
<td class="col_ticket_state"><?php echo __('Ticket-Status', 'wpsg'); ?></td>
</tr>
</thead>
<tbody v-for="(ts, i) of ticket_dialog.sibling">
<tr>
<td><a @click.prevent="showTicket(ts.booking_id)" href="#">#{{ts.booking_id}}</a> <a :href="ts.urls.pdf" target="_blank">[<?php echo __('PDF', 'wpsg'); ?>]</a></td>
<td :class="{'text-red': ticket_dialog.time_raised}">{{ticket_dialog.ticket_data.label}}</td>
<td>
<span class="text-red" v-if="ts.state_code === <?php echo TicketBooking::STATUS_UNAVAILABLE; ?>">
<span v-if="ts.revoked">
<?php echo __('Entwertet', 'wpsg'); ?>
</span>
<template v-else>
<span v-if="ts.time_raised" class="text-red"><?php echo __('Ausgelaufen', 'wpsg'); ?></span>
<span v-else><?php echo __('Ungültig', 'wpsg'); ?></span>
</template>
</span>
<span class="text-green" v-if="ts.state_code === <?php echo TicketBooking::STATUS_AVAILABLE; ?>">
<?php echo __('Gültig', 'wpsg'); ?>
[<a v-if="ts.state_code === <?php echo TicketBooking::STATUS_AVAILABLE; ?>" href="#" @click="revokeBooking(ts.booking_id, false)" class="revokeBooking">entwerten</a>]
</span>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<div v-if="ticket_dialog.tab === 2">
<table>
<thead>
<tr>
<th><?php echo __('Datum/Zeit', 'wpsg'); ?></th>
<th><?php echo __('Benutzer', 'wpsg'); ?></th>
<th><?php echo __('Aktion', 'wpsg'); ?></th>
</tr>
</thead>
<tbody v-for="(l, i) of ticket_dialog.log">
<tr>
<td class="col_time">{{en_de_date_time(l.date_time)}}</td>
<td class="col_user">{{l.user_name}}</td>
<td>
<span class="text-green" v-if="l.log === <?php echo TicketBooking::LOG_SCAN; ?>"><?php echo __('gescannt', 'wpsg'); ?></span>
<span class="text-red" v-else-if="l.log === <?php echo TicketBooking::LOG_REVOKE; ?>"><?php echo __('entwertet', 'wpsg'); ?></span>
</td>
</tr>
</tbody>
</table>
</div>
<div v-if="ticket_dialog.tab === 3">
<pre>{{ticket_dialog}}</pre>
</div>
</div>
<div class="foot" v-if="ticket_dialog.state_code === 1">
<a href="#" @click="revokeBooking(ticket_dialog.booking_id)" v-if="ticket_dialog.state_code === 1" class="revokeBooking"><?php echo __('Ticket entwerten', 'wpsg'); ?></a>
</div>
</div>
</div>
</div>
 
<style>
#qr_scanner_app .flex { display:flex; }
#qr_scanner_app .grid { display:grid; }
#qr_scanner_app .text-red { color:red; }
#qr_scanner_app .justify-between { justify-content:space-between; }
#qr_scanner_app .justify-start { justify-content:flex-start; }
#qr_scanner_app .justify-end { justify-content:flex-end; }
#qr_scanner_app .items-center { align-items:center; }
#qr_scanner_app .text-green { color:green; }
#qr_scanner_app .text-red { color:red; }
#qr_scanner_app .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#ticket_dialog { position:fixed; left:0; top:0; width:100dvw; height:100dvh; display:flex; justify-content:center; align-items:center; z-index:10000; background-color:rgba(255, 255, 255, 0.95); }
#ticket_dialog > .inner { background-color:white; border:1px solid #003664; position:relative; }
#ticket_dialog > .inner .loading_layer { position:absolute; left:0; top:0; width:100%; height:100%; transition:all 0.1s; display:flex; align-items:center; justify-content:center; background-color:rgba(255, 255, 255, 0.75); }
#ticket_dialog > .inner > .head { border-bottom:1px solid #003664; padding:0.5rem 1rem; font-size:1.25em; font-weight:bold; color:white; background-color:#003664; }
#ticket_dialog > .inner > .head .button_wrap { font-size:0.75em; margin-left:1.5rem; display:flex; gap:0.5rem; align-items:center; }
#ticket_dialog > .inner > .head .button_wrap > a { border:1px solid white; display:block; padding:0.25rem 0.75rem; }
#ticket_dialog > .inner > .head .button_wrap > a.active { background-color:white; color:#003664; }
#ticket_dialog > .inner > .head .state { font-size:0.75em; border:1px solid white; display:flex; align-items:center; padding:0.25rem 0.75rem; margin-right:1.5rem; }
#ticket_dialog > .inner > .head .state2 { background-color:red; }
#ticket_dialog > .inner > .head .state1 { background-color:green; }
#ticket_dialog > .inner > .head a { color:#FFFFFF; cursor:pointer; }
#ticket_dialog > .inner > .head > a:hover { text-decoration:none; }
#ticket_dialog > .inner > .head > a { padding:0.5rem; display:inline-block; cursor:pointer; color:#003664; }
#ticket_dialog > .inner > .content { padding:1rem; width:50dvw; max-width:calc(100dvw - 60px); height:500px; max-height:calc(100dvh - 60px); overflow:auto; }
#ticket_dialog > .inner > .content .form_row { display:flex; padding:0.25rem 0; justify-content:space-between; }
#ticket_dialog > .inner > .content .form_row .form_label { }
#ticket_dialog > .inner > .content .form_row .form_value { width:50%; }
#ticket_dialog > .inner > .content .form_row_1_4 .form_value { width:75%; }
#ticket_dialog > .inner > .content table { width:100%; }
#ticket_dialog > .inner > .content table thead > tr > * { background-color:#003664; color:#FFFFFF; padding:0.25rem 0.5rem; }
#ticket_dialog > .inner > .content table tbody > tr > * { padding:0.25rem 0.5rem; }
#ticket_dialog > .inner > .content table tbody > tr:last-child > * { border-bottom:1px solid #333333; }
#ticket_dialog > .inner > .content table tr > *.col_time { width:130px; }
#ticket_dialog > .inner > .content table tr > *.col_user { width:250px; }
#ticket_dialog > .inner > .foot { border-top:1px solid #003664; padding:0.5rem 1rem; display:flex; justify-content:space-between; align-items:center; }
#ticket_dialog > .inner > .foot a { padding:0.25rem 0.75rem; background-color:green; border:1px solid #003664; color:#FFFFFF; }
#ticket_dialog .revokeBooking { }
#ticket_dialog .col_ticket_state { width:150px; }
</style>
 
<script src="<?php echo WPSG_URL; ?>mods/mod_ticket/assets/js/HTML5QrScannerv2.3.8.js"></script>
<script type="module">
const wpsgSettings = {
baseUrl: '<?php echo WPSG_URL; ?>'
};
import { wpsg_ticket_qrScanner } from '<?php echo WPSG_URL; ?>mods/mod_ticket/assets/js/wpsg_qrscanner.js';
wpsg_ticket_qrScanner(wpsgSettings, <?php echo json_encode([
'admin_url' => \admin_url('admin-ajax.php')
]); ?>);
</script>
/mods/mod_ticket/settings_edit_templates.phtml
0,0 → 1,209
<?php
 
namespace wpsgTicket;
?>
 
<div id="wpsg_ticket_modul_template">
 
<div class="head">
 
<a href="#" @click.prevent="addTemplate" title="<?php echo __('Neues Template anlegen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
 
<div v-if="data.arTemplates.length > 0">
 
<select v-model="template">
<option :value="null"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
<option v-for="(template, index) in data.arTemplates" :value="template">
{{template.template_name}} ({{template.config.arField.length}} <?php echo __('Felder', 'wpsg'); ?><template v-if="template.defaulttemplate">, <?php echo __('Standard', 'wpsg'); ?></template>)
</option>
</select>
 
</div>
<div v-else>
 
<?php echo __('Keine Templates vorhanden', 'wpsg'); ?>
 
</div>
 
<a v-if="template" href="#" @click.prevent="removeTemplate" title="<?php echo __('Template löschen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
</a>
 
</div>
 
<div v-if="template" class="template">
 
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label label-copy" for="wpsg_mod_downloadplus_filename">
<a href="#" title="<?php echo __('Template kopieren', 'wpsg'); ?>" @click="copyTemplate()"><span class="wpsg-glyphicon glyphicon glyphicon-copy"></span></a>
<span><?php echo __('Name des Templates', 'wpsg'); ?></span>
</label>
<div class="col-sm-6">
<div class="wpsg_field_wrap wpsg_field_wrap_template_name">
<input type="text" v-model="template.template_name" />
<div>
<label class="control-label"><?php echo __('Standard: ', 'wpsg'); ?></label>
<input type="checkbox" :checked="template.defaulttemplate" @click="setDefaultTemplate" />
</div>
</div>
</div>
</div>
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label"><?php echo __('Template Größe (mm)', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap flex items-center justify-start gap-2">
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.width">
x
<input type="text" class="form-control input-sm" autocomplete="off" v-model="template.config.height">
</div>
</div>
</div>
<div class="form-group form-group-sm has-feedback">
<label class="col-sm-6 control-label"><?php echo __('Hintergrund (PDF/JPEG)', 'wpsg'); ?></label>
<div class="col-sm-6">
<div class="wpsg_field_wrap flex items-start justify-between gap-2">
<input type="file" @change.prevent="uploadBg" ref="file_upload" accept=".jpeg,.jpg,.pdf" />
<span class="flex items-center">
<a v-if="template.hasBackground" :href="template.url_bg_download" target="_blank"><?php echo __('Anzeigen', 'wpsg'); ?></a>
</span>
</div>
</div>
</div>
 
<br />
<table class="table table_qr table-body-striped wpsg_mod_downloadplus_fieldtable">
<thead>
<tr>
<th colspan="8"><?php echo __('QR - Code', 'wpsg'); ?></th>
</tr>
</thead>
<template v-for="(field, field_index) in template.config.arField">
<tbody v-if="field.text === '%qr%'">
<tr>
<td class="col_w0"></td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('X / Y', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<div clasS="flex items-center gap-2">
<input type="text" style="width:50px;" v-model="field.x" />
<span>/</span>
<input type="text" style="width:50px;" v-model="field.y" />
</div>
</td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.w" />
</td>
<td class="col_w1">
<div class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.h" />
</td>
<td class="col_w0"></td>
</tr>
</tbody>
</template>
</table>
<table class="table table-body-striped wpsg_mod_downloadplus_fieldtable">
<thead>
<tr>
<th colspan="8"><?php echo __('Weitere Felder mit Platzhaltern', 'wpsg'); ?></th>
</tr>
<tr>
<th class="col_w0">
<a href="#" @click.prevent="addField" title="<?php echo __('Neues Feld', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
</th>
<th class="col_w1"><?php echo __('X', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Y', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Ausrichtung', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Farbe', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Deckkraft', 'wpsg'); ?></th>
<th class="col_w1"><?php echo __('Winkel', 'wpsg'); ?></th>
<th class="col_action"></th>
</tr>
</thead>
<template v-for="(field, field_index) in template.config.arField">
<tbody v-if="field.text !== '%qr%'">
<tr>
<td class="col_w0">#{{field_index + 1}}</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.x" />
</td>
<td class="col_w1">
<input type="text" style="width:50px;" v-model="field.y" />
</td>
<td class="col_w1">
<select v-model="field.align" v-if="field.text !== '%qr%'">
<option value="L">Links</option>
<option value="C">Zentriert</option>
<option value="R">Rechts</option>
</select>
<div v-else class="text-right"><strong><?php echo __('Breite', 'wpsg'); ?></strong></div>
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:75px;" v-model="field.color" />
<input v-else type="text" style="width:50px;" v-model="field.w" />
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.opaque" />
<div v-else class="text-right"><strong><?php echo __('Höhe', 'wpsg'); ?>:</strong></div>
</td>
<td class="col_w1">
<input class="wpsg_hideBarcode" v-if="field.text !== '%qr%'" type="text" style="width:50px;" v-model="field.angle" />
<input v-else type="text" style="width:50px;" v-model="field.h" />
</td>
<td class="col_w0"></td>
</tr>
<tr>
<td class="col_w0">
<a href="#" @click.prevent="addField(field_index)" title="<?php echo __('Neues Feld davor einfügen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-plus"></span>
</a>
</td>
<td class="col_freitext_label col_w1" colspan="1">
<span v-if="field.text !== '%qr%'"><?php echo __('Freitext', 'wpsg'); ?>:</span>
</td>
<td colspan="5" class="col_freitext">
<div class="flex items-center gap-2">
<input v-if="field.text !== '%qr%'" type="text" style="width:100%;" v-model="field.text" />
<span v-else>QR Code</span>
<template v-if="field.text !== '%qr%'">
<select class="fontselect" v-model="field.font" style="width:100%;">
<option v-for="(font, index_font) in data.arFonts" :value="font.code">{{font.label}}</option>
</select>
<select v-model="field.fontsize" style="width:100%;">
<option v-for="size in [4,5,6,7,8,9,10,11,12,13,14,16,18,20,22,24,26,28,30,32,34]" :value="size">{{size}}</option>
</select>
</template>
</div>
</td>
<td>
<a v-if="field.text !== '%qr%'" target="_blank" href="#" @click.prevent="removeField(field_index)" title="<?php echo __('Feld löschen', 'wpsg'); ?>">
<span class="wpsg-glyphicon glyphicon glyphicon-trash"></span>
</a>
</td>
</tr>
</tbody>
</template>
</table>
<a :href="template.url_preview" target="_blank" class="button button-primary"><?php echo __('Vorschau', 'wpsg'); ?></a>
</div>
 
<br />
 
</div>
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/mods/mod_trustedshops/settings_edit.phtml
1,7 → 1,7
<?php
 
/**
* Tempalte für die Einstellungen des Trusted Shops Moduls
* Template für die Einstellungen des Trusted Shops Moduls
*/
?>
16,6 → 16,7
<br />
 
<div class="wpsg_mod_protectedshops">
 
<div class="wpsg_admin_box" id="wpsg_tab">
 
<ul class="nav nav-tabs" role="tablist">
24,35 → 25,37
<li role="presentation"><a href="#tab3" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Bewertungslinks', 'wpsg'); ?></a></li>
<li role="presentation"><a href="#tab4" aria-controls="messages" role="tab" data-toggle="tab"><?php echo __('Review Collector', 'wpsg'); ?></a></li>
</ul>
 
<div class="tab-content">
 
<div id="tab1" role="tabpanel" class="tab-pane active" >
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_siegelcache', __('Bewertungsbild zwischenspeichern (empfohlen)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegelcache'), array('help' => 'wpsg_mod_trustedshops_siegelcache')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_siegeltitle', __('Titel des Bewertungsbildes', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegeltitle'), array('help' => 'wpsg_mod_trustedshops_siegeltitle')); ?>
<?php if (wpsg_isSizedString($this->view['siegelURL'])) { ?>
<br />
<div class="wpsg_hinweis"><?php echo wpsg_translate(__('Das Trusted Shops Widget muss in einen <a href="#1#">Widgetbereich</a> eingefügt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/widgets.php'); ?></div><br />
<?php echo __('Vorschau:', 'wpsg'); ?><br />
<img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
<?php } ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_siegelcache', __('Bewertungsbild zwischenspeichern (empfohlen)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegelcache'), array('help' => 'wpsg_mod_trustedshops_siegelcache')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_siegeltitle', __('Titel des Bewertungsbildes', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_siegeltitle'), array('help' => 'wpsg_mod_trustedshops_siegeltitle')); ?>
<?php if (wpsg_isSizedString($this->view['siegelURL'])) { ?>
<br />
<div class="wpsg_hinweis"><?php echo wpsg_translate(__('Das Trusted Shops Widget muss in einen <a href="#1#">Widgetbereich</a> eingefügt werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/widgets.php'); ?></div><br />
<?php echo __('Vorschau:', 'wpsg'); ?><br />
<img class="bewertung" alt="<?php echo wpsg_hspc($this->get_option('wpsg_mod_trustedshops_siegeltitle')); ?>" border="0" src="<?php echo $this->view['siegelURL']; ?>"/>
<?php } ?>
</div>
<div id="tab2" role="tabpanel" class="tab-pane" >
<?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_orderdone', __('Link zur Bewertung', 'wpsg'), array(
'0' => __('Nicht anzeigen', 'wpsg'),
'1' => __('Immer anzeigen', 'wpsg'),
'2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
), $this->get_option('wpsg_mod_trustedshops_orderdone'), array('help' => 'wpsg_mod_trustedshops_orderdone')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonetitle', __('Titel des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonetitle'), array('help' => 'wpsg_mod_trustedshops_orderdonetitle')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonelogo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonelogo'), array('help' => 'wpsg_mod_trustedshops_orderdonelogo')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_warranty', __('Trusted Shops Käuferschutz (Garantie)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_warranty'), array('help' => 'wpsg_mod_trustedshops_warranty')); ?>
<?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_orderdone', __('Link zur Bewertung', 'wpsg'), array(
'0' => __('Nicht anzeigen', 'wpsg'),
'1' => __('Immer anzeigen', 'wpsg'),
'2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
), $this->get_option('wpsg_mod_trustedshops_orderdone'), array('help' => 'wpsg_mod_trustedshops_orderdone')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonetitle', __('Titel des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonetitle'), array('help' => 'wpsg_mod_trustedshops_orderdonetitle')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_orderdonelogo', __('Alternative Logo URL', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_orderdonelogo'), array('help' => 'wpsg_mod_trustedshops_orderdonelogo')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_warranty', __('Trusted Shops Käuferschutz (Garantie)', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_warranty'), array('help' => 'wpsg_mod_trustedshops_warranty')); ?>
</div>
<div id="tab3" role="tabpanel" class="tab-pane" >
67,8 → 70,6
<br />
<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
<br />
<?php echo wpsg_drawForm_Select('wpsg_mod_trustedshops_invoicemail', __('Link zur Bewertung in Rechnungsmail', 'wpsg'), array(
'0' => __('Nicht anzeigen', 'wpsg'),
'1' => __('Immer anzeigen', 'wpsg'),
75,7 → 76,6
'2' => __('Nur anzeigen, wenn Kunde bewerten möchte', 'wpsg')
), $this->get_option('wpsg_mod_trustedshops_invoicemail'), array('help' => 'wpsg_mod_trustedshops_invoicemail')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_invoicemailtitle', __('Text des Links', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_invoicemailtitle'), array('help' => 'wpsg_mod_trustedshops_invoicemailtitle')); ?>
<?php } ?>
</div>
82,85 → 82,61
<div id="tab4" role="tabpanel" class="tab-pane" >
 
<?php echo wpsg_drawForm_TextStart(); ?>
<input type="hidden" name="wpsg_mod_trustedshops_reminder" value="0">
<input id="wpsg_mod_trustedshops_reminder" type="checkbox" class="checkbox" <?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_trustedshops_reminder')))?'checked="checked"':''); ?> tabindex="14" name="wpsg_mod_trustedshops_reminder" value="1">
<div id="wpsg_mod_trustedshops_reminder_layer" class="wpsg_form_trustedshops_reminderDays">
<p><?php echo __('Nach', 'wpsg'); ?></p>
<input id="wpsg_mod_trustedshops_reminderDays" type="text" class="text" tabindex="15" name="wpsg_mod_trustedshops_reminderDays" value="<?php echo $this->get_option('wpsg_mod_trustedshops_reminderDays'); ?>">
<p><?php echo __('Tagen', 'wpsg'); ?></p>
</div>
<?php echo wpsg_drawForm_TextEnd(__('Erinnerung', 'wpsg'), array('noP' => true)); ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<?php foreach ($this->arStatus as $state_id => $state_label) { ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_reminder', __('Erinnerung', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminder'), array('help' => 'wpsg_mod_trustedshops_reminder')); ?>
<div id="wpsg_mod_trustedshops_reminder_layer" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_mod_trustedshops_reminderDays', __('Zeitspanne zum versenden der Erinnerunsmail in Tagen', 'wpsg'), $this->get_option('wpsg_mod_trustedshops_reminderDays'), array('help' => 'wpsg_mod_trustedshops_reminderDays')); ?>
</div>
 
<br />
 
<?php echo wpsg_drawForm_Link('wpsg_mod_trustedshops_link', __('Auslöser bei Statuswechsel', 'wpsg'),
__('Bearbeiten', 'wpsg'), array('help' => 'wpsg_mod_trustedshops_link', 'class' => 'wpsg_mod_trustedshops_state')); ?>
 
<div class="wpsg_mod_trustedshops_reminderstate_layer" style="display:none;">
 
<?php foreach ($this->arStatus as $state_id => $state_label) { ?>
<?php
$arr1 = $this->get_option('wpsg_mod_trustedshops_state');
$chk = ((in_array($state_id, (array)$this->get_option('wpsg_mod_trustedshops_state')))?1:0);
echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_state[]', __($state_label, 'wpsg'),
$chk, array('help1' => 'wpsg_shippay_mwstland',
'value' => wpsg_hspc($state_id),
'noHidden' => true,
'fullWidth' => true
));
$arr1 = $this->get_option('wpsg_mod_trustedshops_state');
$chk = ((in_array($state_id, (array)$this->get_option('wpsg_mod_trustedshops_state')))?1:0);
echo wpsg_drawForm_Checkbox('wpsg_mod_trustedshops_state[]', __($state_label, 'wpsg'),
$chk, array('help1' => 'wpsg_shippay_mwstland', 'value' => wpsg_hspc($state_id), 'labelright' => true));
?>
<br />
<?php } ?>
<?php } ?>
 
<?php echo wpsg_drawForm_TextEnd(__('Bestellzustände', 'wpsg'), array('noP' => true)); ?>
<br />
 
<?php echo wpsg_drawForm_Input('', __('Letzter Export', 'wpsg'), $this->view['lastExport'], array('text' => true)); ?>
<br />
<div class="wpsg_form_field">
<div class="wpsg_form_left">&nbsp;</div>
<div class="wpsg_form_right wpsg_form_right_unit">
<?php $temp = $this->callMod('wpsg_mod_trustedshops', 'getExportData');
if (wpsg_isSizedArray($temp)) { ?>
<a target="_blank" onclick="location.href=location.href;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops&do=export&noheader=1" class="button"><?php echo __('CSV-Export-Datei erstellen', 'wpsg'); ?></a>
<?php } else { ?>
<p><?php echo __('Derzeit keine Daten zum Export verfügbar.', 'wpsg'); ?></p>
<?php } ?>
</div>
<div class="wpsg_clear"></div>
</div>
<?php echo wpsg_drawForm_Input('', __('Letzter Export', 'wpsg'), $this->view['lastExport'], array('text' => true)); ?>
<br />
<div class="wpsg_form_field">
<div class="wpsg_form_left">&nbsp;</div>
<div class="wpsg_form_right wpsg_form_right_unit">
<?php $temp = $this->callMod('wpsg_mod_trustedshops', 'getExportData');
if (wpsg_isSizedArray($temp)) { ?>
<a target="_blank" onclick="location.href=location.href;" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_trustedshops&do=export&noheader=1" class="button"><?php echo __('CSV-Export-Datei erstellen', 'wpsg'); ?></a>
<?php } else { ?>
<p><?php echo __('Derzeit keine Daten zum Export verfügbar.', 'wpsg'); ?></p>
<?php } ?>
</div>
<br />
<a href="https://www.trustedshops.com/tsb2b/sa/ratings/batchRatingRequest.seam"><?php echo __('Trusted Shops Review Collector', 'wpsg'); ?></a>
<div class="wpsg_clear"></div>
</div>
<br />
<a href="https://www.trustedshops.com/tsb2b/sa/ratings/batchRatingRequest.seam"><?php echo __('Trusted Shops Review Collector', 'wpsg'); ?></a>
</div>
 
</div>
 
</div>
 
<script type="text/javascript">/* <![CDATA[ */
 
jQuery(document).ready(function() {
 
jQuery('#wpsg_mod_trustedshops_reminder').bind('change', function() {
 
if (jQuery('#wpsg_mod_trustedshops_reminder').is(':checked'))
{
 
jQuery('#wpsg_mod_trustedshops_reminder_layer').show(250);
}
else
{
 
jQuery('#wpsg_mod_trustedshops_reminder_layer').hide(250);
}
} ).change();
jQuery('#wpsg_tab').wpsg_tab( {
'cookiename': 'wpsg_trustedshop_tab',
185,7 → 161,41
}
} ).change();
 
jQuery('.wpsg_mod_trustedshops_state').bind('click', function() {
 
jQuery('.wpsg_mod_trustedshops_reminderstate_layer').toggle();
 
if (jQuery('.wpsg_mod_trustedshops_reminderstate_layer').is(':visible')) jQuery(this).html('<?php echo __('Ausblenden', 'wpsg'); ?>');
else jQuery(this).html('<?php echo __('Bearbeiten', 'wpsg'); ?>');
 
return false;
 
} );
} );
 
document.addEventListener("DOMContentLoaded", function() {
 
var reminderCheckbox = document.getElementById('wpsg_mod_trustedshops_reminder');
var reminderDiv = document.getElementById('wpsg_mod_trustedshops_reminder_layer');
function toggleDivVisibility(checkbox, div)
{
 
if (checkbox.checked) div.style.display = "block";
else div.style.display = "none";
 
}
 
// Event Listener für die Checkboxen
reminderCheckbox.addEventListener("change", function() {
toggleDivVisibility(reminderCheckbox, reminderDiv);
});
 
// Überprüfen und Initialisieren des Anfangszustands der Checkboxen
toggleDivVisibility(reminderCheckbox, reminderDiv);
 
});
 
/* ]]> */</script>
/admin/kundendaten_tab3.phtml
17,6 → 17,7
<?php
echo wpsg_drawForm_Select('wpsg_customerpreset_payment', __('Standard Zahlungsart', 'wpsg'), [
'0' => __('Bitte wählen', 'wpsg'),
'-1' => __('günstigste Zahlungsart', 'wpsg')
] + $this->view['arPayment'], $this->get_option('wpsg_customerpreset_payment'), array('help' => 'wpsg_customerpreset_payment'));
 
/admin/ueber.phtml
23,6 → 23,9
 
<a class="list-group-item <?php echo ((isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'systemlog')?'active':''); ?>"
href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=ueber&subaction=systemlog'); ?>"><?php echo __('Fehlerprotokoll', 'wpsg'); ?></a>
<a class="list-group-item <?php echo ((isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'updatelog')?'active':''); ?>"
href="<?php echo wpsg_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=ueber&subaction=updatelog'); ?>"><?php echo __('Updateprotokoll', 'wpsg'); ?></a>
 
</div>
 
121,6 → 124,31
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
<?php } ?>
 
<?php if (isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'updatelog') {
try { $wpsg_update_log = json_decode($this->get_option('wpsg_update_log'), true); } catch (\Throwable $e) { $wpsg_update_log = []; }
?>
 
<?php foreach ($wpsg_update_log as $log_index => $log) { ?>
<?php echo wpsg_drawForm_AdminboxStart(
wpsg_translate(__('Update vom #1# : #2# -> #3#', 'wpsg'), ($log['time']??''), ($log['pre']['version']??''), ($log['after']['version']??'')),
'wpsg_update_log_'.$log_index,
[
'collapsed' => true,
'collapsable' => true
]
); ?>
<pre><?php print_r($log); ?></pre>
 
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
<?php } ?>
<?php } ?>
 
<?php if (isset($_REQUEST['subaction']) && $_REQUEST['subaction'] == 'systemlog') { ?>
<?php echo wpsg_drawForm_AdminboxStart(__('Fehlerprotokoll', 'wpsg'), '', array('style' => 'width:905px;')); ?>
 
/mods/mod_ticket/ticket_mail_html.phtml
0,0 → 1,20
<?php
declare(strict_types=1);
/**
* @author: Daniel Schmitzer (daniel@maennchen1.de)
* @date: 03.12.23
* @time: 13:13
*/
namespace wpsgTicket;
/** @var \wpsg_order $oOrder */
$oOrder = $this->view['oOrder'];
/** @var int[] $arTicketBookingIDSend */
$arTicketBookingIDSend = $this->view['arTicketBookingIDSend'];
 
?><p>Hallo <?php echo $oOrder->getCustomer()->getFirstname().' '.$oOrder->getCustomer()->getName(); ?></p>
<p>Hiermit erhalten Sie im Anhang Ihre Tickets aus der Bestellung <?php echo $oOrder->getNr(); ?>.</p>
/mods/mod_klarna/order_done.phtml
0,0 → 1,42
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 04.03.24
* @time: 13:39
*/
namespace wpsgKlarna;
$view = $this->view['wpsg_mod_klarna'];
?>
 
<div class="order_done_wpsg_mod_klarna <?php echo ($view['state']??''); ?>">
 
<?php if (($view['state']??'') === 'PAYED_DONE') { ?>
<p><?php echo __('Betrag wurde mit Klarna bezahlt.', 'wpsgKlarna'); ?></p>
<?php } else if (($view['state']??'') === 'PAYED') { ?>
<p><?php echo __('Betrag wurde bereits mit Klarna bezahlt.', 'wpsgKlarna'); ?></p>
 
<?php } else if (($view['state']??'') === 'TOPAY') { ?>
<div id="wpsg_mod_klarna_widget"></div>
<input type="button" class="button" id="klarna_payment_button" value="<?php echo __('Jetzt mit Klarna bezahlen.', 'wpsgKlarna'); ?>" />
<?php
$this->view['wpsg_mod_klarna']['button_id'] = 'klarna_payment_button';
echo $this->render(dirname(__FILE__).'/pay.phtml');
?>
<?php } ?>
 
</div>
/mods/mod_klarna/pay.phtml
0,0 → 1,114
<?php
declare(strict_types=1);
/**
* @author: daniel
* @date: 05.03.24
* @time: 07:20
*/
namespace wpsgKlarna;
$view = $this->view['wpsg_mod_klarna'];
/** @var \wpsg_order $oOrder */
$oOrder = $view['oOrder'];
$authorize_arg = [
'billing_address' => [
'given_name' => $oOrder->getInvoiceFirstName(),
'family_name' => $oOrder->getInvoiceName(),
'email' => $oOrder->getCustomer()->getEMail(),
'street_address' => $oOrder->getInvoiceStreet(),
'postal_code' => $oOrder->getInvoiceZip(),
'city' => $oOrder->getInvoiceCity(),
]
];
?>
 
<script>
window.klarnaAsyncCallback = () => {
 
const el_pppl_loading_blocker = document.getElementById('pppl_loading_blocker');
Klarna.Payments.init({
client_token: '<?php echo $view['client_token']; ?>'
});
Klarna.Payments.load({
container: '#wpsg_mod_klarna_widget'
}, {
}, function (res) {
 
console.log(res);
});
document.getElementById('<?php echo $view['button_id']; ?>').addEventListener('click', (event) => {
 
event.preventDefault();
if (el_pppl_loading_blocker) el_pppl_loading_blocker.style.display = 'block';
Klarna.Payments.authorize(
{}, {},
function(res) {
console.log(res);
if (res.authorization_token) {
 
try {
fetch('<?php echo $view['url_setAuthToken']; ?>', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
'authorization_token': res.authorization_token
})
}).then(response => {
 
return response.json();
 
}).then(data => {
 
if (data.success) {
 
location.href = data.href;
 
} else throw Error();
 
}).catch(e => {
 
if (el_pppl_loading_blocker) el_pppl_loading_blocker.style.display = 'none';
 
});
} catch (error) {
 
if (el_pppl_loading_blocker) el_pppl_loading_blocker.style.display = 'none';
 
}
} else {
if (el_pppl_loading_blocker) el_pppl_loading_blocker.style.display = 'none';
}
}
);
 
});
 
};
</script>
 
<script src="https://x.klarnacdn.net/kp/lib/v1/api.js" async></script>
/mods/mod_paypal/settings_edit.phtml
60,6 → 60,7
 
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_paypal_sandbox', __('Sandbox Modus', 'wpsg'), $this->get_option('wpsg_mod_paypal_sandbox'), array('help' => 'wpsg_mod_paypal_sandbox')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_subject', __('Betreff der Überweisung', 'wpsg'), $this->get_option('wpsg_mod_paypal_subject'), array('help' => 'wpsg_mod_paypal_subject')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_paypal_invoicenumber', __('Formatierung InvoiceNumber', 'wpsg'), $this->get_option('wpsg_mod_paypal_invoicenumber'), array('help' => 'wpsg_mod_paypal_invoicenumber')); ?>
 
<br />
 
/mods/mod_gutschein/index.phtml
101,6 → 101,8
<span class="edit"><a title="<?php echo __("Diesen Gutschein bearbeiten", "wpsg"); ?>" href="#" class="wpsg_voucher_edit" onclick="return false;" data-voucher_id="<?php echo $oVoucher->getId(); ?>"><?php echo __("Bearbeiten", "wpsg"); ?></a></span>
|
<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diesen Gutschein löschen möchten?', 'wpsg'); ?>');" title="<?php echo __('Diese Gutschein löschen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_gutschein&subaction=delete&noheader=1&voucher_id=<?php echo $oVoucher->getId(); ?>"><?php echo __('Löschen', 'wpsg'); ?></a></span>
|
<span><a title="<?php echo __('Bestellungen anzeigen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&filter[status]=-1&filter[voucher_id]=<?php echo $oVoucher->getId(); ?>"><?php echo __('Bestellungen suchen', 'wpsg'); ?></a></span>
</div>
</td>
/mods/mod_prepayment/settings_edit.phtml
22,4 → 22,3
<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_bank', __('Bank', 'wpsg'), $this->get_option('wpsg_mod_prepayment_bank'), array('help' => 'wpsg_mod_prepayment_bank')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_iban', __('IBAN', 'wpsg'), $this->get_option('wpsg_mod_prepayment_iban'), array('help' => 'wpsg_mod_prepayment_iban')); ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_prepayment_swift', __('BIC-/SWIFT Code', 'wpsg'), $this->get_option('wpsg_mod_prepayment_swift'), array('help' => 'wpsg_mod_prepayment_swift')); ?>
/mods/mod_deliverynote/order_view_row.phtml
8,7 → 8,7
<tr class="wpsg_<?php echo (($this->view['wpsg_mod_deliverynote']['i'] == 0)?'odd':'even'); ?>">
<td align="left" colspan="<?php echo ((sizeof($this->view['arCalculation']['tax']) > 1 || $this->get_option('wpsg_showMwstAlways') == '1')?'5':'4'); ?>">
<label style="font-weight:normal; display:flex; flex-direction:row; margin-bottom:0px;">
<input checked="checked" type="checkbox" class="wpsg_mod_deliverynote_product" name="wpsg_mod_deliverynote_products[]" value="<?php echo $this->view['wpsg_mod_deliverynote']['product']['product_index']; ?>" style="margin:0px; margin-right:5px;" />
<input checked="checked" type="checkbox" class="wpsg_mod_deliverynote_product_i" name="wpsg_mod_deliverynote_products[]" value="<?php echo $this->view['wpsg_mod_deliverynote']['product']['product_index']; ?>" style="margin:0px; margin-right:5px;" />
<span>&nbsp;<?php echo __('Auf Lieferschein', 'wpsg'); ?></span>
</label>
</td>
/admin/kundendaten_tab1.phtml
20,6 → 20,7
<?php echo wpsg_drawForm_Select('pflicht[geb]', __('Geburtsdatum', 'wpsg'), $arSelect, $this->view['pflicht']['geb'])?>
<?php echo wpsg_drawForm_Select('pflicht[email]', __('E-Mail Adresse', 'wpsg'), $arSelect, $this->view['pflicht']['email'])?>
<?php echo wpsg_drawForm_Checkbox('pflicht[emailconfirm]', __('E-Mail Adresse (Wiederholung)', 'wpsg'), $this->view['pflicht']['emailconfirm']); ?>
<?php echo wpsg_drawForm_Checkbox('pflicht[eInvoice]', __('E-Mail Adresse für eRechnung abfragen (optional)', 'wpsg'), $this->view['pflicht']['eInvoice']??0); ?>
<?php echo wpsg_drawForm_Select('pflicht[tel]', __('Telefon', 'wpsg'), $arSelect, $this->view['pflicht']['tel'])?>
<?php echo wpsg_drawForm_Select('pflicht[fax]', __('Fax', 'wpsg'), $arSelect, $this->view['pflicht']['fax'])?>
<?php echo wpsg_drawForm_Select('pflicht[strasse]', __('Straße', 'wpsg'), $arSelect, $this->view['pflicht']['strasse'])?>
/admin/includes.phtml
31,9 → 31,9
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_js', __('Thickbox einbinden (JavaScript)', 'wpsg'), $this->get_option('wpsg_load_thickbox_js'), array('help' => 'wpsg_load_thickbox')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox_css', __('Thickbox einbinden (Styles)', 'wpsg'), $this->get_option('wpsg_load_thickbox_css'), array('help' => 'wpsg_load_thickbox')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_load_fslightbox_js', __('fsLightbox (Fullscreen Lightbox) einbinden (JavaScript)', 'wpsg'), $this->get_option('wpsg_load_fslightbox_js'), array('help' => 'wpsg_load_fslightbox_js')); ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_load_thickbox', __('Thickbox einbinden (JavaScript + CSS)', 'wpsg'), $this->get_option('wpsg_load_thickbox'), array('help' => 'wpsg_load_thickbox')); ?>
<br />
<?php echo wpsg_drawForm_Checkbox('wpsg_load_validierung_js', __('Javascript Validierung laden', 'wpsg'), $this->get_option('wpsg_load_validierung_js'), array('help' => 'wpsg_load_validierung')); ?>
/mailtemplates/adminmail.phtml
6,8 → 6,8
 
$this->htmlMail = false;
$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
?><?php echo __('Hallo Administrator,', 'wpsg'); ?>
<?php echo __('Eine neue Bestellung ist im Online-Shop eingegangen.', 'wpsg'); ?>
27,7 → 27,10
<?php echo wpsg_pad_right(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
<?php } ?>
 
<?php echo __('Lieferadresse:', 'wpsg'); ?>
 
54,6 → 57,9
<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
<?php } ?>
 
<?php } ?>
 
/order/index.phtml
54,6 → 54,8
<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo @$this->view['arFilter']['order']; ?>" />
<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo @$this->view['arFilter']['ascdesc']; ?>" />
 
<input type="hidden" name="filter[voucher_id]" value="<?php echo intval($this->view['arFilter']['voucher_id']??0); ?>" />
<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($this->view['arFilter']['s'])); ?>
<?php echo wpsg_drawForm_Input('filter[k_id]', __('Kunde (ID)', 'wpsg'), wpsg_getStr($this->view['arFilter']['k_id'])); ?>
<?php echo wpsg_drawForm_Select('filter[payment_key]', __('Zahlungsart', 'wpsg'), $arPaymentKeySelect, wpsg_getStr($this->view['arFilter']['payment_key'])); ?>
79,7 → 81,7
<select name="filter[cdate_m]" class="form-control input-sm">
<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
<?php for ($i = 1; $i <= 12; $i ++) { ?>
<option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
<option <?php echo ((wpsg_getStr($this->view['arFilter']['cdate_m']) == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo __(date('F', mktime(0, 0, 0, $i, 1, 2000))); ?></option>
<?php } ?>
</select>
</div>
/css/tiny-slider.-2.9.4.min.css
0,0 → 1,0
.tns-outer{padding:0 !important}.tns-outer [hidden]{display:none !important}.tns-outer [aria-controls],.tns-outer [data-action]{cursor:pointer}.tns-slider{-webkit-transition:all 0s;-moz-transition:all 0s;transition:all 0s}.tns-slider>.tns-item{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.tns-horizontal.tns-subpixel{white-space:nowrap}.tns-horizontal.tns-subpixel>.tns-item{display:inline-block;vertical-align:top;white-space:normal}.tns-horizontal.tns-no-subpixel:after{content:'';display:table;clear:both}.tns-horizontal.tns-no-subpixel>.tns-item{float:left}.tns-horizontal.tns-carousel.tns-no-subpixel>.tns-item{margin-right:-100%}.tns-no-calc{position:relative;left:0}.tns-gallery{position:relative;left:0;min-height:1px}.tns-gallery>.tns-item{position:absolute;left:-100%;-webkit-transition:transform 0s, opacity 0s;-moz-transition:transform 0s, opacity 0s;transition:transform 0s, opacity 0s}.tns-gallery>.tns-slide-active{position:relative;left:auto !important}.tns-gallery>.tns-moving{-webkit-transition:all 0.25s;-moz-transition:all 0.25s;transition:all 0.25s}.tns-autowidth{display:inline-block}.tns-lazy-img{-webkit-transition:opacity 0.6s;-moz-transition:opacity 0.6s;transition:opacity 0.6s;opacity:0.6}.tns-lazy-img.tns-complete{opacity:1}.tns-ah{-webkit-transition:height 0s;-moz-transition:height 0s;transition:height 0s}.tns-ovh{overflow:hidden}.tns-visually-hidden{position:absolute;left:-10000em}.tns-transparent{opacity:0;visibility:hidden}.tns-fadeIn{opacity:1;filter:alpha(opacity=100);z-index:0}.tns-normal,.tns-fadeOut{opacity:0;filter:alpha(opacity=0);z-index:-1}.tns-vpfix{white-space:nowrap}.tns-vpfix>div,.tns-vpfix>li{display:inline-block}.tns-t-subp2{margin:0 auto;width:310px;position:relative;height:10px;overflow:hidden}.tns-t-ct{width:2333.3333333%;width:-webkit-calc(100% * 70 / 3);width:-moz-calc(100% * 70 / 3);width:calc(100% * 70 / 3);position:absolute;right:0}.tns-t-ct:after{content:'';display:table;clear:both}.tns-t-ct>div{width:1.4285714%;width:-webkit-calc(100% / 70);width:-moz-calc(100% / 70);width:calc(100% / 70);height:10px;float:left}
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/order/view_customerdata.phtml
55,6 → 55,9
'">'.$this->view['data']['email'].'</a>'); ?>
<?php } ?>
<?php } ?>
<?php echo wpsg_drawForm_Input('email_einvoice', __('E-Mail für eInvoice', 'wpsg'), $this->view['data']['email_einvoice']); ?>
<br />
<?php if ($this->view['pflicht']['strasse'] != '2') { ?>
143,7 → 146,7
</a>
 
<?php echo wpsg_drawForm_TextEnd(__('Anschrift', 'wpsg')); ?>
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
<?php if (strtotime($this->view['data']['geb']) > 0) { ?>
<?php echo wpsg_drawForm_Text(__('Geburtsdatum', 'wpsg'), wpsg_fromDate($this->view['data']['geb']), array('text' => true)); ?>
172,6 → 175,12
<?php } ?>
<?php echo wpsg_drawForm_TextEnd(__('E-Mail', 'wpsg')); ?>
<?php $email_einvoice = $Customer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<?php echo wpsg_drawForm_TextStart(); ?>
<a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a>
<?php echo wpsg_drawForm_TextEnd(__('E-Mail für eRechnungen', 'wpsg')); ?>
<?php } ?>
 
<script>
 
function wpsg_saveInvoiceAdress()
/warenkorb/index.phtml
79,8 → 79,8
<?php } ?>
</span>
 
<?php if (get_the_ID() !== intval($this->get_option('wpsg_page_basket'))) { ?>
<input type="button" class="wpsg_button wpshopgermany_linktokasse" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController:: URL_BASKET); ?>';" value="<?php echo __("Zum Warenkorb", "wpsg"); ?>" />
<?php if (get_the_ID() !== intval($this->get_option('wpsg_page_basket')) || (($_REQUEST['wpsg']['action']??'') === 'widget')) { ?>
<input type="button" class="button wpsg_button wpshopgermany_linktokasse" onclick="location.href='<?php echo $this->getURL(wpsg_ShopController:: URL_BASKET); ?>';" value="<?php echo __("Zum Warenkorb", "wpsg"); ?>" />
<?php } ?>
 
<?php } else { ?>
/css/frontend.css
36,7 → 36,7
.basket_product_wrap .basket_product_row .product_action .title { width: 60%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_action .price { width: 39%; display:inline-block; text-align:right; }
.basket_product_wrap .basket_product_row .product_action .price_total { width: 39%; display:inline-block; font-weight:bold; text-align:right; }
.basket_product_wrap .basket_product_row .product_info { display:flex; width:100%; justify-content:space-between; align-items:center; }
.basket_product_wrap .basket_product_row .product_info { display:flex; width:100%; justify-content:space-between; align-items:center; margin-bottom:0.25rem; }
.basket_product_wrap .basket_product_row .product_upload { }
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target { margin-left:15px; flex-grow:1; }
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target ul { margin:0px; }
44,7 → 44,7
.basket_product_wrap .basket_product_row .product_upload .wpsg_mod_orderupload_target li a.removeLink { text-decoration:none; box-shadow:none; align-self:center; }
.basket_product_wrap .basket_product_row .product_upload ul li { list-style:none; }
.basket_product_wrap .basket_product_row .product_info .titlep { min-width:120px; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_info .title { width: 30%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_info .title { display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.basket_product_wrap .basket_product_row .product_info .valuel { width: 50%; display:inline-block; font-weight:normal; text-align:left; }
.basket_product_wrap .basket_product_row .product_info .valuer { width: 50%; display:inline-block; font-weight:normal; text-align:right; }
.basket_product_wrap .basket_product_row .product_info .fulll { width: 80%; display:inline-block; font-weight:normal; text-align:left; }
78,7 → 78,11
 
.wpsg_basket .wpsg_checkoutbutton { float:right; padding:0.75em 1em; }
.wpsg_basket .wpsg_cell_gesamtsumme_value { font-weight:bold; }
.wpsg_basket .wpsg_refreshbutton, .wpsg_basketbutton { float:left; padding:0.75em 1em; }
.wpsg_checkout2 .wpsg_overviewbutton,
.wpsg_checkout2 .wpsg_checkoutbutton,
.wpsg_overview .wpsg_orderbutton,
.wpsg_overview .wpsg_checkoutbutton,
.wpsg_basket .wpsg_refreshbutton, .wpsg_checkout2button, .wpsg_basketbutton { float:left; padding:0.75em 1em; }
.wpsg_basket .wpsg_basket_weiter_shoppen {background:#1a1a1a none repeat scroll 0 0; border:0 none; border-radius:2px; color:#fff; font-weight:700; line-height:1; text-transform:uppercase; padding:0.85em 0.875em 0.78em;}
.wpsg_basket .product_action_printshop .label { align-self:flex-start; }
.wpsg_basket .product_action_printshop .files ul li { list-style:none; display:flex; align-items:center; justify-content:flex-end; }
148,6 → 152,9
.wpsg_overview .wpsg_overview_productimage { display:inline; padding-right:0.2rem; vertical-align:baseline; }
.wpsg_overview .wpsg_cell_weight_value { text-align:right; }
.wpsg_overview .wpsg_cell_deliverytime_value { text-align:right; }
.wpsg_overview {
.einvoice_input { margin-bottom:2rem; }
}
 
.wpsg_overview .wpsg_table_wrap {}
.wpsg_overview .wpsg_table_wrap .overview_product_row { display:flex; align-items:baseline; border-bottom:1px solid #EAEAEA; padding-bottom:1em; margin-bottom:1em; }
161,7 → 168,7
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_action .price_total { width: 39%; display:inline-block; font-weight:bold; text-align:right; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info { display:flex; width:100%; justify-content:space-between; align-items:center; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .titlep { min-width:120px; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .title { width: 30%; display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .title { display:inline-block; margin-top:0.3em; margin-bottom:0.3em; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .valuel { width: 50%; display:inline-block; font-weight:normal; text-align:left; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .valuer { width: 50%; display:inline-block; font-weight:normal; text-align:right; }
.wpsg_overview .wpsg_table_wrap .overview_product_row .product_info .fulll { width: 80%; display:inline-block; font-weight:normal; text-align:left; }
239,6 → 246,7
/* Produkttemplate */
.wpsg_productform { position:relative; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_productimages { float:left; margin-right:0.75em; }
.wpsg_productform img { max-width:100%; height:auto; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_produkt_preishinweis { font-size:0.75em; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_mod_productview_oldprice,
.product_wrap .productdetails .oldprice { text-decoration:line-through; }
250,7 → 258,7
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_informationarea { margin-top:1.5em; margin-bottom:1.5em; }
.wpsg_productform .wpsg_produkt_wrapper label { font-weight:bold; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="text"] { width:48%; float:left; box-sizing:border-box; padding:0.7em; line-height:1.5em; font-size:1rem; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="submit"] { width:48%; float:right; box-sizing: border-box; padding:0.7em; line-height:1.5em; font-size:1rem; border:1px solid transparent; border-radius:3px; }
.wpsg_productform .wpsg_produkt_wrapper .wpsg_product_buttonarea input[type="submit"] { width:48%; cursor:pointer; float:right; box-sizing: border-box; padding:0.7em; line-height:1.5em; font-size:1rem; border:1px solid transparent; border-radius:3px; }
.wpsg_productform .wpsg_product_layer { position:absolute; left:0px; top:0px; width:100%; height:100%; background-color:rgba(0, 0, 0, 0.25); padding:0.75em; margin:-0.75em; box-sizing:content-box; }
.wpsg_productform .wpsg_product_layer img { position:absolute; left:50%; margin-left:-8px; top:50%; margin-top:-5px; }
.wpsg_productform .wpsg_produkt_produktbilder { max-width:200px; }
451,7 → 459,7
.wpsg_progress:after { border:1px solid #C5C5C5; height:10px; background-color:#F2F2F2; box-sizing:border-box; display:block; width:100%; content:" "; }
.wpsg_progress span.step { width:25%; display:block; float:left; list-style:none; position:relative; }
.wpsg_progress span.step > .text { margin-top:30px; text-align:center; width:100%; display:block; }
.wpsg_progress span.step > .dot { position:absolute; z-index:2; background-color:#C5C5C5; width:20px; height:20px; left:50%; top:0%; margin-left:-15px; margin-top:-5px; border-radius:10px; }
.wpsg_progress span.step > .dot { position:absolute; z-index:2; background-color:#C5C5C5; width:20px; height:20px; left:50%; top:0%; margin-left:-14px; margin-top:-4px; border-radius:10px; }
.wpsg_progress span.step:before { border:1px solid #C5C5C5; position:absolute; z-index:2; left:50%; margin-left:-20px; text-align:center; line-height:40px; background-color:#F2F2F2; content:" "; display:block; width:30px; height:30px; border-radius:25px; margin-top:-10px; }
.wpsg_progress span.step1:before { content:""; }
.wpsg_progress span.step2:before { content:""; }
555,4 → 563,30
/* wpsg_mod_amazon_v2 */
#AmazonPayButton_wrap { text-align:right; margin-bottom:2rem; width:100%; justify-content:flex-end; display:flex; }
#AmazonPayButton_wrap #AmazonPayButton { width:210px; }
#AmazonLoginButton_wrap { text-align:right; margin-bottom:2rem; width:100%; justify-content:flex-end; display:flex; }
#AmazonLoginButton_wrap { text-align:right; margin-bottom:2rem; width:100%; justify-content:flex-end; display:flex; }
 
/* wpsg_mod_prepayment - QR-Code auf Bestellabschlussseite */
.wpsg_mod_prepayment_info_wrap { display:flex; justify-content:center; flex-direction:column; gap:20px; }
.wpsg_mod_prepayment_info { display: flex; gap: 20px; border: 1px solid #000000; padding: 20px; }
.wpsg_mod_prepayment_info h4{ margin: 0; }
.wpsg_mod_prepayment_info_left { display: flex; flex-direction: column; }
.wpsg_mod_prepayment_info_left_qrcodeimg { width:240px; height:240px; }
.wpsg_mod_prepayment_info_left_wrap { display:flex; gap:25%; }
.wpsg_mod_prepayment_info_left_currency { display:flex; flex-direction:column; }
.wpsg_mod_prepayment_info_left_amount { display:flex; flex-direction:column; }
 
.wpsg_mod_prepayment_girocode { display: flex; gap: 20px; border: 1px solid #000000; padding: 20px;}
.wpsg_mod_prepayment_girocode h4{ margin: 0; }
.wpsg_mod_prepayment_girocode_left { display: flex; flex-direction: column; }
.wpsg_mod_prepayment_girocode_left_qrcodeimg { width:240px; height:240px; }
.wpsg_mod_prepayment_girocode_left_wrap { display:flex; gap:25%; }
.wpsg_mod_prepayment_girocode_left_currency { display:flex; flex-direction:column; }
.wpsg_mod_prepayment_girocode_left_amount { display:flex; flex-direction:column; }
 
.wpsg_mod_prepayment_qrrechnung { display: flex; gap: 20px; border: 1px solid #000000; padding: 20px; }
.wpsg_mod_prepayment_qrrechnung h4{ margin: 0; }
.wpsg_mod_prepayment_qrrechnung_left { display: flex; flex-direction: column; }
.wpsg_mod_prepayment_qrrechnung_left_qrcodeimg { width:240px; height:240px; }
.wpsg_mod_prepayment_qrrechnung_left_wrap { display:flex; gap:25%; }
.wpsg_mod_prepayment_qrrechnung_left_currency { display:flex; flex-direction:column; }
.wpsg_mod_prepayment_qrrechnung_left_amount { display:flex; flex-direction:column; }
/mailtemplates/kundenmail.phtml
8,9 → 8,9
$arPflicht = $this->loadPflichtFeldDaten();
$arTitle = explode('|', $arPflicht['anrede_auswahl']);
//wpsg_debug($this->view);
 
$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
?><?php echo wpsg_translate(__('Hallo #1# #2# #3#,', 'wpsg'), @$arTitle[$this->view['basket']['checkout']['title']], $this->view['basket']['checkout']['vname'], $this->view['basket']['checkout']['name']); ?>
<?php echo __('vielen Dank für Ihre Bestellung.', 'wpsg'); ?>
30,8 → 30,10
<?php echo wpsg_pad_right(__('Ort', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['plz']; ?> <?php echo $this->view['basket']['checkout']['ort']; ?>
<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
 
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
<?php } ?>
<?php echo __('Lieferadresse:', 'wpsg'); ?>
 
<?php echo wpsg_pad_right(__('Firma', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['shipping_firma']; ?>
56,7 → 58,10
<?php echo wpsg_pad_right(__('Land', 'wpsg').':', 35); ?><?php echo $this->db->fetchOne("SELECT `name` FROM `".WPSG_TBL_LAND."` WHERE `id` = '".wpsg_q($this->view['basket']['checkout']['land'])."' "); ?>
<?php echo wpsg_pad_right(__('Telefon', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['tel']; ?>
<?php echo wpsg_pad_right(__('Fax', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['fax']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php echo wpsg_pad_right(__('E-Mail Adresse', 'wpsg').':', 35); ?><?php echo $this->view['basket']['checkout']['email']; ?>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<?php echo wpsg_pad_right(__('E-Mail (eRechnung)', 'wpsg').':', 35); ?><?php echo $email_einvoice; ?>
<?php } ?>
<?php } ?>
/admin/shopdata.phtml
21,6 → 21,12
<form name="form1" method="post" enctype="multipart/form-data" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;subaction=<?php echo $_REQUEST['subaction']; ?>&amp;noheader=1">
<?php \wp_nonce_field('wpsg-save-admin-shopdata'); ?>
 
<?php
$countrys = array();
$arCountry = wpsg_country::find();
foreach ($arCountry as $oCountry) $countrys[$oCountry->getId()] = $oCountry->getName();
?>
<div class="panel panel-default">
<div class="panel-heading clearfix">
29,6 → 35,7
<div class="panel-body">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_name', __('Name des Shops / Firma', 'wpsg'), $this->get_option('wpsg_shopdata_name'), array('help' => 'wpsg_shopdata_name')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_owner', __('Inhaber des Shops', 'wpsg'), $this->get_option('wpsg_shopdata_owner'), array('help' => 'wpsg_shopdata_owner')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_shopdata_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_tel'), array('help' => 'wpsg_shopdata_tel')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_fax'), array('help' => 'wpsg_shopdata_fax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_email'), array('help' => 'wpsg_shopdata_email')); ?>
42,16 → 49,10
<h3 class="panel-title"><?php echo __('Anschrift', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_street'), array('help' => 'wpsg_shopdata_street')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_zip'), array('help' => 'wpsg_shopdata_zip')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>
<?php echo wpsg_drawForm_Select('wpsg_shopdata_eu', __('Hauptsitz des Shopbetreiber befindet sich:', 'wpsg'), Array(
wpsg_AdminController::SHOPDATA_EU_GERMANY => __('in Deutschland', 'wpsg'),
wpsg_AdminController::SHOPDATA_EU_EU => __('innerhalb der EU', 'wpsg'),
wpsg_AdminController::SHOPDATA_EU_WORLD => __('im europäischen Ausland', 'wpsg')
), $this->get_option('wpsg_shopdata_eu'), array('help' => 'wpsg_shopdata_eu')); ?>
 
<?php echo wpsg_drawForm_Input('wpsg_shopdata_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_city'), array('help' => 'wpsg_shopdata_city')); ?>
<?php echo wpsg_drawForm_Select('wpsg_shopdata_country', __('Land', 'wpsg'), $countrys, $this->get_option('wpsg_shopdata_country'), array('help' => 'wpsg_shopdata_country')); ?>
</div>
</div>
60,16 → 61,17
<h3 class="panel-title"><?php echo __('Zweigstelle', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<?php echo wpsg_drawForm_Checkbox('wpsg_shopdata_2', __('Zweigstelle vorhanden', 'wpsg'), $this->get_option('wpsg_shopdata_2')); ?>
<div class="wpsg_shopdata_2_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_2_street'), array('help' => 'wpsg_shopdata_2_street')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_2_zip'), array('help' => 'wpsg_shopdata_2_zip')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_2_city'), array('help' => 'wpsg_shopdata_2_city')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_country', __('Land', 'wpsg'), $this->get_option('wpsg_shopdata_2_country'), array('help' => 'wpsg_shopdata_2_country')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_tel', __('Telefon', 'wpsg'), $this->get_option('wpsg_shopdata_2_tel'), array('help' => 'wpsg_shopdata_2_tel')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_fax', __('Fax', 'wpsg'), $this->get_option('wpsg_shopdata_2_fax'), array('help' => 'wpsg_shopdata_2_fax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_2_email'), array('help' => 'wpsg_shopdata_2_email')); ?>
</div>
<?php echo wpsg_drawForm_Checkbox('wpsg_shopdata_2', __('Zweigstelle vorhanden', 'wpsg'), $this->get_option('wpsg_shopdata_2'), array('help' => 'wpsg_shopdata_2')); ?>
<div class="wpsg_shopdata_2_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_2_street')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_2_zip')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_city', __('Ort', 'wpsg'), $this->get_option('wpsg_shopdata_2_city')); ?>
<?php echo wpsg_drawForm_Select('wpsg_shopdata_2_country', __('Land', 'wpsg'), $countrys, $this->get_option('wpsg_shopdata_2_country')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_tel', __('Telefon', 'wpsg'), $this->get_option('wpsg_shopdata_2_tel')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_fax', __('Fax', 'wpsg'), $this->get_option('wpsg_shopdata_2_fax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_2_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_2_email')); ?>
</div>
</div>
</div>
78,32 → 80,32
<h3 class="panel-title"><?php echo __('Bankdaten', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_name', __('Name der Bank', 'wpsg'), $this->get_option('wpsg_shopdata_bank_name'), array('help' => 'wpsg_shopdata_bank_name')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_owner', __('Kontoinhaber', 'wpsg'), $this->get_option('wpsg_shopdata_bank_owner'), array('help' => 'wpsg_shopdata_bank_owner')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_iban', __('IBAN Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_iban'), array('help' => 'wpsg_shopdata_bank_iban')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_bic', __('BIC Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_bic'), array('help' => 'wpsg_shopdata_bank_bic')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_qriban', __('QR-IBAN Nummer', 'wpsg'), $this->get_option('wpsg_shopdata_bank_qriban'), array('help' => 'wpsg_shopdata_bank_qriban')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_bank_besr', __('BESR-ID', 'wpsg'), $this->get_option('wpsg_shopdata_bank_besr'), array('help' => 'wpsg_shopdata_bank_besr')); ?>
</div>
</div>
<?php /* only Standort = Ausland */ ?>
<div class="wpsg_shopdata_eu wpsg_shopdata_eu_<?php echo wpsg_AdminController::SHOPDATA_EU_WORLD; ?>" style="display:<?php echo (($this->get_option('wpsg_shopdata_eu') == wpsg_AdminController::SHOPDATA_EU_WORLD || $this->get_option('wpsg_shopdata_eu') === false)?'block':'none'); ?>;">
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title"><?php echo __('EU-Vertreter', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_name', __('Name des EU-Vertreters', 'wpsg'), $this->get_option('wpsg_shopdata_eu_name'), array('help' => 'wpsg_shopdata_eu_name')); ?>
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title"><?php echo __('EU-Vertreter', 'wpsg'); ?></h3>
</div>
<div class="panel-body">
<?php echo wpsg_drawForm_Checkbox('wpsg_shopdata_3', __('EU-Vertreter vorhanden', 'wpsg'), $this->get_option('wpsg_shopdata_3'), array('help' => 'wpsg_shopdata_3')); ?>
<div class="wpsg_shopdata_3_activ" style="display:none;">
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_name', __('Name des EU-Vertreters', 'wpsg'), $this->get_option('wpsg_shopdata_eu_name')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_eu_street'), array('help' => 'wpsg_shopdata_eu_street')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_eu_zip'), array('help' => 'wpsg_shopdata_eu_zip')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_city', __('Stadt', 'wpsg'), $this->get_option('wpsg_shopdata_eu_city'), array('help' => 'wpsg_shopdata_eu_city')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_country', __('Land', 'wpsg'), $this->get_option('wpsg_shopdata_eu_country'), array('help' => 'wpsg_shopdata_eu_country')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_street', __('Straße', 'wpsg'), $this->get_option('wpsg_shopdata_eu_street')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_zip', __('Postleitzahl', 'wpsg'), $this->get_option('wpsg_shopdata_eu_zip')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_city', __('Stadt', 'wpsg'), $this->get_option('wpsg_shopdata_eu_city')); ?>
<?php echo wpsg_drawForm_Select('wpsg_shopdata_eu_country', __('Land', 'wpsg'), $countrys, $this->get_option('wpsg_shopdata_eu_country')); ?>
<br />
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_tel'), array('help' => 'wpsg_shopdata_eu_tel')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_fax'), array('help' => 'wpsg_shopdata_eu_fax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_eu_email'), array('help' => 'wpsg_shopdata_eu_email')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_tel', __('Telefonnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_tel')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_fax', __('Faxnummer', 'wpsg'), $this->get_option('wpsg_shopdata_eu_fax')); ?>
<?php echo wpsg_drawForm_Input('wpsg_shopdata_eu_email', __('E-Mail', 'wpsg'), $this->get_option('wpsg_shopdata_eu_email')); ?>
</div>
</div>
</div>
121,7 → 123,13
} ).change();
jQuery('#wpsg_shopdata_3').bind('change', function() {
 
if (jQuery(this).is(':checked')) jQuery('.wpsg_shopdata_3_activ').show();
else jQuery('.wpsg_shopdata_3_activ').hide();
 
} ).change();
 
} );
/* ]]> */</script>
/warenkorb/checkout2.phtml
33,7 → 33,7
<?php } else { ?>
<div class="wpsg_payship_name"><?php echo __($s['name'], 'wpsg'); ?></div>
<?php } ?>
<?php if ((isset($s['hint']) && trim($s['hint']) != '') || wpsg_getFloat($s['price']) > 0) { ?>
<?php if ((isset($s['hint']) && trim($s['hint']) != '') || wpsg_getFloat($s['price']) > 0) { ?>
<div id="shipping_<?php echo $s['id']; ?>_hint" class="shippay_hint">
<?php if ($s['price'] > 0) { ?>
<?php echo __('Gebühr', 'wpsg'); ?>: <?php echo wpsg_ff($s['price'], $this->get_option('wpsg_currency')); ?><br />
104,8 → 104,12
</form>
<div style="position:fixed; left:0; top:0; width:100vw; height:100vh; background-color:rgba(255, 255, 255, 0.5); display:none;" id="pppl_loading_blocker"></div>
<script type="text/javascript">/* <![CDATA[ */
 
const el_pppl_loading_blocker = document.getElementById('pppl_loading_blocker');
function wpsg_setShipPay(jqElement)
{
 
122,6 → 126,8
 
jQuery('.shippay_wrap .shippay_item_wrap').bind('click', function() {
 
el_pppl_loading_blocker.style.display = 'block';
wpsg_setShipPay(jQuery(this));
jQuery.ajax( {
132,7 → 138,11
'wpsg_form_data': jQuery('#wpsg_checkout_form').serialize()
},
'async': true,
'success': function(data) { }
'success': function(data) {
location.reload();
}
} );
} );
/produkt/addedit_texte.phtml
13,7 → 13,6
{
wp_print_scripts('editor');
if (function_exists('add_thickbox')) add_thickbox();
wp_print_scripts('media-upload');
if (function_exists('wp_tiny_mce')) wp_tiny_mce();
wp_admin_css();
42,6 → 41,7
?>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
 
<?php $this->callMods('product_addedit_before_longtext'); ?>
<?php echo wpsg_drawForm_AdminboxStart(__('Langtext', 'wpsg')); ?>
<?php
/produkt/addedit_productcodes.phtml
75,19 → 75,13
</div>
<?php $GLOBALS['wpsg_vue_3.2.47_loaded'] = ($GLOBALS['wpsg_vue_3.2.47_loaded']??0) + 1; if ($GLOBALS['wpsg_vue_3.2.47_loaded'] <= 1) { ?>
<script src="<?php echo WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/views/js/vue-3.2.47.global.min.js'; ?>"></script>
<?php } ?>
<script>
<script type="module">
import { ref, createApp, onMounted, computed } from '<?php echo plugin_dir_url(__FILE__); ?>/../../js/vue.esm-browser.js';
 
(() => {
 
const ref = Vue.ref;
const computed = Vue.computed;
const onMounted = Vue.onMounted;
 
const app = Vue.createApp({
document.addEventListener('DOMContentLoaded', function() {
const app = createApp({
setup() {
 
const data = ref(<?php echo json_encode($arData); ?>);
131,7 → 125,7
}
}).mount('#wpsg_mod_productcodes_app');
 
})();
});
</script>
/warenkorb/overview.phtml
18,7 → 18,7
<?php $GLOBALS['step'] = 4; $this->render(WPSG_PATH_VIEW.'/warenkorb/progress.phtml'); ?>
<?php } ?>
 
<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>">
<form method="post" action="<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>" id="wpsg_form">
 
<h2><?php echo __('Zusammenfassung', 'wpsg'); ?></h2>
 
27,7 → 27,7
<?php if (!$this->hasMod('wpsg_mod_ordercondition')) { ?>
<div class="wpsg_agb">
<label>
<input type="checkbox" value="1" name="wpsg[agb]" />
<input type="checkbox" value="1" name="wpsg[agb]" required />
<?php echo wpsg_translate(__('Ich habe die #1# des Anbieters gelesen und erkläre mit dem Absenden der Bestellung mein Einverständnis. Die #2# habe ich zur Kenntnis genommen.', 'wpsg'),
'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_AGB).'">'.__('AGB', 'wpsg').'</a>',
'<a target="_blank" href="'.$this->getURL(wpsg_ShopController::URL_WIDERRUF).'">'.__('Widerrufsbelehrung', 'wpsg').'</a>');
166,6 → 166,13
<?php if (wpsg_isSizedString($this->view['basket']['checkout']['ustidnr'])) { ?>
<?php echo __('UStIdNr.', 'wpsg'); ?>: <?php echo wpsg_hspc($this->view['basket']['checkout']['ustidnr']); ?><br /><br />
<?php } ?>
<?php if (trim($this->view['basket']['checkout']['email_einvoice']??'') !== '') { ?>
<div class="einvoice_input">
<span><?php echo __('E-Mail für eRechnung:', 'wpsg'); ?></span>
<span><?php echo $this->view['basket']['checkout']['email_einvoice']; ?></span>
</div>
<?php } ?>
 
<div class="subtitle">
<?php echo __('Bestellte Produkte', 'wpsg'); ?>&nbsp;
/mailtemplates/html/customer.phtml
1,4 → 1,9
<?php
 
$oCustomer = wpsg_customer::getInstance(intval($this->view['basket']['checkout']['k_id']));
?>
 
<?php if ($this->hasMod('wpsg_mod_shippingadress') && $this->callMod('wpsg_mod_shippingadress', 'check_different_shippingadress', array('k_id' => $this->view['basket']['checkout']['k_id'], 'o_id' => $this->view['o_id']))) { ?>
<h2><?php echo __('Rechnungsadresse:', 'wpsg'); ?></h2>
 
40,7 → 45,13
<tr>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
</tr>
</tr>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<tr>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail (eRechnung)', 'wpsg'); ?>:</td>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a></td>
</tr>
<?php } ?>
</table>
 
<h2><?php echo __('Lieferadresse', 'wpsg'); ?>:</h2>
110,6 → 121,12
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail Adresse', 'wpsg'); ?>:</td>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?>"><?php echo wpsg_hspc($this->view['basket']['checkout']['email']); ?></a></td>
</tr>
<?php $email_einvoice = $oCustomer->getEMailEInvoice(); if ($email_einvoice !== null) { ?>
<tr>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col0"><?php echo __('E-Mail (eRechnung)', 'wpsg'); ?>:</td>
<td style="padding:2px; line-height:100%; vertical-align:middle;" class="col1"><a href="mailto:<?php echo htmlspecialchars($email_einvoice); ?>"><?php echo htmlspecialchars($email_einvoice); ?></a></td>
</tr>
<?php } ?>
</table>
 
<?php } ?>
169,12 → 186,28
require_once WPSG_PATH_LIB.'phpgirocode.class.php';
if (isset($this->view['mod_prepayment']['subject'])) {
if (isset($this->view['mod_prepayment']['subject']) && ($this->get_option('wpsg_mod_prepayment_qrcode') == true)) {
if (in_array('kundenmail.phtml', $this->arTemplateStack)) {
 
echo $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE));
if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '0') {
 
$qrcodes = array();
$qrcodes = $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['wpsg_mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 
foreach ($qrcodes as $qr) echo $qr;
 
} else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '1') {
 
echo $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 
} else if ($this->get_option('wpsg_mod_prepayment_qrcode_country') == '2') {
 
echo $this->callMod('wpsg_mod_prepayment', 'genQRCode', array($this->view['o_id'], $this->view['mod_prepayment']['subject'], $this->view['basket']['sum']['preis_gesamt_brutto'], 3, PhpGirocode::OUTPUT_FILE, $this->get_option('wpsg_mod_prepayment_qrcode_country'), $this->view['basket']));
 
}
 
}
}
/warenkorb/checkout.phtml
144,7 → 144,14
<label for="vname" class="wpsg_checkout"><?php echo __("Vorname:", "wpsg"); ?>
<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="vname" name="wpsg[checkout][vname]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['vname'])); ?>" />
<input
class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("vname", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text"
id="vname"
autocomplete="vname"
name="wpsg[checkout][vname]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['vname'])); ?>"
/>
</div>
<?php } ?>
153,7 → 160,14
<label for="name" class="wpsg_checkout"><?php echo __("Name:", "wpsg"); ?>
<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
</label>
<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="name" name="wpsg[checkout][name]" value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['name'])); ?>" />
<input
class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="text"
id="name"
autocomplete="name"
name="wpsg[checkout][name]"
value="<?php echo htmlspecialchars(wpsg_getStr($this->view['basket']['checkout']['name'])); ?>"
/>
</div>
<?php } ?>
191,6 → 205,20
<?php } ?>
<?php } ?>
<?php if (intval($this->view['pflicht']['eInvoice']??0) === 1) { ?>
<div class="wpsg_checkoutblock" id="wpsg_email_einvoice">
<label for="wpsg_email_einvoice_input" class="wpsg_checkout"><?php echo __("E-Mail (für eRechnung, optional)", "wpsg"); ?></label>
<input
class="wpsg_input_text wpsg_checkout <?php echo ((in_array("email_einvoice", (array)$this->view['error']))?'wpsg_error':''); ?>"
type="email"
id="wpsg_email_einvoice_input"
name="wpsg[checkout][email_einvoice]"
value="<?php echo htmlspecialchars($this->view['basket']['checkout']['email_einvoice']??''); ?>"
autocomplete="off"
/>
</div>
<?php } ?>
<?php if ($this->view['pflicht']['geb'] != '2') { ?>
<div class="wpsg_checkoutblock" id="wpsg_geburtsdatum">
<label for="geb" class="wpsg_checkout"><?php echo __('Geburtsdatum (Format: TT.MM.JJJJ):',"wpsg"); ?>
/warenkorb/basket.phtml
6,6 → 6,7
 
//wpsg_debug($this->view['basket']);
//wpsg_debug($this->view['basket']['arCalculation']);
//wpsg_debug($_SESSION['wpsg']);
//wpsg_debug($this->arShipping);
 
/produkttemplates/standard.phtml
68,7 → 68,7
 
<meta itemprop="image" content="<?php echo $att[0]; ?>" />
 
<a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $oProduct->getProductName(); ?>" href="<?php echo $att[0]; ?>" class="thickbox">
<a <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $oProduct->getProductName(); ?>" href="<?php echo $att[0]; ?>" data-fslightbox="<?php echo $this->getTemplateIndex(); ?>">
 
<?php echo wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false, array()); ?>
189,14 → 189,35
<div class="wpsg_clear"></div>
<?php /* Lagerbestand START*/ ?>
<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?>
<?php
if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') {
$stock_source_display = '0'; // Variantenbestand
if ($oProduct->getMeta('wpsg_vp_product_stock_display', false, '0') === '0') {
// Einstellung
if ($this->get_option('wpsg_vp_product_stock_display') === '1') $stock_source_display = '1';
} else if ($oProduct->getMeta('wpsg_vp_product_stock_display') === '1') {
$stock_source_display = '1'; // Produktbestand
}
$stock_display = $this->view['data']['stock'];
if ($stock_source_display === '1') $stock_display = $oProduct->__get('stock');
?>
<div class="wpsg_mod_produktindex_stock">
<?php if (intval($this->view['data']['stock']) > 0) {?>
<?php if ($stock_display > 0) {?>
<label><?php echo __('Lagerbestand', 'wpsg'); ?></label>
<?php echo wpsg_translate(__('#1# Artikel auf Lager','wpsg'), $this->view['data']['stock']); ?>
<?php echo wpsg_translate(__('#1# Artikel auf Lager','wpsg'), $stock_display); ?>
<?php } else { ?>
291,7 → 312,7
<?php /* Varianten ENDE */ ?>
<?php $this->callMods('product_bottom', array(&$this->view['data']['product_key'], $this->getTemplateIndex())); ?>
<div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
<?php if ($this->view['oProduct']->canOrder()) { ?>
300,7 → 321,7
<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?></label>
 
<input type="text" value="<?php echo ((wpsg_isSizedInt($this->view['data']['menge']))?$this->view['data']['menge']:'1'); ?>" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" <?php echo (($this->view['data']['basket_multiple'] == 4)?' readonly="readonly" ':''); ?> />
<?php /* Urlaubsmodus aktiv */ ?>
<?php if ($this->hasMod('wpsg_mod_deliverytime') && ($this->get_option('wpsg_mod_deliverytime_holiday') == '1')) { ?>
/produkttemplates/standard3.phtml
32,7 → 32,7
</div>
<div class="view">
<?php foreach ($arAttachmentIDsAll as $k => $image_id) { ?>
<a class="thickbox" id="<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>" rel="gallery-<?php echo $this->getTemplateIndex(); ?>" href="<?php echo \wp_get_attachment_image_src($image_id, 'full')[0]; ?>"></a>
<a class="" id="<?php echo $this->getTemplateIndex(); ?>_<?php echo $k; ?>" data-fslightbox="<?php echo $this->getTemplateIndex(); ?>" href="<?php echo \wp_get_attachment_image_src($image_id, 'full')[0]; ?>"></a>
<?php } ?>
<div class="wpsg_product_slider">
 
/produkt/addedit_general.phtml
38,7 → 38,9
<?php } ?>
<?php echo wpsg_drawForm_TextEnd(__('Übersetzungen', 'wpsg')); ?>
<?php } ?>
<?php echo wpsg_drawForm_Input('detailname', __('Produktname (Detail)', 'wpsg'), wpsg_getStr($this->view['data']['detailname'])); ?>
<?php echo wpsg_drawForm_Input('detailname', __('Produktname (Detail)', 'wpsg'), wpsg_getStr($this->view['data']['detailname']), [
'help' => 'product_detailname', 'hint' => __('Wird im Frontend anstelle des Produktnamens verwendet', 'wpsg')
]); ?>
<?php echo wpsg_drawForm_Input('shortdesc', __('Produktbeschreibung (Kurz)', 'wpsg'), wpsg_getStr($this->view['data']['shortdesc'])); ?>
<?php if (wpsg_isSizedInt($this->view['data']['id']) && !isset($_REQUEST['wpsg_lang'])) { ?>
<?php echo wpsg_drawForm_Input(false, __('Produkt ID', 'wpsg'), wpsg_getStr($this->view['data']['id']), array('readonly' => true)); ?>
/produkttemplates/standard2.phtml
70,7 → 70,7
<?php $att = wp_get_attachment_image_src($arAttachmentIDsAll[$i], array(800, 600), false); ?>
<a data-index="<?php echo $i; ?>" <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> rel="gallery-wpsg-<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="thickbox bigimg">
<a data-index="<?php echo $i; ?>" <?php if ($arAttachmentIDsAll[$i] != $arAttachmentID) echo 'style="display:none;"'; ?> data-fslightbox="<?php echo $this->getTemplateIndex(); ?>" title="<?php echo $this->getProductName($this->view['data']['id']); ?>" href="<?php echo $att[0]; ?>" class="bigimg">
 
<?php echo wp_get_attachment_image($arAttachmentIDsAll[$i], array(300, 300), false, array()); ?>
/js/tiny-slider-2.9.2.min.js
0,0 → 1,0
var tns=function(){Object.keys||(Object.keys=function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var t=window,Oi=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window,Di=e.cancelAnimationFrame||e.mozCancelAnimationFrame||function(t){clearTimeout(t)};function Hi(){for(var t,e,n,i=arguments[0]||{},a=1,r=arguments.length;a<r;a++)if(null!==(t=arguments[a]))for(e in t)i!==(n=t[e])&&void 0!==n&&(i[e]=n);return i}function ki(t){return 0<=["true","false"].indexOf(t)?JSON.parse(t):t}function Ri(t,e,n,i){if(i)try{t.setItem(e,n)}catch(t){}return n}function Ii(){var t=document,e=t.body;return e||((e=t.createElement("body")).fake=!0),e}var n=document.documentElement;function Pi(t){var e="";return t.fake&&(e=n.style.overflow,t.style.background="",t.style.overflow=n.style.overflow="hidden",n.appendChild(t)),e}function zi(t,e){t.fake&&(t.remove(),n.style.overflow=e,n.offsetHeight)}function Wi(t,e,n,i){"insertRule"in t?t.insertRule(e+"{"+n+"}",i):t.addRule(e,n,i)}function Fi(t){return("insertRule"in t?t.cssRules:t.rules).length}function qi(t,e,n){for(var i=0,a=t.length;i<a;i++)e.call(n,t[i],i)}var i="classList"in document.createElement("_"),ji=i?function(t,e){return t.classList.contains(e)}:function(t,e){return 0<=t.className.indexOf(e)},Vi=i?function(t,e){ji(t,e)||t.classList.add(e)}:function(t,e){ji(t,e)||(t.className+=" "+e)},Gi=i?function(t,e){ji(t,e)&&t.classList.remove(e)}:function(t,e){ji(t,e)&&(t.className=t.className.replace(e,""))};function Qi(t,e){return t.hasAttribute(e)}function Xi(t,e){return t.getAttribute(e)}function r(t){return void 0!==t.item}function Yi(t,e){if(t=r(t)||t instanceof Array?t:[t],"[object Object]"===Object.prototype.toString.call(e))for(var n=t.length;n--;)for(var i in e)t[n].setAttribute(i,e[i])}function Ki(t,e){t=r(t)||t instanceof Array?t:[t];for(var n=(e=e instanceof Array?e:[e]).length,i=t.length;i--;)for(var a=n;a--;)t[i].removeAttribute(e[a])}function Ji(t){for(var e=[],n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function Ui(t,e){"none"!==t.style.display&&(t.style.display="none")}function _i(t,e){"none"===t.style.display&&(t.style.display="")}function Zi(t){return"none"!==window.getComputedStyle(t).display}function $i(e){if("string"==typeof e){var n=[e],i=e.charAt(0).toUpperCase()+e.substr(1);["Webkit","Moz","ms","O"].forEach(function(t){"ms"===t&&"transform"!==e||n.push(t+i)}),e=n}for(var t=document.createElement("fakeelement"),a=(e.length,0);a<e.length;a++){var r=e[a];if(void 0!==t.style[r])return r}return!1}function ta(t,e){var n=!1;return/^Webkit/.test(t)?n="webkit"+e+"End":/^O/.test(t)?n="o"+e+"End":t&&(n=e.toLowerCase()+"end"),n}var a=!1;try{var o=Object.defineProperty({},"passive",{get:function(){a=!0}});window.addEventListener("test",null,o)}catch(t){}var u=!!a&&{passive:!0};function ea(t,e,n){for(var i in e){var a=0<=["touchstart","touchmove"].indexOf(i)&&!n&&u;t.addEventListener(i,e[i],a)}}function na(t,e){for(var n in e){var i=0<=["touchstart","touchmove"].indexOf(n)&&u;t.removeEventListener(n,e[n],i)}}function ia(){return{topics:{},on:function(t,e){this.topics[t]=this.topics[t]||[],this.topics[t].push(e)},off:function(t,e){if(this.topics[t])for(var n=0;n<this.topics[t].length;n++)if(this.topics[t][n]===e){this.topics[t].splice(n,1);break}},emit:function(e,n){n.type=e,this.topics[e]&&this.topics[e].forEach(function(t){t(n,e)})}}}var aa=function(O){O=Hi({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0},O||{});var D=document,h=window,a={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},e={},n=O.useLocalStorage;if(n){var t=navigator.userAgent,i=new Date;try{(e=h.localStorage)?(e.setItem(i,i),n=e.getItem(i)==i,e.removeItem(i)):n=!1,n||(e={})}catch(t){n=!1}n&&(e.tnsApp&&e.tnsApp!==t&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(t){e.removeItem(t)}),localStorage.tnsApp=t)}var r,o,u,l,s,c,f,y=e.tC?ki(e.tC):Ri(e,"tC",function(){var t=document,e=Ii(),n=Pi(e),i=t.createElement("div"),a=!1;e.appendChild(i);try{for(var r,o="(10px * 10)",u=["calc"+o,"-moz-calc"+o,"-webkit-calc"+o],l=0;l<3;l++)if(r=u[l],i.style.width=r,100===i.offsetWidth){a=r.replace(o,"");break}}catch(t){}return e.fake?zi(e,n):i.remove(),a}(),n),g=e.tPL?ki(e.tPL):Ri(e,"tPL",function(){var t,e=document,n=Ii(),i=Pi(n),a=e.createElement("div"),r=e.createElement("div"),o="";a.className="tns-t-subp2",r.className="tns-t-ct";for(var u=0;u<70;u++)o+="<div></div>";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?zi(n,i):a.remove(),t}(),n),H=e.tMQ?ki(e.tMQ):Ri(e,"tMQ",(o=document,u=Ii(),l=Pi(u),s=o.createElement("div"),c=o.createElement("style"),f="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",c.type="text/css",s.className="tns-mq-test",u.appendChild(c),u.appendChild(s),c.styleSheet?c.styleSheet.cssText=f:c.appendChild(o.createTextNode(f)),r=window.getComputedStyle?window.getComputedStyle(s).position:s.currentStyle.position,u.fake?zi(u,l):s.remove(),"absolute"===r),n),d=e.tTf?ki(e.tTf):Ri(e,"tTf",$i("transform"),n),v=e.t3D?ki(e.t3D):Ri(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=Ii(),a=Pi(i),r=n.createElement("p"),o=9<t.length?"-"+t.slice(0,-9).toLowerCase()+"-":"";return o+="transform",i.insertBefore(r,null),r.style[t]="translate3d(1px,1px,1px)",e=window.getComputedStyle(r).getPropertyValue(o),i.fake?zi(i,a):r.remove(),void 0!==e&&0<e.length&&"none"!==e}(d),n),x=e.tTDu?ki(e.tTDu):Ri(e,"tTDu",$i("transitionDuration"),n),p=e.tTDe?ki(e.tTDe):Ri(e,"tTDe",$i("transitionDelay"),n),b=e.tADu?ki(e.tADu):Ri(e,"tADu",$i("animationDuration"),n),m=e.tADe?ki(e.tADe):Ri(e,"tADe",$i("animationDelay"),n),C=e.tTE?ki(e.tTE):Ri(e,"tTE",ta(x,"Transition"),n),w=e.tAE?ki(e.tAE):Ri(e,"tAE",ta(b,"Animation"),n),M=h.console&&"function"==typeof h.console.warn,T=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],E={};if(T.forEach(function(t){if("string"==typeof O[t]){var e=O[t],n=D.querySelector(e);if(E[t]=e,!n||!n.nodeName)return void(M&&console.warn("Can't find",O[t]));O[t]=n}}),!(O.container.children.length<1)){var k=O.responsive,R=O.nested,I="carousel"===O.mode;if(k){0 in k&&(O=Hi(O,k[0]),delete k[0]);var A={};for(var N in k){var L=k[N];L="number"==typeof L?{items:L}:L,A[N]=L}k=A,A=null}if(I||function t(e){for(var n in e)I||("slideBy"===n&&(e[n]="page"),"edgePadding"===n&&(e[n]=!1),"autoHeight"===n&&(e[n]=!1)),"responsive"===n&&t(e[n])}(O),!I){O.axis="horizontal",O.slideBy="page",O.edgePadding=!1;var P=O.animateIn,z=O.animateOut,B=O.animateDelay,W=O.animateNormal}var S,F,q="horizontal"===O.axis,j=D.createElement("div"),V=D.createElement("div"),G=O.container,Q=G.parentNode,X=G.outerHTML,Y=G.children,K=Y.length,J=sn(),U=!1;k&&Bn(),I&&(G.className+=" tns-vpfix");var _,Z,$,tt,et,nt,it,at,rt=O.autoWidth,ot=vn("fixedWidth"),ut=vn("edgePadding"),lt=vn("gutter"),st=fn(),ct=vn("center"),ft=rt?1:Math.floor(vn("items")),dt=vn("slideBy"),vt=O.viewportMax||O.fixedWidthViewportWidth,pt=vn("arrowKeys"),mt=vn("speed"),ht=O.rewind,yt=!ht&&O.loop,gt=vn("autoHeight"),xt=vn("controls"),bt=vn("controlsText"),Ct=vn("nav"),wt=vn("touch"),Mt=vn("mouseDrag"),Tt=vn("autoplay"),Et=vn("autoplayTimeout"),At=vn("autoplayText"),Nt=vn("autoplayHoverPause"),Lt=vn("autoplayResetOnVisibility"),Bt=(at=document.createElement("style"),it&&at.setAttribute("media",it),document.querySelector("head").appendChild(at),at.sheet?at.sheet:at.styleSheet),St=O.lazyload,Ot=(O.lazyloadSelector,[]),Dt=yt?(et=function(){{if(rt||ot&&!vt)return K-1;var t=ot?"fixedWidth":"items",e=[];if((ot||O[t]<K)&&e.push(O[t]),k)for(var n in k){var i=k[n][t];i&&(ot||i<K)&&e.push(i)}return e.length||e.push(0),Math.ceil(ot?vt/Math.min.apply(null,e):Math.max.apply(null,e))}}(),nt=I?Math.ceil((5*et-K)/2):4*et-K,nt=Math.max(et,nt),dn("edgePadding")?nt+1:nt):0,Ht=I?K+2*Dt:K+Dt,kt=!(!ot&&!rt||yt),Rt=ot?ni():null,It=!I||!yt,Pt=q?"left":"top",zt="",Wt="",Ft=ot?function(){return ct&&!yt?K-1:Math.ceil(-Rt/(ot+lt))}:rt?function(){for(var t=Ht;t--;)if(_[t]>=-Rt)return t}:function(){return ct&&I&&!yt?K-1:yt||I?Math.max(0,Ht-Math.ceil(ft)):Ht-1},qt=on(vn("startIndex")),jt=qt,Vt=(rn(),0),Gt=rt?null:Ft(),Qt=O.preventActionWhenRunning,Xt=O.swipeAngle,Yt=!Xt||"?",Kt=!1,Jt=O.onInit,Ut=new ia,_t=" tns-slider tns-"+O.mode,Zt=G.id||(tt=window.tnsId,window.tnsId=tt?tt+1:1,"tns"+window.tnsId),$t=vn("disable"),te=!1,ee=O.freezable,ne=!(!ee||rt)&&Ln(),ie=!1,ae={click:fi,keydown:function(t){t=xi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&(0===e?Ee.disabled||fi(t,-1):Ae.disabled||fi(t,1))}},re={click:function(t){if(Kt){if(Qt)return;si()}var e=bi(t=xi(t));for(;e!==Se&&!Qi(e,"data-nav");)e=e.parentNode;if(Qi(e,"data-nav")){var n=ke=Number(Xi(e,"data-nav")),i=ot||rt?n*K/De:n*ft,a=ve?n:Math.min(Math.ceil(i),K-1);ci(a,t),Re===n&&(qe&&hi(),ke=-1)}},keydown:function(t){t=xi(t);var e=D.activeElement;if(!Qi(e,"data-nav"))return;var n=[a.LEFT,a.RIGHT,a.ENTER,a.SPACE].indexOf(t.keyCode),i=Number(Xi(e,"data-nav"));0<=n&&(0===n?0<i&&gi(Be[i-1]):1===n?i<De-1&&gi(Be[i+1]):ci(ke=i,t))}},oe={mouseover:function(){qe&&(vi(),je=!0)},mouseout:function(){je&&(di(),je=!1)}},ue={visibilitychange:function(){D.hidden?qe&&(vi(),Ge=!0):Ge&&(di(),Ge=!1)}},le={keydown:function(t){t=xi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&fi(t,0===e?-1:1)}},se={touchstart:Ti,touchmove:Ei,touchend:Ai,touchcancel:Ai},ce={mousedown:Ti,mousemove:Ei,mouseup:Ai,mouseleave:Ai},fe=dn("controls"),de=dn("nav"),ve=!!rt||O.navAsThumbnails,pe=dn("autoplay"),me=dn("touch"),he=dn("mouseDrag"),ye="tns-slide-active",ge="tns-complete",xe={load:function(t){zn(bi(t))},error:function(t){e=bi(t),Vi(e,"failed"),Wn(e);var e}},be="force"===O.preventScrollOnTouch;if(fe)var Ce,we,Me=O.controlsContainer,Te=O.controlsContainer?O.controlsContainer.outerHTML:"",Ee=O.prevButton,Ae=O.nextButton,Ne=O.prevButton?O.prevButton.outerHTML:"",Le=O.nextButton?O.nextButton.outerHTML:"";if(de)var Be,Se=O.navContainer,Oe=O.navContainer?O.navContainer.outerHTML:"",De=rt?K:Li(),He=0,ke=-1,Re=ln(),Ie=Re,Pe="tns-nav-active",ze="Carousel Page ",We=" (Current Slide)";if(pe)var Fe,qe,je,Ve,Ge,Qe="forward"===O.autoplayDirection?1:-1,Xe=O.autoplayButton,Ye=O.autoplayButton?O.autoplayButton.outerHTML:"",Ke=["<span class='tns-visually-hidden'>"," animation</span>"];if(me||he)var Je,Ue,_e={},Ze={},$e=!1,tn=q?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};rt||an($t||ne),d&&(Pt=d,zt="translate",v?(zt+=q?"3d(":"3d(0px, ",Wt=q?", 0px, 0px)":", 0px)"):(zt+=q?"X(":"Y(",Wt=")")),I&&(G.className=G.className.replace("tns-vpfix","")),function(){dn("gutter");j.className="tns-outer",V.className="tns-inner",j.id=Zt+"-ow",V.id=Zt+"-iw",""===G.id&&(G.id=Zt);_t+=g||rt?" tns-subpixel":" tns-no-subpixel",_t+=y?" tns-calc":" tns-no-calc",rt&&(_t+=" tns-autowidth");_t+=" tns-"+O.axis,G.className+=_t,I?((S=D.createElement("div")).id=Zt+"-mw",S.className="tns-ovh",j.appendChild(S),S.appendChild(V)):j.appendChild(V);if(gt){var t=S||V;t.className+=" tns-ah"}if(Q.insertBefore(j,G),V.appendChild(G),qi(Y,function(t,e){Vi(t,"tns-item"),t.id||(t.id=Zt+"-item"+e),!I&&W&&Vi(t,W),Yi(t,{"aria-hidden":"true",tabindex:"-1"})}),Dt){for(var e=D.createDocumentFragment(),n=D.createDocumentFragment(),i=Dt;i--;){var a=i%K,r=Y[a].cloneNode(!0);if(Ki(r,"id"),n.insertBefore(r,n.firstChild),I){var o=Y[K-1-a].cloneNode(!0);Ki(o,"id"),e.appendChild(o)}}G.insertBefore(e,G.firstChild),G.appendChild(n),Y=G.children}}(),function(){if(!I)for(var t=qt,e=qt+Math.min(K,ft);t<e;t++){var n=Y[t];n.style.left=100*(t-qt)/ft+"%",Vi(n,P),Gi(n,W)}q&&(g||rt?(Wi(Bt,"#"+Zt+" > .tns-item","font-size:"+h.getComputedStyle(Y[0]).fontSize+";",Fi(Bt)),Wi(Bt,"#"+Zt,"font-size:0;",Fi(Bt))):I&&qi(Y,function(t,e){var n;t.style.marginLeft=(n=e,y?y+"("+100*n+"% / "+Ht+")":100*n/Ht+"%")}));if(H){if(x){var i=S&&O.autoHeight?xn(O.speed):"";Wi(Bt,"#"+Zt+"-mw",i,Fi(Bt))}i=pn(O.edgePadding,O.gutter,O.fixedWidth,O.speed,O.autoHeight),Wi(Bt,"#"+Zt+"-iw",i,Fi(Bt)),I&&(i=q&&!rt?"width:"+mn(O.fixedWidth,O.gutter,O.items)+";":"",x&&(i+=xn(mt)),Wi(Bt,"#"+Zt,i,Fi(Bt))),i=q&&!rt?hn(O.fixedWidth,O.gutter,O.items):"",O.gutter&&(i+=yn(O.gutter)),I||(x&&(i+=xn(mt)),b&&(i+=bn(mt))),i&&Wi(Bt,"#"+Zt+" > .tns-item",i,Fi(Bt))}else{Gn(),V.style.cssText=pn(ut,lt,ot,gt),I&&q&&!rt&&(G.style.width=mn(ot,lt,ft));var i=q&&!rt?hn(ot,lt,ft):"";lt&&(i+=yn(lt)),i&&Wi(Bt,"#"+Zt+" > .tns-item",i,Fi(Bt))}if(k&&H)for(var a in k){a=parseInt(a);var r=k[a],i="",o="",u="",l="",s="",c=rt?null:vn("items",a),f=vn("fixedWidth",a),d=vn("speed",a),v=vn("edgePadding",a),p=vn("autoHeight",a),m=vn("gutter",a);x&&S&&vn("autoHeight",a)&&"speed"in r&&(o="#"+Zt+"-mw{"+xn(d)+"}"),("edgePadding"in r||"gutter"in r)&&(u="#"+Zt+"-iw{"+pn(v,m,f,d,p)+"}"),I&&q&&!rt&&("fixedWidth"in r||"items"in r||ot&&"gutter"in r)&&(l="width:"+mn(f,m,c)+";"),x&&"speed"in r&&(l+=xn(d)),l&&(l="#"+Zt+"{"+l+"}"),("fixedWidth"in r||ot&&"gutter"in r||!I&&"items"in r)&&(s+=hn(f,m,c)),"gutter"in r&&(s+=yn(m)),!I&&"speed"in r&&(x&&(s+=xn(d)),b&&(s+=bn(d))),s&&(s="#"+Zt+" > .tns-item{"+s+"}"),(i=o+u+l+s)&&Bt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Bt.cssRules.length)}}(),Cn();var en=yt?I?function(){var t=Vt,e=Gt;t+=dt,e-=dt,ut?(t+=1,e-=1):ot&&(st+lt)%(ot+lt)&&(e-=1),Dt&&(e<qt?qt-=K:qt<t&&(qt+=K))}:function(){if(Gt<qt)for(;Vt+K<=qt;)qt-=K;else if(qt<Vt)for(;qt<=Gt-K;)qt+=K}:function(){qt=Math.max(Vt,Math.min(Gt,qt))},nn=I?function(){var e,n,i,a,t,r,o,u,l,s,c;ti(G,""),x||!mt?(ri(),mt&&Zi(G)||si()):(e=G,n=Pt,i=zt,a=Wt,t=ii(),r=mt,o=si,u=Math.min(r,10),l=0<=t.indexOf("%")?"%":"px",t=t.replace(l,""),s=Number(e.style[n].replace(i,"").replace(a,"").replace(l,"")),c=(t-s)/r*u,setTimeout(function t(){r-=u,s+=c,e.style[n]=i+s+l+a,0<r?setTimeout(t,u):o()},u)),q||Ni()}:function(){Ot=[];var t={};t[C]=t[w]=si,na(Y[jt],t),ea(Y[qt],t),oi(jt,P,z,!0),oi(qt,W,P),C&&w&&mt&&Zi(G)||si()};return{version:"2.9.2",getInfo:Si,events:Ut,goTo:ci,play:function(){Tt&&!qe&&(mi(),Ve=!1)},pause:function(){qe&&(hi(),Ve=!0)},isOn:U,updateSliderHeight:Xn,refresh:Cn,destroy:function(){if(Bt.disabled=!0,Bt.ownerNode&&Bt.ownerNode.remove(),na(h,{resize:An}),pt&&na(D,le),Me&&na(Me,ae),Se&&na(Se,re),na(G,oe),na(G,ue),Xe&&na(Xe,{click:yi}),Tt&&clearInterval(Fe),I&&C){var t={};t[C]=si,na(G,t)}wt&&na(G,se),Mt&&na(G,ce);var r=[X,Te,Ne,Le,Oe,Ye];for(var e in T.forEach(function(t,e){var n="container"===t?j:O[t];if("object"==typeof n){var i=!!n.previousElementSibling&&n.previousElementSibling,a=n.parentNode;n.outerHTML=r[e],O[t]=i?i.nextElementSibling:a.firstElementChild}}),T=P=z=B=W=q=j=V=G=Q=X=Y=K=F=J=rt=ot=ut=lt=st=ft=dt=vt=pt=mt=ht=yt=gt=Bt=St=_=Ot=Dt=Ht=kt=Rt=It=Pt=zt=Wt=Ft=qt=jt=Vt=Gt=Xt=Yt=Kt=Jt=Ut=_t=Zt=$t=te=ee=ne=ie=ae=re=oe=ue=le=se=ce=fe=de=ve=pe=me=he=ye=ge=xe=Z=xt=bt=Me=Te=Ee=Ae=Ce=we=Ct=Se=Oe=Be=De=He=ke=Re=Ie=Pe=ze=We=Tt=Et=Qe=At=Nt=Xe=Ye=Lt=Ke=Fe=qe=je=Ve=Ge=_e=Ze=Je=$e=Ue=tn=wt=Mt=null,this)"rebuild"!==e&&(this[e]=null);U=!1},rebuild:function(){return aa(Hi(O,E))}}}function an(t){t&&(xt=Ct=wt=Mt=pt=Tt=Nt=Lt=!1)}function rn(){for(var t=I?qt-Dt:qt;t<0;)t+=K;return t%K+1}function on(t){return t=t?Math.max(0,Math.min(yt?K-1:K-ft,t)):0,I?t+Dt:t}function un(t){for(null==t&&(t=qt),I&&(t-=Dt);t<0;)t+=K;return Math.floor(t%K)}function ln(){var t,e=un();return t=ve?e:ot||rt?Math.ceil((e+1)*De/K-1):Math.floor(e/ft),!yt&&I&&qt===Gt&&(t=De-1),t}function sn(){return h.innerWidth||D.documentElement.clientWidth||D.body.clientWidth}function cn(t){return"top"===t?"afterbegin":"beforeend"}function fn(){var t=ut?2*ut-lt:0;return function t(e){var n,i,a=D.createElement("div");return e.appendChild(a),i=(n=a.getBoundingClientRect()).right-n.left,a.remove(),i||t(e.parentNode)}(Q)-t}function dn(t){if(O[t])return!0;if(k)for(var e in k)if(k[e][t])return!0;return!1}function vn(t,e){if(null==e&&(e=J),"items"===t&&ot)return Math.floor((st+lt)/(ot+lt))||1;var n=O[t];if(k)for(var i in k)e>=parseInt(i)&&t in k[i]&&(n=k[i][t]);return"slideBy"===t&&"page"===n&&(n=vn("items")),I||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function pn(t,e,n,i,a){var r="";if(void 0!==t){var o=t;e&&(o-=e),r=q?"margin: 0 "+o+"px 0 "+t+"px;":"margin: "+t+"px 0 "+o+"px 0;"}else if(e&&!n){var u="-"+e+"px";r="margin: 0 "+(q?u+" 0 0":"0 "+u+" 0")+";"}return!I&&a&&x&&i&&(r+=xn(i)),r}function mn(t,e,n){return t?(t+e)*Ht+"px":y?y+"("+100*Ht+"% / "+n+")":100*Ht/n+"%"}function hn(t,e,n){var i;if(t)i=t+e+"px";else{I||(n=Math.floor(n));var a=I?Ht:n;i=y?y+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==R?i+";":i+" !important;"}function yn(t){var e="";!1!==t&&(e=(q?"padding-":"margin-")+(q?"right":"bottom")+": "+t+"px;");return e}function gn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function xn(t){return gn(x,18)+"transition-duration:"+t/1e3+"s;"}function bn(t){return gn(b,17)+"animation-duration:"+t/1e3+"s;"}function Cn(){if(dn("autoHeight")||rt||!q){var t=G.querySelectorAll("img");qi(t,function(t){var e=t.src;e&&e.indexOf("data:image")<0?(ea(t,xe),t.src="",t.src=e,Vi(t,"loading")):St||zn(t)}),Oi(function(){jn(Ji(t),function(){Z=!0})}),!rt&&q&&(t=Fn(qt,Math.min(qt+ft-1,Ht-1))),St?wn():Oi(function(){jn(Ji(t),wn)})}else I&&ai(),Tn(),En()}function wn(){if(rt){var e=yt?qt:K-1;!function t(){Y[e-1].getBoundingClientRect().right.toFixed(2)===Y[e].getBoundingClientRect().left.toFixed(2)?Mn():setTimeout(function(){t()},16)}()}else Mn()}function Mn(){q&&!rt||(Yn(),rt?(Rt=ni(),ee&&(ne=Ln()),Gt=Ft(),an($t||ne)):Ni()),I&&ai(),Tn(),En()}function Tn(){if(Kn(),j.insertAdjacentHTML("afterbegin",'<div class="tns-liveregion tns-visually-hidden" aria-live="polite" aria-atomic="true">slide <span class="current">'+Rn()+"</span> of "+K+"</div>"),$=j.querySelector(".tns-liveregion .current"),pe){var t=Tt?"stop":"start";Xe?Yi(Xe,{"data-action":t}):O.autoplayButtonOutput&&(j.insertAdjacentHTML(cn(O.autoplayPosition),'<button data-action="'+t+'">'+Ke[0]+t+Ke[1]+At[0]+"</button>"),Xe=j.querySelector("[data-action]")),Xe&&ea(Xe,{click:yi}),Tt&&(mi(),Nt&&ea(G,oe),Lt&&ea(G,ue))}if(de){if(Se)Yi(Se,{"aria-label":"Carousel Pagination"}),qi(Be=Se.children,function(t,e){Yi(t,{"data-nav":e,tabindex:"-1","aria-label":ze+(e+1),"aria-controls":Zt})});else{for(var e="",n=ve?"":'style="display:none"',i=0;i<K;i++)e+='<button data-nav="'+i+'" tabindex="-1" aria-controls="'+Zt+'" '+n+' aria-label="'+ze+(i+1)+'"></button>';e='<div class="tns-nav" aria-label="Carousel Pagination">'+e+"</div>",j.insertAdjacentHTML(cn(O.navPosition),e),Se=j.querySelector(".tns-nav"),Be=Se.children}if(Bi(),x){var a=x.substring(0,x.length-18).toLowerCase(),r="transition: all "+mt/1e3+"s";a&&(r="-"+a+"-"+r),Wi(Bt,"[aria-controls^="+Zt+"-item]",r,Fi(Bt))}Yi(Be[Re],{"aria-label":ze+(Re+1)+We}),Ki(Be[Re],"tabindex"),Vi(Be[Re],Pe),ea(Se,re)}fe&&(Me||Ee&&Ae||(j.insertAdjacentHTML(cn(O.controlsPosition),'<div class="tns-controls" aria-label="Carousel Navigation" tabindex="0"><button data-controls="prev" tabindex="-1" aria-controls="'+Zt+'">'+bt[0]+'</button><button data-controls="next" tabindex="-1" aria-controls="'+Zt+'">'+bt[1]+"</button></div>"),Me=j.querySelector(".tns-controls")),Ee&&Ae||(Ee=Me.children[0],Ae=Me.children[1]),O.controlsContainer&&Yi(Me,{"aria-label":"Carousel Navigation",tabindex:"0"}),(O.controlsContainer||O.prevButton&&O.nextButton)&&Yi([Ee,Ae],{"aria-controls":Zt,tabindex:"-1"}),(O.controlsContainer||O.prevButton&&O.nextButton)&&(Yi(Ee,{"data-controls":"prev"}),Yi(Ae,{"data-controls":"next"})),Ce=Un(Ee),we=Un(Ae),$n(),Me?ea(Me,ae):(ea(Ee,ae),ea(Ae,ae))),Sn()}function En(){if(I&&C){var t={};t[C]=si,ea(G,t)}wt&&ea(G,se,O.preventScrollOnTouch),Mt&&ea(G,ce),pt&&ea(D,le),"inner"===R?Ut.on("outerResized",function(){Nn(),Ut.emit("innerLoaded",Si())}):(k||ot||rt||gt||!q)&&ea(h,{resize:An}),gt&&("outer"===R?Ut.on("innerLoaded",qn):$t||qn()),Pn(),$t?Hn():ne&&Dn(),Ut.on("indexChanged",Vn),"inner"===R&&Ut.emit("innerLoaded",Si()),"function"==typeof Jt&&Jt(Si()),U=!0}function An(t){Oi(function(){Nn(xi(t))})}function Nn(t){if(U){"outer"===R&&Ut.emit("outerResized",Si(t)),J=sn();var e,n=F,i=!1;k&&(Bn(),(e=n!==F)&&Ut.emit("newBreakpointStart",Si(t)));var a,r,o,u,l=ft,s=$t,c=ne,f=pt,d=xt,v=Ct,p=wt,m=Mt,h=Tt,y=Nt,g=Lt,x=qt;if(e){var b=ot,C=gt,w=bt,M=ct,T=At;if(!H)var E=lt,A=ut}if(pt=vn("arrowKeys"),xt=vn("controls"),Ct=vn("nav"),wt=vn("touch"),ct=vn("center"),Mt=vn("mouseDrag"),Tt=vn("autoplay"),Nt=vn("autoplayHoverPause"),Lt=vn("autoplayResetOnVisibility"),e&&($t=vn("disable"),ot=vn("fixedWidth"),mt=vn("speed"),gt=vn("autoHeight"),bt=vn("controlsText"),At=vn("autoplayText"),Et=vn("autoplayTimeout"),H||(ut=vn("edgePadding"),lt=vn("gutter"))),an($t),st=fn(),q&&!rt||$t||(Yn(),q||(Ni(),i=!0)),(ot||rt)&&(Rt=ni(),Gt=Ft()),(e||ot)&&(ft=vn("items"),dt=vn("slideBy"),(r=ft!==l)&&(ot||rt||(Gt=Ft()),en())),e&&$t!==s&&($t?Hn():function(){if(!te)return;if(Bt.disabled=!1,G.className+=_t,ai(),yt)for(var t=Dt;t--;)I&&_i(Y[t]),_i(Y[Ht-t-1]);if(!I)for(var e=qt,n=qt+K;e<n;e++){var i=Y[e],a=e<qt+ft?P:W;i.style.left=100*(e-qt)/ft+"%",Vi(i,a)}On(),te=!1}()),ee&&(e||ot||rt)&&(ne=Ln())!==c&&(ne?(ri(ii(on(0))),Dn()):(!function(){if(!ie)return;ut&&H&&(V.style.margin="");if(Dt)for(var t="tns-transparent",e=Dt;e--;)I&&Gi(Y[e],t),Gi(Y[Ht-e-1],t);On(),ie=!1}(),i=!0)),an($t||ne),Tt||(Nt=Lt=!1),pt!==f&&(pt?ea(D,le):na(D,le)),xt!==d&&(xt?Me?_i(Me):(Ee&&_i(Ee),Ae&&_i(Ae)):Me?Ui(Me):(Ee&&Ui(Ee),Ae&&Ui(Ae))),Ct!==v&&(Ct?_i(Se):Ui(Se)),wt!==p&&(wt?ea(G,se,O.preventScrollOnTouch):na(G,se)),Mt!==m&&(Mt?ea(G,ce):na(G,ce)),Tt!==h&&(Tt?(Xe&&_i(Xe),qe||Ve||mi()):(Xe&&Ui(Xe),qe&&hi())),Nt!==y&&(Nt?ea(G,oe):na(G,oe)),Lt!==g&&(Lt?ea(D,ue):na(D,ue)),e){if(ot===b&&ct===M||(i=!0),gt!==C&&(gt||(V.style.height="")),xt&&bt!==w&&(Ee.innerHTML=bt[0],Ae.innerHTML=bt[1]),Xe&&At!==T){var N=Tt?1:0,L=Xe.innerHTML,B=L.length-T[N].length;L.substring(B)===T[N]&&(Xe.innerHTML=L.substring(0,B)+At[N])}}else ct&&(ot||rt)&&(i=!0);if((r||ot&&!rt)&&(De=Li(),Bi()),(a=qt!==x)?(Ut.emit("indexChanged",Si()),i=!0):r?a||Vn():(ot||rt)&&(Pn(),Kn(),kn()),r&&!I&&function(){for(var t=qt+Math.min(K,ft),e=Ht;e--;){var n=Y[e];qt<=e&&e<t?(Vi(n,"tns-moving"),n.style.left=100*(e-qt)/ft+"%",Vi(n,P),Gi(n,W)):n.style.left&&(n.style.left="",Vi(n,W),Gi(n,P)),Gi(n,z)}setTimeout(function(){qi(Y,function(t){Gi(t,"tns-moving")})},300)}(),!$t&&!ne){if(e&&!H&&(gt===autoheightTem&&mt===speedTem||Gn(),ut===A&&lt===E||(V.style.cssText=pn(ut,lt,ot,mt,gt)),q)){I&&(G.style.width=mn(ot,lt,ft));var S=hn(ot,lt,ft)+yn(lt);u=Fi(o=Bt)-1,"deleteRule"in o?o.deleteRule(u):o.removeRule(u),Wi(Bt,"#"+Zt+" > .tns-item",S,Fi(Bt))}gt&&qn(),i&&(ai(),jt=qt)}e&&Ut.emit("newBreakpointEnd",Si(t))}}function Ln(){if(!ot&&!rt)return K<=(ct?ft-(ft-1)/2:ft);var t=ot?(ot+lt)*K:_[K],e=ut?st+2*ut:st+lt;return ct&&(e-=ot?(st-ot)/2:(st-(_[qt+1]-_[qt]-lt))/2),t<=e}function Bn(){for(var t in F=0,k)(t=parseInt(t))<=J&&(F=t)}function Sn(){!Tt&&Xe&&Ui(Xe),!Ct&&Se&&Ui(Se),xt||(Me?Ui(Me):(Ee&&Ui(Ee),Ae&&Ui(Ae)))}function On(){Tt&&Xe&&_i(Xe),Ct&&Se&&_i(Se),xt&&(Me?_i(Me):(Ee&&_i(Ee),Ae&&_i(Ae)))}function Dn(){if(!ie){if(ut&&(V.style.margin="0px"),Dt)for(var t="tns-transparent",e=Dt;e--;)I&&Vi(Y[e],t),Vi(Y[Ht-e-1],t);Sn(),ie=!0}}function Hn(){if(!te){if(Bt.disabled=!0,G.className=G.className.replace(_t.substring(1),""),Ki(G,["style"]),yt)for(var t=Dt;t--;)I&&Ui(Y[t]),Ui(Y[Ht-t-1]);if(q&&I||Ki(V,["style"]),!I)for(var e=qt,n=qt+K;e<n;e++){var i=Y[e];Ki(i,["style"]),Gi(i,P),Gi(i,W)}Sn(),te=!0}}function kn(){var t=Rn();$.innerHTML!==t&&($.innerHTML=t)}function Rn(){var t=In(),e=t[0]+1,n=t[1]+1;return e===n?e+"":e+" to "+n}function In(t){null==t&&(t=ii());var n,i,a,r=qt;if(ct||ut?(rt||ot)&&(i=-(parseFloat(t)+ut),a=i+st+2*ut):rt&&(i=_[qt],a=i+st),rt)_.forEach(function(t,e){e<Ht&&((ct||ut)&&t<=i+.5&&(r=e),.5<=a-t&&(n=e))});else{if(ot){var e=ot+lt;ct||ut?(r=Math.floor(i/e),n=Math.ceil(a/e-1)):n=r+Math.ceil(st/e)-1}else if(ct||ut){var o=ft-1;if(ct?(r-=o/2,n=qt+o/2):n=qt+o,ut){var u=ut*ft/st;r-=u,n+=u}r=Math.floor(r),n=Math.ceil(n)}else n=r+ft-1;r=Math.max(r,0),n=Math.min(n,Ht-1)}return[r,n]}function Pn(){St&&!$t&&Fn.apply(null,In()).forEach(function(t){if(!ji(t,ge)){var e={};e[C]=function(t){t.stopPropagation()},ea(t,e),ea(t,xe),t.src=Xi(t,"data-src");var n=Xi(t,"data-srcset");n&&(t.srcset=n),Vi(t,"loading")}})}function zn(t){Vi(t,"loaded"),Wn(t)}function Wn(t){Vi(t,"tns-complete"),Gi(t,"loading"),na(t,xe)}function Fn(t,e){for(var n=[];t<=e;)qi(Y[t].querySelectorAll("img"),function(t){n.push(t)}),t++;return n}function qn(){var t=Fn.apply(null,In());Oi(function(){jn(t,Xn)})}function jn(n,t){return Z?t():(n.forEach(function(t,e){ji(t,ge)&&n.splice(e,1)}),n.length?void Oi(function(){jn(n,t)}):t())}function Vn(){Pn(),Kn(),kn(),$n(),function(){if(Ct&&(Re=0<=ke?ke:ln(),ke=-1,Re!==Ie)){var t=Be[Ie],e=Be[Re];Yi(t,{tabindex:"-1","aria-label":ze+(Ie+1)}),Gi(t,Pe),Yi(e,{"aria-label":ze+(Re+1)+We}),Ki(e,"tabindex"),Vi(e,Pe),Ie=Re}}()}function Gn(){I&&gt&&(S.style[x]=mt/1e3+"s")}function Qn(t,e){for(var n=[],i=t,a=Math.min(t+e,Ht);i<a;i++)n.push(Y[i].offsetHeight);return Math.max.apply(null,n)}function Xn(){var t=gt?Qn(qt,ft):Qn(Dt,K),e=S||V;e.style.height!==t&&(e.style.height=t+"px")}function Yn(){_=[0];var n=q?"left":"top",i=q?"right":"bottom",a=Y[0].getBoundingClientRect()[n];qi(Y,function(t,e){e&&_.push(t.getBoundingClientRect()[n]-a),e===Ht-1&&_.push(t.getBoundingClientRect()[i]-a)})}function Kn(){var t=In(),n=t[0],i=t[1];qi(Y,function(t,e){n<=e&&e<=i?Qi(t,"aria-hidden")&&(Ki(t,["aria-hidden","tabindex"]),Vi(t,ye)):Qi(t,"aria-hidden")||(Yi(t,{"aria-hidden":"true",tabindex:"-1"}),Gi(t,ye))})}function Jn(t){return t.nodeName.toLowerCase()}function Un(t){return"button"===Jn(t)}function _n(t){return"true"===t.getAttribute("aria-disabled")}function Zn(t,e,n){t?e.disabled=n:e.setAttribute("aria-disabled",n.toString())}function $n(){if(xt&&!ht&&!yt){var t=Ce?Ee.disabled:_n(Ee),e=we?Ae.disabled:_n(Ae),n=qt<=Vt,i=!ht&&Gt<=qt;n&&!t&&Zn(Ce,Ee,!0),!n&&t&&Zn(Ce,Ee,!1),i&&!e&&Zn(we,Ae,!0),!i&&e&&Zn(we,Ae,!1)}}function ti(t,e){x&&(t.style[x]=e)}function ei(t){return null==t&&(t=qt),rt?(st-(ut?lt:0)-(_[t+1]-_[t]-lt))/2:ot?(st-ot)/2:(ft-1)/2}function ni(){var t=st+(ut?lt:0)-(ot?(ot+lt)*Ht:_[Ht]);return ct&&!yt&&(t=ot?-(ot+lt)*(Ht-1)-ei():ei(Ht-1)-_[Ht-1]),0<t&&(t=0),t}function ii(t){var e;if(null==t&&(t=qt),q&&!rt)if(ot)e=-(ot+lt)*t,ct&&(e+=ei());else{var n=d?Ht:ft;ct&&(t-=ei()),e=100*-t/n}else e=-_[t],ct&&rt&&(e+=ei());return kt&&(e=Math.max(e,Rt)),e+=!q||rt||ot?"px":"%"}function ai(t){ti(G,"0s"),ri(t)}function ri(t){null==t&&(t=ii()),G.style[Pt]=zt+t+Wt}function oi(t,e,n,i){var a=t+ft;yt||(a=Math.min(a,Ht));for(var r=t;r<a;r++){var o=Y[r];i||(o.style.left=100*(r-qt)/ft+"%"),B&&p&&(o.style[p]=o.style[m]=B*(r-t)/1e3+"s"),Gi(o,e),Vi(o,n),i&&Ot.push(o)}}function ui(t,e){It&&en(),(qt!==jt||e)&&(Ut.emit("indexChanged",Si()),Ut.emit("transitionStart",Si()),gt&&qn(),qe&&t&&0<=["click","keydown"].indexOf(t.type)&&hi(),Kt=!0,nn())}function li(t){return t.toLowerCase().replace(/-/g,"")}function si(t){if(I||Kt){if(Ut.emit("transitionEnd",Si(t)),!I&&0<Ot.length)for(var e=0;e<Ot.length;e++){var n=Ot[e];n.style.left="",m&&p&&(n.style[m]="",n.style[p]=""),Gi(n,z),Vi(n,W)}if(!t||!I&&t.target.parentNode===G||t.target===G&&li(t.propertyName)===li(Pt)){if(!It){var i=qt;en(),qt!==i&&(Ut.emit("indexChanged",Si()),ai())}"inner"===R&&Ut.emit("innerLoaded",Si()),Kt=!1,jt=qt}}}function ci(t,e){if(!ne)if("prev"===t)fi(e,-1);else if("next"===t)fi(e,1);else{if(Kt){if(Qt)return;si()}var n=un(),i=0;if("first"===t?i=-n:"last"===t?i=I?K-ft-n:K-1-n:("number"!=typeof t&&(t=parseInt(t)),isNaN(t)||(e||(t=Math.max(0,Math.min(K-1,t))),i=t-n)),!I&&i&&Math.abs(i)<ft){var a=0<i?1:-1;i+=Vt<=qt+i-K?K*a:2*K*a*-1}qt+=i,I&&yt&&(qt<Vt&&(qt+=K),Gt<qt&&(qt-=K)),un(qt)!==un(jt)&&ui(e)}}function fi(t,e){if(Kt){if(Qt)return;si()}var n;if(!e){for(var i=bi(t=xi(t));i!==Me&&[Ee,Ae].indexOf(i)<0;)i=i.parentNode;var a=[Ee,Ae].indexOf(i);0<=a&&(n=!0,e=0===a?-1:1)}if(ht){if(qt===Vt&&-1===e)return void ci("last",t);if(qt===Gt&&1===e)return void ci("first",t)}e&&(qt+=dt*e,rt&&(qt=Math.floor(qt)),ui(n||t&&"keydown"===t.type?t:null))}function di(){Fe=setInterval(function(){fi(null,Qe)},Et),qe=!0}function vi(){clearInterval(Fe),qe=!1}function pi(t,e){Yi(Xe,{"data-action":t}),Xe.innerHTML=Ke[0]+t+Ke[1]+e}function mi(){di(),Xe&&pi("stop",At[1])}function hi(){vi(),Xe&&pi("start",At[0])}function yi(){qe?(hi(),Ve=!0):(mi(),Ve=!1)}function gi(t){t.focus()}function xi(t){return Ci(t=t||h.event)?t.changedTouches[0]:t}function bi(t){return t.target||h.event.srcElement}function Ci(t){return 0<=t.type.indexOf("touch")}function wi(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function Mi(){return a=Ze.y-_e.y,r=Ze.x-_e.x,t=Math.atan2(a,r)*(180/Math.PI),e=Xt,n=!1,i=Math.abs(90-Math.abs(t)),90-e<=i?n="horizontal":i<=e&&(n="vertical"),n===O.axis;var t,e,n,i,a,r}function Ti(t){if(Kt){if(Qt)return;si()}Tt&&qe&&vi(),$e=!0,Ue&&(Di(Ue),Ue=null);var e=xi(t);Ut.emit(Ci(t)?"touchStart":"dragStart",Si(t)),!Ci(t)&&0<=["img","a"].indexOf(Jn(bi(t)))&&wi(t),Ze.x=_e.x=e.clientX,Ze.y=_e.y=e.clientY,I&&(Je=parseFloat(G.style[Pt].replace(zt,"")),ti(G,"0s"))}function Ei(t){if($e){var e=xi(t);Ze.x=e.clientX,Ze.y=e.clientY,I?Ue||(Ue=Oi(function(){!function t(e){if(!Yt)return void($e=!1);Di(Ue);$e&&(Ue=Oi(function(){t(e)}));"?"===Yt&&(Yt=Mi());if(Yt){!be&&Ci(e)&&(be=!0);try{e.type&&Ut.emit(Ci(e)?"touchMove":"dragMove",Si(e))}catch(t){}var n=Je,i=tn(Ze,_e);if(!q||ot||rt)n+=i,n+="px";else{var a=d?i*ft*100/((st+lt)*Ht):100*i/(st+lt);n+=a,n+="%"}G.style[Pt]=zt+n+Wt}}(t)})):("?"===Yt&&(Yt=Mi()),Yt&&(be=!0)),be&&t.preventDefault()}}function Ai(i){if($e){Ue&&(Di(Ue),Ue=null),I&&ti(G,""),$e=!1;var t=xi(i);Ze.x=t.clientX,Ze.y=t.clientY;var a=tn(Ze,_e);if(Math.abs(a)){if(!Ci(i)){var n=bi(i);ea(n,{click:function t(e){wi(e),na(n,{click:t})}})}I?Ue=Oi(function(){if(q&&!rt){var t=-a*ft/(st+lt);t=0<a?Math.floor(t):Math.ceil(t),qt+=t}else{var e=-(Je+a);if(e<=0)qt=Vt;else if(e>=_[Ht-1])qt=Gt;else for(var n=0;n<Ht&&e>=_[n];)e>_[qt=n]&&a<0&&(qt+=1),n++}ui(i,a),Ut.emit(Ci(i)?"touchEnd":"dragEnd",Si(i))}):Yt&&fi(i,0<a?-1:1)}}"auto"===O.preventScrollOnTouch&&(be=!1),Xt&&(Yt="?"),Tt&&!qe&&di()}function Ni(){(S||V).style.height=_[qt+ft]-_[qt]+"px"}function Li(){var t=ot?(ot+lt)*K/st:K/ft;return Math.min(Math.ceil(t),K)}function Bi(){if(Ct&&!ve&&De!==He){var t=He,e=De,n=_i;for(De<He&&(t=De,e=He,n=Ui);t<e;)n(Be[t]),t++;He=De}}function Si(t){return{container:G,slideItems:Y,navContainer:Se,navItems:Be,controlsContainer:Me,hasControls:fe,prevButton:Ee,nextButton:Ae,items:ft,slideBy:dt,cloneCount:Dt,slideCount:K,slideCountNew:Ht,index:qt,indexCached:jt,displayIndex:rn(),navCurrentIndex:Re,navCurrentIndexCached:Ie,pages:De,pagesCached:He,sheet:Bt,isOn:U,event:t||{}}}M&&console.warn("No slides found in",O.container)};return aa}();
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/js/fslightbox.js
0,0 → 1,0
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o,i="fslightbox-",r="".concat(i,"styles"),s="".concat(i,"cursor-grabbing"),a="".concat(i,"full-dimension"),c="".concat(i,"flex-centered"),l="".concat(i,"open"),u="".concat(i,"transform-transition"),d="".concat(i,"absoluted"),f="".concat(i,"slide-btn"),p="".concat(f,"-container"),h="".concat(i,"fade-in"),m="".concat(i,"fade-out"),g=h+"-strong",v=m+"-strong",b="".concat(i,"opacity-"),x="".concat(b,"1"),y="".concat(i,"source");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){var t=e.stageIndexes,n=e.core.stageManager,o=e.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===t.current?o:t.current-1},n.getNextSlideIndex=function(){return t.current===o?0:t.current+1},n.updateStageIndexes=0===o?function(){}:1===o?function(){0===t.current?(t.next=1,delete t.previous):(t.previous=0,delete t.next)}:function(){t.previous=n.getPreviousSlideIndex(),t.next=n.getNextSlideIndex()},n.i=o<=2?function(){return!0}:function(e){var n=t.current;if(0===n&&e===o||n===o&&0===e)return!0;var i=n-e;return-1===i||0===i||1===i}}"object"===("undefined"==typeof document?"undefined":w(document))&&((o=document.createElement("style")).className=r,o.appendChild(document.createTextNode(".fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-cursor-grabbing{cursor:grabbing}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);touch-action:pinch-zoom;z-index:1000000000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg-path{transition:fill .15s ease;fill:#ddd}.fslightbox-nav{height:45px;width:100%;position:absolute;top:0;left:0}.fslightbox-slide-number-container{display:flex;justify-content:center;align-items:center;position:relative;height:100%;font-size:15px;color:#d7d7d7;z-index:0;max-width:55px;text-align:left}.fslightbox-slide-number-container .fslightbox-flex-centered{height:100%}.fslightbox-slash{display:block;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:#fff}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:100%;display:flex;background:rgba(35,35,35,.65)}.fslightbox-toolbar-button{height:100%;width:45px;cursor:pointer}.fslightbox-toolbar-button:hover .fslightbox-svg-path{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%)}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}}.fslightbox-slide-btn-container:hover .fslightbox-svg-path{fill:#f1f1f1}.fslightbox-slide-btn{padding:9px;font-size:26px;background:rgba(35,35,35,.65)}@media (min-width:768px){.fslightbox-slide-btn{padding:10px}}@media (min-width:1600px){.fslightbox-slide-btn{padding:11px}}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container-next{padding-left:30px}}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-right:6px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-invalid-file-wrapper{font-size:22px;color:#eaebeb;margin:auto}.fslightbox-video{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightboxl{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightboxl div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightboxl 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightboxl div:nth-child(1){animation-delay:-.45s}.fslightboxl div:nth-child(2){animation-delay:-.3s}.fslightboxl div:nth-child(3){animation-delay:-.15s}@keyframes fslightboxl{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-source{position:relative;z-index:2;opacity:0}")),document.head.appendChild(o));function L(e){var t,n=e.props,o=0,i={};this.getSourceTypeFromLocalStorageByUrl=function(e){return t[e]?t[e]:r(e)},this.handleReceivedSourceTypeForUrl=function(e,n){if(!1===i[n]&&(o--,"invalid"!==e?i[n]=e:delete i[n],0===o)){!function(e,t){for(var n in t)e[n]=t[n]}(t,i);try{localStorage.setItem("fslightbox-types",JSON.stringify(t))}catch(e){}}};var r=function(e){o++,i[e]=!1};if(n.disableLocalStorage)this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){};else{try{t=JSON.parse(localStorage.getItem("fslightbox-types"))}catch(e){}t||(t={},this.getSourceTypeFromLocalStorageByUrl=r)}}function A(e,t,n,o){var i=e.data,r=e.elements.sources,s=n/o,a=0;this.adjustSize=function(){if((a=i.maxSourceWidth/s)<i.maxSourceHeight)return n<i.maxSourceWidth&&(a=o),c();a=o>i.maxSourceHeight?i.maxSourceHeight:o,c()};var c=function(){r[t].style.width=a*s+"px",r[t].style.height=a+"px"}}function C(e,t){var n=this,o=e.collections.sourceSizers,i=e.elements,r=i.sourceAnimationWrappers,s=i.sources,a=e.isl,c=e.resolve;function l(e,n){o[t]=c(A,[t,e,n]),o[t].adjustSize()}this.runActions=function(e,o){a[t]=!0,s[t].classList.add(x),r[t].classList.add(g),r[t].removeChild(r[t].firstChild),l(e,o),n.runActions=l}}function E(e,t){var n,o=this,i=e.elements.sources,r=e.props,s=(0,e.resolve)(C,[t]);this.handleImageLoad=function(e){var t=e.target,n=t.naturalWidth,o=t.naturalHeight;s.runActions(n,o)},this.handleVideoLoad=function(e){var t=e.target,o=t.videoWidth,i=t.videoHeight;n=!0,s.runActions(o,i)},this.handleNotMetaDatedVideoLoad=function(){n||o.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;r.maxYoutubeDimensions&&(e=r.maxYoutubeDimensions.width,t=r.maxYoutubeDimensions.height),s.runActions(e,t)},this.handleCustomLoad=function(){var e=i[t],n=e.offsetWidth,r=e.offsetHeight;n&&r?s.runActions(n,r):setTimeout(o.handleCustomLoad)}}function F(e,t,n){var o=e.elements.sources,i=e.props.customClasses,r=i[t]?i[t]:"";o[t].className=n+" "+r}function I(e,t){var n=e.elements.sources,o=e.props.customAttributes;for(var i in o[t])n[t].setAttribute(i,o[t][i])}function T(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=document.createElement("img"),F(e,t,y),i[t].src=s[t],i[t].onload=n[t].handleImageLoad,I(e,t),r[t].appendChild(i[t])}function N(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props,a=s.sources,c=s.videosPosters;i[t]=document.createElement("video"),F(e,t,y),i[t].src=a[t],i[t].onloadedmetadata=function(e){n[t].handleVideoLoad(e)},i[t].controls=!0,I(e,t),c[t]&&(i[t].poster=c[t]);var l=document.createElement("source");l.src=a[t],i[t].appendChild(l),setTimeout(n[t].handleNotMetaDatedVideoLoad,3e3),r[t].appendChild(i[t])}function z(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,s=o.sourceAnimationWrappers,a=e.props.sources;r[t]=document.createElement("iframe"),F(e,t,"".concat(y," ").concat(i,"youtube-iframe"));var c=a[t],l=c.split("?")[1];r[t].src="https://www.youtube.com/embed/".concat(c.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?").concat(l||""),r[t].allowFullscreen=!0,I(e,t),s[t].appendChild(r[t]),n[t].handleYoutubeLoad()}function P(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=s[t],F(e,t,"".concat(i[t].className," ").concat(y)),r[t].appendChild(i[t]),n[t].handleCustomLoad()}function k(e,t){var n=e.elements,o=n.sources,r=n.sourceAnimationWrappers;e.props.sources;o[t]=document.createElement("div"),o[t].className="".concat(i,"invalid-file-wrapper ").concat(c),o[t].innerHTML="Invalid source",r[t].classList.add(g),r[t].removeChild(r[t].firstChild),r[t].appendChild(o[t])}function H(e){var t=e.collections,n=t.sourceLoadHandlers,o=t.sourcesRenderFunctions,i=e.core.sourceDisplayFacade,r=e.resolve;this.runActionsForSourceTypeAndIndex=function(t,s){var a;switch("invalid"!==t&&(n[s]=r(E,[s])),t){case"image":a=T;break;case"video":a=N;break;case"youtube":a=z;break;case"custom":a=P;break;default:a=k}o[s]=function(){return a(e,s)},i.displaySourcesWhichShouldBeDisplayed()}}function W(){var e,t,n,o={isUrlYoutubeOne:function(e){var t=document.createElement("a");return t.href=e,"www.youtube.com"===t.hostname||"youtu.be"===t.hostname},getTypeFromResponseContentType:function(e){return e.slice(0,e.indexOf("/"))}};function i(){if(4!==n.readyState){if(2===n.readyState){var e;switch(o.getTypeFromResponseContentType(n.getResponseHeader("content-type"))){case"image":e="image";break;case"video":e="video";break;default:e="invalid"}n.onreadystatechange=null,n.abort(),t(e)}}else t("invalid")}this.setUrlToCheck=function(t){e=t},this.getSourceType=function(r){if(o.isUrlYoutubeOne(e))return r("youtube");t=r,(n=new XMLHttpRequest).onreadystatechange=i,n.open("GET",e,!0),n.send()}}function R(e,t,n){var o=e.props,i=o.types,r=o.type,s=o.sources,a=e.resolve;this.getTypeSetByClientForIndex=function(e){var t;return i&&i[e]?t=i[e]:r&&(t=r),t},this.retrieveTypeWithXhrForIndex=function(e){var o=a(W);o.setUrlToCheck(s[e]),o.getSourceType((function(o){t.handleReceivedSourceTypeForUrl(o,s[e]),n.runActionsForSourceTypeAndIndex(o,e)}))}}function D(e,t){var n=e.core.stageManager,o=e.elements,i=o.smw,r=o.sourceWrappersContainer,s=e.props,l=0,f=document.createElement("div");function p(e){f.style.transform="translateX(".concat(e+l,"px)"),l=0}function h(){return(1+s.slideDistance)*innerWidth}f.className="".concat(d," ").concat(a," ").concat(c),f.s=function(){f.style.display="flex"},f.h=function(){f.style.display="none"},f.a=function(){f.classList.add(u)},f.d=function(){f.classList.remove(u)},f.n=function(){f.style.removeProperty("transform")},f.v=function(e){return l=e,f},f.ne=function(){p(-h())},f.z=function(){p(0)},f.p=function(){p(h())},n.i(t)||f.h(),i[t]=f,r.appendChild(f),function(e,t){var n=e.elements,o=n.smw,i=n.sourceAnimationWrappers,r=document.createElement("div"),s=document.createElement("div");s.className="fslightboxl";for(var a=0;a<3;a++){var c=document.createElement("div");s.appendChild(c)}r.appendChild(s),o[t].appendChild(r),i[t]=r}(e,t)}function O(e,t,n,o){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"width",t),r.setAttributeNS(null,"height",t),r.setAttributeNS(null,"viewBox",n);var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"class","".concat(i,"svg-path")),s.setAttributeNS(null,"d",o),r.appendChild(s),e.appendChild(r),r}function M(e,t){var n=document.createElement("div");return n.className="".concat(i,"toolbar-button ").concat(c),n.title=t,e.appendChild(n),n}function j(e,t){var n=document.createElement("div");n.className="".concat(i,"toolbar"),t.appendChild(n),function(e,t){var n=e.componentsServices,o=e.data,i=e.fs,r="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",s=M(t);s.title="Enter fullscreen";var a=O(s,"20px","0 0 18 18",r);n.ofs=function(){o.ifs=!0,s.title="Exit fullscreen",a.setAttributeNS(null,"width","24px"),a.setAttributeNS(null,"height","24px"),a.setAttributeNS(null,"viewBox","0 0 950 1024"),a.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},n.xfs=function(){o.ifs=!1,s.title="Enter fullscreen",a.setAttributeNS(null,"width","20px"),a.setAttributeNS(null,"height","20px"),a.setAttributeNS(null,"viewBox","0 0 18 18"),a.firstChild.setAttributeNS(null,"d",r)},s.onclick=i.t}(e,n),function(e,t){var n=M(t,"Close");n.onclick=e.core.lightboxCloser.closeLightbox,O(n,"20px","0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(e,n)}function X(e){var t=e.props.sources,n=e.elements.container,o=document.createElement("div");o.className="".concat(i,"nav"),n.appendChild(o),j(e,o),t.length>1&&function(e,t){var n=e.componentsServices,o=e.props.sources,r=(e.stageIndexes,document.createElement("div"));r.className="".concat(i,"slide-number-container");var s=document.createElement("div");s.className=c;var a=document.createElement("span");n.setSlideNumber=function(e){return a.innerHTML=e};var l=document.createElement("span");l.className="".concat(i,"slash");var u=document.createElement("div");u.innerHTML=o.length,r.appendChild(s),s.appendChild(a),s.appendChild(l),s.appendChild(u),t.appendChild(r),setTimeout((function(){s.offsetWidth>55&&(r.style.justifyContent="flex-start")}))}(e,o)}function B(e,t,n,o){var i=e.elements.container,r=n.charAt(0).toUpperCase()+n.slice(1),s=document.createElement("div");s.className="".concat(p," ").concat(p,"-").concat(n),s.title="".concat(r," slide"),s.onclick=t,function(e,t){var n=document.createElement("div");n.className="".concat(f," ").concat(c),O(n,"20px","0 0 20 20",t),e.appendChild(n)}(s,o),i.appendChild(s)}function U(e){var t=e.core,n=t.lightboxCloser,o=t.slideChangeFacade,i=e.fs;this.listener=function(e){switch(e.key){case"Escape":n.closeLightbox();break;case"ArrowLeft":o.changeToPrevious();break;case"ArrowRight":o.changeToNext();break;case"F11":e.preventDefault(),i.t()}}}function q(e){var t=e.elements,n=e.sourcePointerProps,o=e.stageIndexes;function i(e,o){t.smw[e].v(n.swipedX)[o]()}this.runActionsForEvent=function(e){var r,a,c;t.container.contains(t.slideSwipingHoverer)||t.container.appendChild(t.slideSwipingHoverer),r=t.container,a=s,(c=r.classList).contains(a)||c.add(a),n.swipedX=e.screenX-n.downScreenX;var l=o.previous,u=o.next;i(o.current,"z"),void 0!==l&&n.swipedX>0?i(l,"ne"):void 0!==u&&n.swipedX<0&&i(u,"p")}}function V(e){var t=e.props.sources,n=e.resolve,o=e.sourcePointerProps,i=n(q);1===t.length?this.listener=function(){o.swipedX=1}:this.listener=function(e){o.isPointering&&i.runActionsForEvent(e)}}function _(e){var t=e.core.slideIndexChanger,n=e.elements.smw,o=e.stageIndexes,i=e.sws;function r(e){var t=n[o.current];t.a(),t[e]()}function s(e,t){void 0!==e&&(n[e].s(),n[e][t]())}this.runPositiveSwipedXActions=function(){var e=o.previous;if(void 0===e)r("z");else{r("p");var n=o.next;t.changeTo(e);var a=o.previous;i.d(a),i.b(n),r("z"),s(a,"ne")}},this.runNegativeSwipedXActions=function(){var e=o.next;if(void 0===e)r("z");else{r("ne");var n=o.previous;t.changeTo(e);var a=o.next;i.d(a),i.b(n),r("z"),s(a,"p")}}}function Y(e,t){e.contains(t)&&e.removeChild(t)}function J(e){var t=e.core.lightboxCloser,n=e.elements,o=e.resolve,i=e.sourcePointerProps,r=o(_);this.runNoSwipeActions=function(){Y(n.container,n.slideSwipingHoverer),i.isSourceDownEventTarget||t.closeLightbox(),i.isPointering=!1},this.runActions=function(){i.swipedX>0?r.runPositiveSwipedXActions():r.runNegativeSwipedXActions(),Y(n.container,n.slideSwipingHoverer),n.container.classList.remove(s),i.isPointering=!1}}function G(e){var t=e.resolve,n=e.sourcePointerProps,o=t(J);this.listener=function(){n.isPointering&&(n.swipedX?o.runActions():o.runNoSwipeActions())}}function $(e){var t=this,n=e.core,o=n.eventsDispatcher,i=n.globalEventsController,r=n.scrollbarRecompensor,s=e.data,a=e.elements,c=e.fs,u=e.props,d=e.sourcePointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){t.isLightboxFadingOut=!0,a.container.classList.add(v),i.removeListeners(),u.exitFullscreenOnClose&&s.ifs&&c.x(),setTimeout((function(){t.isLightboxFadingOut=!1,d.isPointering=!1,a.container.classList.remove(v),document.documentElement.classList.remove(l),r.removeRecompense(),document.body.removeChild(a.container),o.dispatch("onClose")}),270)}}function K(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function Q(e){var t,n,o;n=(t=e).core.eventsDispatcher,o=t.props,n.dispatch=function(e){o[e]&&o[e]()},function(e){var t=e.componentsServices,n=e.data,o=e.fs,i=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];function r(e){for(var t=0;t<i.length;t++)document[e](i[t],s)}function s(){document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement?t.ofs():t.xfs()}o.o=function(){t.ofs();var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},o.x=function(){t.xfs(),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},o.t=function(){n.ifs?o.x():o.o()},o.l=function(){r("addEventListener")},o.q=function(){r("removeEventListener")}}(e),function(e){var t=e.core,n=t.globalEventsController,o=t.windowResizeActioner,i=e.fs,r=e.resolve,s=r(U),a=r(V),c=r(G);n.attachListeners=function(){document.addEventListener("pointermove",a.listener),document.addEventListener("pointerup",c.listener),addEventListener("resize",o.runActions),document.addEventListener("keydown",s.listener),i.l()},n.removeListeners=function(){document.removeEventListener("pointermove",a.listener),document.removeEventListener("pointerup",c.listener),removeEventListener("resize",o.runActions),document.removeEventListener("keydown",s.listener),i.q()}}(e),function(e){var t=e.core.lightboxCloser,n=(0,e.resolve)($);t.closeLightbox=function(){n.isLightboxFadingOut||n.runActions()}}(e),function(e){var t=e.data,n=e.core.scrollbarRecompensor;function o(){document.body.offsetHeight>innerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")}n.addRecompense=function(){"complete"===document.readyState?o():addEventListener("load",(function(){o(),n.addRecompense=o}))},n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),function(e){var t=e.core,n=t.slideChangeFacade,o=t.slideIndexChanger,i=t.stageManager;e.props.sources.length>1?(n.changeToPrevious=function(){o.jumpTo(i.getPreviousSlideIndex())},n.changeToNext=function(){o.jumpTo(i.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(e),function(e){var t=e.componentsServices,n=e.core,o=n.slideIndexChanger,i=n.sourceDisplayFacade,r=n.stageManager,s=e.elements,a=s.smw,c=s.sourceAnimationWrappers,l=e.isl,u=e.stageIndexes,d=e.sws;o.changeTo=function(e){u.current=e,r.updateStageIndexes(),t.setSlideNumber(e+1),i.displaySourcesWhichShouldBeDisplayed()},o.jumpTo=function(e){var t=u.previous,n=u.current,i=u.next,s=l[n],f=l[e];o.changeTo(e);for(var p=0;p<a.length;p++)a[p].d();d.d(n),d.c(),requestAnimationFrame((function(){requestAnimationFrame((function(){var e=u.previous,o=u.next;function p(){r.i(n)?n===u.previous?a[n].ne():n===u.next&&a[n].p():(a[n].h(),a[n].n())}s&&c[n].classList.add(m),f&&c[u.current].classList.add(h),d.a(),void 0!==e&&e!==n&&a[e].ne(),a[u.current].n(),void 0!==o&&o!==n&&a[o].p(),d.b(t),d.b(i),l[n]?setTimeout(p,260):p()}))}))}}(e),function(e){var t=e.core.sourcesPointerDown,n=e.elements,o=n.smw,i=n.sources,r=e.sourcePointerProps,s=e.stageIndexes;t.listener=function(e){"VIDEO"!==e.target.tagName&&e.preventDefault(),r.isPointering=!0,r.downScreenX=e.screenX,r.swipedX=0;var t=i[s.current];t&&t.contains(e.target)?r.isSourceDownEventTarget=!0:r.isSourceDownEventTarget=!1;for(var n=0;n<o.length;n++)o[n].d()}}(e),function(e){var t=e.collections.sourcesRenderFunctions,n=e.core.sourceDisplayFacade,o=e.props,i=e.stageIndexes;function r(e){t[e]&&(t[e](),delete t[e])}n.displaySourcesWhichShouldBeDisplayed=function(){if(o.loadOnlyCurrentSource)r(i.current);else for(var e in i)r(i[e])}}(e),function(e){var t=e.core.stageManager,n=e.elements,o=n.smw,i=n.sourceAnimationWrappers,r=e.isl,s=e.stageIndexes,a=e.sws;a.a=function(){for(var e in s)o[s[e]].s()},a.b=function(e){void 0===e||t.i(e)||(o[e].h(),o[e].n())},a.c=function(){for(var e in s)a.d(s[e])},a.d=function(e){if(r[e]){var t=i[e];K(t,g),K(t,h),K(t,m)}}}(e),function(e){var t=e.collections.sourceSizers,n=e.core.windowResizeActioner,o=e.data,i=e.elements.smw,r=e.stageIndexes;n.runActions=function(){innerWidth<992?o.maxSourceWidth=innerWidth:o.maxSourceWidth=.9*innerWidth,o.maxSourceHeight=.9*innerHeight;for(var e=0;e<i.length;e++)i[e].d(),t[e]&&t[e].adjustSize();var n=r.previous,s=r.next;void 0!==n&&i[n].ne(),void 0!==s&&i[s].p()}}(e)}function Z(e){var t=e.componentsServices,n=e.core,o=n.eventsDispatcher,r=n.globalEventsController,s=n.scrollbarRecompensor,c=n.sourceDisplayFacade,u=n.stageManager,f=n.windowResizeActioner,p=e.data,h=e.elements,m=(e.props,e.stageIndexes),v=e.sws;function b(){var t,n;p.i=!0,p.scrollbarWidth=function(){var e=document.createElement("div"),t=e.style,n=document.createElement("div");t.visibility="hidden",t.width="100px",t.msOverflowStyle="scrollbar",t.overflow="scroll",n.style.width="100%",document.body.appendChild(e);var o=e.offsetWidth;e.appendChild(n);var i=n.offsetWidth;return document.body.removeChild(e),o-i}(),Q(e),h.container=document.createElement("div"),h.container.className="".concat(i,"container ").concat(a," ").concat(g),function(e){var t=e.elements;t.slideSwipingHoverer=document.createElement("div"),t.slideSwipingHoverer.className="".concat(i,"slide-swiping-hoverer ").concat(a," ").concat(d)}(e),X(e),function(e){var t=e.core.sourcesPointerDown,n=e.elements,o=e.props.sources,i=document.createElement("div");i.className="".concat(d," ").concat(a),n.container.appendChild(i),i.addEventListener("pointerdown",t.listener),n.sourceWrappersContainer=i;for(var r=0;r<o.length;r++)D(e,r)}(e),e.props.sources.length>1&&(n=(t=e).core.slideChangeFacade,B(t,n.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),B(t,n.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")),function(e){for(var t=e.props.sources,n=e.resolve,o=n(L),i=n(H),r=n(R,[o,i]),s=0;s<t.length;s++)if("string"==typeof t[s]){var a=r.getTypeSetByClientForIndex(s);if(a)i.runActionsForSourceTypeAndIndex(a,s);else{var c=o.getSourceTypeFromLocalStorageByUrl(t[s]);c?i.runActionsForSourceTypeAndIndex(c,s):r.retrieveTypeWithXhrForIndex(s)}}else i.runActionsForSourceTypeAndIndex("custom",s)}(e),o.dispatch("onInit")}e.open=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=m.previous,a=m.current,d=m.next;m.current=n,p.i||S(e),u.updateStageIndexes(),p.i?(v.c(),v.a(),v.b(i),v.b(a),v.b(d),o.dispatch("onShow")):b(),c.displaySourcesWhichShouldBeDisplayed(),t.setSlideNumber(n+1),document.body.appendChild(h.container),document.documentElement.classList.add(l),s.addRecompense(),r.attachListeners(),f.runActions(),h.smw[m.current].n(),o.dispatch("onOpen")}}function ee(e,t,n){return(ee=te()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&ne(i,n.prototype),i}).apply(null,arguments)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ne(e,t){return(ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){return function(e){if(Array.isArray(e))return ie(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function re(){for(var e=document.getElementsByTagName("a"),t=function(t){if(!e[t].hasAttribute("data-fslightbox"))return"continue";var n=e[t].hasAttribute("data-href")?e[t].getAttribute("data-href"):e[t].getAttribute("href");if(!n)return console.warn('The "data-fslightbox" attribute was set without the "href" attribute.'),"continue";var o=e[t].getAttribute("data-fslightbox");fsLightboxInstances[o]||(fsLightboxInstances[o]=new FsLightbox);var i=null;"#"===n.charAt(0)?(i=document.getElementById(n.substring(1)).cloneNode(!0)).removeAttribute("id"):i=n,fsLightboxInstances[o].props.sources.push(i),fsLightboxInstances[o].elements.a.push(e[t]);var r=fsLightboxInstances[o].props.sources.length-1;e[t].onclick=function(e){e.preventDefault(),fsLightboxInstances[o].open(r)},d("types","data-type"),d("videosPosters","data-video-poster"),d("customClasses","data-class"),d("customClasses","data-custom-class");for(var s=["href","data-fslightbox","data-href","data-type","data-video-poster","data-class","data-custom-class"],a=e[t].attributes,c=fsLightboxInstances[o].props.customAttributes,l=0;l<a.length;l++)if(-1===s.indexOf(a[l].name)&&"data-"===a[l].name.substr(0,5)){c[r]||(c[r]={});var u=a[l].name.substr(5);c[r][u]=a[l].value}function d(n,i){e[t].hasAttribute(i)&&(fsLightboxInstances[o].props[n][r]=e[t].getAttribute(i))}},n=0;n<e.length;n++)t(n);var o=Object.keys(fsLightboxInstances);window.fsLightbox=fsLightboxInstances[o[o.length-1]]}window.FsLightbox=function(){var e=this;this.props={sources:[],customAttributes:[],customClasses:[],types:[],videosPosters:[],slideDistance:.3},this.data={isFullscreenOpen:!1,maxSourceWidth:0,maxSourceHeight:0,scrollbarWidth:0},this.isl=[],this.sourcePointerProps={downScreenX:null,isPointering:!1,isSourceDownEventTarget:!1,swipedX:0},this.stageIndexes={},this.elements={a:[],container:null,slideSwipingHoverer:null,smw:[],sourceWrappersContainer:null,sources:[],sourceAnimationWrappers:[]},this.componentsServices={setSlideNumber:function(){}},this.resolve=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(e),ee(t,oe(n))},this.collections={sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={eventsDispatcher:{},globalEventsController:{},lightboxCloser:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},this.fs={},this.sws={},Z(this),this.close=function(){return e.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},re(),window.refreshFsLightbox=function(){for(var e in fsLightboxInstances){var t=fsLightboxInstances[e].props;fsLightboxInstances[e]=new FsLightbox,fsLightboxInstances[e].props=t,fsLightboxInstances[e].props.sources=[],fsLightboxInstances[e].elements.a=[]}re()}}])}));
/js/vue.esm-browser.js
0,0 → 1,15386
function makeMap(str, expectsLowerCase) {
const map = /* @__PURE__ */ Object.create(null);
const list = str.split(",");
for (let i = 0; i < list.length; i++) {
map[list[i]] = true;
}
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
}
 
const EMPTY_OBJ = Object.freeze({}) ;
const EMPTY_ARR = Object.freeze([]) ;
const NOOP = () => {
};
const NO = () => false;
const onRE = /^on[^a-z]/;
const isOn = (key) => onRE.test(key);
const isModelListener = (key) => key.startsWith("onUpdate:");
const extend = Object.assign;
const remove = (arr, el) => {
const i = arr.indexOf(el);
if (i > -1) {
arr.splice(i, 1);
}
};
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
const isArray = Array.isArray;
const isMap = (val) => toTypeString(val) === "[object Map]";
const isSet = (val) => toTypeString(val) === "[object Set]";
const isDate = (val) => toTypeString(val) === "[object Date]";
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
const isFunction = (val) => typeof val === "function";
const isString = (val) => typeof val === "string";
const isSymbol = (val) => typeof val === "symbol";
const isObject = (val) => val !== null && typeof val === "object";
const isPromise = (val) => {
return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
};
const objectToString = Object.prototype.toString;
const toTypeString = (value) => objectToString.call(value);
const toRawType = (value) => {
return toTypeString(value).slice(8, -1);
};
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
const isReservedProp = /* @__PURE__ */ makeMap(
// the leading comma is intentional so empty string "" is also included
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
);
const isBuiltInDirective = /* @__PURE__ */ makeMap(
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
);
const cacheStringFunction = (fn) => {
const cache = /* @__PURE__ */ Object.create(null);
return (str) => {
const hit = cache[str];
return hit || (cache[str] = fn(str));
};
};
const camelizeRE = /-(\w)/g;
const camelize = cacheStringFunction((str) => {
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
});
const hyphenateRE = /\B([A-Z])/g;
const hyphenate = cacheStringFunction(
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
);
const capitalize = cacheStringFunction((str) => {
return str.charAt(0).toUpperCase() + str.slice(1);
});
const toHandlerKey = cacheStringFunction((str) => {
const s = str ? `on${capitalize(str)}` : ``;
return s;
});
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
const invokeArrayFns = (fns, arg) => {
for (let i = 0; i < fns.length; i++) {
fns[i](arg);
}
};
const def = (obj, key, value) => {
Object.defineProperty(obj, key, {
configurable: true,
enumerable: false,
value
});
};
const looseToNumber = (val) => {
const n = parseFloat(val);
return isNaN(n) ? val : n;
};
const toNumber = (val) => {
const n = isString(val) ? Number(val) : NaN;
return isNaN(n) ? val : n;
};
let _globalThis;
const getGlobalThis = () => {
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
};
 
const PatchFlagNames = {
[1]: `TEXT`,
[2]: `CLASS`,
[4]: `STYLE`,
[8]: `PROPS`,
[16]: `FULL_PROPS`,
[32]: `HYDRATE_EVENTS`,
[64]: `STABLE_FRAGMENT`,
[128]: `KEYED_FRAGMENT`,
[256]: `UNKEYED_FRAGMENT`,
[512]: `NEED_PATCH`,
[1024]: `DYNAMIC_SLOTS`,
[2048]: `DEV_ROOT_FRAGMENT`,
[-1]: `HOISTED`,
[-2]: `BAIL`
};
 
const slotFlagsText = {
[1]: "STABLE",
[2]: "DYNAMIC",
[3]: "FORWARDED"
};
 
const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console";
const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);
 
const range = 2;
function generateCodeFrame(source, start = 0, end = source.length) {
let lines = source.split(/(\r?\n)/);
const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
lines = lines.filter((_, idx) => idx % 2 === 0);
let count = 0;
const res = [];
for (let i = 0; i < lines.length; i++) {
count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);
if (count >= start) {
for (let j = i - range; j <= i + range || end > count; j++) {
if (j < 0 || j >= lines.length)
continue;
const line = j + 1;
res.push(
`${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`
);
const lineLength = lines[j].length;
const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;
if (j === i) {
const pad = start - (count - (lineLength + newLineSeqLength));
const length = Math.max(
1,
end > count ? lineLength - pad : end - start
);
res.push(` | ` + " ".repeat(pad) + "^".repeat(length));
} else if (j > i) {
if (end > count) {
const length = Math.max(Math.min(end - count, lineLength), 1);
res.push(` | ` + "^".repeat(length));
}
count += lineLength + newLineSeqLength;
}
}
break;
}
}
return res.join("\n");
}
 
function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const item = value[i];
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
if (normalized) {
for (const key in normalized) {
res[key] = normalized[key];
}
}
}
return res;
} else if (isString(value) || isObject(value)) {
return value;
}
}
const listDelimiterRE = /;(?![^(]*\))/g;
const propertyDelimiterRE = /:([^]+)/;
const styleCommentRE = /\/\*[^]*?\*\//g;
function parseStringStyle(cssText) {
const ret = {};
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
if (item) {
const tmp = item.split(propertyDelimiterRE);
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
}
});
return ret;
}
function normalizeClass(value) {
let res = "";
if (isString(value)) {
res = value;
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
const normalized = normalizeClass(value[i]);
if (normalized) {
res += normalized + " ";
}
}
} else if (isObject(value)) {
for (const name in value) {
if (value[name]) {
res += name + " ";
}
}
}
return res.trim();
}
function normalizeProps(props) {
if (!props)
return null;
let { class: klass, style } = props;
if (klass && !isString(klass)) {
props.class = normalizeClass(klass);
}
if (style) {
props.style = normalizeStyle(style);
}
return props;
}
 
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
 
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
function includeBooleanAttr(value) {
return !!value || value === "";
}
 
function looseCompareArrays(a, b) {
if (a.length !== b.length)
return false;
let equal = true;
for (let i = 0; equal && i < a.length; i++) {
equal = looseEqual(a[i], b[i]);
}
return equal;
}
function looseEqual(a, b) {
if (a === b)
return true;
let aValidType = isDate(a);
let bValidType = isDate(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? a.getTime() === b.getTime() : false;
}
aValidType = isSymbol(a);
bValidType = isSymbol(b);
if (aValidType || bValidType) {
return a === b;
}
aValidType = isArray(a);
bValidType = isArray(b);
if (aValidType || bValidType) {
return aValidType && bValidType ? looseCompareArrays(a, b) : false;
}
aValidType = isObject(a);
bValidType = isObject(b);
if (aValidType || bValidType) {
if (!aValidType || !bValidType) {
return false;
}
const aKeysCount = Object.keys(a).length;
const bKeysCount = Object.keys(b).length;
if (aKeysCount !== bKeysCount) {
return false;
}
for (const key in a) {
const aHasKey = a.hasOwnProperty(key);
const bHasKey = b.hasOwnProperty(key);
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
return false;
}
}
}
return String(a) === String(b);
}
function looseIndexOf(arr, val) {
return arr.findIndex((item) => looseEqual(item, val));
}
 
const toDisplayString = (val) => {
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
};
const replacer = (_key, val) => {
if (val && val.__v_isRef) {
return replacer(_key, val.value);
} else if (isMap(val)) {
return {
[`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
entries[`${key} =>`] = val2;
return entries;
}, {})
};
} else if (isSet(val)) {
return {
[`Set(${val.size})`]: [...val.values()]
};
} else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
return String(val);
}
return val;
};
 
function warn$1(msg, ...args) {
console.warn(`[Vue warn] ${msg}`, ...args);
}
 
let activeEffectScope;
class EffectScope {
constructor(detached = false) {
this.detached = detached;
/**
* @internal
*/
this._active = true;
/**
* @internal
*/
this.effects = [];
/**
* @internal
*/
this.cleanups = [];
this.parent = activeEffectScope;
if (!detached && activeEffectScope) {
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
this
) - 1;
}
}
get active() {
return this._active;
}
run(fn) {
if (this._active) {
const currentEffectScope = activeEffectScope;
try {
activeEffectScope = this;
return fn();
} finally {
activeEffectScope = currentEffectScope;
}
} else {
warn$1(`cannot run an inactive effect scope.`);
}
}
/**
* This should only be called on non-detached scopes
* @internal
*/
on() {
activeEffectScope = this;
}
/**
* This should only be called on non-detached scopes
* @internal
*/
off() {
activeEffectScope = this.parent;
}
stop(fromParent) {
if (this._active) {
let i, l;
for (i = 0, l = this.effects.length; i < l; i++) {
this.effects[i].stop();
}
for (i = 0, l = this.cleanups.length; i < l; i++) {
this.cleanups[i]();
}
if (this.scopes) {
for (i = 0, l = this.scopes.length; i < l; i++) {
this.scopes[i].stop(true);
}
}
if (!this.detached && this.parent && !fromParent) {
const last = this.parent.scopes.pop();
if (last && last !== this) {
this.parent.scopes[this.index] = last;
last.index = this.index;
}
}
this.parent = void 0;
this._active = false;
}
}
}
function effectScope(detached) {
return new EffectScope(detached);
}
function recordEffectScope(effect, scope = activeEffectScope) {
if (scope && scope.active) {
scope.effects.push(effect);
}
}
function getCurrentScope() {
return activeEffectScope;
}
function onScopeDispose(fn) {
if (activeEffectScope) {
activeEffectScope.cleanups.push(fn);
} else {
warn$1(
`onScopeDispose() is called when there is no active effect scope to be associated with.`
);
}
}
 
const createDep = (effects) => {
const dep = new Set(effects);
dep.w = 0;
dep.n = 0;
return dep;
};
const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
const newTracked = (dep) => (dep.n & trackOpBit) > 0;
const initDepMarkers = ({ deps }) => {
if (deps.length) {
for (let i = 0; i < deps.length; i++) {
deps[i].w |= trackOpBit;
}
}
};
const finalizeDepMarkers = (effect) => {
const { deps } = effect;
if (deps.length) {
let ptr = 0;
for (let i = 0; i < deps.length; i++) {
const dep = deps[i];
if (wasTracked(dep) && !newTracked(dep)) {
dep.delete(effect);
} else {
deps[ptr++] = dep;
}
dep.w &= ~trackOpBit;
dep.n &= ~trackOpBit;
}
deps.length = ptr;
}
};
 
const targetMap = /* @__PURE__ */ new WeakMap();
let effectTrackDepth = 0;
let trackOpBit = 1;
const maxMarkerBits = 30;
let activeEffect;
const ITERATE_KEY = Symbol("iterate" );
const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" );
class ReactiveEffect {
constructor(fn, scheduler = null, scope) {
this.fn = fn;
this.scheduler = scheduler;
this.active = true;
this.deps = [];
this.parent = void 0;
recordEffectScope(this, scope);
}
run() {
if (!this.active) {
return this.fn();
}
let parent = activeEffect;
let lastShouldTrack = shouldTrack;
while (parent) {
if (parent === this) {
return;
}
parent = parent.parent;
}
try {
this.parent = activeEffect;
activeEffect = this;
shouldTrack = true;
trackOpBit = 1 << ++effectTrackDepth;
if (effectTrackDepth <= maxMarkerBits) {
initDepMarkers(this);
} else {
cleanupEffect(this);
}
return this.fn();
} finally {
if (effectTrackDepth <= maxMarkerBits) {
finalizeDepMarkers(this);
}
trackOpBit = 1 << --effectTrackDepth;
activeEffect = this.parent;
shouldTrack = lastShouldTrack;
this.parent = void 0;
if (this.deferStop) {
this.stop();
}
}
}
stop() {
if (activeEffect === this) {
this.deferStop = true;
} else if (this.active) {
cleanupEffect(this);
if (this.onStop) {
this.onStop();
}
this.active = false;
}
}
}
function cleanupEffect(effect2) {
const { deps } = effect2;
if (deps.length) {
for (let i = 0; i < deps.length; i++) {
deps[i].delete(effect2);
}
deps.length = 0;
}
}
function effect(fn, options) {
if (fn.effect instanceof ReactiveEffect) {
fn = fn.effect.fn;
}
const _effect = new ReactiveEffect(fn);
if (options) {
extend(_effect, options);
if (options.scope)
recordEffectScope(_effect, options.scope);
}
if (!options || !options.lazy) {
_effect.run();
}
const runner = _effect.run.bind(_effect);
runner.effect = _effect;
return runner;
}
function stop(runner) {
runner.effect.stop();
}
let shouldTrack = true;
const trackStack = [];
function pauseTracking() {
trackStack.push(shouldTrack);
shouldTrack = false;
}
function resetTracking() {
const last = trackStack.pop();
shouldTrack = last === void 0 ? true : last;
}
function track(target, type, key) {
if (shouldTrack && activeEffect) {
let depsMap = targetMap.get(target);
if (!depsMap) {
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
}
let dep = depsMap.get(key);
if (!dep) {
depsMap.set(key, dep = createDep());
}
const eventInfo = { effect: activeEffect, target, type, key } ;
trackEffects(dep, eventInfo);
}
}
function trackEffects(dep, debuggerEventExtraInfo) {
let shouldTrack2 = false;
if (effectTrackDepth <= maxMarkerBits) {
if (!newTracked(dep)) {
dep.n |= trackOpBit;
shouldTrack2 = !wasTracked(dep);
}
} else {
shouldTrack2 = !dep.has(activeEffect);
}
if (shouldTrack2) {
dep.add(activeEffect);
activeEffect.deps.push(dep);
if (activeEffect.onTrack) {
activeEffect.onTrack(
extend(
{
effect: activeEffect
},
debuggerEventExtraInfo
)
);
}
}
}
function trigger(target, type, key, newValue, oldValue, oldTarget) {
const depsMap = targetMap.get(target);
if (!depsMap) {
return;
}
let deps = [];
if (type === "clear") {
deps = [...depsMap.values()];
} else if (key === "length" && isArray(target)) {
const newLength = Number(newValue);
depsMap.forEach((dep, key2) => {
if (key2 === "length" || key2 >= newLength) {
deps.push(dep);
}
});
} else {
if (key !== void 0) {
deps.push(depsMap.get(key));
}
switch (type) {
case "add":
if (!isArray(target)) {
deps.push(depsMap.get(ITERATE_KEY));
if (isMap(target)) {
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
}
} else if (isIntegerKey(key)) {
deps.push(depsMap.get("length"));
}
break;
case "delete":
if (!isArray(target)) {
deps.push(depsMap.get(ITERATE_KEY));
if (isMap(target)) {
deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
}
}
break;
case "set":
if (isMap(target)) {
deps.push(depsMap.get(ITERATE_KEY));
}
break;
}
}
const eventInfo = { target, type, key, newValue, oldValue, oldTarget } ;
if (deps.length === 1) {
if (deps[0]) {
{
triggerEffects(deps[0], eventInfo);
}
}
} else {
const effects = [];
for (const dep of deps) {
if (dep) {
effects.push(...dep);
}
}
{
triggerEffects(createDep(effects), eventInfo);
}
}
}
function triggerEffects(dep, debuggerEventExtraInfo) {
const effects = isArray(dep) ? dep : [...dep];
for (const effect2 of effects) {
if (effect2.computed) {
triggerEffect(effect2, debuggerEventExtraInfo);
}
}
for (const effect2 of effects) {
if (!effect2.computed) {
triggerEffect(effect2, debuggerEventExtraInfo);
}
}
}
function triggerEffect(effect2, debuggerEventExtraInfo) {
if (effect2 !== activeEffect || effect2.allowRecurse) {
if (effect2.onTrigger) {
effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo));
}
if (effect2.scheduler) {
effect2.scheduler();
} else {
effect2.run();
}
}
}
function getDepFromReactive(object, key) {
var _a;
return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key);
}
 
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
const builtInSymbols = new Set(
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
);
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
function createArrayInstrumentations() {
const instrumentations = {};
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
instrumentations[key] = function(...args) {
const arr = toRaw(this);
for (let i = 0, l = this.length; i < l; i++) {
track(arr, "get", i + "");
}
const res = arr[key](...args);
if (res === -1 || res === false) {
return arr[key](...args.map(toRaw));
} else {
return res;
}
};
});
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
instrumentations[key] = function(...args) {
pauseTracking();
const res = toRaw(this)[key].apply(this, args);
resetTracking();
return res;
};
});
return instrumentations;
}
function hasOwnProperty(key) {
const obj = toRaw(this);
track(obj, "has", key);
return obj.hasOwnProperty(key);
}
class BaseReactiveHandler {
constructor(_isReadonly = false, _shallow = false) {
this._isReadonly = _isReadonly;
this._shallow = _shallow;
}
get(target, key, receiver) {
const isReadonly2 = this._isReadonly, shallow = this._shallow;
if (key === "__v_isReactive") {
return !isReadonly2;
} else if (key === "__v_isReadonly") {
return isReadonly2;
} else if (key === "__v_isShallow") {
return shallow;
} else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
return target;
}
const targetIsArray = isArray(target);
if (!isReadonly2) {
if (targetIsArray && hasOwn(arrayInstrumentations, key)) {
return Reflect.get(arrayInstrumentations, key, receiver);
}
if (key === "hasOwnProperty") {
return hasOwnProperty;
}
}
const res = Reflect.get(target, key, receiver);
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
return res;
}
if (!isReadonly2) {
track(target, "get", key);
}
if (shallow) {
return res;
}
if (isRef(res)) {
return targetIsArray && isIntegerKey(key) ? res : res.value;
}
if (isObject(res)) {
return isReadonly2 ? readonly(res) : reactive(res);
}
return res;
}
}
class MutableReactiveHandler extends BaseReactiveHandler {
constructor(shallow = false) {
super(false, shallow);
}
set(target, key, value, receiver) {
let oldValue = target[key];
if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
return false;
}
if (!this._shallow) {
if (!isShallow(value) && !isReadonly(value)) {
oldValue = toRaw(oldValue);
value = toRaw(value);
}
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
oldValue.value = value;
return true;
}
}
const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
const result = Reflect.set(target, key, value, receiver);
if (target === toRaw(receiver)) {
if (!hadKey) {
trigger(target, "add", key, value);
} else if (hasChanged(value, oldValue)) {
trigger(target, "set", key, value, oldValue);
}
}
return result;
}
deleteProperty(target, key) {
const hadKey = hasOwn(target, key);
const oldValue = target[key];
const result = Reflect.deleteProperty(target, key);
if (result && hadKey) {
trigger(target, "delete", key, void 0, oldValue);
}
return result;
}
has(target, key) {
const result = Reflect.has(target, key);
if (!isSymbol(key) || !builtInSymbols.has(key)) {
track(target, "has", key);
}
return result;
}
ownKeys(target) {
track(
target,
"iterate",
isArray(target) ? "length" : ITERATE_KEY
);
return Reflect.ownKeys(target);
}
}
class ReadonlyReactiveHandler extends BaseReactiveHandler {
constructor(shallow = false) {
super(true, shallow);
}
set(target, key) {
{
warn$1(
`Set operation on key "${String(key)}" failed: target is readonly.`,
target
);
}
return true;
}
deleteProperty(target, key) {
{
warn$1(
`Delete operation on key "${String(key)}" failed: target is readonly.`,
target
);
}
return true;
}
}
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
true
);
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
 
const toShallow = (value) => value;
const getProto = (v) => Reflect.getPrototypeOf(v);
function get(target, key, isReadonly = false, isShallow = false) {
target = target["__v_raw"];
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly) {
if (hasChanged(key, rawKey)) {
track(rawTarget, "get", key);
}
track(rawTarget, "get", rawKey);
}
const { has: has2 } = getProto(rawTarget);
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
if (has2.call(rawTarget, key)) {
return wrap(target.get(key));
} else if (has2.call(rawTarget, rawKey)) {
return wrap(target.get(rawKey));
} else if (target !== rawTarget) {
target.get(key);
}
}
function has(key, isReadonly = false) {
const target = this["__v_raw"];
const rawTarget = toRaw(target);
const rawKey = toRaw(key);
if (!isReadonly) {
if (hasChanged(key, rawKey)) {
track(rawTarget, "has", key);
}
track(rawTarget, "has", rawKey);
}
return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
}
function size(target, isReadonly = false) {
target = target["__v_raw"];
!isReadonly && track(toRaw(target), "iterate", ITERATE_KEY);
return Reflect.get(target, "size", target);
}
function add(value) {
value = toRaw(value);
const target = toRaw(this);
const proto = getProto(target);
const hadKey = proto.has.call(target, value);
if (!hadKey) {
target.add(value);
trigger(target, "add", value, value);
}
return this;
}
function set(key, value) {
value = toRaw(value);
const target = toRaw(this);
const { has: has2, get: get2 } = getProto(target);
let hadKey = has2.call(target, key);
if (!hadKey) {
key = toRaw(key);
hadKey = has2.call(target, key);
} else {
checkIdentityKeys(target, has2, key);
}
const oldValue = get2.call(target, key);
target.set(key, value);
if (!hadKey) {
trigger(target, "add", key, value);
} else if (hasChanged(value, oldValue)) {
trigger(target, "set", key, value, oldValue);
}
return this;
}
function deleteEntry(key) {
const target = toRaw(this);
const { has: has2, get: get2 } = getProto(target);
let hadKey = has2.call(target, key);
if (!hadKey) {
key = toRaw(key);
hadKey = has2.call(target, key);
} else {
checkIdentityKeys(target, has2, key);
}
const oldValue = get2 ? get2.call(target, key) : void 0;
const result = target.delete(key);
if (hadKey) {
trigger(target, "delete", key, void 0, oldValue);
}
return result;
}
function clear() {
const target = toRaw(this);
const hadItems = target.size !== 0;
const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
const result = target.clear();
if (hadItems) {
trigger(target, "clear", void 0, void 0, oldTarget);
}
return result;
}
function createForEach(isReadonly, isShallow) {
return function forEach(callback, thisArg) {
const observed = this;
const target = observed["__v_raw"];
const rawTarget = toRaw(target);
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
!isReadonly && track(rawTarget, "iterate", ITERATE_KEY);
return target.forEach((value, key) => {
return callback.call(thisArg, wrap(value), wrap(key), observed);
});
};
}
function createIterableMethod(method, isReadonly, isShallow) {
return function(...args) {
const target = this["__v_raw"];
const rawTarget = toRaw(target);
const targetIsMap = isMap(rawTarget);
const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
const isKeyOnly = method === "keys" && targetIsMap;
const innerIterator = target[method](...args);
const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
!isReadonly && track(
rawTarget,
"iterate",
isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
);
return {
// iterator protocol
next() {
const { value, done } = innerIterator.next();
return done ? { value, done } : {
value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
done
};
},
// iterable protocol
[Symbol.iterator]() {
return this;
}
};
};
}
function createReadonlyMethod(type) {
return function(...args) {
{
const key = args[0] ? `on key "${args[0]}" ` : ``;
console.warn(
`${capitalize(type)} operation ${key}failed: target is readonly.`,
toRaw(this)
);
}
return type === "delete" ? false : this;
};
}
function createInstrumentations() {
const mutableInstrumentations2 = {
get(key) {
return get(this, key);
},
get size() {
return size(this);
},
has,
add,
set,
delete: deleteEntry,
clear,
forEach: createForEach(false, false)
};
const shallowInstrumentations2 = {
get(key) {
return get(this, key, false, true);
},
get size() {
return size(this);
},
has,
add,
set,
delete: deleteEntry,
clear,
forEach: createForEach(false, true)
};
const readonlyInstrumentations2 = {
get(key) {
return get(this, key, true);
},
get size() {
return size(this, true);
},
has(key) {
return has.call(this, key, true);
},
add: createReadonlyMethod("add"),
set: createReadonlyMethod("set"),
delete: createReadonlyMethod("delete"),
clear: createReadonlyMethod("clear"),
forEach: createForEach(true, false)
};
const shallowReadonlyInstrumentations2 = {
get(key) {
return get(this, key, true, true);
},
get size() {
return size(this, true);
},
has(key) {
return has.call(this, key, true);
},
add: createReadonlyMethod("add"),
set: createReadonlyMethod("set"),
delete: createReadonlyMethod("delete"),
clear: createReadonlyMethod("clear"),
forEach: createForEach(true, true)
};
const iteratorMethods = ["keys", "values", "entries", Symbol.iterator];
iteratorMethods.forEach((method) => {
mutableInstrumentations2[method] = createIterableMethod(
method,
false,
false
);
readonlyInstrumentations2[method] = createIterableMethod(
method,
true,
false
);
shallowInstrumentations2[method] = createIterableMethod(
method,
false,
true
);
shallowReadonlyInstrumentations2[method] = createIterableMethod(
method,
true,
true
);
});
return [
mutableInstrumentations2,
readonlyInstrumentations2,
shallowInstrumentations2,
shallowReadonlyInstrumentations2
];
}
const [
mutableInstrumentations,
readonlyInstrumentations,
shallowInstrumentations,
shallowReadonlyInstrumentations
] = /* @__PURE__ */ createInstrumentations();
function createInstrumentationGetter(isReadonly, shallow) {
const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations;
return (target, key, receiver) => {
if (key === "__v_isReactive") {
return !isReadonly;
} else if (key === "__v_isReadonly") {
return isReadonly;
} else if (key === "__v_raw") {
return target;
}
return Reflect.get(
hasOwn(instrumentations, key) && key in target ? instrumentations : target,
key,
receiver
);
};
}
const mutableCollectionHandlers = {
get: /* @__PURE__ */ createInstrumentationGetter(false, false)
};
const shallowCollectionHandlers = {
get: /* @__PURE__ */ createInstrumentationGetter(false, true)
};
const readonlyCollectionHandlers = {
get: /* @__PURE__ */ createInstrumentationGetter(true, false)
};
const shallowReadonlyCollectionHandlers = {
get: /* @__PURE__ */ createInstrumentationGetter(true, true)
};
function checkIdentityKeys(target, has2, key) {
const rawKey = toRaw(key);
if (rawKey !== key && has2.call(target, rawKey)) {
const type = toRawType(target);
console.warn(
`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
);
}
}
 
const reactiveMap = /* @__PURE__ */ new WeakMap();
const shallowReactiveMap = /* @__PURE__ */ new WeakMap();
const readonlyMap = /* @__PURE__ */ new WeakMap();
const shallowReadonlyMap = /* @__PURE__ */ new WeakMap();
function targetTypeMap(rawType) {
switch (rawType) {
case "Object":
case "Array":
return 1 /* COMMON */;
case "Map":
case "Set":
case "WeakMap":
case "WeakSet":
return 2 /* COLLECTION */;
default:
return 0 /* INVALID */;
}
}
function getTargetType(value) {
return value["__v_skip"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));
}
function reactive(target) {
if (isReadonly(target)) {
return target;
}
return createReactiveObject(
target,
false,
mutableHandlers,
mutableCollectionHandlers,
reactiveMap
);
}
function shallowReactive(target) {
return createReactiveObject(
target,
false,
shallowReactiveHandlers,
shallowCollectionHandlers,
shallowReactiveMap
);
}
function readonly(target) {
return createReactiveObject(
target,
true,
readonlyHandlers,
readonlyCollectionHandlers,
readonlyMap
);
}
function shallowReadonly(target) {
return createReactiveObject(
target,
true,
shallowReadonlyHandlers,
shallowReadonlyCollectionHandlers,
shallowReadonlyMap
);
}
function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
if (!isObject(target)) {
{
console.warn(`value cannot be made reactive: ${String(target)}`);
}
return target;
}
if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
return target;
}
const existingProxy = proxyMap.get(target);
if (existingProxy) {
return existingProxy;
}
const targetType = getTargetType(target);
if (targetType === 0 /* INVALID */) {
return target;
}
const proxy = new Proxy(
target,
targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
);
proxyMap.set(target, proxy);
return proxy;
}
function isReactive(value) {
if (isReadonly(value)) {
return isReactive(value["__v_raw"]);
}
return !!(value && value["__v_isReactive"]);
}
function isReadonly(value) {
return !!(value && value["__v_isReadonly"]);
}
function isShallow(value) {
return !!(value && value["__v_isShallow"]);
}
function isProxy(value) {
return isReactive(value) || isReadonly(value);
}
function toRaw(observed) {
const raw = observed && observed["__v_raw"];
return raw ? toRaw(raw) : observed;
}
function markRaw(value) {
def(value, "__v_skip", true);
return value;
}
const toReactive = (value) => isObject(value) ? reactive(value) : value;
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
 
function trackRefValue(ref2) {
if (shouldTrack && activeEffect) {
ref2 = toRaw(ref2);
{
trackEffects(ref2.dep || (ref2.dep = createDep()), {
target: ref2,
type: "get",
key: "value"
});
}
}
}
function triggerRefValue(ref2, newVal) {
ref2 = toRaw(ref2);
const dep = ref2.dep;
if (dep) {
{
triggerEffects(dep, {
target: ref2,
type: "set",
key: "value",
newValue: newVal
});
}
}
}
function isRef(r) {
return !!(r && r.__v_isRef === true);
}
function ref(value) {
return createRef(value, false);
}
function shallowRef(value) {
return createRef(value, true);
}
function createRef(rawValue, shallow) {
if (isRef(rawValue)) {
return rawValue;
}
return new RefImpl(rawValue, shallow);
}
class RefImpl {
constructor(value, __v_isShallow) {
this.__v_isShallow = __v_isShallow;
this.dep = void 0;
this.__v_isRef = true;
this._rawValue = __v_isShallow ? value : toRaw(value);
this._value = __v_isShallow ? value : toReactive(value);
}
get value() {
trackRefValue(this);
return this._value;
}
set value(newVal) {
const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
newVal = useDirectValue ? newVal : toRaw(newVal);
if (hasChanged(newVal, this._rawValue)) {
this._rawValue = newVal;
this._value = useDirectValue ? newVal : toReactive(newVal);
triggerRefValue(this, newVal);
}
}
}
function triggerRef(ref2) {
triggerRefValue(ref2, ref2.value );
}
function unref(ref2) {
return isRef(ref2) ? ref2.value : ref2;
}
function toValue(source) {
return isFunction(source) ? source() : unref(source);
}
const shallowUnwrapHandlers = {
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
set: (target, key, value, receiver) => {
const oldValue = target[key];
if (isRef(oldValue) && !isRef(value)) {
oldValue.value = value;
return true;
} else {
return Reflect.set(target, key, value, receiver);
}
}
};
function proxyRefs(objectWithRefs) {
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
}
class CustomRefImpl {
constructor(factory) {
this.dep = void 0;
this.__v_isRef = true;
const { get, set } = factory(
() => trackRefValue(this),
() => triggerRefValue(this)
);
this._get = get;
this._set = set;
}
get value() {
return this._get();
}
set value(newVal) {
this._set(newVal);
}
}
function customRef(factory) {
return new CustomRefImpl(factory);
}
function toRefs(object) {
if (!isProxy(object)) {
console.warn(`toRefs() expects a reactive object but received a plain one.`);
}
const ret = isArray(object) ? new Array(object.length) : {};
for (const key in object) {
ret[key] = propertyToRef(object, key);
}
return ret;
}
class ObjectRefImpl {
constructor(_object, _key, _defaultValue) {
this._object = _object;
this._key = _key;
this._defaultValue = _defaultValue;
this.__v_isRef = true;
}
get value() {
const val = this._object[this._key];
return val === void 0 ? this._defaultValue : val;
}
set value(newVal) {
this._object[this._key] = newVal;
}
get dep() {
return getDepFromReactive(toRaw(this._object), this._key);
}
}
class GetterRefImpl {
constructor(_getter) {
this._getter = _getter;
this.__v_isRef = true;
this.__v_isReadonly = true;
}
get value() {
return this._getter();
}
}
function toRef(source, key, defaultValue) {
if (isRef(source)) {
return source;
} else if (isFunction(source)) {
return new GetterRefImpl(source);
} else if (isObject(source) && arguments.length > 1) {
return propertyToRef(source, key, defaultValue);
} else {
return ref(source);
}
}
function propertyToRef(source, key, defaultValue) {
const val = source[key];
return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);
}
 
class ComputedRefImpl {
constructor(getter, _setter, isReadonly, isSSR) {
this._setter = _setter;
this.dep = void 0;
this.__v_isRef = true;
this["__v_isReadonly"] = false;
this._dirty = true;
this.effect = new ReactiveEffect(getter, () => {
if (!this._dirty) {
this._dirty = true;
triggerRefValue(this);
}
});
this.effect.computed = this;
this.effect.active = this._cacheable = !isSSR;
this["__v_isReadonly"] = isReadonly;
}
get value() {
const self = toRaw(this);
trackRefValue(self);
if (self._dirty || !self._cacheable) {
self._dirty = false;
self._value = self.effect.run();
}
return self._value;
}
set value(newValue) {
this._setter(newValue);
}
}
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
let getter;
let setter;
const onlyGetter = isFunction(getterOrOptions);
if (onlyGetter) {
getter = getterOrOptions;
setter = () => {
console.warn("Write operation failed: computed value is readonly");
} ;
} else {
getter = getterOrOptions.get;
setter = getterOrOptions.set;
}
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
if (debugOptions && !isSSR) {
cRef.effect.onTrack = debugOptions.onTrack;
cRef.effect.onTrigger = debugOptions.onTrigger;
}
return cRef;
}
 
const stack = [];
function pushWarningContext(vnode) {
stack.push(vnode);
}
function popWarningContext() {
stack.pop();
}
function warn(msg, ...args) {
pauseTracking();
const instance = stack.length ? stack[stack.length - 1].component : null;
const appWarnHandler = instance && instance.appContext.config.warnHandler;
const trace = getComponentTrace();
if (appWarnHandler) {
callWithErrorHandling(
appWarnHandler,
instance,
11,
[
msg + args.join(""),
instance && instance.proxy,
trace.map(
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
).join("\n"),
trace
]
);
} else {
const warnArgs = [`[Vue warn]: ${msg}`, ...args];
if (trace.length && // avoid spamming console during tests
true) {
warnArgs.push(`
`, ...formatTrace(trace));
}
console.warn(...warnArgs);
}
resetTracking();
}
function getComponentTrace() {
let currentVNode = stack[stack.length - 1];
if (!currentVNode) {
return [];
}
const normalizedStack = [];
while (currentVNode) {
const last = normalizedStack[0];
if (last && last.vnode === currentVNode) {
last.recurseCount++;
} else {
normalizedStack.push({
vnode: currentVNode,
recurseCount: 0
});
}
const parentInstance = currentVNode.component && currentVNode.component.parent;
currentVNode = parentInstance && parentInstance.vnode;
}
return normalizedStack;
}
function formatTrace(trace) {
const logs = [];
trace.forEach((entry, i) => {
logs.push(...i === 0 ? [] : [`
`], ...formatTraceEntry(entry));
});
return logs;
}
function formatTraceEntry({ vnode, recurseCount }) {
const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
const isRoot = vnode.component ? vnode.component.parent == null : false;
const open = ` at <${formatComponentName(
vnode.component,
vnode.type,
isRoot
)}`;
const close = `>` + postfix;
return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
}
function formatProps(props) {
const res = [];
const keys = Object.keys(props);
keys.slice(0, 3).forEach((key) => {
res.push(...formatProp(key, props[key]));
});
if (keys.length > 3) {
res.push(` ...`);
}
return res;
}
function formatProp(key, value, raw) {
if (isString(value)) {
value = JSON.stringify(value);
return raw ? value : [`${key}=${value}`];
} else if (typeof value === "number" || typeof value === "boolean" || value == null) {
return raw ? value : [`${key}=${value}`];
} else if (isRef(value)) {
value = formatProp(key, toRaw(value.value), true);
return raw ? value : [`${key}=Ref<`, value, `>`];
} else if (isFunction(value)) {
return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
} else {
value = toRaw(value);
return raw ? value : [`${key}=`, value];
}
}
function assertNumber(val, type) {
if (val === void 0) {
return;
} else if (typeof val !== "number") {
warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
} else if (isNaN(val)) {
warn(`${type} is NaN - the duration expression might be incorrect.`);
}
}
 
const ErrorTypeStrings = {
["sp"]: "serverPrefetch hook",
["bc"]: "beforeCreate hook",
["c"]: "created hook",
["bm"]: "beforeMount hook",
["m"]: "mounted hook",
["bu"]: "beforeUpdate hook",
["u"]: "updated",
["bum"]: "beforeUnmount hook",
["um"]: "unmounted hook",
["a"]: "activated hook",
["da"]: "deactivated hook",
["ec"]: "errorCaptured hook",
["rtc"]: "renderTracked hook",
["rtg"]: "renderTriggered hook",
[0]: "setup function",
[1]: "render function",
[2]: "watcher getter",
[3]: "watcher callback",
[4]: "watcher cleanup function",
[5]: "native event handler",
[6]: "component event handler",
[7]: "vnode hook",
[8]: "directive hook",
[9]: "transition hook",
[10]: "app errorHandler",
[11]: "app warnHandler",
[12]: "ref function",
[13]: "async component loader",
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
};
function callWithErrorHandling(fn, instance, type, args) {
let res;
try {
res = args ? fn(...args) : fn();
} catch (err) {
handleError(err, instance, type);
}
return res;
}
function callWithAsyncErrorHandling(fn, instance, type, args) {
if (isFunction(fn)) {
const res = callWithErrorHandling(fn, instance, type, args);
if (res && isPromise(res)) {
res.catch((err) => {
handleError(err, instance, type);
});
}
return res;
}
const values = [];
for (let i = 0; i < fn.length; i++) {
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
}
return values;
}
function handleError(err, instance, type, throwInDev = true) {
const contextVNode = instance ? instance.vnode : null;
if (instance) {
let cur = instance.parent;
const exposedInstance = instance.proxy;
const errorInfo = ErrorTypeStrings[type] ;
while (cur) {
const errorCapturedHooks = cur.ec;
if (errorCapturedHooks) {
for (let i = 0; i < errorCapturedHooks.length; i++) {
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
return;
}
}
}
cur = cur.parent;
}
const appErrorHandler = instance.appContext.config.errorHandler;
if (appErrorHandler) {
callWithErrorHandling(
appErrorHandler,
null,
10,
[err, exposedInstance, errorInfo]
);
return;
}
}
logError(err, type, contextVNode, throwInDev);
}
function logError(err, type, contextVNode, throwInDev = true) {
{
const info = ErrorTypeStrings[type];
if (contextVNode) {
pushWarningContext(contextVNode);
}
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
if (contextVNode) {
popWarningContext();
}
if (throwInDev) {
throw err;
} else {
console.error(err);
}
}
}
 
let isFlushing = false;
let isFlushPending = false;
const queue = [];
let flushIndex = 0;
const pendingPostFlushCbs = [];
let activePostFlushCbs = null;
let postFlushIndex = 0;
const resolvedPromise = /* @__PURE__ */ Promise.resolve();
let currentFlushPromise = null;
const RECURSION_LIMIT = 100;
function nextTick(fn) {
const p = currentFlushPromise || resolvedPromise;
return fn ? p.then(this ? fn.bind(this) : fn) : p;
}
function findInsertionIndex(id) {
let start = flushIndex + 1;
let end = queue.length;
while (start < end) {
const middle = start + end >>> 1;
const middleJobId = getId(queue[middle]);
middleJobId < id ? start = middle + 1 : end = middle;
}
return start;
}
function queueJob(job) {
if (!queue.length || !queue.includes(
job,
isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
)) {
if (job.id == null) {
queue.push(job);
} else {
queue.splice(findInsertionIndex(job.id), 0, job);
}
queueFlush();
}
}
function queueFlush() {
if (!isFlushing && !isFlushPending) {
isFlushPending = true;
currentFlushPromise = resolvedPromise.then(flushJobs);
}
}
function invalidateJob(job) {
const i = queue.indexOf(job);
if (i > flushIndex) {
queue.splice(i, 1);
}
}
function queuePostFlushCb(cb) {
if (!isArray(cb)) {
if (!activePostFlushCbs || !activePostFlushCbs.includes(
cb,
cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
)) {
pendingPostFlushCbs.push(cb);
}
} else {
pendingPostFlushCbs.push(...cb);
}
queueFlush();
}
function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
{
seen = seen || /* @__PURE__ */ new Map();
}
for (; i < queue.length; i++) {
const cb = queue[i];
if (cb && cb.pre) {
if (checkRecursiveUpdates(seen, cb)) {
continue;
}
queue.splice(i, 1);
i--;
cb();
}
}
}
function flushPostFlushCbs(seen) {
if (pendingPostFlushCbs.length) {
const deduped = [...new Set(pendingPostFlushCbs)];
pendingPostFlushCbs.length = 0;
if (activePostFlushCbs) {
activePostFlushCbs.push(...deduped);
return;
}
activePostFlushCbs = deduped;
{
seen = seen || /* @__PURE__ */ new Map();
}
activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
continue;
}
activePostFlushCbs[postFlushIndex]();
}
activePostFlushCbs = null;
postFlushIndex = 0;
}
}
const getId = (job) => job.id == null ? Infinity : job.id;
const comparator = (a, b) => {
const diff = getId(a) - getId(b);
if (diff === 0) {
if (a.pre && !b.pre)
return -1;
if (b.pre && !a.pre)
return 1;
}
return diff;
};
function flushJobs(seen) {
isFlushPending = false;
isFlushing = true;
{
seen = seen || /* @__PURE__ */ new Map();
}
queue.sort(comparator);
const check = (job) => checkRecursiveUpdates(seen, job) ;
try {
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
const job = queue[flushIndex];
if (job && job.active !== false) {
if (check(job)) {
continue;
}
callWithErrorHandling(job, null, 14);
}
}
} finally {
flushIndex = 0;
queue.length = 0;
flushPostFlushCbs(seen);
isFlushing = false;
currentFlushPromise = null;
if (queue.length || pendingPostFlushCbs.length) {
flushJobs(seen);
}
}
}
function checkRecursiveUpdates(seen, fn) {
if (!seen.has(fn)) {
seen.set(fn, 1);
} else {
const count = seen.get(fn);
if (count > RECURSION_LIMIT) {
const instance = fn.ownerInstance;
const componentName = instance && getComponentName(instance.type);
warn(
`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`
);
return true;
} else {
seen.set(fn, count + 1);
}
}
}
 
let isHmrUpdating = false;
const hmrDirtyComponents = /* @__PURE__ */ new Set();
{
getGlobalThis().__VUE_HMR_RUNTIME__ = {
createRecord: tryWrap(createRecord),
rerender: tryWrap(rerender),
reload: tryWrap(reload)
};
}
const map = /* @__PURE__ */ new Map();
function registerHMR(instance) {
const id = instance.type.__hmrId;
let record = map.get(id);
if (!record) {
createRecord(id, instance.type);
record = map.get(id);
}
record.instances.add(instance);
}
function unregisterHMR(instance) {
map.get(instance.type.__hmrId).instances.delete(instance);
}
function createRecord(id, initialDef) {
if (map.has(id)) {
return false;
}
map.set(id, {
initialDef: normalizeClassComponent(initialDef),
instances: /* @__PURE__ */ new Set()
});
return true;
}
function normalizeClassComponent(component) {
return isClassComponent(component) ? component.__vccOpts : component;
}
function rerender(id, newRender) {
const record = map.get(id);
if (!record) {
return;
}
record.initialDef.render = newRender;
[...record.instances].forEach((instance) => {
if (newRender) {
instance.render = newRender;
normalizeClassComponent(instance.type).render = newRender;
}
instance.renderCache = [];
isHmrUpdating = true;
instance.update();
isHmrUpdating = false;
});
}
function reload(id, newComp) {
const record = map.get(id);
if (!record)
return;
newComp = normalizeClassComponent(newComp);
updateComponentDef(record.initialDef, newComp);
const instances = [...record.instances];
for (const instance of instances) {
const oldComp = normalizeClassComponent(instance.type);
if (!hmrDirtyComponents.has(oldComp)) {
if (oldComp !== record.initialDef) {
updateComponentDef(oldComp, newComp);
}
hmrDirtyComponents.add(oldComp);
}
instance.appContext.propsCache.delete(instance.type);
instance.appContext.emitsCache.delete(instance.type);
instance.appContext.optionsCache.delete(instance.type);
if (instance.ceReload) {
hmrDirtyComponents.add(oldComp);
instance.ceReload(newComp.styles);
hmrDirtyComponents.delete(oldComp);
} else if (instance.parent) {
queueJob(instance.parent.update);
} else if (instance.appContext.reload) {
instance.appContext.reload();
} else if (typeof window !== "undefined") {
window.location.reload();
} else {
console.warn(
"[HMR] Root or manually mounted instance modified. Full reload required."
);
}
}
queuePostFlushCb(() => {
for (const instance of instances) {
hmrDirtyComponents.delete(
normalizeClassComponent(instance.type)
);
}
});
}
function updateComponentDef(oldComp, newComp) {
extend(oldComp, newComp);
for (const key in oldComp) {
if (key !== "__file" && !(key in newComp)) {
delete oldComp[key];
}
}
}
function tryWrap(fn) {
return (id, arg) => {
try {
return fn(id, arg);
} catch (e) {
console.error(e);
console.warn(
`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`
);
}
};
}
 
let devtools;
let buffer = [];
let devtoolsNotInstalled = false;
function emit$1(event, ...args) {
if (devtools) {
devtools.emit(event, ...args);
} else if (!devtoolsNotInstalled) {
buffer.push({ event, args });
}
}
function setDevtoolsHook(hook, target) {
var _a, _b;
devtools = hook;
if (devtools) {
devtools.enabled = true;
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
buffer = [];
} else if (
// handle late devtools injection - only do this if we are in an actual
// browser environment to avoid the timer handle stalling test runner exit
// (#4815)
typeof window !== "undefined" && // some envs mock window but not fully
window.HTMLElement && // also exclude jsdom
!((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
) {
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
replay.push((newHook) => {
setDevtoolsHook(newHook, target);
});
setTimeout(() => {
if (!devtools) {
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
devtoolsNotInstalled = true;
buffer = [];
}
}, 3e3);
} else {
devtoolsNotInstalled = true;
buffer = [];
}
}
function devtoolsInitApp(app, version) {
emit$1("app:init" /* APP_INIT */, app, version, {
Fragment,
Text,
Comment,
Static
});
}
function devtoolsUnmountApp(app) {
emit$1("app:unmount" /* APP_UNMOUNT */, app);
}
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
"component:added" /* COMPONENT_ADDED */
);
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
"component:removed" /* COMPONENT_REMOVED */
);
const devtoolsComponentRemoved = (component) => {
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
!devtools.cleanupBuffer(component)) {
_devtoolsComponentRemoved(component);
}
};
function createDevtoolsComponentHook(hook) {
return (component) => {
emit$1(
hook,
component.appContext.app,
component.uid,
component.parent ? component.parent.uid : void 0,
component
);
};
}
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
"perf:start" /* PERFORMANCE_START */
);
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
"perf:end" /* PERFORMANCE_END */
);
function createDevtoolsPerformanceHook(hook) {
return (component, type, time) => {
emit$1(hook, component.appContext.app, component.uid, component, type, time);
};
}
function devtoolsComponentEmit(component, event, params) {
emit$1(
"component:emit" /* COMPONENT_EMIT */,
component.appContext.app,
component,
event,
params
);
}
 
function emit(instance, event, ...rawArgs) {
if (instance.isUnmounted)
return;
const props = instance.vnode.props || EMPTY_OBJ;
{
const {
emitsOptions,
propsOptions: [propsOptions]
} = instance;
if (emitsOptions) {
if (!(event in emitsOptions) && true) {
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
warn(
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
);
}
} else {
const validator = emitsOptions[event];
if (isFunction(validator)) {
const isValid = validator(...rawArgs);
if (!isValid) {
warn(
`Invalid event arguments: event validation failed for event "${event}".`
);
}
}
}
}
}
let args = rawArgs;
const isModelListener = event.startsWith("update:");
const modelArg = isModelListener && event.slice(7);
if (modelArg && modelArg in props) {
const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`;
const { number, trim } = props[modifiersKey] || EMPTY_OBJ;
if (trim) {
args = rawArgs.map((a) => isString(a) ? a.trim() : a);
}
if (number) {
args = rawArgs.map(looseToNumber);
}
}
{
devtoolsComponentEmit(instance, event, args);
}
{
const lowerCaseEvent = event.toLowerCase();
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
warn(
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
instance,
instance.type
)} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".`
);
}
}
let handlerName;
let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)
props[handlerName = toHandlerKey(camelize(event))];
if (!handler && isModelListener) {
handler = props[handlerName = toHandlerKey(hyphenate(event))];
}
if (handler) {
callWithAsyncErrorHandling(
handler,
instance,
6,
args
);
}
const onceHandler = props[handlerName + `Once`];
if (onceHandler) {
if (!instance.emitted) {
instance.emitted = {};
} else if (instance.emitted[handlerName]) {
return;
}
instance.emitted[handlerName] = true;
callWithAsyncErrorHandling(
onceHandler,
instance,
6,
args
);
}
}
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
const cache = appContext.emitsCache;
const cached = cache.get(comp);
if (cached !== void 0) {
return cached;
}
const raw = comp.emits;
let normalized = {};
let hasExtends = false;
if (!isFunction(comp)) {
const extendEmits = (raw2) => {
const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);
if (normalizedFromExtend) {
hasExtends = true;
extend(normalized, normalizedFromExtend);
}
};
if (!asMixin && appContext.mixins.length) {
appContext.mixins.forEach(extendEmits);
}
if (comp.extends) {
extendEmits(comp.extends);
}
if (comp.mixins) {
comp.mixins.forEach(extendEmits);
}
}
if (!raw && !hasExtends) {
if (isObject(comp)) {
cache.set(comp, null);
}
return null;
}
if (isArray(raw)) {
raw.forEach((key) => normalized[key] = null);
} else {
extend(normalized, raw);
}
if (isObject(comp)) {
cache.set(comp, normalized);
}
return normalized;
}
function isEmitListener(options, key) {
if (!options || !isOn(key)) {
return false;
}
key = key.slice(2).replace(/Once$/, "");
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
}
 
let currentRenderingInstance = null;
let currentScopeId = null;
function setCurrentRenderingInstance(instance) {
const prev = currentRenderingInstance;
currentRenderingInstance = instance;
currentScopeId = instance && instance.type.__scopeId || null;
return prev;
}
function pushScopeId(id) {
currentScopeId = id;
}
function popScopeId() {
currentScopeId = null;
}
const withScopeId = (_id) => withCtx;
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
if (!ctx)
return fn;
if (fn._n) {
return fn;
}
const renderFnWithContext = (...args) => {
if (renderFnWithContext._d) {
setBlockTracking(-1);
}
const prevInstance = setCurrentRenderingInstance(ctx);
let res;
try {
res = fn(...args);
} finally {
setCurrentRenderingInstance(prevInstance);
if (renderFnWithContext._d) {
setBlockTracking(1);
}
}
{
devtoolsComponentUpdated(ctx);
}
return res;
};
renderFnWithContext._n = true;
renderFnWithContext._c = true;
renderFnWithContext._d = true;
return renderFnWithContext;
}
 
let accessedAttrs = false;
function markAttrsAccessed() {
accessedAttrs = true;
}
function renderComponentRoot(instance) {
const {
type: Component,
vnode,
proxy,
withProxy,
props,
propsOptions: [propsOptions],
slots,
attrs,
emit,
render,
renderCache,
data,
setupState,
ctx,
inheritAttrs
} = instance;
let result;
let fallthroughAttrs;
const prev = setCurrentRenderingInstance(instance);
{
accessedAttrs = false;
}
try {
if (vnode.shapeFlag & 4) {
const proxyToUse = withProxy || proxy;
result = normalizeVNode(
render.call(
proxyToUse,
proxyToUse,
renderCache,
props,
setupState,
data,
ctx
)
);
fallthroughAttrs = attrs;
} else {
const render2 = Component;
if (attrs === props) {
markAttrsAccessed();
}
result = normalizeVNode(
render2.length > 1 ? render2(
props,
true ? {
get attrs() {
markAttrsAccessed();
return attrs;
},
slots,
emit
} : { attrs, slots, emit }
) : render2(
props,
null
/* we know it doesn't need it */
)
);
fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);
}
} catch (err) {
blockStack.length = 0;
handleError(err, instance, 1);
result = createVNode(Comment);
}
let root = result;
let setRoot = void 0;
if (result.patchFlag > 0 && result.patchFlag & 2048) {
[root, setRoot] = getChildRoot(result);
}
if (fallthroughAttrs && inheritAttrs !== false) {
const keys = Object.keys(fallthroughAttrs);
const { shapeFlag } = root;
if (keys.length) {
if (shapeFlag & (1 | 6)) {
if (propsOptions && keys.some(isModelListener)) {
fallthroughAttrs = filterModelListeners(
fallthroughAttrs,
propsOptions
);
}
root = cloneVNode(root, fallthroughAttrs);
} else if (!accessedAttrs && root.type !== Comment) {
const allAttrs = Object.keys(attrs);
const eventAttrs = [];
const extraAttrs = [];
for (let i = 0, l = allAttrs.length; i < l; i++) {
const key = allAttrs[i];
if (isOn(key)) {
if (!isModelListener(key)) {
eventAttrs.push(key[2].toLowerCase() + key.slice(3));
}
} else {
extraAttrs.push(key);
}
}
if (extraAttrs.length) {
warn(
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
);
}
if (eventAttrs.length) {
warn(
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
);
}
}
}
}
if (vnode.dirs) {
if (!isElementRoot(root)) {
warn(
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
);
}
root = cloneVNode(root);
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
}
if (vnode.transition) {
if (!isElementRoot(root)) {
warn(
`Component inside <Transition> renders non-element root node that cannot be animated.`
);
}
root.transition = vnode.transition;
}
if (setRoot) {
setRoot(root);
} else {
result = root;
}
setCurrentRenderingInstance(prev);
return result;
}
const getChildRoot = (vnode) => {
const rawChildren = vnode.children;
const dynamicChildren = vnode.dynamicChildren;
const childRoot = filterSingleRoot(rawChildren);
if (!childRoot) {
return [vnode, void 0];
}
const index = rawChildren.indexOf(childRoot);
const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
const setRoot = (updatedRoot) => {
rawChildren[index] = updatedRoot;
if (dynamicChildren) {
if (dynamicIndex > -1) {
dynamicChildren[dynamicIndex] = updatedRoot;
} else if (updatedRoot.patchFlag > 0) {
vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
}
}
};
return [normalizeVNode(childRoot), setRoot];
};
function filterSingleRoot(children) {
let singleRoot;
for (let i = 0; i < children.length; i++) {
const child = children[i];
if (isVNode(child)) {
if (child.type !== Comment || child.children === "v-if") {
if (singleRoot) {
return;
} else {
singleRoot = child;
}
}
} else {
return;
}
}
return singleRoot;
}
const getFunctionalFallthrough = (attrs) => {
let res;
for (const key in attrs) {
if (key === "class" || key === "style" || isOn(key)) {
(res || (res = {}))[key] = attrs[key];
}
}
return res;
};
const filterModelListeners = (attrs, props) => {
const res = {};
for (const key in attrs) {
if (!isModelListener(key) || !(key.slice(9) in props)) {
res[key] = attrs[key];
}
}
return res;
};
const isElementRoot = (vnode) => {
return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;
};
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
const { props: prevProps, children: prevChildren, component } = prevVNode;
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
const emits = component.emitsOptions;
if ((prevChildren || nextChildren) && isHmrUpdating) {
return true;
}
if (nextVNode.dirs || nextVNode.transition) {
return true;
}
if (optimized && patchFlag >= 0) {
if (patchFlag & 1024) {
return true;
}
if (patchFlag & 16) {
if (!prevProps) {
return !!nextProps;
}
return hasPropsChanged(prevProps, nextProps, emits);
} else if (patchFlag & 8) {
const dynamicProps = nextVNode.dynamicProps;
for (let i = 0; i < dynamicProps.length; i++) {
const key = dynamicProps[i];
if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {
return true;
}
}
}
} else {
if (prevChildren || nextChildren) {
if (!nextChildren || !nextChildren.$stable) {
return true;
}
}
if (prevProps === nextProps) {
return false;
}
if (!prevProps) {
return !!nextProps;
}
if (!nextProps) {
return true;
}
return hasPropsChanged(prevProps, nextProps, emits);
}
return false;
}
function hasPropsChanged(prevProps, nextProps, emitsOptions) {
const nextKeys = Object.keys(nextProps);
if (nextKeys.length !== Object.keys(prevProps).length) {
return true;
}
for (let i = 0; i < nextKeys.length; i++) {
const key = nextKeys[i];
if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {
return true;
}
}
return false;
}
function updateHOCHostEl({ vnode, parent }, el) {
while (parent && parent.subTree === vnode) {
(vnode = parent.vnode).el = el;
parent = parent.parent;
}
}
 
const isSuspense = (type) => type.__isSuspense;
const SuspenseImpl = {
name: "Suspense",
// In order to make Suspense tree-shakable, we need to avoid importing it
// directly in the renderer. The renderer checks for the __isSuspense flag
// on a vnode's type and calls the `process` method, passing in renderer
// internals.
__isSuspense: true,
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
if (n1 == null) {
mountSuspense(
n2,
container,
anchor,
parentComponent,
parentSuspense,
isSVG,
slotScopeIds,
optimized,
rendererInternals
);
} else {
patchSuspense(
n1,
n2,
container,
anchor,
parentComponent,
isSVG,
slotScopeIds,
optimized,
rendererInternals
);
}
},
hydrate: hydrateSuspense,
create: createSuspenseBoundary,
normalize: normalizeSuspenseChildren
};
const Suspense = SuspenseImpl ;
function triggerEvent(vnode, name) {
const eventListener = vnode.props && vnode.props[name];
if (isFunction(eventListener)) {
eventListener();
}
}
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
const {
p: patch,
o: { createElement }
} = rendererInternals;
const hiddenContainer = createElement("div");
const suspense = vnode.suspense = createSuspenseBoundary(
vnode,
parentSuspense,
parentComponent,
container,
hiddenContainer,
anchor,
isSVG,
slotScopeIds,
optimized,
rendererInternals
);
patch(
null,
suspense.pendingBranch = vnode.ssContent,
hiddenContainer,
null,
parentComponent,
suspense,
isSVG,
slotScopeIds
);
if (suspense.deps > 0) {
triggerEvent(vnode, "onPending");
triggerEvent(vnode, "onFallback");
patch(
null,
vnode.ssFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds
);
setActiveBranch(suspense, vnode.ssFallback);
} else {
suspense.resolve(false, true);
}
}
function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
const suspense = n2.suspense = n1.suspense;
suspense.vnode = n2;
n2.el = n1.el;
const newBranch = n2.ssContent;
const newFallback = n2.ssFallback;
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
if (pendingBranch) {
suspense.pendingBranch = newBranch;
if (isSameVNodeType(newBranch, pendingBranch)) {
patch(
pendingBranch,
newBranch,
suspense.hiddenContainer,
null,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
if (suspense.deps <= 0) {
suspense.resolve();
} else if (isInFallback) {
patch(
activeBranch,
newFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds,
optimized
);
setActiveBranch(suspense, newFallback);
}
} else {
suspense.pendingId++;
if (isHydrating) {
suspense.isHydrating = false;
suspense.activeBranch = pendingBranch;
} else {
unmount(pendingBranch, parentComponent, suspense);
}
suspense.deps = 0;
suspense.effects.length = 0;
suspense.hiddenContainer = createElement("div");
if (isInFallback) {
patch(
null,
newBranch,
suspense.hiddenContainer,
null,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
if (suspense.deps <= 0) {
suspense.resolve();
} else {
patch(
activeBranch,
newFallback,
container,
anchor,
parentComponent,
null,
// fallback tree will not have suspense context
isSVG,
slotScopeIds,
optimized
);
setActiveBranch(suspense, newFallback);
}
} else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
patch(
activeBranch,
newBranch,
container,
anchor,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
suspense.resolve(true);
} else {
patch(
null,
newBranch,
suspense.hiddenContainer,
null,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
if (suspense.deps <= 0) {
suspense.resolve();
}
}
}
} else {
if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
patch(
activeBranch,
newBranch,
container,
anchor,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
setActiveBranch(suspense, newBranch);
} else {
triggerEvent(n2, "onPending");
suspense.pendingBranch = newBranch;
suspense.pendingId++;
patch(
null,
newBranch,
suspense.hiddenContainer,
null,
parentComponent,
suspense,
isSVG,
slotScopeIds,
optimized
);
if (suspense.deps <= 0) {
suspense.resolve();
} else {
const { timeout, pendingId } = suspense;
if (timeout > 0) {
setTimeout(() => {
if (suspense.pendingId === pendingId) {
suspense.fallback(newFallback);
}
}, timeout);
} else if (timeout === 0) {
suspense.fallback(newFallback);
}
}
}
}
}
let hasWarned = false;
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
if (!hasWarned) {
hasWarned = true;
console[console.info ? "info" : "log"](
`<Suspense> is an experimental feature and its API will likely change.`
);
}
const {
p: patch,
m: move,
um: unmount,
n: next,
o: { parentNode, remove }
} = rendererInternals;
let parentSuspenseId;
const isSuspensible = isVNodeSuspensible(vnode);
if (isSuspensible) {
if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
parentSuspenseId = parentSuspense.pendingId;
parentSuspense.deps++;
}
}
const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
{
assertNumber(timeout, `Suspense timeout`);
}
const suspense = {
vnode,
parent: parentSuspense,
parentComponent,
isSVG,
container,
hiddenContainer,
anchor,
deps: 0,
pendingId: 0,
timeout: typeof timeout === "number" ? timeout : -1,
activeBranch: null,
pendingBranch: null,
isInFallback: true,
isHydrating,
isUnmounted: false,
effects: [],
resolve(resume = false, sync = false) {
{
if (!resume && !suspense.pendingBranch) {
throw new Error(
`suspense.resolve() is called without a pending branch.`
);
}
if (suspense.isUnmounted) {
throw new Error(
`suspense.resolve() is called on an already unmounted suspense boundary.`
);
}
}
const {
vnode: vnode2,
activeBranch,
pendingBranch,
pendingId,
effects,
parentComponent: parentComponent2,
container: container2
} = suspense;
if (suspense.isHydrating) {
suspense.isHydrating = false;
} else if (!resume) {
const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
if (delayEnter) {
activeBranch.transition.afterLeave = () => {
if (pendingId === suspense.pendingId) {
move(pendingBranch, container2, anchor2, 0);
}
};
}
let { anchor: anchor2 } = suspense;
if (activeBranch) {
anchor2 = next(activeBranch);
unmount(activeBranch, parentComponent2, suspense, true);
}
if (!delayEnter) {
move(pendingBranch, container2, anchor2, 0);
}
}
setActiveBranch(suspense, pendingBranch);
suspense.pendingBranch = null;
suspense.isInFallback = false;
let parent = suspense.parent;
let hasUnresolvedAncestor = false;
while (parent) {
if (parent.pendingBranch) {
parent.effects.push(...effects);
hasUnresolvedAncestor = true;
break;
}
parent = parent.parent;
}
if (!hasUnresolvedAncestor) {
queuePostFlushCb(effects);
}
suspense.effects = [];
if (isSuspensible) {
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
parentSuspense.deps--;
if (parentSuspense.deps === 0 && !sync) {
parentSuspense.resolve();
}
}
}
triggerEvent(vnode2, "onResolve");
},
fallback(fallbackVNode) {
if (!suspense.pendingBranch) {
return;
}
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
triggerEvent(vnode2, "onFallback");
const anchor2 = next(activeBranch);
const mountFallback = () => {
if (!suspense.isInFallback) {
return;
}
patch(
null,
fallbackVNode,
container2,
anchor2,
parentComponent2,
null,
// fallback tree will not have suspense context
isSVG2,
slotScopeIds,
optimized
);
setActiveBranch(suspense, fallbackVNode);
};
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
if (delayEnter) {
activeBranch.transition.afterLeave = mountFallback;
}
suspense.isInFallback = true;
unmount(
activeBranch,
parentComponent2,
null,
// no suspense so unmount hooks fire now
true
// shouldRemove
);
if (!delayEnter) {
mountFallback();
}
},
move(container2, anchor2, type) {
suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
suspense.container = container2;
},
next() {
return suspense.activeBranch && next(suspense.activeBranch);
},
registerDep(instance, setupRenderEffect) {
const isInPendingSuspense = !!suspense.pendingBranch;
if (isInPendingSuspense) {
suspense.deps++;
}
const hydratedEl = instance.vnode.el;
instance.asyncDep.catch((err) => {
handleError(err, instance, 0);
}).then((asyncSetupResult) => {
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
return;
}
instance.asyncResolved = true;
const { vnode: vnode2 } = instance;
{
pushWarningContext(vnode2);
}
handleSetupResult(instance, asyncSetupResult, false);
if (hydratedEl) {
vnode2.el = hydratedEl;
}
const placeholder = !hydratedEl && instance.subTree.el;
setupRenderEffect(
instance,
vnode2,
// component may have been moved before resolve.
// if this is not a hydration, instance.subTree will be the comment
// placeholder.
parentNode(hydratedEl || instance.subTree.el),
// anchor will not be used if this is hydration, so only need to
// consider the comment placeholder case.
hydratedEl ? null : next(instance.subTree),
suspense,
isSVG,
optimized
);
if (placeholder) {
remove(placeholder);
}
updateHOCHostEl(instance, vnode2.el);
{
popWarningContext();
}
if (isInPendingSuspense && --suspense.deps === 0) {
suspense.resolve();
}
});
},
unmount(parentSuspense2, doRemove) {
suspense.isUnmounted = true;
if (suspense.activeBranch) {
unmount(
suspense.activeBranch,
parentComponent,
parentSuspense2,
doRemove
);
}
if (suspense.pendingBranch) {
unmount(
suspense.pendingBranch,
parentComponent,
parentSuspense2,
doRemove
);
}
}
};
return suspense;
}
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
const suspense = vnode.suspense = createSuspenseBoundary(
vnode,
parentSuspense,
parentComponent,
node.parentNode,
document.createElement("div"),
null,
isSVG,
slotScopeIds,
optimized,
rendererInternals,
true
/* hydrating */
);
const result = hydrateNode(
node,
suspense.pendingBranch = vnode.ssContent,
parentComponent,
suspense,
slotScopeIds,
optimized
);
if (suspense.deps === 0) {
suspense.resolve(false, true);
}
return result;
}
function normalizeSuspenseChildren(vnode) {
const { shapeFlag, children } = vnode;
const isSlotChildren = shapeFlag & 32;
vnode.ssContent = normalizeSuspenseSlot(
isSlotChildren ? children.default : children
);
vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
}
function normalizeSuspenseSlot(s) {
let block;
if (isFunction(s)) {
const trackBlock = isBlockTreeEnabled && s._c;
if (trackBlock) {
s._d = false;
openBlock();
}
s = s();
if (trackBlock) {
s._d = true;
block = currentBlock;
closeBlock();
}
}
if (isArray(s)) {
const singleChild = filterSingleRoot(s);
if (!singleChild) {
warn(`<Suspense> slots expect a single root node.`);
}
s = singleChild;
}
s = normalizeVNode(s);
if (block && !s.dynamicChildren) {
s.dynamicChildren = block.filter((c) => c !== s);
}
return s;
}
function queueEffectWithSuspense(fn, suspense) {
if (suspense && suspense.pendingBranch) {
if (isArray(fn)) {
suspense.effects.push(...fn);
} else {
suspense.effects.push(fn);
}
} else {
queuePostFlushCb(fn);
}
}
function setActiveBranch(suspense, branch) {
suspense.activeBranch = branch;
const { vnode, parentComponent } = suspense;
const el = vnode.el = branch.el;
if (parentComponent && parentComponent.subTree === vnode) {
parentComponent.vnode.el = el;
updateHOCHostEl(parentComponent, el);
}
}
function isVNodeSuspensible(vnode) {
var _a;
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
}
 
function watchEffect(effect, options) {
return doWatch(effect, null, options);
}
function watchPostEffect(effect, options) {
return doWatch(
effect,
null,
extend({}, options, { flush: "post" })
);
}
function watchSyncEffect(effect, options) {
return doWatch(
effect,
null,
extend({}, options, { flush: "sync" })
);
}
const INITIAL_WATCHER_VALUE = {};
function watch(source, cb, options) {
if (!isFunction(cb)) {
warn(
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
);
}
return doWatch(source, cb, options);
}
function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
var _a;
if (!cb) {
if (immediate !== void 0) {
warn(
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
);
}
if (deep !== void 0) {
warn(
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
);
}
}
const warnInvalidSource = (s) => {
warn(
`Invalid watch source: `,
s,
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
);
};
const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null;
let getter;
let forceTrigger = false;
let isMultiSource = false;
if (isRef(source)) {
getter = () => source.value;
forceTrigger = isShallow(source);
} else if (isReactive(source)) {
getter = () => source;
deep = true;
} else if (isArray(source)) {
isMultiSource = true;
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
getter = () => source.map((s) => {
if (isRef(s)) {
return s.value;
} else if (isReactive(s)) {
return traverse(s);
} else if (isFunction(s)) {
return callWithErrorHandling(s, instance, 2);
} else {
warnInvalidSource(s);
}
});
} else if (isFunction(source)) {
if (cb) {
getter = () => callWithErrorHandling(source, instance, 2);
} else {
getter = () => {
if (instance && instance.isUnmounted) {
return;
}
if (cleanup) {
cleanup();
}
return callWithAsyncErrorHandling(
source,
instance,
3,
[onCleanup]
);
};
}
} else {
getter = NOOP;
warnInvalidSource(source);
}
if (cb && deep) {
const baseGetter = getter;
getter = () => traverse(baseGetter());
}
let cleanup;
let onCleanup = (fn) => {
cleanup = effect.onStop = () => {
callWithErrorHandling(fn, instance, 4);
};
};
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
const job = () => {
if (!effect.active) {
return;
}
if (cb) {
const newValue = effect.run();
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
if (cleanup) {
cleanup();
}
callWithAsyncErrorHandling(cb, instance, 3, [
newValue,
// pass undefined as the old value when it's changed for the first time
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
onCleanup
]);
oldValue = newValue;
}
} else {
effect.run();
}
};
job.allowRecurse = !!cb;
let scheduler;
if (flush === "sync") {
scheduler = job;
} else if (flush === "post") {
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
} else {
job.pre = true;
if (instance)
job.id = instance.uid;
scheduler = () => queueJob(job);
}
const effect = new ReactiveEffect(getter, scheduler);
{
effect.onTrack = onTrack;
effect.onTrigger = onTrigger;
}
if (cb) {
if (immediate) {
job();
} else {
oldValue = effect.run();
}
} else if (flush === "post") {
queuePostRenderEffect(
effect.run.bind(effect),
instance && instance.suspense
);
} else {
effect.run();
}
const unwatch = () => {
effect.stop();
if (instance && instance.scope) {
remove(instance.scope.effects, effect);
}
};
return unwatch;
}
function instanceWatch(source, value, options) {
const publicThis = this.proxy;
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
let cb;
if (isFunction(value)) {
cb = value;
} else {
cb = value.handler;
options = value;
}
const cur = currentInstance;
setCurrentInstance(this);
const res = doWatch(getter, cb.bind(publicThis), options);
if (cur) {
setCurrentInstance(cur);
} else {
unsetCurrentInstance();
}
return res;
}
function createPathGetter(ctx, path) {
const segments = path.split(".");
return () => {
let cur = ctx;
for (let i = 0; i < segments.length && cur; i++) {
cur = cur[segments[i]];
}
return cur;
};
}
function traverse(value, seen) {
if (!isObject(value) || value["__v_skip"]) {
return value;
}
seen = seen || /* @__PURE__ */ new Set();
if (seen.has(value)) {
return value;
}
seen.add(value);
if (isRef(value)) {
traverse(value.value, seen);
} else if (isArray(value)) {
for (let i = 0; i < value.length; i++) {
traverse(value[i], seen);
}
} else if (isSet(value) || isMap(value)) {
value.forEach((v) => {
traverse(v, seen);
});
} else if (isPlainObject(value)) {
for (const key in value) {
traverse(value[key], seen);
}
}
return value;
}
 
function validateDirectiveName(name) {
if (isBuiltInDirective(name)) {
warn("Do not use built-in directive ids as custom directive id: " + name);
}
}
function withDirectives(vnode, directives) {
const internalInstance = currentRenderingInstance;
if (internalInstance === null) {
warn(`withDirectives can only be used inside render functions.`);
return vnode;
}
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
const bindings = vnode.dirs || (vnode.dirs = []);
for (let i = 0; i < directives.length; i++) {
let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];
if (dir) {
if (isFunction(dir)) {
dir = {
mounted: dir,
updated: dir
};
}
if (dir.deep) {
traverse(value);
}
bindings.push({
dir,
instance,
value,
oldValue: void 0,
arg,
modifiers
});
}
}
return vnode;
}
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
const bindings = vnode.dirs;
const oldBindings = prevVNode && prevVNode.dirs;
for (let i = 0; i < bindings.length; i++) {
const binding = bindings[i];
if (oldBindings) {
binding.oldValue = oldBindings[i].value;
}
let hook = binding.dir[name];
if (hook) {
pauseTracking();
callWithAsyncErrorHandling(hook, instance, 8, [
vnode.el,
binding,
vnode,
prevVNode
]);
resetTracking();
}
}
}
 
const leaveCbKey = Symbol("_leaveCb");
const enterCbKey$1 = Symbol("_enterCb");
function useTransitionState() {
const state = {
isMounted: false,
isLeaving: false,
isUnmounting: false,
leavingVNodes: /* @__PURE__ */ new Map()
};
onMounted(() => {
state.isMounted = true;
});
onBeforeUnmount(() => {
state.isUnmounting = true;
});
return state;
}
const TransitionHookValidator = [Function, Array];
const BaseTransitionPropsValidators = {
mode: String,
appear: Boolean,
persisted: Boolean,
// enter
onBeforeEnter: TransitionHookValidator,
onEnter: TransitionHookValidator,
onAfterEnter: TransitionHookValidator,
onEnterCancelled: TransitionHookValidator,
// leave
onBeforeLeave: TransitionHookValidator,
onLeave: TransitionHookValidator,
onAfterLeave: TransitionHookValidator,
onLeaveCancelled: TransitionHookValidator,
// appear
onBeforeAppear: TransitionHookValidator,
onAppear: TransitionHookValidator,
onAfterAppear: TransitionHookValidator,
onAppearCancelled: TransitionHookValidator
};
const BaseTransitionImpl = {
name: `BaseTransition`,
props: BaseTransitionPropsValidators,
setup(props, { slots }) {
const instance = getCurrentInstance();
const state = useTransitionState();
let prevTransitionKey;
return () => {
const children = slots.default && getTransitionRawChildren(slots.default(), true);
if (!children || !children.length) {
return;
}
let child = children[0];
if (children.length > 1) {
let hasFound = false;
for (const c of children) {
if (c.type !== Comment) {
if (hasFound) {
warn(
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
);
break;
}
child = c;
hasFound = true;
}
}
}
const rawProps = toRaw(props);
const { mode } = rawProps;
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
warn(`invalid <transition> mode: ${mode}`);
}
if (state.isLeaving) {
return emptyPlaceholder(child);
}
const innerChild = getKeepAliveChild(child);
if (!innerChild) {
return emptyPlaceholder(child);
}
const enterHooks = resolveTransitionHooks(
innerChild,
rawProps,
state,
instance
);
setTransitionHooks(innerChild, enterHooks);
const oldChild = instance.subTree;
const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
let transitionKeyChanged = false;
const { getTransitionKey } = innerChild.type;
if (getTransitionKey) {
const key = getTransitionKey();
if (prevTransitionKey === void 0) {
prevTransitionKey = key;
} else if (key !== prevTransitionKey) {
prevTransitionKey = key;
transitionKeyChanged = true;
}
}
if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
const leavingHooks = resolveTransitionHooks(
oldInnerChild,
rawProps,
state,
instance
);
setTransitionHooks(oldInnerChild, leavingHooks);
if (mode === "out-in") {
state.isLeaving = true;
leavingHooks.afterLeave = () => {
state.isLeaving = false;
if (instance.update.active !== false) {
instance.update();
}
};
return emptyPlaceholder(child);
} else if (mode === "in-out" && innerChild.type !== Comment) {
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
const leavingVNodesCache = getLeavingNodesForType(
state,
oldInnerChild
);
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
el[leaveCbKey] = () => {
earlyRemove();
el[leaveCbKey] = void 0;
delete enterHooks.delayedLeave;
};
enterHooks.delayedLeave = delayedLeave;
};
}
}
return child;
};
}
};
const BaseTransition = BaseTransitionImpl;
function getLeavingNodesForType(state, vnode) {
const { leavingVNodes } = state;
let leavingVNodesCache = leavingVNodes.get(vnode.type);
if (!leavingVNodesCache) {
leavingVNodesCache = /* @__PURE__ */ Object.create(null);
leavingVNodes.set(vnode.type, leavingVNodesCache);
}
return leavingVNodesCache;
}
function resolveTransitionHooks(vnode, props, state, instance) {
const {
appear,
mode,
persisted = false,
onBeforeEnter,
onEnter,
onAfterEnter,
onEnterCancelled,
onBeforeLeave,
onLeave,
onAfterLeave,
onLeaveCancelled,
onBeforeAppear,
onAppear,
onAfterAppear,
onAppearCancelled
} = props;
const key = String(vnode.key);
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
const callHook = (hook, args) => {
hook && callWithAsyncErrorHandling(
hook,
instance,
9,
args
);
};
const callAsyncHook = (hook, args) => {
const done = args[1];
callHook(hook, args);
if (isArray(hook)) {
if (hook.every((hook2) => hook2.length <= 1))
done();
} else if (hook.length <= 1) {
done();
}
};
const hooks = {
mode,
persisted,
beforeEnter(el) {
let hook = onBeforeEnter;
if (!state.isMounted) {
if (appear) {
hook = onBeforeAppear || onBeforeEnter;
} else {
return;
}
}
if (el[leaveCbKey]) {
el[leaveCbKey](
true
/* cancelled */
);
}
const leavingVNode = leavingVNodesCache[key];
if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
leavingVNode.el[leaveCbKey]();
}
callHook(hook, [el]);
},
enter(el) {
let hook = onEnter;
let afterHook = onAfterEnter;
let cancelHook = onEnterCancelled;
if (!state.isMounted) {
if (appear) {
hook = onAppear || onEnter;
afterHook = onAfterAppear || onAfterEnter;
cancelHook = onAppearCancelled || onEnterCancelled;
} else {
return;
}
}
let called = false;
const done = el[enterCbKey$1] = (cancelled) => {
if (called)
return;
called = true;
if (cancelled) {
callHook(cancelHook, [el]);
} else {
callHook(afterHook, [el]);
}
if (hooks.delayedLeave) {
hooks.delayedLeave();
}
el[enterCbKey$1] = void 0;
};
if (hook) {
callAsyncHook(hook, [el, done]);
} else {
done();
}
},
leave(el, remove) {
const key2 = String(vnode.key);
if (el[enterCbKey$1]) {
el[enterCbKey$1](
true
/* cancelled */
);
}
if (state.isUnmounting) {
return remove();
}
callHook(onBeforeLeave, [el]);
let called = false;
const done = el[leaveCbKey] = (cancelled) => {
if (called)
return;
called = true;
remove();
if (cancelled) {
callHook(onLeaveCancelled, [el]);
} else {
callHook(onAfterLeave, [el]);
}
el[leaveCbKey] = void 0;
if (leavingVNodesCache[key2] === vnode) {
delete leavingVNodesCache[key2];
}
};
leavingVNodesCache[key2] = vnode;
if (onLeave) {
callAsyncHook(onLeave, [el, done]);
} else {
done();
}
},
clone(vnode2) {
return resolveTransitionHooks(vnode2, props, state, instance);
}
};
return hooks;
}
function emptyPlaceholder(vnode) {
if (isKeepAlive(vnode)) {
vnode = cloneVNode(vnode);
vnode.children = null;
return vnode;
}
}
function getKeepAliveChild(vnode) {
return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode;
}
function setTransitionHooks(vnode, hooks) {
if (vnode.shapeFlag & 6 && vnode.component) {
setTransitionHooks(vnode.component.subTree, hooks);
} else if (vnode.shapeFlag & 128) {
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
} else {
vnode.transition = hooks;
}
}
function getTransitionRawChildren(children, keepComment = false, parentKey) {
let ret = [];
let keyedFragmentCount = 0;
for (let i = 0; i < children.length; i++) {
let child = children[i];
const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);
if (child.type === Fragment) {
if (child.patchFlag & 128)
keyedFragmentCount++;
ret = ret.concat(
getTransitionRawChildren(child.children, keepComment, key)
);
} else if (keepComment || child.type !== Comment) {
ret.push(key != null ? cloneVNode(child, { key }) : child);
}
}
if (keyedFragmentCount > 1) {
for (let i = 0; i < ret.length; i++) {
ret[i].patchFlag = -2;
}
}
return ret;
}
 
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function defineComponent(options, extraOptions) {
return isFunction(options) ? (
// #8326: extend call and options.name access are considered side-effects
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
) : options;
}
 
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function defineAsyncComponent(source) {
if (isFunction(source)) {
source = { loader: source };
}
const {
loader,
loadingComponent,
errorComponent,
delay = 200,
timeout,
// undefined = never times out
suspensible = true,
onError: userOnError
} = source;
let pendingRequest = null;
let resolvedComp;
let retries = 0;
const retry = () => {
retries++;
pendingRequest = null;
return load();
};
const load = () => {
let thisRequest;
return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {
err = err instanceof Error ? err : new Error(String(err));
if (userOnError) {
return new Promise((resolve, reject) => {
const userRetry = () => resolve(retry());
const userFail = () => reject(err);
userOnError(err, userRetry, userFail, retries + 1);
});
} else {
throw err;
}
}).then((comp) => {
if (thisRequest !== pendingRequest && pendingRequest) {
return pendingRequest;
}
if (!comp) {
warn(
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
);
}
if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) {
comp = comp.default;
}
if (comp && !isObject(comp) && !isFunction(comp)) {
throw new Error(`Invalid async component load result: ${comp}`);
}
resolvedComp = comp;
return comp;
}));
};
return defineComponent({
name: "AsyncComponentWrapper",
__asyncLoader: load,
get __asyncResolved() {
return resolvedComp;
},
setup() {
const instance = currentInstance;
if (resolvedComp) {
return () => createInnerComp(resolvedComp, instance);
}
const onError = (err) => {
pendingRequest = null;
handleError(
err,
instance,
13,
!errorComponent
/* do not throw in dev if user provided error component */
);
};
if (suspensible && instance.suspense || false) {
return load().then((comp) => {
return () => createInnerComp(comp, instance);
}).catch((err) => {
onError(err);
return () => errorComponent ? createVNode(errorComponent, {
error: err
}) : null;
});
}
const loaded = ref(false);
const error = ref();
const delayed = ref(!!delay);
if (delay) {
setTimeout(() => {
delayed.value = false;
}, delay);
}
if (timeout != null) {
setTimeout(() => {
if (!loaded.value && !error.value) {
const err = new Error(
`Async component timed out after ${timeout}ms.`
);
onError(err);
error.value = err;
}
}, timeout);
}
load().then(() => {
loaded.value = true;
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
queueJob(instance.parent.update);
}
}).catch((err) => {
onError(err);
error.value = err;
});
return () => {
if (loaded.value && resolvedComp) {
return createInnerComp(resolvedComp, instance);
} else if (error.value && errorComponent) {
return createVNode(errorComponent, {
error: error.value
});
} else if (loadingComponent && !delayed.value) {
return createVNode(loadingComponent);
}
};
}
});
}
function createInnerComp(comp, parent) {
const { ref: ref2, props, children, ce } = parent.vnode;
const vnode = createVNode(comp, props, children);
vnode.ref = ref2;
vnode.ce = ce;
delete parent.vnode.ce;
return vnode;
}
 
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
const KeepAliveImpl = {
name: `KeepAlive`,
// Marker for special handling inside the renderer. We are not using a ===
// check directly on KeepAlive in the renderer, because importing it directly
// would prevent it from being tree-shaken.
__isKeepAlive: true,
props: {
include: [String, RegExp, Array],
exclude: [String, RegExp, Array],
max: [String, Number]
},
setup(props, { slots }) {
const instance = getCurrentInstance();
const sharedContext = instance.ctx;
const cache = /* @__PURE__ */ new Map();
const keys = /* @__PURE__ */ new Set();
let current = null;
{
instance.__v_cache = cache;
}
const parentSuspense = instance.suspense;
const {
renderer: {
p: patch,
m: move,
um: _unmount,
o: { createElement }
}
} = sharedContext;
const storageContainer = createElement("div");
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
const instance2 = vnode.component;
move(vnode, container, anchor, 0, parentSuspense);
patch(
instance2.vnode,
vnode,
container,
anchor,
instance2,
parentSuspense,
isSVG,
vnode.slotScopeIds,
optimized
);
queuePostRenderEffect(() => {
instance2.isDeactivated = false;
if (instance2.a) {
invokeArrayFns(instance2.a);
}
const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
if (vnodeHook) {
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
}
}, parentSuspense);
{
devtoolsComponentAdded(instance2);
}
};
sharedContext.deactivate = (vnode) => {
const instance2 = vnode.component;
move(vnode, storageContainer, null, 1, parentSuspense);
queuePostRenderEffect(() => {
if (instance2.da) {
invokeArrayFns(instance2.da);
}
const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
if (vnodeHook) {
invokeVNodeHook(vnodeHook, instance2.parent, vnode);
}
instance2.isDeactivated = true;
}, parentSuspense);
{
devtoolsComponentAdded(instance2);
}
};
function unmount(vnode) {
resetShapeFlag(vnode);
_unmount(vnode, instance, parentSuspense, true);
}
function pruneCache(filter) {
cache.forEach((vnode, key) => {
const name = getComponentName(vnode.type);
if (name && (!filter || !filter(name))) {
pruneCacheEntry(key);
}
});
}
function pruneCacheEntry(key) {
const cached = cache.get(key);
if (!current || !isSameVNodeType(cached, current)) {
unmount(cached);
} else if (current) {
resetShapeFlag(current);
}
cache.delete(key);
keys.delete(key);
}
watch(
() => [props.include, props.exclude],
([include, exclude]) => {
include && pruneCache((name) => matches(include, name));
exclude && pruneCache((name) => !matches(exclude, name));
},
// prune post-render after `current` has been updated
{ flush: "post", deep: true }
);
let pendingCacheKey = null;
const cacheSubtree = () => {
if (pendingCacheKey != null) {
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
}
};
onMounted(cacheSubtree);
onUpdated(cacheSubtree);
onBeforeUnmount(() => {
cache.forEach((cached) => {
const { subTree, suspense } = instance;
const vnode = getInnerChild(subTree);
if (cached.type === vnode.type && cached.key === vnode.key) {
resetShapeFlag(vnode);
const da = vnode.component.da;
da && queuePostRenderEffect(da, suspense);
return;
}
unmount(cached);
});
});
return () => {
pendingCacheKey = null;
if (!slots.default) {
return null;
}
const children = slots.default();
const rawVNode = children[0];
if (children.length > 1) {
{
warn(`KeepAlive should contain exactly one component child.`);
}
current = null;
return children;
} else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {
current = null;
return rawVNode;
}
let vnode = getInnerChild(rawVNode);
const comp = vnode.type;
const name = getComponentName(
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
);
const { include, exclude, max } = props;
if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
current = vnode;
return rawVNode;
}
const key = vnode.key == null ? comp : vnode.key;
const cachedVNode = cache.get(key);
if (vnode.el) {
vnode = cloneVNode(vnode);
if (rawVNode.shapeFlag & 128) {
rawVNode.ssContent = vnode;
}
}
pendingCacheKey = key;
if (cachedVNode) {
vnode.el = cachedVNode.el;
vnode.component = cachedVNode.component;
if (vnode.transition) {
setTransitionHooks(vnode, vnode.transition);
}
vnode.shapeFlag |= 512;
keys.delete(key);
keys.add(key);
} else {
keys.add(key);
if (max && keys.size > parseInt(max, 10)) {
pruneCacheEntry(keys.values().next().value);
}
}
vnode.shapeFlag |= 256;
current = vnode;
return isSuspense(rawVNode.type) ? rawVNode : vnode;
};
}
};
const KeepAlive = KeepAliveImpl;
function matches(pattern, name) {
if (isArray(pattern)) {
return pattern.some((p) => matches(p, name));
} else if (isString(pattern)) {
return pattern.split(",").includes(name);
} else if (isRegExp(pattern)) {
return pattern.test(name);
}
return false;
}
function onActivated(hook, target) {
registerKeepAliveHook(hook, "a", target);
}
function onDeactivated(hook, target) {
registerKeepAliveHook(hook, "da", target);
}
function registerKeepAliveHook(hook, type, target = currentInstance) {
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
let current = target;
while (current) {
if (current.isDeactivated) {
return;
}
current = current.parent;
}
return hook();
});
injectHook(type, wrappedHook, target);
if (target) {
let current = target.parent;
while (current && current.parent) {
if (isKeepAlive(current.parent.vnode)) {
injectToKeepAliveRoot(wrappedHook, type, target, current);
}
current = current.parent;
}
}
}
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
const injected = injectHook(
type,
hook,
keepAliveRoot,
true
/* prepend */
);
onUnmounted(() => {
remove(keepAliveRoot[type], injected);
}, target);
}
function resetShapeFlag(vnode) {
vnode.shapeFlag &= ~256;
vnode.shapeFlag &= ~512;
}
function getInnerChild(vnode) {
return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
}
 
function injectHook(type, hook, target = currentInstance, prepend = false) {
if (target) {
const hooks = target[type] || (target[type] = []);
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
if (target.isUnmounted) {
return;
}
pauseTracking();
setCurrentInstance(target);
const res = callWithAsyncErrorHandling(hook, target, type, args);
unsetCurrentInstance();
resetTracking();
return res;
});
if (prepend) {
hooks.unshift(wrappedHook);
} else {
hooks.push(wrappedHook);
}
return wrappedHook;
} else {
const apiName = toHandlerKey(ErrorTypeStrings[type].replace(/ hook$/, ""));
warn(
`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
);
}
}
const createHook = (lifecycle) => (hook, target = currentInstance) => (
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
(!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
);
const onBeforeMount = createHook("bm");
const onMounted = createHook("m");
const onBeforeUpdate = createHook("bu");
const onUpdated = createHook("u");
const onBeforeUnmount = createHook("bum");
const onUnmounted = createHook("um");
const onServerPrefetch = createHook("sp");
const onRenderTriggered = createHook(
"rtg"
);
const onRenderTracked = createHook(
"rtc"
);
function onErrorCaptured(hook, target = currentInstance) {
injectHook("ec", hook, target);
}
 
const COMPONENTS = "components";
const DIRECTIVES = "directives";
function resolveComponent(name, maybeSelfReference) {
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
}
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
function resolveDynamicComponent(component) {
if (isString(component)) {
return resolveAsset(COMPONENTS, component, false) || component;
} else {
return component || NULL_DYNAMIC_COMPONENT;
}
}
function resolveDirective(name) {
return resolveAsset(DIRECTIVES, name);
}
function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
const instance = currentRenderingInstance || currentInstance;
if (instance) {
const Component = instance.type;
if (type === COMPONENTS) {
const selfName = getComponentName(
Component,
false
/* do not include inferred name to avoid breaking existing code */
);
if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
return Component;
}
}
const res = (
// local registration
// check instance[type] first which is resolved for options API
resolve(instance[type] || Component[type], name) || // global registration
resolve(instance.appContext[type], name)
);
if (!res && maybeSelfReference) {
return Component;
}
if (warnMissing && !res) {
const extra = type === COMPONENTS ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
}
return res;
} else {
warn(
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
);
}
}
function resolve(registry, name) {
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
}
 
function renderList(source, renderItem, cache, index) {
let ret;
const cached = cache && cache[index];
if (isArray(source) || isString(source)) {
ret = new Array(source.length);
for (let i = 0, l = source.length; i < l; i++) {
ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
}
} else if (typeof source === "number") {
if (!Number.isInteger(source)) {
warn(`The v-for range expect an integer value but got ${source}.`);
}
ret = new Array(source);
for (let i = 0; i < source; i++) {
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
}
} else if (isObject(source)) {
if (source[Symbol.iterator]) {
ret = Array.from(
source,
(item, i) => renderItem(item, i, void 0, cached && cached[i])
);
} else {
const keys = Object.keys(source);
ret = new Array(keys.length);
for (let i = 0, l = keys.length; i < l; i++) {
const key = keys[i];
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
}
}
} else {
ret = [];
}
if (cache) {
cache[index] = ret;
}
return ret;
}
 
function createSlots(slots, dynamicSlots) {
for (let i = 0; i < dynamicSlots.length; i++) {
const slot = dynamicSlots[i];
if (isArray(slot)) {
for (let j = 0; j < slot.length; j++) {
slots[slot[j].name] = slot[j].fn;
}
} else if (slot) {
slots[slot.name] = slot.key ? (...args) => {
const res = slot.fn(...args);
if (res)
res.key = slot.key;
return res;
} : slot.fn;
}
}
return slots;
}
 
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
if (name !== "default")
props.name = name;
return createVNode("slot", props, fallback && fallback());
}
let slot = slots[name];
if (slot && slot.length > 1) {
warn(
`SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
);
slot = () => [];
}
if (slot && slot._c) {
slot._d = false;
}
openBlock();
const validSlotContent = slot && ensureValidVNode(slot(props));
const rendered = createBlock(
Fragment,
{
key: props.key || // slot content array of a dynamic conditional slot may have a branch
// key attached in the `createSlots` helper, respect that
validSlotContent && validSlotContent.key || `_${name}`
},
validSlotContent || (fallback ? fallback() : []),
validSlotContent && slots._ === 1 ? 64 : -2
);
if (!noSlotted && rendered.scopeId) {
rendered.slotScopeIds = [rendered.scopeId + "-s"];
}
if (slot && slot._c) {
slot._d = true;
}
return rendered;
}
function ensureValidVNode(vnodes) {
return vnodes.some((child) => {
if (!isVNode(child))
return true;
if (child.type === Comment)
return false;
if (child.type === Fragment && !ensureValidVNode(child.children))
return false;
return true;
}) ? vnodes : null;
}
 
function toHandlers(obj, preserveCaseIfNecessary) {
const ret = {};
if (!isObject(obj)) {
warn(`v-on with no argument expects an object value.`);
return ret;
}
for (const key in obj) {
ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
}
return ret;
}
 
const getPublicInstance = (i) => {
if (!i)
return null;
if (isStatefulComponent(i))
return getExposeProxy(i) || i.proxy;
return getPublicInstance(i.parent);
};
const publicPropertiesMap = (
// Move PURE marker to new line to workaround compiler discarding it
// due to type annotation
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
$: (i) => i,
$el: (i) => i.vnode.el,
$data: (i) => i.data,
$props: (i) => shallowReadonly(i.props) ,
$attrs: (i) => shallowReadonly(i.attrs) ,
$slots: (i) => shallowReadonly(i.slots) ,
$refs: (i) => shallowReadonly(i.refs) ,
$parent: (i) => getPublicInstance(i.parent),
$root: (i) => getPublicInstance(i.root),
$emit: (i) => i.emit,
$options: (i) => resolveMergedOptions(i) ,
$forceUpdate: (i) => i.f || (i.f = () => queueJob(i.update)),
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
$watch: (i) => instanceWatch.bind(i)
})
);
const isReservedPrefix = (key) => key === "_" || key === "$";
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
const PublicInstanceProxyHandlers = {
get({ _: instance }, key) {
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
if (key === "__isVue") {
return true;
}
let normalizedProps;
if (key[0] !== "$") {
const n = accessCache[key];
if (n !== void 0) {
switch (n) {
case 1 /* SETUP */:
return setupState[key];
case 2 /* DATA */:
return data[key];
case 4 /* CONTEXT */:
return ctx[key];
case 3 /* PROPS */:
return props[key];
}
} else if (hasSetupBinding(setupState, key)) {
accessCache[key] = 1 /* SETUP */;
return setupState[key];
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
accessCache[key] = 2 /* DATA */;
return data[key];
} else if (
// only cache other properties when instance has declared (thus stable)
// props
(normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
) {
accessCache[key] = 3 /* PROPS */;
return props[key];
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
accessCache[key] = 4 /* CONTEXT */;
return ctx[key];
} else if (shouldCacheAccess) {
accessCache[key] = 0 /* OTHER */;
}
}
const publicGetter = publicPropertiesMap[key];
let cssModule, globalProperties;
if (publicGetter) {
if (key === "$attrs") {
track(instance, "get", key);
markAttrsAccessed();
} else if (key === "$slots") {
track(instance, "get", key);
}
return publicGetter(instance);
} else if (
// css module (injected by vue-loader)
(cssModule = type.__cssModules) && (cssModule = cssModule[key])
) {
return cssModule;
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
accessCache[key] = 4 /* CONTEXT */;
return ctx[key];
} else if (
// global properties
globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
) {
{
return globalProperties[key];
}
} else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading
// to infinite warning loop
key.indexOf("__v") !== 0)) {
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
warn(
`Property ${JSON.stringify(
key
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
);
} else if (instance === currentRenderingInstance) {
warn(
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
);
}
}
},
set({ _: instance }, key, value) {
const { data, setupState, ctx } = instance;
if (hasSetupBinding(setupState, key)) {
setupState[key] = value;
return true;
} else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
return false;
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
data[key] = value;
return true;
} else if (hasOwn(instance.props, key)) {
warn(`Attempting to mutate prop "${key}". Props are readonly.`);
return false;
}
if (key[0] === "$" && key.slice(1) in instance) {
warn(
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
);
return false;
} else {
if (key in instance.appContext.config.globalProperties) {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
value
});
} else {
ctx[key] = value;
}
}
return true;
},
has({
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
}, key) {
let normalizedProps;
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
},
defineProperty(target, key, descriptor) {
if (descriptor.get != null) {
target._.accessCache[key] = 0;
} else if (hasOwn(descriptor, "value")) {
this.set(target, key, descriptor.value, null);
}
return Reflect.defineProperty(target, key, descriptor);
}
};
{
PublicInstanceProxyHandlers.ownKeys = (target) => {
warn(
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
);
return Reflect.ownKeys(target);
};
}
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
{},
PublicInstanceProxyHandlers,
{
get(target, key) {
if (key === Symbol.unscopables) {
return;
}
return PublicInstanceProxyHandlers.get(target, key, target);
},
has(_, key) {
const has = key[0] !== "_" && !isGloballyAllowed(key);
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
warn(
`Property ${JSON.stringify(
key
)} should not start with _ which is a reserved prefix for Vue internals.`
);
}
return has;
}
}
);
function createDevRenderContext(instance) {
const target = {};
Object.defineProperty(target, `_`, {
configurable: true,
enumerable: false,
get: () => instance
});
Object.keys(publicPropertiesMap).forEach((key) => {
Object.defineProperty(target, key, {
configurable: true,
enumerable: false,
get: () => publicPropertiesMap[key](instance),
// intercepted by the proxy so no need for implementation,
// but needed to prevent set errors
set: NOOP
});
});
return target;
}
function exposePropsOnRenderContext(instance) {
const {
ctx,
propsOptions: [propsOptions]
} = instance;
if (propsOptions) {
Object.keys(propsOptions).forEach((key) => {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => instance.props[key],
set: NOOP
});
});
}
}
function exposeSetupStateOnRenderContext(instance) {
const { ctx, setupState } = instance;
Object.keys(toRaw(setupState)).forEach((key) => {
if (!setupState.__isScriptSetup) {
if (isReservedPrefix(key[0])) {
warn(
`setup() return property ${JSON.stringify(
key
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
);
return;
}
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => setupState[key],
set: NOOP
});
}
});
}
 
const warnRuntimeUsage = (method) => warn(
`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
);
function defineProps() {
{
warnRuntimeUsage(`defineProps`);
}
return null;
}
function defineEmits() {
{
warnRuntimeUsage(`defineEmits`);
}
return null;
}
function defineExpose(exposed) {
{
warnRuntimeUsage(`defineExpose`);
}
}
function defineOptions(options) {
{
warnRuntimeUsage(`defineOptions`);
}
}
function defineSlots() {
{
warnRuntimeUsage(`defineSlots`);
}
return null;
}
function defineModel() {
{
warnRuntimeUsage("defineModel");
}
}
function withDefaults(props, defaults) {
{
warnRuntimeUsage(`withDefaults`);
}
return null;
}
function useSlots() {
return getContext().slots;
}
function useAttrs() {
return getContext().attrs;
}
function useModel(props, name, options) {
const i = getCurrentInstance();
if (!i) {
warn(`useModel() called without active instance.`);
return ref();
}
if (!i.propsOptions[0][name]) {
warn(`useModel() called with prop "${name}" which is not declared.`);
return ref();
}
if (options && options.local) {
const proxy = ref(props[name]);
watch(
() => props[name],
(v) => proxy.value = v
);
watch(proxy, (value) => {
if (value !== props[name]) {
i.emit(`update:${name}`, value);
}
});
return proxy;
} else {
return {
__v_isRef: true,
get value() {
return props[name];
},
set value(value) {
i.emit(`update:${name}`, value);
}
};
}
}
function getContext() {
const i = getCurrentInstance();
if (!i) {
warn(`useContext() called without active instance.`);
}
return i.setupContext || (i.setupContext = createSetupContext(i));
}
function normalizePropsOrEmits(props) {
return isArray(props) ? props.reduce(
(normalized, p) => (normalized[p] = null, normalized),
{}
) : props;
}
function mergeDefaults(raw, defaults) {
const props = normalizePropsOrEmits(raw);
for (const key in defaults) {
if (key.startsWith("__skip"))
continue;
let opt = props[key];
if (opt) {
if (isArray(opt) || isFunction(opt)) {
opt = props[key] = { type: opt, default: defaults[key] };
} else {
opt.default = defaults[key];
}
} else if (opt === null) {
opt = props[key] = { default: defaults[key] };
} else {
warn(`props default key "${key}" has no corresponding declaration.`);
}
if (opt && defaults[`__skip_${key}`]) {
opt.skipFactory = true;
}
}
return props;
}
function mergeModels(a, b) {
if (!a || !b)
return a || b;
if (isArray(a) && isArray(b))
return a.concat(b);
return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));
}
function createPropsRestProxy(props, excludedKeys) {
const ret = {};
for (const key in props) {
if (!excludedKeys.includes(key)) {
Object.defineProperty(ret, key, {
enumerable: true,
get: () => props[key]
});
}
}
return ret;
}
function withAsyncContext(getAwaitable) {
const ctx = getCurrentInstance();
if (!ctx) {
warn(
`withAsyncContext called without active current instance. This is likely a bug.`
);
}
let awaitable = getAwaitable();
unsetCurrentInstance();
if (isPromise(awaitable)) {
awaitable = awaitable.catch((e) => {
setCurrentInstance(ctx);
throw e;
});
}
return [awaitable, () => setCurrentInstance(ctx)];
}
 
function createDuplicateChecker() {
const cache = /* @__PURE__ */ Object.create(null);
return (type, key) => {
if (cache[key]) {
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
} else {
cache[key] = type;
}
};
}
let shouldCacheAccess = true;
function applyOptions(instance) {
const options = resolveMergedOptions(instance);
const publicThis = instance.proxy;
const ctx = instance.ctx;
shouldCacheAccess = false;
if (options.beforeCreate) {
callHook$1(options.beforeCreate, instance, "bc");
}
const {
// state
data: dataOptions,
computed: computedOptions,
methods,
watch: watchOptions,
provide: provideOptions,
inject: injectOptions,
// lifecycle
created,
beforeMount,
mounted,
beforeUpdate,
updated,
activated,
deactivated,
beforeDestroy,
beforeUnmount,
destroyed,
unmounted,
render,
renderTracked,
renderTriggered,
errorCaptured,
serverPrefetch,
// public API
expose,
inheritAttrs,
// assets
components,
directives,
filters
} = options;
const checkDuplicateProperties = createDuplicateChecker() ;
{
const [propsOptions] = instance.propsOptions;
if (propsOptions) {
for (const key in propsOptions) {
checkDuplicateProperties("Props" /* PROPS */, key);
}
}
}
if (injectOptions) {
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
}
if (methods) {
for (const key in methods) {
const methodHandler = methods[key];
if (isFunction(methodHandler)) {
{
Object.defineProperty(ctx, key, {
value: methodHandler.bind(publicThis),
configurable: true,
enumerable: true,
writable: true
});
}
{
checkDuplicateProperties("Methods" /* METHODS */, key);
}
} else {
warn(
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
);
}
}
}
if (dataOptions) {
if (!isFunction(dataOptions)) {
warn(
`The data option must be a function. Plain object usage is no longer supported.`
);
}
const data = dataOptions.call(publicThis, publicThis);
if (isPromise(data)) {
warn(
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
);
}
if (!isObject(data)) {
warn(`data() should return an object.`);
} else {
instance.data = reactive(data);
{
for (const key in data) {
checkDuplicateProperties("Data" /* DATA */, key);
if (!isReservedPrefix(key[0])) {
Object.defineProperty(ctx, key, {
configurable: true,
enumerable: true,
get: () => data[key],
set: NOOP
});
}
}
}
}
}
shouldCacheAccess = true;
if (computedOptions) {
for (const key in computedOptions) {
const opt = computedOptions[key];
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
if (get === NOOP) {
warn(`Computed property "${key}" has no getter.`);
}
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
warn(
`Write operation failed: computed property "${key}" is readonly.`
);
} ;
const c = computed({
get,
set
});
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => c.value,
set: (v) => c.value = v
});
{
checkDuplicateProperties("Computed" /* COMPUTED */, key);
}
}
}
if (watchOptions) {
for (const key in watchOptions) {
createWatcher(watchOptions[key], ctx, publicThis, key);
}
}
if (provideOptions) {
const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
Reflect.ownKeys(provides).forEach((key) => {
provide(key, provides[key]);
});
}
if (created) {
callHook$1(created, instance, "c");
}
function registerLifecycleHook(register, hook) {
if (isArray(hook)) {
hook.forEach((_hook) => register(_hook.bind(publicThis)));
} else if (hook) {
register(hook.bind(publicThis));
}
}
registerLifecycleHook(onBeforeMount, beforeMount);
registerLifecycleHook(onMounted, mounted);
registerLifecycleHook(onBeforeUpdate, beforeUpdate);
registerLifecycleHook(onUpdated, updated);
registerLifecycleHook(onActivated, activated);
registerLifecycleHook(onDeactivated, deactivated);
registerLifecycleHook(onErrorCaptured, errorCaptured);
registerLifecycleHook(onRenderTracked, renderTracked);
registerLifecycleHook(onRenderTriggered, renderTriggered);
registerLifecycleHook(onBeforeUnmount, beforeUnmount);
registerLifecycleHook(onUnmounted, unmounted);
registerLifecycleHook(onServerPrefetch, serverPrefetch);
if (isArray(expose)) {
if (expose.length) {
const exposed = instance.exposed || (instance.exposed = {});
expose.forEach((key) => {
Object.defineProperty(exposed, key, {
get: () => publicThis[key],
set: (val) => publicThis[key] = val
});
});
} else if (!instance.exposed) {
instance.exposed = {};
}
}
if (render && instance.render === NOOP) {
instance.render = render;
}
if (inheritAttrs != null) {
instance.inheritAttrs = inheritAttrs;
}
if (components)
instance.components = components;
if (directives)
instance.directives = directives;
}
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
if (isArray(injectOptions)) {
injectOptions = normalizeInject(injectOptions);
}
for (const key in injectOptions) {
const opt = injectOptions[key];
let injected;
if (isObject(opt)) {
if ("default" in opt) {
injected = inject(
opt.from || key,
opt.default,
true
/* treat default function as factory */
);
} else {
injected = inject(opt.from || key);
}
} else {
injected = inject(opt);
}
if (isRef(injected)) {
Object.defineProperty(ctx, key, {
enumerable: true,
configurable: true,
get: () => injected.value,
set: (v) => injected.value = v
});
} else {
ctx[key] = injected;
}
{
checkDuplicateProperties("Inject" /* INJECT */, key);
}
}
}
function callHook$1(hook, instance, type) {
callWithAsyncErrorHandling(
isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),
instance,
type
);
}
function createWatcher(raw, ctx, publicThis, key) {
const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
if (isString(raw)) {
const handler = ctx[raw];
if (isFunction(handler)) {
watch(getter, handler);
} else {
warn(`Invalid watch handler specified by key "${raw}"`, handler);
}
} else if (isFunction(raw)) {
watch(getter, raw.bind(publicThis));
} else if (isObject(raw)) {
if (isArray(raw)) {
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
} else {
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
if (isFunction(handler)) {
watch(getter, handler, raw);
} else {
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
}
}
} else {
warn(`Invalid watch option: "${key}"`, raw);
}
}
function resolveMergedOptions(instance) {
const base = instance.type;
const { mixins, extends: extendsOptions } = base;
const {
mixins: globalMixins,
optionsCache: cache,
config: { optionMergeStrategies }
} = instance.appContext;
const cached = cache.get(base);
let resolved;
if (cached) {
resolved = cached;
} else if (!globalMixins.length && !mixins && !extendsOptions) {
{
resolved = base;
}
} else {
resolved = {};
if (globalMixins.length) {
globalMixins.forEach(
(m) => mergeOptions(resolved, m, optionMergeStrategies, true)
);
}
mergeOptions(resolved, base, optionMergeStrategies);
}
if (isObject(base)) {
cache.set(base, resolved);
}
return resolved;
}
function mergeOptions(to, from, strats, asMixin = false) {
const { mixins, extends: extendsOptions } = from;
if (extendsOptions) {
mergeOptions(to, extendsOptions, strats, true);
}
if (mixins) {
mixins.forEach(
(m) => mergeOptions(to, m, strats, true)
);
}
for (const key in from) {
if (asMixin && key === "expose") {
warn(
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
);
} else {
const strat = internalOptionMergeStrats[key] || strats && strats[key];
to[key] = strat ? strat(to[key], from[key]) : from[key];
}
}
return to;
}
const internalOptionMergeStrats = {
data: mergeDataFn,
props: mergeEmitsOrPropsOptions,
emits: mergeEmitsOrPropsOptions,
// objects
methods: mergeObjectOptions,
computed: mergeObjectOptions,
// lifecycle
beforeCreate: mergeAsArray$1,
created: mergeAsArray$1,
beforeMount: mergeAsArray$1,
mounted: mergeAsArray$1,
beforeUpdate: mergeAsArray$1,
updated: mergeAsArray$1,
beforeDestroy: mergeAsArray$1,
beforeUnmount: mergeAsArray$1,
destroyed: mergeAsArray$1,
unmounted: mergeAsArray$1,
activated: mergeAsArray$1,
deactivated: mergeAsArray$1,
errorCaptured: mergeAsArray$1,
serverPrefetch: mergeAsArray$1,
// assets
components: mergeObjectOptions,
directives: mergeObjectOptions,
// watch
watch: mergeWatchOptions,
// provide / inject
provide: mergeDataFn,
inject: mergeInject
};
function mergeDataFn(to, from) {
if (!from) {
return to;
}
if (!to) {
return from;
}
return function mergedDataFn() {
return (extend)(
isFunction(to) ? to.call(this, this) : to,
isFunction(from) ? from.call(this, this) : from
);
};
}
function mergeInject(to, from) {
return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
}
function normalizeInject(raw) {
if (isArray(raw)) {
const res = {};
for (let i = 0; i < raw.length; i++) {
res[raw[i]] = raw[i];
}
return res;
}
return raw;
}
function mergeAsArray$1(to, from) {
return to ? [...new Set([].concat(to, from))] : from;
}
function mergeObjectOptions(to, from) {
return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
}
function mergeEmitsOrPropsOptions(to, from) {
if (to) {
if (isArray(to) && isArray(from)) {
return [.../* @__PURE__ */ new Set([...to, ...from])];
}
return extend(
/* @__PURE__ */ Object.create(null),
normalizePropsOrEmits(to),
normalizePropsOrEmits(from != null ? from : {})
);
} else {
return from;
}
}
function mergeWatchOptions(to, from) {
if (!to)
return from;
if (!from)
return to;
const merged = extend(/* @__PURE__ */ Object.create(null), to);
for (const key in from) {
merged[key] = mergeAsArray$1(to[key], from[key]);
}
return merged;
}
 
function createAppContext() {
return {
app: null,
config: {
isNativeTag: NO,
performance: false,
globalProperties: {},
optionMergeStrategies: {},
errorHandler: void 0,
warnHandler: void 0,
compilerOptions: {}
},
mixins: [],
components: {},
directives: {},
provides: /* @__PURE__ */ Object.create(null),
optionsCache: /* @__PURE__ */ new WeakMap(),
propsCache: /* @__PURE__ */ new WeakMap(),
emitsCache: /* @__PURE__ */ new WeakMap()
};
}
let uid$1 = 0;
function createAppAPI(render, hydrate) {
return function createApp(rootComponent, rootProps = null) {
if (!isFunction(rootComponent)) {
rootComponent = extend({}, rootComponent);
}
if (rootProps != null && !isObject(rootProps)) {
warn(`root props passed to app.mount() must be an object.`);
rootProps = null;
}
const context = createAppContext();
{
Object.defineProperty(context.config, "unwrapInjectedRef", {
get() {
return true;
},
set() {
warn(
`app.config.unwrapInjectedRef has been deprecated. 3.3 now always unwraps injected refs in Options API.`
);
}
});
}
const installedPlugins = /* @__PURE__ */ new WeakSet();
let isMounted = false;
const app = context.app = {
_uid: uid$1++,
_component: rootComponent,
_props: rootProps,
_container: null,
_context: context,
_instance: null,
version,
get config() {
return context.config;
},
set config(v) {
{
warn(
`app.config cannot be replaced. Modify individual options instead.`
);
}
},
use(plugin, ...options) {
if (installedPlugins.has(plugin)) {
warn(`Plugin has already been applied to target app.`);
} else if (plugin && isFunction(plugin.install)) {
installedPlugins.add(plugin);
plugin.install(app, ...options);
} else if (isFunction(plugin)) {
installedPlugins.add(plugin);
plugin(app, ...options);
} else {
warn(
`A plugin must either be a function or an object with an "install" function.`
);
}
return app;
},
mixin(mixin) {
{
if (!context.mixins.includes(mixin)) {
context.mixins.push(mixin);
} else {
warn(
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
);
}
}
return app;
},
component(name, component) {
{
validateComponentName(name, context.config);
}
if (!component) {
return context.components[name];
}
if (context.components[name]) {
warn(`Component "${name}" has already been registered in target app.`);
}
context.components[name] = component;
return app;
},
directive(name, directive) {
{
validateDirectiveName(name);
}
if (!directive) {
return context.directives[name];
}
if (context.directives[name]) {
warn(`Directive "${name}" has already been registered in target app.`);
}
context.directives[name] = directive;
return app;
},
mount(rootContainer, isHydrate, isSVG) {
if (!isMounted) {
if (rootContainer.__vue_app__) {
warn(
`There is already an app instance mounted on the host container.
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
);
}
const vnode = createVNode(rootComponent, rootProps);
vnode.appContext = context;
{
context.reload = () => {
render(cloneVNode(vnode), rootContainer, isSVG);
};
}
if (isHydrate && hydrate) {
hydrate(vnode, rootContainer);
} else {
render(vnode, rootContainer, isSVG);
}
isMounted = true;
app._container = rootContainer;
rootContainer.__vue_app__ = app;
{
app._instance = vnode.component;
devtoolsInitApp(app, version);
}
return getExposeProxy(vnode.component) || vnode.component.proxy;
} else {
warn(
`App has already been mounted.
If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
);
}
},
unmount() {
if (isMounted) {
render(null, app._container);
{
app._instance = null;
devtoolsUnmountApp(app);
}
delete app._container.__vue_app__;
} else {
warn(`Cannot unmount an app that is not mounted.`);
}
},
provide(key, value) {
if (key in context.provides) {
warn(
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
);
}
context.provides[key] = value;
return app;
},
runWithContext(fn) {
currentApp = app;
try {
return fn();
} finally {
currentApp = null;
}
}
};
return app;
};
}
let currentApp = null;
 
function provide(key, value) {
if (!currentInstance) {
{
warn(`provide() can only be used inside setup().`);
}
} else {
let provides = currentInstance.provides;
const parentProvides = currentInstance.parent && currentInstance.parent.provides;
if (parentProvides === provides) {
provides = currentInstance.provides = Object.create(parentProvides);
}
provides[key] = value;
}
}
function inject(key, defaultValue, treatDefaultAsFactory = false) {
const instance = currentInstance || currentRenderingInstance;
if (instance || currentApp) {
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : currentApp._context.provides;
if (provides && key in provides) {
return provides[key];
} else if (arguments.length > 1) {
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
} else {
warn(`injection "${String(key)}" not found.`);
}
} else {
warn(`inject() can only be used inside setup() or functional components.`);
}
}
function hasInjectionContext() {
return !!(currentInstance || currentRenderingInstance || currentApp);
}
 
function initProps(instance, rawProps, isStateful, isSSR = false) {
const props = {};
const attrs = {};
def(attrs, InternalObjectKey, 1);
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
setFullProps(instance, rawProps, props, attrs);
for (const key in instance.propsOptions[0]) {
if (!(key in props)) {
props[key] = void 0;
}
}
{
validateProps(rawProps || {}, props, instance);
}
if (isStateful) {
instance.props = isSSR ? props : shallowReactive(props);
} else {
if (!instance.type.props) {
instance.props = attrs;
} else {
instance.props = props;
}
}
instance.attrs = attrs;
}
function isInHmrContext(instance) {
while (instance) {
if (instance.type.__hmrId)
return true;
instance = instance.parent;
}
}
function updateProps(instance, rawProps, rawPrevProps, optimized) {
const {
props,
attrs,
vnode: { patchFlag }
} = instance;
const rawCurrentProps = toRaw(props);
const [options] = instance.propsOptions;
let hasAttrsChanged = false;
if (
// always force full diff in dev
// - #1942 if hmr is enabled with sfc component
// - vite#872 non-sfc component used by sfc component
!isInHmrContext(instance) && (optimized || patchFlag > 0) && !(patchFlag & 16)
) {
if (patchFlag & 8) {
const propsToUpdate = instance.vnode.dynamicProps;
for (let i = 0; i < propsToUpdate.length; i++) {
let key = propsToUpdate[i];
if (isEmitListener(instance.emitsOptions, key)) {
continue;
}
const value = rawProps[key];
if (options) {
if (hasOwn(attrs, key)) {
if (value !== attrs[key]) {
attrs[key] = value;
hasAttrsChanged = true;
}
} else {
const camelizedKey = camelize(key);
props[camelizedKey] = resolvePropValue(
options,
rawCurrentProps,
camelizedKey,
value,
instance,
false
/* isAbsent */
);
}
} else {
if (value !== attrs[key]) {
attrs[key] = value;
hasAttrsChanged = true;
}
}
}
}
} else {
if (setFullProps(instance, rawProps, props, attrs)) {
hasAttrsChanged = true;
}
let kebabKey;
for (const key in rawCurrentProps) {
if (!rawProps || // for camelCase
!hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case
// and converted to camelCase (#955)
((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
if (options) {
if (rawPrevProps && // for camelCase
(rawPrevProps[key] !== void 0 || // for kebab-case
rawPrevProps[kebabKey] !== void 0)) {
props[key] = resolvePropValue(
options,
rawCurrentProps,
key,
void 0,
instance,
true
/* isAbsent */
);
}
} else {
delete props[key];
}
}
}
if (attrs !== rawCurrentProps) {
for (const key in attrs) {
if (!rawProps || !hasOwn(rawProps, key) && true) {
delete attrs[key];
hasAttrsChanged = true;
}
}
}
}
if (hasAttrsChanged) {
trigger(instance, "set", "$attrs");
}
{
validateProps(rawProps || {}, props, instance);
}
}
function setFullProps(instance, rawProps, props, attrs) {
const [options, needCastKeys] = instance.propsOptions;
let hasAttrsChanged = false;
let rawCastValues;
if (rawProps) {
for (let key in rawProps) {
if (isReservedProp(key)) {
continue;
}
const value = rawProps[key];
let camelKey;
if (options && hasOwn(options, camelKey = camelize(key))) {
if (!needCastKeys || !needCastKeys.includes(camelKey)) {
props[camelKey] = value;
} else {
(rawCastValues || (rawCastValues = {}))[camelKey] = value;
}
} else if (!isEmitListener(instance.emitsOptions, key)) {
if (!(key in attrs) || value !== attrs[key]) {
attrs[key] = value;
hasAttrsChanged = true;
}
}
}
}
if (needCastKeys) {
const rawCurrentProps = toRaw(props);
const castValues = rawCastValues || EMPTY_OBJ;
for (let i = 0; i < needCastKeys.length; i++) {
const key = needCastKeys[i];
props[key] = resolvePropValue(
options,
rawCurrentProps,
key,
castValues[key],
instance,
!hasOwn(castValues, key)
);
}
}
return hasAttrsChanged;
}
function resolvePropValue(options, props, key, value, instance, isAbsent) {
const opt = options[key];
if (opt != null) {
const hasDefault = hasOwn(opt, "default");
if (hasDefault && value === void 0) {
const defaultValue = opt.default;
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
const { propsDefaults } = instance;
if (key in propsDefaults) {
value = propsDefaults[key];
} else {
setCurrentInstance(instance);
value = propsDefaults[key] = defaultValue.call(
null,
props
);
unsetCurrentInstance();
}
} else {
value = defaultValue;
}
}
if (opt[0 /* shouldCast */]) {
if (isAbsent && !hasDefault) {
value = false;
} else if (opt[1 /* shouldCastTrue */] && (value === "" || value === hyphenate(key))) {
value = true;
}
}
}
return value;
}
function normalizePropsOptions(comp, appContext, asMixin = false) {
const cache = appContext.propsCache;
const cached = cache.get(comp);
if (cached) {
return cached;
}
const raw = comp.props;
const normalized = {};
const needCastKeys = [];
let hasExtends = false;
if (!isFunction(comp)) {
const extendProps = (raw2) => {
hasExtends = true;
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
extend(normalized, props);
if (keys)
needCastKeys.push(...keys);
};
if (!asMixin && appContext.mixins.length) {
appContext.mixins.forEach(extendProps);
}
if (comp.extends) {
extendProps(comp.extends);
}
if (comp.mixins) {
comp.mixins.forEach(extendProps);
}
}
if (!raw && !hasExtends) {
if (isObject(comp)) {
cache.set(comp, EMPTY_ARR);
}
return EMPTY_ARR;
}
if (isArray(raw)) {
for (let i = 0; i < raw.length; i++) {
if (!isString(raw[i])) {
warn(`props must be strings when using array syntax.`, raw[i]);
}
const normalizedKey = camelize(raw[i]);
if (validatePropName(normalizedKey)) {
normalized[normalizedKey] = EMPTY_OBJ;
}
}
} else if (raw) {
if (!isObject(raw)) {
warn(`invalid props options`, raw);
}
for (const key in raw) {
const normalizedKey = camelize(key);
if (validatePropName(normalizedKey)) {
const opt = raw[key];
const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
if (prop) {
const booleanIndex = getTypeIndex(Boolean, prop.type);
const stringIndex = getTypeIndex(String, prop.type);
prop[0 /* shouldCast */] = booleanIndex > -1;
prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
if (booleanIndex > -1 || hasOwn(prop, "default")) {
needCastKeys.push(normalizedKey);
}
}
}
}
}
const res = [normalized, needCastKeys];
if (isObject(comp)) {
cache.set(comp, res);
}
return res;
}
function validatePropName(key) {
if (key[0] !== "$") {
return true;
} else {
warn(`Invalid prop name: "${key}" is a reserved property.`);
}
return false;
}
function getType(ctor) {
const match = ctor && ctor.toString().match(/^\s*(function|class) (\w+)/);
return match ? match[2] : ctor === null ? "null" : "";
}
function isSameType(a, b) {
return getType(a) === getType(b);
}
function getTypeIndex(type, expectedTypes) {
if (isArray(expectedTypes)) {
return expectedTypes.findIndex((t) => isSameType(t, type));
} else if (isFunction(expectedTypes)) {
return isSameType(expectedTypes, type) ? 0 : -1;
}
return -1;
}
function validateProps(rawProps, props, instance) {
const resolvedValues = toRaw(props);
const options = instance.propsOptions[0];
for (const key in options) {
let opt = options[key];
if (opt == null)
continue;
validateProp(
key,
resolvedValues[key],
opt,
!hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
);
}
}
function validateProp(name, value, prop, isAbsent) {
const { type, required, validator, skipCheck } = prop;
if (required && isAbsent) {
warn('Missing required prop: "' + name + '"');
return;
}
if (value == null && !required) {
return;
}
if (type != null && type !== true && !skipCheck) {
let isValid = false;
const types = isArray(type) ? type : [type];
const expectedTypes = [];
for (let i = 0; i < types.length && !isValid; i++) {
const { valid, expectedType } = assertType(value, types[i]);
expectedTypes.push(expectedType || "");
isValid = valid;
}
if (!isValid) {
warn(getInvalidTypeMessage(name, value, expectedTypes));
return;
}
}
if (validator && !validator(value)) {
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
}
}
const isSimpleType = /* @__PURE__ */ makeMap(
"String,Number,Boolean,Function,Symbol,BigInt"
);
function assertType(value, type) {
let valid;
const expectedType = getType(type);
if (isSimpleType(expectedType)) {
const t = typeof value;
valid = t === expectedType.toLowerCase();
if (!valid && t === "object") {
valid = value instanceof type;
}
} else if (expectedType === "Object") {
valid = isObject(value);
} else if (expectedType === "Array") {
valid = isArray(value);
} else if (expectedType === "null") {
valid = value === null;
} else {
valid = value instanceof type;
}
return {
valid,
expectedType
};
}
function getInvalidTypeMessage(name, value, expectedTypes) {
let message = `Invalid prop: type check failed for prop "${name}". Expected ${expectedTypes.map(capitalize).join(" | ")}`;
const expectedType = expectedTypes[0];
const receivedType = toRawType(value);
const expectedValue = styleValue(value, expectedType);
const receivedValue = styleValue(value, receivedType);
if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {
message += ` with value ${expectedValue}`;
}
message += `, got ${receivedType} `;
if (isExplicable(receivedType)) {
message += `with value ${receivedValue}.`;
}
return message;
}
function styleValue(value, type) {
if (type === "String") {
return `"${value}"`;
} else if (type === "Number") {
return `${Number(value)}`;
} else {
return `${value}`;
}
}
function isExplicable(type) {
const explicitTypes = ["string", "number", "boolean"];
return explicitTypes.some((elem) => type.toLowerCase() === elem);
}
function isBoolean(...args) {
return args.some((elem) => elem.toLowerCase() === "boolean");
}
 
const isInternalKey = (key) => key[0] === "_" || key === "$stable";
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
const normalizeSlot = (key, rawSlot, ctx) => {
if (rawSlot._n) {
return rawSlot;
}
const normalized = withCtx((...args) => {
if (currentInstance) {
warn(
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
);
}
return normalizeSlotValue(rawSlot(...args));
}, ctx);
normalized._c = false;
return normalized;
};
const normalizeObjectSlots = (rawSlots, slots, instance) => {
const ctx = rawSlots._ctx;
for (const key in rawSlots) {
if (isInternalKey(key))
continue;
const value = rawSlots[key];
if (isFunction(value)) {
slots[key] = normalizeSlot(key, value, ctx);
} else if (value != null) {
{
warn(
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
);
}
const normalized = normalizeSlotValue(value);
slots[key] = () => normalized;
}
}
};
const normalizeVNodeSlots = (instance, children) => {
if (!isKeepAlive(instance.vnode) && true) {
warn(
`Non-function value encountered for default slot. Prefer function slots for better performance.`
);
}
const normalized = normalizeSlotValue(children);
instance.slots.default = () => normalized;
};
const initSlots = (instance, children) => {
if (instance.vnode.shapeFlag & 32) {
const type = children._;
if (type) {
instance.slots = toRaw(children);
def(children, "_", type);
} else {
normalizeObjectSlots(
children,
instance.slots = {});
}
} else {
instance.slots = {};
if (children) {
normalizeVNodeSlots(instance, children);
}
}
def(instance.slots, InternalObjectKey, 1);
};
const updateSlots = (instance, children, optimized) => {
const { vnode, slots } = instance;
let needDeletionCheck = true;
let deletionComparisonTarget = EMPTY_OBJ;
if (vnode.shapeFlag & 32) {
const type = children._;
if (type) {
if (isHmrUpdating) {
extend(slots, children);
trigger(instance, "set", "$slots");
} else if (optimized && type === 1) {
needDeletionCheck = false;
} else {
extend(slots, children);
if (!optimized && type === 1) {
delete