Version 5.0.0 beta 2

This commit is contained in:
Neo committed 2025-12-19 16:39:01 -08:00
1 parent 15c7beabc5
commit f61b0da85d
181 files changed
+3182 -1533

No files matched your search

+1 -8
View File
@@ -300,7 +300,7 @@ phpQuery
PHP User Agent Parser
Description: Parses user agent strings
Location: system/3rd_party/PhpUserAgent
Included Version: 1.7.0
Included Version: 1.9.0
Website: https://github.com/donatj/PhpUserAgent
License: http://opensource.org/licenses/mit-license.php
@@ -329,13 +329,6 @@ success.mp3 Notification Sound by RCP Tones
Website: http://rcptones.com/dev_tones/
License: http://creativecommons.org/licenses/by/3.0/us/
Twemoji
Description: Emoji images
Location: Served from CDN
Included version: 14.0.2
Website: http://twitter.github.io/twemoji/
License: https://github.com/twitter/twemoji/blob/gh-pages/LICENSE
Underscore.js
Description: General-purpose functional JS library
Location: dev/js/library/underscore/
+1 -1
View File
@@ -20,7 +20,7 @@
{{if $nullLang}}
<div class="ipsFieldRow__inlineCheckbox">
{lang="or"}
<input type="checkbox" role='checkbox' data-control="unlimited" name="{$name}_null" id="{$name}_null" value="1" {{if $value === NULL}}checked aria-checked='true'{{endif}} {{if $disabled}}disabled{{endif}} aria-controls='{$name}' aria-labelledby='{$name}_null_label'>
<input type="checkbox" role='checkbox' data-control="unlimited" name="{$name}_null" id="{$name}_null" value="1" {{if $value === NULL}}checked{{endif}} {{if $disabled}}disabled{{endif}} aria-controls='{$name}' aria-labelledby='{$name}_null_label'>
<label for='{$name}_null' id='{$name}_null_label'>{lang="$nullLang"}</label>
</div>
{{endif}}
+2 -2
View File
@@ -10,9 +10,9 @@
name="{expression="trim( $name, '[]' )"}_unlimited"
value='{$unlimited}'
id="{expression="trim( $id ?: $name, '[]' )"}_unlimited"
{{if $unlimited === $value}}checked aria-checked='true'{{else}}aria-checked='false'{{endif}}
{{if $unlimited === $value}}checked{{endif}}
{{if $disabled}}disabled aria-disabled='true'{{endif}}
data-ipsToggle
class="ipsSwitch"
data-role="checkboxsetUnlimitedToggle"
>
&nbsp;
+1 -1
View File
@@ -20,7 +20,7 @@
{{if $nullLang}}
<div class="ipsFieldRow__inlineCheckbox">
{lang="or"}
<input type="checkbox" role='checkbox' data-control="unlimited" name="{$name}_null" id="{$name}_null" value="1" {{if $value === NULL}}checked aria-checked='true'{{endif}} {{if $disabled}}disabled{{endif}} aria-controls='{$name}' aria-labelledby='{$name}_null_label'>
<input type="checkbox" role='checkbox' data-control="unlimited" name="{$name}_null" id="{$name}_null" value="1" {{if $value === NULL}}checked{{endif}} {{if $disabled}}disabled{{endif}} aria-controls='{$name}' aria-labelledby='{$name}_null_label'>
<label for='{$name}_null' id='{$name}_null_label'>{lang="$nullLang"}</label>
</div>
{{endif}}
+1 -1
View File
@@ -163,7 +163,7 @@ class comments extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -191,7 +191,7 @@ class entries extends ItemController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
}
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="blog">
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.manageCategories.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
<file javascript_app="blog" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.manageCategories.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -277,7 +277,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="blog" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.view.js" javascript_type="template" javascript_version="5000026" javascript_position="1000050"><![CDATA[/* CLASS LIST TEMPLATES */
<file javascript_app="blog" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.view.js" javascript_type="template" javascript_version="5000028" javascript_position="1000050"><![CDATA[/* CLASS LIST TEMPLATES */
ips.templates.set('blog.view.addButton', "\
<button type=\"button\" class=\"ipsButton ipsButton--primary ipsHide\" data-action=\"addNew\">{{#lang}}manage_cats_new_row{{/lang}}</button>\
");
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="blog" version="5000026">
<app key="blog" version="5000028">
<word key="__app_blog" js="0">Blogs</word>
<word key="frontnavigation_blogs" js="0">Blogs</word>
<word key="__indefart_blog_entry_comment" js="0">a comment on a blog entry</word>
+1 -1
View File
@@ -1743,7 +1743,7 @@
</li>]]></template>
<css css_location="front" css_app="blog" css_attributes="" css_path="." css_name="blog.css">/* Blog index: &quot;View Blogs&quot; */
.ipsData--blog-entries.ipsData--grid{
--i-data--display-desc: 5;
--i-data--desc-truncate: 5;
}
.ipsCoverPhoto--blog-listing{
+3 -1
View File
@@ -275,5 +275,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -0,0 +1,22 @@
{
"id": 5000027,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeeditor": true,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,19 @@
{
"html": {
"added": [],
"edited": [],
"removed": []
},
"css": {
"added": [],
"edited": [
"front\/blog.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,14 @@
{
"categories": {
"added": [],
"edited": [],
"removed": []
},
"settings": {
"added": [],
"edited": [
"layout_blog_view"
],
"removed": []
}
}
@@ -0,0 +1,22 @@
{
"id": 5000028,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": true,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,14 @@
{
"categories": {
"added": [],
"edited": [],
"removed": []
},
"settings": {
"added": [],
"edited": [
"layout_blog_view"
],
"removed": []
}
}
+1 -1
View File
@@ -148,7 +148,7 @@ class comments extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -224,7 +224,7 @@ class events extends ItemController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
}
+1 -1
View File
@@ -152,7 +152,7 @@ class reviews extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+11 -11
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="calendar">
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000250"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.main.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -110,7 +110,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000250"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/browse" javascript_name="ips.browse.monthView.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -229,7 +229,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.eventList.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -347,7 +347,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.nearMe.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -711,7 +711,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000300"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/overview" javascript_name="ips.overview.search.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1265,7 +1265,7 @@ var PER_PAGE = 16;
});
}(jQuery, _));
]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.dates.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1813,7 +1813,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000200"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/venue" javascript_name="ips.venue.main.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000200"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1920,7 +1920,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderButton.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2003,7 +2003,7 @@ var PER_PAGE = 16;
}
});
}(jQuery, _));]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150">/**
<file javascript_app="calendar" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.reminderForm.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2113,7 +2113,7 @@ var PER_PAGE = 16;
});
}(jQuery, _));
</file>
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.calendar.templates.js" javascript_type="framework" javascript_version="5000028" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*/
@@ -2122,7 +2122,7 @@ var PER_PAGE = 16;
ips.templates.set('calendar.reminder.loading', " \
<div class='ipsLoading ipsLoading--tiny'></div>\
");]]></file>
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000026" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
<file javascript_app="calendar" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.overview.js" javascript_type="template" javascript_version="5000028" javascript_position="1000050"><![CDATA[ips.templates.set("eventLoading", `
<li class='ipsData__item ipsData__item--loading'>
<div class="ipsData__image"></div>
<div class="ipsData__content">
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="calendar" version="5000026">
<app key="calendar" version="5000028">
<word key="__app_calendar" js="0">Events</word>
<word key="frontnavigation_calendar" js="0">Events</word>
<word key="__indefart_calendar_event_comment" js="0">a comment on an event</word>
+5 -5
View File
@@ -1449,13 +1449,13 @@
<ul class='i-basis_100p i-padding_3 ipsList ipsList--inline'>
<li>
<label class="i-flex i-align-items_center i-gap_1">
<input type="checkbox" role="checkbox" name="event_dates[single_day]" {{if isset($value['single_day']) AND $value['single_day']}}checked aria-checked='true'{{endif}} value="1" id="check_single_day" class="ipsInput ipsInput--toggle">
<input type="checkbox" role="checkbox" name="event_dates[single_day]" {{if isset($value['single_day']) AND $value['single_day']}}checked{{endif}} value="1" id="check_single_day" class="ipsInput ipsInput--toggle">
{lang="event_single_day"}
</label>
</li>
<li>
<label class="i-flex i-align-items_center i-gap_1">
<input type="checkbox" role="checkbox" name="event_dates[all_day]" {{if isset($value['all_day']) AND $value['all_day']}}checked aria-checked='true'{{endif}} value="1" id="check_all_day" class="ipsInput ipsInput--toggle">
<input type="checkbox" role="checkbox" name="event_dates[all_day]" {{if isset($value['all_day']) AND $value['all_day']}}checked{{endif}} value="1" id="check_all_day" class="ipsInput ipsInput--toggle">
{lang="event_all_day"}
</label>
</li>
@@ -1492,7 +1492,7 @@
<ul class='i-margin-top_2 ipsList ipsList--inline' id='end_date_controls'>
<li>
<label class="i-flex i-align-items_center i-gap_1">
<input type="checkbox" role="checkbox" name="event_dates[no_end_time]" {{if !isset( $value['end_time'] ) OR !$value['end_time']}}checked aria-checked='true'{{endif}} value="1" id="check_no_end_time" class="ipsInput ipsInput--toggle">
<input type="checkbox" role="checkbox" name="event_dates[no_end_time]" {{if !isset( $value['end_time'] ) OR !$value['end_time']}}checked{{endif}} value="1" id="check_no_end_time" class="ipsInput ipsInput--toggle">
{lang="no_end_time"}
</label>
</li>
@@ -1503,7 +1503,7 @@
<p><span data-role='dateSummary'></span></p>
<p id='elRepeatRow_hidden' class="i-margin-top_1">
<label class="i-flex i-align-items_center i-gap_1">
<input type='checkbox' role='checkbox' name='event_dates[event_repeat]' value='1' id="elRepeatCb" {{if isset($value['event_repeat']) AND $value['event_repeat']}}checked aria-checked='true'{{endif}} class="ipsInput ipsInput--toggle">
<input type='checkbox' role='checkbox' name='event_dates[event_repeat]' value='1' id="elRepeatCb" {{if isset($value['event_repeat']) AND $value['event_repeat']}}checked{{endif}} class="ipsInput ipsInput--toggle">
{lang="submit_event_repeats_check"}
</label>
</p>
@@ -1551,7 +1551,7 @@
<ul class='ipsFieldRow__content ipsFieldRow__content--checkboxes'>
{{foreach \IPS\calendar\Date::getDayNames() as $day }}
<li>
<input type="checkbox" role="checkbox" name="event_dates[repeat_freq_on_{$day['ical']}]" value="1" id="check_repeat_freq_on_{$day['ical']}" data-iCal='{$day['ical']}' {{if ( isset( $value['repeat_freq_on_' . $day['ical'] ] ) AND $value['repeat_freq_on_' . $day['ical'] ] )}}checked aria-checked='true'{{endif}} class="ipsInput ipsInput--toggle">
<input type="checkbox" role="checkbox" name="event_dates[repeat_freq_on_{$day['ical']}]" value="1" id="check_repeat_freq_on_{$day['ical']}" data-iCal='{$day['ical']}' {{if ( isset( $value['repeat_freq_on_' . $day['ical'] ] ) AND $value['repeat_freq_on_' . $day['ical'] ] )}}checked{{endif}} class="ipsInput ipsInput--toggle">
<label for="check_repeat_freq_on_{$day['ical']}">{$day['abbreviated']}</label>
</li>
{{endforeach}}
+3 -1
View File
@@ -275,5 +275,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -0,0 +1,22 @@
{
"id": 5000027,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": true,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,19 @@
{
"html": {
"added": [],
"edited": [
"front\/submit\/datesForm"
],
"removed": []
},
"css": {
"added": [],
"edited": [],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,22 @@
{
"id": 5000028,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
+13 -6
View File
@@ -390,12 +390,19 @@ class Application extends SystemApplication
continue;
}
$block = Widget::load( $this, 'RecordFeed' . $db->id, mt_rand(), array(), $widget['restrict'] );
$block->allowReuse = (boolean) $widget['allow_reuse'];
$block->menuStyle = $widget['menu_style'];
$block->allowCustomPadding = (bool) $widget['padding'];
$block->layouts = $block->getSupportedLayouts();
$blocks[] = $block;
try
{
$block = Widget::load( $this, 'RecordFeed' . $db->id, mt_rand(), array(), $widget['restrict'] );
$block->allowReuse = (boolean)$widget['allow_reuse'];
$block->menuStyle = $widget['menu_style'];
$block->allowCustomPadding = (bool)$widget['padding'];
$block->layouts = $block->getSupportedLayouts();
$blocks[] = $block;
}
catch ( Exception $e )
{
continue;
}
}
}
+9 -2
View File
@@ -110,7 +110,6 @@ class comments extends CommentController
{
throw new OutOfRangeException;
}
$this->class = 'IPS\cms\Records\Comment' . $database->id;
}
catch ( OutOfRangeException $e )
{
@@ -220,6 +219,14 @@ class comments extends CommentController
{
throw new Exception( 'INVALID_ID', '2T311/5', 403 );
}
if( $record->useForumComments() )
{
$this->class = 'IPS\cms\Records\CommentTopicSync' . $database->id;
}
else
{
$this->class = 'IPS\cms\Records\Comment' . $database->id;
}
/* Get author */
if ( $this->member )
@@ -242,7 +249,7 @@ class comments extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -281,7 +281,7 @@ class records extends ItemController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -247,7 +247,7 @@ class reviews extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+2 -2
View File
@@ -1463,7 +1463,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
&nbsp;
{lang="or"}
&nbsp;
<input type="checkbox" role='checkbox' data-control="unlimited{{if $input->toggles AND \count( $input->toggles )}} toggle{{endif}}" name="{$input->name}_unlimited" id='{$input->name}_unlimited' value="{$input->options['unlimited']}" {{if $input->options['unlimited'] === $input->value}}checked aria-checked='true'{{endif}} {{if $input->options['disabled']}}disabled{{endif}} {{if $input->toggles AND \count( $input->toggles )}}{{if $input->toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $input->toggles )"}"{{endif}} aria-labelledby='label_{$input->name}_unlimited' class="ipsInput ipsInput--toggle">
<input type="checkbox" role='checkbox' data-control="unlimited{{if $input->toggles AND \count( $input->toggles )}} toggle{{endif}}" name="{$input->name}_unlimited" id='{$input->name}_unlimited' value="{$input->options['unlimited']}" {{if $input->options['unlimited'] === $input->value}}checked{{endif}} {{if $input->options['disabled']}}disabled{{endif}} {{if $input->toggles AND \count( $input->toggles )}}{{if $input->toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $input->toggles )"}"{{endif}} aria-labelledby='label_{$input->name}_unlimited' class="ipsInput ipsInput--toggle">
<label for='{$input->name}_unlimited' id='label_{$input->name}_unlimited' class='ipsField_unlimited'>{lang="never"}</label>
{{endif}}
</li>
@@ -1616,7 +1616,7 @@ data-view-tracking-data="{expression="base64_encode(json_encode( $review->getVie
&nbsp;
{lang="or"}
&nbsp;
<input type="checkbox" role='checkbox' data-control="unlimited{{if \count( $input->toggles )}} toggle{{endif}}" name="{$input->name}_unlimited" id='{$input->name}_unlimited' value="{$input->options['unlimited']}" {{if $input->options['unlimited'] === $input->value}}checked aria-checked='true'{{endif}} {{if $input->options['disabled']}}disabled{{endif}} {{if \count( $input->toggles )}}{{if $input->toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $input->toggles )"}"{{endif}} aria-labelledby='label_{$input->name}_unlimited' class="ipsInput ipsInput--toggle">
<input type="checkbox" role='checkbox' data-control="unlimited{{if \count( $input->toggles )}} toggle{{endif}}" name="{$input->name}_unlimited" id='{$input->name}_unlimited' value="{$input->options['unlimited']}" {{if $input->options['unlimited'] === $input->value}}checked{{endif}} {{if $input->options['disabled']}}disabled{{endif}} {{if \count( $input->toggles )}}{{if $input->toggleOn === FALSE}}data-togglesOff{{else}}data-togglesOn{{endif}}="{expression="implode( ',', $input->toggles )"}"{{endif}} aria-labelledby='label_{$input->name}_unlimited' class="ipsInput ipsInput--toggle">
<label for='{$input->name}_unlimited' id='label_{$input->name}_unlimited' class='ipsField_unlimited'>{lang="never"}</label>
{{endif}}
</li>
+19 -19
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="cms">
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/blocks" javascript_name="ips.blocks.form.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -67,7 +67,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/*
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/blocks" javascript_name="ips.blocks.navigation.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050"><![CDATA[/*
+--------------------------------------------------------------------------
|
| =============================================
@@ -112,7 +112,7 @@
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.download.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -157,7 +157,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/databases" javascript_name="ips.databases.form.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -233,7 +233,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150"><![CDATA[/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/external" javascript_name="ips.external.communication.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -368,7 +368,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000200"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/fields" javascript_name="ips.fields.form.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000200"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -431,7 +431,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000300"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/media" javascript_name="ips.media.main.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000300"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1071,7 +1071,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000250"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.embed.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1106,7 +1106,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000250"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/pages" javascript_name="ips.pages.form.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000250"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1228,7 +1228,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.form.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1340,7 +1340,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100">/**
<file javascript_app="cms" javascript_location="front" javascript_path="controllers/records" javascript_name="ips.records.revisions.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1395,7 +1395,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.addForm.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1445,7 +1445,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.conflict.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -1517,7 +1517,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileEditor.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2478,7 +2478,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.fileList.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2770,7 +2770,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050"><![CDATA[/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.main.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2939,7 +2939,7 @@
});
}(jQuery, _));]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
<file javascript_app="cms" javascript_location="admin" javascript_path="controllers/templates" javascript_name="ips.templates.variablesDialog.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -2984,7 +2984,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000026" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.media.js" javascript_type="template" javascript_version="5000028" javascript_position="1000050"><![CDATA[ips.templates.set( 'templates.media.grid', "\
<ul class='ipsGrid ipsGrid--pages-media'>\
{{{contents}}}\
</ul>\
@@ -3001,7 +3001,7 @@ ips.templates.set( 'templates.media.noSearchResults', "\
{{#lang}}mediaNoResults{{/lang}}\
</div>\
");]]></file>
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000026" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
<file javascript_app="cms" javascript_location="admin" javascript_path="templates" javascript_name="ips.templates.templates.js" javascript_type="template" javascript_version="5000028" javascript_position="1000050"><![CDATA[/* TEMPLATE EDITOR TEMPLATES */
/* TEMPLATECEPTION */
ips.templates.set('templates.editor.newTab', " \
<li data-fileid='{{fileid}}' data-location='{{location}}'>\
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="cms" version="5000026">
<app key="cms" version="5000028">
<word key="__app_cms" js="0">Pages</word>
<word key="menutab__cms" js="0">Pages</word>
<word key="menutab__cms_icon" js="0">file</word>
+3 -1
View File
@@ -593,5 +593,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -416,6 +416,9 @@ class databases extends Controller
{
$name = NULL;
$desc = NULL;
$displaySettings = [
'index' => [ 'type' => 'categories', 'layout' => 'table' ]
];
if ( $xml->name == 'data' )
{
@@ -423,26 +426,60 @@ class databases extends Controller
$node = new SimpleXMLElement( $xml->readOuterXML() );
foreach( $node->attributes() as $k => $v )
{
$database->$k = (string) $v;
switch( $k )
{
case 'template_listing':
$displaySettings['listing'] = ( $v == 'listing' ) ? [ 'layout' => 'table', 'template' => null ] : [ 'layout' => 'custom', 'template' => (string) $v ];
break;
case 'template_display':
$displaySettings['display'] = [ 'layout' => 'custom', 'template' => (string) $v ];
break;
case 'template_form':
$displaySettings['form'] = [ 'layout' => 'custom', 'template' => (string) $v ];
break;
case 'template_categories':
$displaySettings['categories'] = ( $v == 'category_index' ) ? [ 'layout' => 'table', 'template' => null ] : [ 'layout' => 'custom', 'template' => (string) $v ];
break;
case 'template_featured':
break;
case 'cat_index_type':
if( $v )
{
$displaySettings['index'] = [ 'type' => 'all', 'layout' => 'grid' ];
}
break;
default:
$database->$k = (string) $v;
break;
}
}
/* Any kids of your own? */
foreach( $node->children() as $k => $v )
{
if ( $k === 'name' )
switch( $k )
{
$name = $v;
}
else if ( $k === 'description' )
{
$desc = $v;
}
else
{
$tryJson = json_decode( $v, TRUE );
$database->$k = ( $tryJson ) ?: (string) $v;
case 'name':
$name = $v;
break;
case 'description':
$desc = $v;
break;
case 'featured_settings':
$json = json_decode( $v, true );
if( isset( $json['featured'] ) and $json['featured'] )
{
$displaySettings['index']['type'] = 'featured';
}
break;
default:
$tryJson = json_decode( $v, TRUE );
$database->$k = ( $tryJson ) ?: (string) $v;
break;
}
}
$database->display_settings = $displaySettings;
Lang::saveCustom( 'cms', "content_db_" . $database->id, $name );
Lang::saveCustom( 'cms', "content_db_" . $database->id . '_desc', $desc );
@@ -650,8 +687,18 @@ class databases extends Controller
}
else
{
$attrs[ $k ] = ( $k == 'category_parent_id' ) ? (int) $v : (string) $v;
switch( $k )
{
case 'category_parent_id':
$attrs[ $k ] = (int) $v;
break;
case 'category_club_id': // always null because the club itself is not imported here
$attrs[ $k ] = null;
break;
default:
$attrs[ $k ] = (string) $v;
break;
}
}
}
@@ -697,6 +744,13 @@ class databases extends Controller
}
}
}
/* If the database does not have a default category yet, assign one */
if( !$database->use_categories and !$database->default_category )
{
$database->default_category = $category->id;
$database->save();
}
$cat_map = Store::i()->db_import_cat_map;
$parent_map = Store::i()->db_import_cat_parent_map;
@@ -809,7 +863,7 @@ class databases extends Controller
/* Done */
$data['next'] = $next;
return array( $data, Member::loggedIn()->language()->addToStack('cms_db_import_progress', FALSE, array( 'sprintf' => array( ucfirst( $data['next'] ) ) ) ) );
return array( $data, Member::loggedIn()->language()->addToStack('cms_db_import_progress', FALSE, array( 'sprintf' => array( ucfirst( $data['next'] ?? '' ) ) ) ) );
}
else
{
@@ -993,7 +1047,7 @@ class databases extends Controller
if ( array_key_exists( $k, $fieldSchema['columns'] ) AND ! in_array( $k, $removeFields ) AND ! in_array( $k, $textFields ) )
{
$xml->startAttribute( $k );
$xml->text( $v );
$xml->text( $v ?? '' );
$xml->endAttribute();
}
}
@@ -1040,7 +1094,7 @@ class databases extends Controller
if ( array_key_exists( $k, $categorySchema['columns'] ) AND ! in_array( $k, $removeFields ) AND ! in_array( $k, $textFields ) )
{
$xml->startAttribute( $k );
$xml->text( $v );
$xml->text( $v ?? '' );
$xml->endAttribute();
}
}
@@ -25,6 +25,7 @@ use IPS\Helpers\Form\Node;
use IPS\Helpers\Form\Upload;
use IPS\Helpers\Tree\Tree;
use IPS\Http\Url;
use IPS\Image;
use IPS\Member;
use IPS\Node\Controller;
use IPS\Output;
@@ -332,8 +333,10 @@ class media extends Controller
{
$form = new Form( 'form', 'upload' );
$form->class = 'ipsForm--vertical ipsForm--upload-items ipsForm_noLabels';
$form->add( new Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_merge( File::$safeFileExtensions, static::$additionalAllowedMediaFileTypes ), 'obscure' => FALSE, 'storageExtension' => 'cms_Media', 'storageContainer' => 'pages_media', 'multiple' => true, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
$extensions = array_merge( File::$safeFileExtensions, static::$additionalAllowedMediaFileTypes, Image::supportedExtensions() );
sort( $extensions );
$form->add( new Upload( 'media_filename', NULL, FALSE, array( 'allowedFileTypes' => array_values( array_unique( $extensions ) ), 'obscure' => FALSE, 'storageExtension' => 'cms_Media', 'storageContainer' => 'pages_media', 'multiple' => true, 'minimize' => FALSE ), NULL, NULL, NULL, 'media_filename' ) );
if ( ! isset( Request::i()->media_parent ) and ! Request::i()->media_parent )
{
@@ -0,0 +1,22 @@
{
"id": 5000027,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,22 @@
{
"id": 5000028,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -1663,7 +1663,7 @@ class Categories extends Model implements Permissions
*/
public function get_display_settings() : ?array
{
if( $data = json_decode( $this->template_listing, true ) )
if( $this->template_listing and $data = json_decode( $this->template_listing, true ) )
{
return $data;
}
+1 -1
View File
@@ -1654,7 +1654,7 @@ class Fields extends CustomField implements Permissions
}
}
return $value;
return $value ?? '';
}
+10 -7
View File
@@ -42,9 +42,7 @@ use IPS\Helpers\Form\Translatable;
use IPS\Helpers\Form\YesNo;
use IPS\Http\Url;
use IPS\Http\Url\Friendly;
use IPS\IPS;
use IPS\Lang;
use IPS\Log;
use IPS\Member;
use IPS\Member\Group;
use IPS\Node\Model;
@@ -55,7 +53,6 @@ use IPS\Request;
use IPS\Settings;
use IPS\Task;
use IPS\Theme;
use IPS\Widget;
use IPS\Widget\Area;
use LogicException;
use OutOfBoundsException;
@@ -670,7 +667,7 @@ class Page extends Model implements Permissions
try
{
$test = Db::i()->select( '*', 'cms_pages', [ 'page_seo_name=? and page_id <> ? and page_folder_id=?', $val, ( $item ? (int) $item->_id : 0 ), Request::i()->page_folder_id ] )->first();
$test = Db::i()->select( '*', 'cms_pages', [ 'page_seo_name=? and page_id <> ? and page_folder_id=?', $val, ( (int)$item?->_id ), Request::i()->page_folder_id ] )->first();
throw new InvalidArgumentException( 'content_page_file_name_in_use' );
}
catch( UnderflowException )
@@ -695,6 +692,7 @@ class Page extends Model implements Permissions
$wrapperTemplates = array( '_none_' => Member::loggedIn()->language()->addToStack('cms_page_wrapper_template_none') );
foreach( Templates::getTemplates( Templates::RETURN_PAGE + Templates::RETURN_DATABASE_AND_IN_DEV ) as $id => $obj )
{
/* @var Templates $obj */
if ( $obj->isSuitableForCustomWrapper() )
{
$wrapperTemplates[ Templates::readableGroupName( $obj->group ) ][ $obj->group . '__' . $obj->title . '__' . $obj->key ] = Templates::readableGroupName( $obj->title );
@@ -702,9 +700,14 @@ class Page extends Model implements Permissions
}
/* List of templates */
$return['page_wrapper_template'] = new Select( 'page_wrapper_template', ($item?->wrapper_template), FALSE, array(
$return['page_wrapper_template'] = new Select( 'page_wrapper_template', ($item?->wrapper_template), null, array(
'options' => $wrapperTemplates
), NULL, NULL, Theme::i()->getTemplate( 'pages', 'cms', 'admin' )->previewTemplateLink(), 'page_wrapper_template' );
), function( $val ){
if( $val == '_none_' and !Request::i()->page_ipb_wrapper )
{
throw new InvalidArgumentException('form_required');
}
}, NULL, Theme::i()->getTemplate( 'pages', 'cms', 'admin' )->previewTemplateLink(), 'page_wrapper_template' );
if ( count( Theme::themes() ) > 1 )
{
@@ -1609,7 +1612,7 @@ class Page extends Model implements Permissions
$this->storeUrl();
}
$values['page_meta_image'] = ( $values['page_meta_image'] instanceof File ) ? (string) $values['page_meta_image'] : null;
$values['page_meta_image'] = ( isset( $values['page_meta_image'] ) and $values['page_meta_image'] instanceof File ) ? (string) $values['page_meta_image'] : null;
/* Menu stuffs */
if ( isset( $values['page_add_to_menu'] ) )
+1 -2
View File
@@ -3811,8 +3811,7 @@ class Records extends Item implements
*/
function getTopicContent(): mixed
{
$column = 'field_' . static::database()->field_content;
return $this->$column;
return Theme::i()->getTemplate( 'submit', 'cms', 'front' )->topic( $this );
}
/**
@@ -243,35 +243,29 @@ class Templates extends ActiveRecord
return $templates[ $id ];
}
}
try
{
return parent::load( $id, $idField, $extraWhereClause );
}
catch( OutOfRangeException $ex )
{
throw $ex;
}
return parent::load( $id, $idField, $extraWhereClause );
}
/**
* Make a group_name readable (Group Name)
*
* @param string $name Group name from the database
* @param string|null $name Group name from the database
* @return string
*/
public static function readableGroupName( string $name ) : string
public static function readableGroupName( ?string $name ) : string
{
if ( $name === 'js' )
switch( $name )
{
return 'JS';
case null:
return '';
case 'js':
return 'JS';
case 'css':
return 'CSS';
default:
return ucwords( str_replace( array( '-', '_' ), ' ', $name ) );
}
else if ( $name === 'css' )
{
return 'CSS';
}
return ucwords( str_replace( array( '-', '_' ), ' ', $name ) );
}
/**
+8
View File
@@ -26,6 +26,7 @@ use IPS\Member;
use IPS\Request;
use IPS\Settings;
use IPS\Theme;
use IPS\Widget\Polymorphic;
use OutOfRangeException;
use function count;
use function defined;
@@ -44,7 +45,14 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
* RecordFeed Widget
*/
class RecordFeed extends Widget
implements Polymorphic
{
public static function getBaseKey(): string
{
return "RecordFeed";
}
/**
* @brief Widget Key
*/
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="convert">
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/convert" javascript_name="ips.convert.menu.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100">/**
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/convert" javascript_name="ips.convert.menu.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -45,7 +45,7 @@
}
} );
}(jQuery, _));</file>
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/forms" javascript_name="ips.forms.reactionmapper.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
<file javascript_app="convert" javascript_location="admin" javascript_path="controllers/forms" javascript_name="ips.forms.reactionmapper.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="convert" version="5000026">
<app key="convert" version="5000028">
<word key="__app_convert" js="0">Converter</word>
<word key="menu__convert_manage" js="0">Conversions</word>
<word key="menu__convert_manage_manage_start" js="0">Start New Conversion</word>
+3 -1
View File
@@ -275,5 +275,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -0,0 +1,22 @@
{
"id": 5000027,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,22 @@
{
"id": 5000028,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": false,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
-1
View File
@@ -197,7 +197,6 @@
<setting key="embed_url_filter_any_action"><![CDATA[{"key":"embed_url_filter_any_action","default":"allow","report":"none"}]]></setting>
<setting key="emoji_cache"><![CDATA[{"key":"emoji_cache","default":"1","report":"none"}]]></setting>
<setting key="emoji_shortcodes"><![CDATA[{"key":"emoji_shortcodes","default":"1","report":"full"}]]></setting>
<setting key="emoji_style"><![CDATA[{"key":"emoji_style","default":"native","report":"full"}]]></setting>
<setting key="error_log"><![CDATA[{"key":"error_log","default":"1","report":"none"}]]></setting>
<setting key="error_log_level"><![CDATA[{"key":"error_log_level","default":"3","report":"full"}]]></setting>
<setting key="error_notify"><![CDATA[{"key":"error_notify","default":"","report":"full"}]]></setting>
@@ -36,7 +36,7 @@ class {class} extends FormsAbstract
*/
public static function formType() : string
{
return '{formType}';
return {formType};
}
/**
@@ -27,7 +27,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
}
/**
* Member Listener
* Content Listener
*/
class {filename} extends ContentListenerType
{
@@ -24,7 +24,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
}
/**
* Member Listener
* Node Listener
*/
class {filename} extends NodeListenerType
{
+1 -1
View File
@@ -45,7 +45,7 @@
"isDynamicEntry": true
},
"src/main.jsx": {
"file": "assets/main-CkrLsobl.js",
"file": "assets/main-C7yyeubP.js",
"name": "main",
"src": "src/main.jsx",
"isEntry": true,
File diff suppressed because it is too large. Load diff
+10 -13
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="core" version="5000026">
<app key="core" version="5000028">
<word key="__app_core" js="0">System</word>
<word key="__indefart_personal_conversation" js="0">a personal conversation</word>
<word key="__indefart_personal_conversation_message" js="0">a message in a personal conversation</word>
@@ -8337,6 +8337,7 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
<word key="right_to_be_forgotten_type" js="0">Allow members to request their account deletion.</word>
<word key="pii_external" js="0">Link to an external URL</word>
<word key="right_to_be_forgotten_external" js="0">Link to an external URL</word>
<word key="notification_account_del_request_rejected" js="0">Account Deletion Rejections</word>
<word key="ext__Statistics" js="0">Extension to generate charts for statistics</word>
<word key="menu__core_overview_mycharts" js="0">My Saved Charts</word>
<word key="mycharts_blurb" js="0"><![CDATA[You do not have any charts saved currently.<br><br>Once you save a chart with your desired filter settings, they will all show here for quick and easy access.]]></word>
@@ -8401,6 +8402,11 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
<word key="theme_editor_size_medium" js="0">Medium (tablet)</word>
<word key="theme_editor_size_large" js="0">Large (desktop)</word>
<word key="theme_editor_custom_css" js="0">Custom CSS</word>
<word key="theme_editor_custom_css_done" js="0">Done</word>
<word key="theme_editor_custom_css_revert" js="0">Revert</word>
<word key="theme_editor_lightness" js="0">Lightness</word>
<word key="theme_editor_chroma" js="0">Chroma</word>
<word key="theme_editor_hue" js="0">Hue</word>
<word key="theme_editor_close" js="0">Close editor</word>
<word key="theme_editor_exit" js="0">Exit</word>
<word key="theme_editor_save" js="0">Save settings</word>
@@ -8479,6 +8485,9 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
<word key="err__duplicate_cat_key" js="0">Duplicate Category Key</word>
<word key="err__duplicate_setting_key" js="0">Duplicate Setting Key</word>
<word key="dev_themeeditor_export_none" js="0">There are no Theme Editor categories or settings available for export.</word>
<word key="theme_light_mode" js="0">Light Mode</word>
<word key="theme_dark_mode" js="0">Dark Mode</word>
<word key="theme_system" js="0">System Preference</word>
<word key="login_handlers" js="0">Methods</word>
<word key="login_handler" js="0">Handler</word>
<word key="login_details" js="0">Details</word>
@@ -11083,7 +11092,6 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
<word key="editor" js="0">Editor</word>
<word key="editor_close_preview" js="0">Return to editing mode</word>
<word key="parseError_URL_NOT_ALLOWED" js="0">The following URL is not allowed: %s</word>
<word key="standard_emoji" js="0">Standard Emoji</word>
<word key="custom_emoji" js="0">Custom Emoji</word>
<word key="emoticon_hd" js="0">High definition version used when supported</word>
<word key="emoticons_add" js="0">Add Custom Emoji</word>
@@ -11104,17 +11112,6 @@ In PHP8, altering overloaded method signatures within a subclass results in a fa
<word key="acplog__emoticons_edited" js="0">Edited custom emoji</word>
<word key="acplog__emoticon_deleted" js="0">Deleted a custom emoji</word>
<word key="emoticon_invalid" js="0">URL %s is invalid. Reupload.</word>
<word key="emoji_style" js="0">Emoji Style</word>
<word key="emoji_style_desc" js="0">Regardless of option chosen, users will still be able to enter emoji using their device's emoji keyboard, which will display in native style. Non-native styles will not show in areas which show text only such as activity streams and search results.</word>
<word key="emoji_style_native" js="0">Native</word>
<word key="emoji_style_native_desc" js="0">The style provided by the user's device. Users on older platforms may not see emoji.</word>
<word key="emoji_style_twemoji" js="0"><![CDATA[Twitter Style <div class='i-font-size_2 i-margin-top_1'><img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f600.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f609.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f602.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f60d.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f918.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f926-200d-2640-fe0f.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f937-200d-2642-fe0f.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f37f.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f680.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f389.png' class='ipsEmoji' alt=''> <img src='https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/72x72/1f3f3-fe0f-200d-1f308.png' class='ipsEmoji' alt=''></div>]]></word>
<word key="emoji_style_twemoji_desc" js="0">Will show consistently on all devices.</word>
<word key="emoji_style_disabled" js="0">Do not show standard emoji</word>
<word key="emoji_utf8mb4_required" js="0"><![CDATA[To enable standard emoji support, you must <a href='{internal.app=core&module=support&controller=utf8mb4}' target='_blank' rel='noopener'>convert your database to 4-Byte UTF-8 Encoding</a>.]]></word>
<word key="emoji_utf8mb4_required_cic" js="0"><![CDATA[To enable standard Emoji support, please <a href='{internal.admin.app=core&module=support&controller=support}'>contact support</a>]]></word>
<word key="emoji_shortcodes" js="0">Replace :short_codes: with emoji?</word>
<word key="emoji_shortcodes_desc" js="0"><![CDATA[<mark>:smiley:</mark> <mark>:wink:</mark> <mark>:joy:</mark> <mark>:heart_eyes:</mark> <mark>:the_horns:</mark> <mark>:woman-facepalming:</mark> <mark>:man-shrugging:</mark> <mark>:popcorn:</mark> <mark>:rocket:</mark> <mark>:tada:</mark> <mark>:rainbow-flag:</mark><br>As the user types, suggestions will appear. Any custom emoji you have set up with text starting and ending with : will be included.]]></word>
<word key="acplog__emoticon_set_deleted" js="0">Emoji set deleted</word>
<word key="menu__core_stats_warnings" js="0">Warnings</word>
<word key="stats_warnings_title" js="0">Warnings over time</word>
-5
View File
@@ -619,11 +619,6 @@
"default": "1",
"report": "full"
},
{
"key": "emoji_style",
"default": "native",
"report": "full"
},
{
"key": "error_log",
"default": "1",
File diff suppressed because it is too large. Load diff
+3 -1
View File
@@ -275,5 +275,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -80,7 +80,7 @@ class GroupSettings extends GroupFormAbstract
$color = NULL;
if ( preg_match( '/^<span style=\'color:#((?:(?:[a-f0-9]{3})|(?:[a-f0-9]{6})))\'>$/i', $element->value['prefix'], $matches ) and $element->value['suffix'] === '</span>' )
{
$color = $matches[1];
$color = '#' . $matches[1];
$element->value['prefix'] = NULL;
$element->value['suffix'] = NULL;
}
@@ -89,7 +89,7 @@ class GroupSettings extends GroupFormAbstract
},
'formatValue' => function( $element )
{
if ( isset( $element->value['prefix'] ) or isset( $element->value['suffix'] ) )
if ( !empty( $element->value['prefix'] ) or !empty( $element->value['suffix'] ) )
{
return array( 'prefix' => $element->value['prefix'], 'suffix' => $element->value['suffix'] );
}
@@ -100,7 +100,7 @@ class GroupSettings extends GroupFormAbstract
{
$color = '#' . $color;
}
if( !in_array( $color, array( '#fff', '#ffffff', '#000', '#000000' ) ) )
{
return array( 'prefix' => "<span style='color:{$color}'>", 'suffix' => '</span>' );
@@ -40,7 +40,7 @@ class Dnames extends IpAddressesAbstract
*/
public function pruneIpAddresses( int $time ) : void
{
Db::i()->update('core_member_history', [ 'log_ip_address=?', '' ] , [ 'log_ip_address != "" AND log_type=? AND log_date <?', 'display_name', $time ] );
Db::i()->update('core_member_history', [ 'log_ip_address' => '' ] , [ 'log_ip_address != ? AND log_type=? AND log_date <?', '', 'display_name', $time ] );
}
/**
@@ -1247,6 +1247,7 @@ customElements.define('theme-editor', class extends HTMLElement {
* @param {HTMLElement} target
*/
closeEditor(e, target){
ips.utils.cookie.set('themeEditorLocation', document.getElementById('themeEditorIframe').contentDocument.location );
if(this.unsavedChanges){
e.preventDefault();
// Clicking the toggle instead of using showModal() ensures the hidden/aria attributes are updated correctly
@@ -0,0 +1,207 @@
var Wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function om(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yO={exports:{}},am={},CO={exports:{}},Ge={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Eu=Symbol.for("react.element"),PU=Symbol.for("react.portal"),UU=Symbol.for("react.fragment"),FU=Symbol.for("react.strict_mode"),BU=Symbol.for("react.profiler"),GU=Symbol.for("react.provider"),YU=Symbol.for("react.context"),HU=Symbol.for("react.forward_ref"),$U=Symbol.for("react.suspense"),VU=Symbol.for("react.memo"),zU=Symbol.for("react.lazy"),$C=Symbol.iterator;function WU(e){return e===null||typeof e!="object"?null:(e=$C&&e[$C]||e["@@iterator"],typeof e=="function"?e:null)}var RO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},NO=Object.assign,vO={};function ul(e,t,n){this.props=e,this.context=t,this.refs=vO,this.updater=n||RO}ul.prototype.isReactComponent={};ul.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ul.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function OO(){}OO.prototype=ul.prototype;function cS(e,t,n){this.props=e,this.context=t,this.refs=vO,this.updater=n||RO}var uS=cS.prototype=new OO;uS.constructor=cS;NO(uS,ul.prototype);uS.isPureReactComponent=!0;var VC=Array.isArray,AO=Object.prototype.hasOwnProperty,dS={current:null},IO={key:!0,ref:!0,__self:!0,__source:!0};function DO(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)AO.call(t,r)&&!IO.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var c=Array(s),d=0;d<s;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Eu,type:e,key:o,ref:a,props:i,_owner:dS.current}}function qU(e,t){return{$$typeof:Eu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function pS(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eu}function KU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var zC=/\/+/g;function dg(e,t){return typeof e=="object"&&e!==null&&e.key!=null?KU(""+e.key):t.toString(36)}function Ep(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Eu:case PU:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+dg(a,0):r,VC(i)?(n="",e!=null&&(n=e.replace(zC,"$&/")+"/"),Ep(i,t,n,"",function(d){return d})):i!=null&&(pS(i)&&(i=qU(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(zC,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",VC(e))for(var s=0;s<e.length;s++){o=e[s];var c=r+dg(o,s);a+=Ep(o,t,n,c,i)}else if(c=WU(e),typeof c=="function")for(e=c.call(e),s=0;!(o=e.next()).done;)o=o.value,c=r+dg(o,s++),a+=Ep(o,t,n,c,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Ad(e,t,n){if(e==null)return e;var r=[],i=0;return Ep(e,r,"","",function(o){return t.call(n,o,i++)}),r}function QU(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var In={current:null},hp={transition:null},XU={ReactCurrentDispatcher:In,ReactCurrentBatchConfig:hp,ReactCurrentOwner:dS};function wO(){throw Error("act(...) is not supported in production builds of React.")}Ge.Children={map:Ad,forEach:function(e,t,n){Ad(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ad(e,function(){t++}),t},toArray:function(e){return Ad(e,function(t){return t})||[]},only:function(e){if(!pS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ge.Component=ul;Ge.Fragment=UU;Ge.Profiler=BU;Ge.PureComponent=cS;Ge.StrictMode=FU;Ge.Suspense=$U;Ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XU;Ge.act=wO;Ge.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=NO({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=dS.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)AO.call(t,c)&&!IO.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&s!==void 0?s[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){s=Array(c);for(var d=0;d<c;d++)s[d]=arguments[d+2];r.children=s}return{$$typeof:Eu,type:e.type,key:i,ref:o,props:r,_owner:a}};Ge.createContext=function(e){return e={$$typeof:YU,_currentValue:e,_currentValue2:e,_threadCountLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var jU=B,ZU=Symbol.for("react.element"),JU=Symbol.for("react.fragment"),eF=Object.prototype.hasOwnProperty,tF=jU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nF={key:!0,ref:!0,__self:!0,__source:!0};function xO(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)eF.call(t,r)&&!nF.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:ZU,type:e,key:o,ref:a,props:i,_owner:tF.current}}am.Fragment=JU;am.jsx=xO;am.jsxs=xO;yO.exports=am;var N=yO.exports,AE={},MO={exports:{}},ur={},LO={exports:{}},kO={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(I,Y){var $=I.length;I.push(Y);e:for(;0<$;){var Z=$-1>>>1,oe=I[Z];if(0<i(oe,Y))I[Z]=Y,I[$]=oe,$=Z;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var Y=I[0],$=I.pop();if($!==Y){I[0]=$;e:for(var Z=0,oe=I.length,Oe=oe>>>1;Z<Oe;){var ze=2*(Z+1)-1,be=I[ze],Ce=ze+1,yt=I[Ce];if(0>i(be,$))Ce<oe&&0>i(yt,be)?(I[Z]=yt,I[Ce]=$,Z=Ce):(I[Z]=be,I[ze]=$,Z=ze);else if(Ce<oe&&0>i(yt,$))I[Z]=yt,I[Ce]=$,Z=Ce;else break e}}return Y}function i(I,Y){var $=I.sortIndex-Y.sortIndex;return $!==0?$:I.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var c=[],d=[],p=1,_=null,f=3,g=!1,E=!1,T=!1,b=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(I){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=I)r(d),Y.sortIndex=Y.expirationTime,t(c,Y);else break;Y=n(d)}}function A(I){if(T=!1,R(I),!E)if(n(c)!==null)E=!0,ae(D);else{var Y=n(d);Y!==null&&x(A,Y.startTime-I)}}function D(I,Y){E=!1,T&&(T=!1,S(z),z=-1),g=!0;var $=f;try{for(R(Y),_=n(c);_!==null&&(!(_.expirationTime>Y)||I&&!le());){var Z=_.callback;if(typeof Z=="function"){_.callback=null,f=_.priorityLevel;var oe=Z(_.expirationTime<=Y);Y=e.unstable_now(),typeof oe=="function"?_.callback=oe:_===n(c)&&r(c),R(Y)}else r(c);_=n(c)}if(_!==null)var Oe=!0;else{var ze=n(d);ze!==null&&x(A,ze.startTime-Y),Oe=!1}return Oe}finally{_=null,f=$,g=!1}}var M=!1,k=null,z=-1,W=5,H=-1;function le(){return!(e.unstable_now()-H<W)}function _e(){if(k!==null){var I=e.unstable_now();H=I;var Y=!0;try{Y=k(!0,I)}finally{Y?he():(M=!1,k=null)}}else M=!1}var he;if(typeof y=="function")he=function(){y(_e)};else if(typeof MessageChannel<"u"){var Se=new MessageChannel,ge=Se.port2;Se.port1.onmessage=_e,he=function(){ge.postMessage(null)}}else he=function(){b(_e,0)};function ae(I){k=I,M||(M=!0,he())}function x(I,Y){z=b(function(){I(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){E||g||(E=!0,ae(D))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):W=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(I){switch(f){case 1:case 2:case 3:var Y=3;break;default:Y=f}var $=f;f=Y;try{return I()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,Y){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var $=f;f=I;try{return Y()}finally{f=$}},e.unstable_scheduleCallback=function(I,Y,$){var Z=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Z+$:Z):$=Z,I){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=$+oe,I={id:p++,callback:Y,priorityLevel:I,startTime:$,expirationTime:oe,sortIndex:-1},$>Z?(I.sortIndex=$,t(d,I),n(c)===null&&I===n(d)&&(T?(S(z),z=-1):T=!0,x(A,$-Z))):(I.sortIndex=oe,t(c,I),E||g||(E=!0,ae(D))),I},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(I){var Y=f;return function(){var $=f;f=Y;try{return I.apply(this,arguments)}finally{f=$}}}})(kO);LO.exports=kO;var rF=LO.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var iF=B,cr=rF;function ee(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var PO=new Set,Mc={};function Ha(e,t){Ks(e,t),Ks(e+"Capture",t)}function Ks(e,t){for(Mc[e]=t,e=0;e<t.length;e++)PO.add(t[e])}var Fi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),IE=Object.prototype.hasOwnProperty,oF=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,WC={},qC={};function aF(e){return IE.call(qC,e)?!0:IE.call(WC,e)?!1:oF.test(e)?qC[e]=!0:(WC[e]=!0,!1)}function sF(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lF(e,t,n,r){if(t===null||typeof t>"u"||sF(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Dn(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rn[e]=new Dn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rn[t]=new Dn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rn[e]=new Dn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rn[e]=new Dn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){rn[e]=new Dn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rn[e]=new Dn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rn[e]=new Dn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rn[e]=new Dn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rn[e]=new Dn(e,5,!1,e.toLowerCase(),null,!1,!1)});var _S=/[\-:]([a-z])/g;function mS(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_S,mS);rn[t]=new Dn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_S,mS);rn[t]=new Dn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_S,mS);rn[t]=new Dn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rn[e]=new Dn(e,1,!1,e.toLowerCase(),null,!1,!1)});rn.xlinkHref=new Dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rn[e]=new Dn(e,1,!1,e.toLowerCase(),null,!0,!0)});function fS(e,t,n,r){var i=rn.hasOwnProperty(t)?rn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!== Line truncated
`+pg+e}var _g=!1;function mg(e,t){if(!e||_g)return"";_g=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var c=`
`+i[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=s);break}}}finally{_g=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?sc(e):""}function cF(e){switch(e.tag){case 5:return sc(e.type);case 16:return sc("Lazy");case 13:return sc("Suspense");case 19:return sc("SuspenseList");case 0:case 2:case 15:return e=mg(e.type,!1),e;case 11:return e=mg(e.type.render,!1),e;case 1:return e=mg(e.type,!0),e;default:return""}}function ME(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ys:return"Fragment";case bs:return"Portal";case DE:return"Profiler";case gS:return"StrictMode";case wE:return"Suspense";case xE:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case FO:return(e.displayName||"Context")+".Consumer";case UO:return(e._context.displayName||"Context")+".Provider";case ES:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case hS:return t=e.displayName||null,t!==null?t:ME(e.type)||"Memo";case so:t=e._payload,e=e._init;try{return ME(e(t))}catch{}}return null}function uF(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ME(t);case 8:return t===gS?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Uo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function GO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dF(e){var t=GO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dd(e){e._valueTracker||(e._valueTracker=dF(e))}function YO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=GO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function LE(e,t){var n=t.checked;return bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function QC(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Uo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function HO(e,t){t=t.checked,t!=null&&fS(e,"checked",t,!1)}function kE(e,t){HO(e,t);var n=Uo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?PE(e,t.type,n):t.hasOwnProperty("defaultValue")&&PE(e,t.type,Uo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function XC(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function PE(e,t,n){(t!=="number"||Fp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var lc=Array.isArray;function ks(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Uo(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function UE(e,t){if(t.dan Line truncated
`).replace(bB,"")}function Fd(e,t,n){if(t=SR(t),SR(e)!==t&&n)throw Error(ee(425))}function Wp(){}var XE=null,jE=null;function ZE(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var JE=typeof setTimeout=="function"?setTimeout:void 0,yB=typeof clearTimeout=="function"?clearTimeout:void 0,TR=typeof Promise=="function"?Promise:void 0,CB=typeof queueMicrotask=="function"?queueMicrotask:typeof TR<"u"?function(e){return TR.resolve(null).then(e).catch(RB)}:JE;function RB(e){setTimeout(function(){throw e})}function Og(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Fc(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Fc(t)}function Io(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function bR(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var pl=Math.random().toString(36).slice(2),ci="__reactFiber$"+pl,$c="__reactProps$"+pl,Bi="__reactContainer$"+pl,eh="__reactEvents$"+pl,NB="__reactListeners$"+pl,vB="__reactHandles$"+pl;function fa(e){var t=e[ci];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Bi]||n[ci]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=bR(e);e!==null;){if(n=e[ci])return n;e=bR(e)}return t}e=n,n=e.parentNode}return null}function Tu(e){return e=e[ci]||e[Bi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ee(33))}function dm(e){return e[$c]||null}var th=[],Os=-1;function Vo(e){return{current:e}}function lt(e){0>Os||(e.current=th[Os],th[Os]=null,Os--)}function it(e,t){Os++,th[Os]=e.current,e.current=t}var Fo={},dn=Vo(Fo),Vn=Vo(!1),xa=Fo;function Qs(e,t){var n=e.type.contextTypes;if(!n)return Fo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function zn(e){return e=e.childContextTypes,e!=null}function qp(){lt(Vn),lt(dn)}function yR(e,t,n){if(dn.current!==Fo)throw Error(ee(168));it(dn,t),it(Vn,n)}function DA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ee(108,uF(e)||"Unknown",i));return bt({},n,r)}function Kp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fo,xa=dn.current,it(dn,e),it(Vn,Vn.current),!0}function CR(e,t,n){var r=e.stateNode;if(!r)throw Error(ee(169));n?(e=DA(e,t,xa),r.__reactInternalMemoizedMergedChildContext=e,lt(Vn),lt(dn),it(dn,e)):lt(Vn),it(Vn,n)}var wi=null,pm=!1,Ag=!1;function wA(e){wi===null?wi=[e]:wi.push(e)}function OB(e){pm=!0,wA(e)}function zo(){if(!Ag&&wi!==null){Ag=!0;var e=0,t=Xe;try{var n=wi;for(Xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wi=null,pm=!1}catch(i){throw wi!==null&&(wi=wi.slice(e+1)),nA(TS,zo),i}finally{Xe=t,Ag=!1}}return null}var As=[],Is=0,Qp=null,Xp=0,Nr=[],vr=0,Ma=null,Mi=1,Li="";function ca(e,t){As[Is++]=Xp,As[Is++]=Qp,Qp=e,Xp=t}function xA(e,t,n){Nr[vr++]=Mi,Nr[vr++]=Li,Nr[vr++]=Ma,Ma=e;var r=Mi;e=Li;var i=32-Wr(r)-1;r&=~(1<<i),n+=1;var o=32-Wr(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Mi=1<<32-Wr(t)+i|n<<i|r,Li=o+e}else Mi=1<<o|n<<i|r,Li=e}function IS(e){e.return!==null&&(ca(e,1),xA(e,1,0))}function DS(e){for(;e===Qp;)Qp=As[--Is],As[Is]=null,Xp=As[--Is],As[Is]=null;for(;e===Ma;)Ma=Nr[--vr],Nr[vr]=null,Li=Nr[--vr],Nr[vr]=null,Mi=Nr[--vr],Nr[vr]=null}var sr=null,ir=null,ft=!1,Hr=null;function MA(e,t){var n=Or(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function RR(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,sr=e,ir=Io(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,sr=e,ir=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ma!==null?{id:Mi,overflow:Li}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Or(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,sr=e,ir=null,!0):!1;default:return!1}}function nh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function rh(e){if(ft){var t=ir;if(t){var n=t;if(!RR(e,t)){if(nh(e))throw Error(ee(418));t=Io(n.nextSibling);var r=sr;t&&RR(e,t)?MA(r,n):(e.flags=e.flags&-4097|2,ft=!1,sr=e)}}else{if(nh(e))throw Error(ee(418));e.flags=e.flags&-4097|2,ft=!1,sr=e}}}function NR(e){ Line truncated
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Mg(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var PB=typeof WeakMap=="function"?WeakMap:Map;function aI(e,t,n){n=Pi(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){i_||(i_=!0,Eh=r),sh(e,t)},n}function sI(e,t,n){n=Pi(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){sh(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){sh(e,t),typeof r!="function"&&(wo===null?wo=new Set([this]):wo.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function MR(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new PB;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=XB.bind(null,e,t,n),t.then(e,e))}function LR(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function kR(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Pi(-1,1),t.tag=2,Do(n,t,1))),n.lanes|=1),e)}var UB=$i.ReactCurrentOwner,$n=!1;function yn(e,t,n,r){t.child=e===null?PA(t,null,n,r):js(t,e.child,n,r)}function PR(e,t,n,r,i){n=n.render;var o=t.ref;return Bs(t,i),r=YS(e,t,n,r,o,i),n=HS(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Yi(e,t,i)):(ft&&n&&IS(t),t.flags|=1,yn(e,t,r,i),t.child)}function UR(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!ZS(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,lI(e,t,o,r,i)):(e=Ap(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Gc,n(a,r)&&e.ref===t.ref)return Yi(e,t,i)}return t.flags|=1,e=Mo(o,r),e.ref=t.ref,e.return=t,t.child=e}function lI(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Gc(o,r)&&e.ref===t.ref)if($n=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&($n=!0);else return t.lanes=e.lanes,Yi(e,t,i)}return lh(e,t,n,r,i)}function cI(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(xs,nr),nr|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,it(xs,nr),nr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,it(xs,nr),nr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,it(xs,nr),nr|=r;return yn(e,t,i,n),t.child}function uI(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function lh(e,t,n,r,i){var o=zn(n)?xa:dn.current;return o=Qs(t,o),Bs(t,i),n=YS(e,t,n,r,o,i),r=HS(),e!==null&&!$n?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Yi(e,t,i)):(ft&&r&&IS(t),t.flags|=1,yn(e,t,n,i),t.child)}function FR(e,t,n,r,i){if(zn(n)){var o=!0;Kp(t)}else o=!1;if(Bs(t,i),t.stateNode===null)Np(e,t),oI(t,n,r),ah(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var c=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=wr(d):(d=zn(n)?xa:dn.current,d=Qs(t,d));var p=n.getDerivedStateFromProps,_=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function";_||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||c!==d)&&xR(t,a,r,d),lo=!1;var f=t.memoizedState;a.state=f,Jp(t,r,a,i),c=t.memoizedState,s!==r||f!==c||Vn.current||lo?(typeof p=="function"&&(oh(t,n,p,r),c=t.memoizedState),(s=lo||wR(t,n,s,r,f,c,d))?(_||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=d,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,FA(e,t),s=t.memoizedProps,d=t.type===t.elementType?s:Gr(t.type,s),a.props=d,_=t.pendingProps,f=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=wr(c):(c=zn(n)?xa:dn.current,c=Qs(t,c));var g=n.getDerivedStateFromProps;(p=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==_||f!==c)&&xR(t,a,r,c),lo=!1,f=t.memoizedState,a.state=f,Jp(t,r,a,i);var E=t.memoizedS Line truncated
`)}}Ua.empty=new Ua(!0);class _G{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function HI(e){let t=[];do t.push(mG(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function mG(e){let t=[];do t.push(fG(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function fG(e){let t=hG(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=gG(e,t);else break;return t}function JR(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gG(e,t){let n=JR(e),r=n;return e.eat(",")&&(e.next!="}"?r=JR(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function EG(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let a=n[o];a.groups.indexOf(t)>-1&&i.push(a)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function hG(e){if(e.eat("(")){let t=HI(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=EG(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function SG(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(a,s,c){let d={term:c,to:s};return t[a].push(d),d}function i(a,s){a.forEach(c=>c.to=s)}function o(a,s){if(a.type=="choice")return a.exprs.reduce((c,d)=>c.concat(o(d,s)),[]);if(a.type=="seq")for(let c=0;;c++){let d=o(a.exprs[c],s);if(c==a.exprs.length-1)return d;i(d,s=n())}else if(a.type=="star"){let c=n();return r(s,c),i(o(a.expr,c),c),[r(c)]}else if(a.type=="plus"){let c=n();return i(o(a.expr,s),c),i(o(a.expr,c),c),[r(c)]}else{if(a.type=="opt")return[r(s)].concat(o(a.expr,s));if(a.type=="range"){let c=s;for(let d=0;d<a.min;d++){let p=n();i(o(a.expr,c),p),c=p}if(a.max==-1)i(o(a.expr,c),c);else for(let d=a.min;d<a.max;d++){let p=n();r(c,p),i(o(a.expr,c),p),c=p}return[r(c)]}else{if(a.type=="name")return[r(s,void 0,a.value)];throw new Error("Unknown expr type")}}}}function $I(e,t){return t-e}function eN(e,t){let n=[];return r(t),n.sort($I);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let a=0;a<o.length;a++){let{term:s,to:c}=o[a];!s&&n.indexOf(c)==-1&&r(c)}}}function TG(e){let t=Object.create(null);return n(eN(e,0));function n(r){let i=[];r.forEach(a=>{e[a].forEach(({term:s,to:c})=>{if(!s)return;let d;for(let p=0;p<i.length;p++)i[p][0]==s&&(d=i[p][1]);eN(e,c).forEach(p=>{d||i.push([s,d=[]]),d.indexOf(p)==-1&&d.push(p)})})});let o=t[r.join(",")]=new Ua(r.indexOf(e.length-1)>-1);for(let a=0;a<i.length;a++){let s=i[a][1].sort($I);o.next.push({type:i[a][0],next:t[s.join(",")]||n(s)})}return o}}function bG(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,a=[];for(let s=0;s<i.next.length;s++){let{type:c,next:d}=i.next[s];a.push(c.name),o&&!(c.isText||c.hasRequiredAttrs())&&(o=!1),r.indexOf(d)==-1&&r.push(d)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function VI(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function zI(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function WI(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function qI(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new CG(e[n]);return t}let tN=class KI{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=qI(r.attrs),this.defaultAttrs=VI(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ua.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:zI(this.attrs,t)}create Line truncated
`):n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],o=t.previousSibling;(!i||o&&o.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(n=n.slice(1))}n&&this.insertNode(this.parser.schema.text(n)),this.findInText(t)}else this.findInside(t)}addElement(t,n){let r=t.nodeName.toLowerCase(),i;jI.hasOwnProperty(r)&&this.parser.normalizeLists&&OG(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(i=this.parser.matchTag(t,this,n));if(o?o.ignore:vG.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let a,s=this.top,c=this.needsBlock;if(XI.hasOwnProperty(r))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),a=!0,s.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t);return}o&&o.skip?this.addAll(t):this.withStyleRules(t,()=>this.addAll(t)),a&&this.sync(s),this.needsBlock=c}else this.withStyleRules(t,()=>{this.addElementByRule(t,o,o.consuming===!1?i:void 0)})}leafFallback(t){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
`))}ignoreFallback(t){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(t){let n=je.none,r=je.none;if(t.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],a=t.getPropertyValue(o);if(a)for(let s=void 0;;){let c=this.parser.matchStyle(o,a,this,s);if(!c)break;if(c.ignore)return null;if(c.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(d=>{c.clearMark(d)&&(r=d.addToSet(r))}):n=this.parser.schema.marks[c.mark].create(c.attrs).addToSet(n),c.consuming===!1)s=c;else break}}return[n,r]}addElementByRule(t,n,r){let i,o,a;n.node?(o=this.parser.schema.nodes[n.node],o.isLeaf?this.insertNode(o.create(n.attrs))||this.leafFallback(t):i=this.enter(o,n.attrs||null,n.preserveWhitespace)):(a=this.parser.schema.marks[n.mark].create(n.attrs),this.addPendingMark(a));let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(r)this.addElement(t,r);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(c=>this.insertNode(c));else{let c=t;typeof n.contentElement=="string"?c=t.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(t):n.contentElement&&(c=n.contentElement),this.findAround(t,c,!0),this.addAll(c)}i&&this.sync(s)&&this.open--,a&&this.removePendingMark(a,s)}addAll(t,n,r){let i=n||0;for(let o=n?t.childNodes[n]:t.firstChild,a=r==null?null:t.childNodes[r];o!=a;o=o.nextSibling,++i)this.findAtPoint(t,i),this.addDOM(o);this.findAtPoint(t,i)}findPlace(t){let n,r;for(let i=this.open;i>=0;i--){let o=this.nodes[i],a=o.findWrapping(t);if(a&&(!n||n.length>a.length)&&(n=a,r=o,!a.length)||o.solid)break}if(!n)return!1;this.sync(r);for(let i=0;i<n.length;i++)this.enterInner(n[i],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let n=this.textblockFromContext();n&&this.enterInner(n)}if(this.findPlace(t)){this.closeExtra();let n=this.top;n.applyPending(t.type),n.match&&(n.match=n.match.matchType(t.type));let r=n.activeMarks;for(let i=0;i<t.marks.length;i++)(!n.type||n.type.allowsMarkType(t.marks[i].type))&&(r=t.marks[i].addToSet(r));return n.content.push(t.mark(r)),!0}return!1}enter(t,n,r){let i=this.findPlace(t.create(n));return i&&this.enterInner(t,n,!0,r),i}enterInner(t,n=null,r=!1,i){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let a=rN(t,i,o.options);o.options&Nc&&o.content.length==0&&(a|=Nc),this.nodes.push(new Wd(t,n,o.activeMarks,o.pendingMarks,r,null,a)),this.open++}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let n=this.open;n>=0;n--)if(this.nodes[n]==t)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),a=(s,c)=>{for(;s>=0;s--){let d=n[s];if(d==""){if(s==n.length-1||s==0)continue;for(;c>=o;c--)if(a(s-1,c))return!0;return!1}else{let p=c>0||c==0&&i?this.nodes[c].type:r&&c>=o?r.node(c-o).type:null;if(!p||p.name!=d&&p.groups.indexOf(d)==-1)return!1;c--}}return!0};return a(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(t){let n=DG(t,this.top.pendingMarks);n&&this.top.stashMarks.push(n),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,n){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(t)>-1)i.pendingMarks=t.removeFromSet(i.pendingMarks);else{i.activeMarks=t.removeFromSet(i.activeMarks);let a=i.popFromStashMark(t);a&&i.type&&i.type.allow Line truncated
`))}})}function zG(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function WG(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let a=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,a);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new zt(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new se(J.from(a),0,0),1,!0))}function Hs(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,a=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!a.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let d=i.depth-1,p=n-2;d>o;d--,p--){let _=i.node(d),f=i.index(d);if(_.type.spec.isolating)return!1;let g=_.content.cutByIndex(f,_.childCount),E=r&&r[p+1];E&&(g=g.replaceChild(0,E.type.create(E.attrs)));let T=r&&r[p]||_;if(!_.canReplace(f+1,_.childCount)||!T.type.validContent(g))return!1}let s=i.indexAfter(o),c=r&&r[0];return i.node(o).canReplaceWith(s,s,c?c.type:i.node(o+1).type)}function qG(e,t,n=1,r){let i=e.doc.resolve(t),o=J.empty,a=J.empty;for(let s=i.depth,c=i.depth-n,d=n-1;s>c;s--,d--){o=J.from(i.node(s).copy(o));let p=r&&r[d];a=J.from(p?p.type.create(p.attrs,a):i.node(s).copy(a))}e.step(new Ht(t,t,new se(o.append(a),n,n),!0))}function Wo(e,t){let n=e.resolve(t),r=n.index();return iD(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function iD(e,t){return!!(e&&t&&!e.isLeaf&&e.canAppend(t))}function Cm(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,a,s=r.index(i);if(i==r.depth?(o=r.nodeBefore,a=r.nodeAfter):n>0?(o=r.node(i+1),s++,a=r.node(i).maybeChild(s)):(o=r.node(i).maybeChild(s-1),a=r.node(i+1)),o&&!o.isTextblock&&iD(o,a)&&r.node(i).canReplace(s,s+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function KG(e,t,n){let r=new Ht(t-n,t+n,se.empty,!0);e.step(r)}function QG(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function XG(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let a=r.depth;a>=0;a--){let s=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,c=r.index(a)+(s>0?1:0),d=r.node(a),p=!1;if(o==1)p=d.canReplace(c,c,i);else{let _=d.contentMatchAt(c).findWrapping(i.firstChild.type);p=_&&d.canReplaceWith(c,c,_[0])}if(p)return s==0?r.pos:s<0?r.before(a+1):r.after(a+1)}return null}function Rm(e,t,n=t,r=se.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return oD(i,o,r)?new Ht(t,n,r):new jG(i,o,r).fit()}function oD(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class jG{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=J.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=J.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,a=r.depth,s=i.depth;for(;a&&s&&o.childCount==1;)o=o.firstChild.content,a--,s--;let c=new se(o,a,s);return t>-1?new zt(r.pos,t,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new Ht(r.pos,i.pos,c):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Gg(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let a=i.firstChild;for(let s=this.depth;s>=0;s--){let{type:c,match:d}=this.frontier[s],p,_=null;if(n==1&&(a?d.matchType(a.type)||(_=d.fillBefore(J.from(a),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:s,parent:o,inject:_};if(n==2&&a&&(p=d.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:s,parent:o,wrap:p};if(o&&d.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Gg(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new se(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Gg(t,n);if(i.c Line truncated
`),p&&g==f.nodeValue.length)for(let E=f,T;E;E=E.parentNode){if(T=E.nextSibling){T.nodeName=="BR"&&(s=c={node:T.parentNode,offset:Jt(T)+1});break}let b=E.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let E=f.childNodes[g-1];p=E&&(E.nodeName=="BR"||E.contentEditable=="false")}}if(jr&&d.focusNode&&d.focusNode!=c.node&&d.focusNode.nodeType==1){let f=d.focusNode.childNodes[d.focusOffset];f&&f.contentEditable=="false"&&(i=!0)}if(!(i||p&&vn)&&Fa(s.node,s.offset,d.anchorNode,d.anchorOffset)&&Fa(c.node,c.offset,d.focusNode,d.focusOffset))return;let _=!1;if((d.extend||t==n)&&!p){d.collapse(s.node,s.offset);try{t!=n&&d.extend(c.node,c.offset),_=!0}catch{}}if(!_){if(t>n){let g=s;s=c,c=g}let f=document.createRange();f.setEnd(c.node,c.offset),f.setStart(s.node,s.offset),d.removeAllRanges(),d.addRange(f)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],a=r+o.size;if(r==a?t<=a&&n>=r:t<a&&n>r){let s=r+o.border,c=a-o.border;if(t>=s&&n<=c){this.dirty=t==r||n==a?ha:CN,t==s&&n==c&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=gi:o.markDirty(t-s,n-s);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?ha:gi}r=a}this.dirty=ha}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?ha:CN;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class SD extends Nu{constructor(t,n,r,i){let o,a=n.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(a.nodeType!=1){let s=document.createElement("span");s.appendChild(a),a=s}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(t,[],a,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==Dr&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class xY extends Nu{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Ba extends Nu{constructor(t,n,r,i){super(t,[],r,i),this.mark=n}static create(t,n,r,i){let o=i.nodeViews[n.type.name],a=o&&o(n,i,r);return(!a||!a.dom)&&(a=Va.renderSpec(document,n.type.spec.toDOM(n,r))),new Ba(t,n,a.dom,a.contentDOM||a.dom)}parseRule(){return this.dirty&gi||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=gi&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=Dr){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=Dr}}slice(t,n,r){let i=Ba.create(this.parent,this.mark,!0,r),o=this.children,a=this.size;n<a&&(o=Mh(o,n,a,r)),t>0&&(o=Mh(o,0,t,r));for(let s=0;s<o.length;s++)o[s].parent=i;return i.children=o,i}}class ko extends Nu{constructor(t,n,r,i,o,a,s,c,d){super(t,[],o,a),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=s}static create(t,n,r,i,o,a){let s=o.nodeViews[n.type.name],c,d=s&&s(n,o,()=>{if(!c)return a;if(c.parent)return c.parent.posBeforeChild(c)},r,i),p=d&&d.dom,_=d&&d.contentDOM;if(n.isText){if(!p)p=document.createTextNode(n.text);else if(p.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else p||({dom:p,contentDOM:_}=Va.renderSpec(document,n.type.spec.toDOM(n)));!_&&!n.isText&&p.nodeName!="BR"&&(p.hasAttribute("contenteditable")||(p.contentEditable="false"),n.type.spec.draggable&&(p.draggable=!0));let f=p;return p=CD(p,r,n),d?c=new MY(t,n,r,i,p,_||null,f,d,o,a+1):n.isText?new Om(t,n,r,i,p,f,o):new ko(t,n,r,i,p,_||null,f,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>J.empty)}return t}matchesNode(t,n,r){return this.dirty==Dr&&t.eq(this.node)&&xh(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCom Line truncated
`);return{dom:c,text:f,slice:t}}function ID(e,t,n,r,i){let o=i.parent.type.spec.code,a,s;if(!n&&!t)return null;let c=t&&(r||o||!n);if(c){if(e.someProp("transformPastedText",f=>{t=f(t,o||r,e)}),o)return t?new se(J.from(e.state.schema.text(t.replace(/\r\n?/g,`
`))),0,0):se.empty;let _=e.someProp("clipboardTextParser",f=>f(t,i,r,e));if(_)s=_;else{let f=i.marks(),{schema:g}=e.state,E=Va.fromSchema(g);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(T=>{let b=a.appendChild(document.createElement("p"));T&&b.appendChild(E.serializeNode(g.text(T,f)))})}}else e.someProp("transformPastedHTML",_=>{n=_(n,e)}),a=JY(n),Ru&&eH(a);let d=a&&a.querySelector("[data-pm-slice]"),p=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(p&&p[3])for(let _=+p[3];_>0;_--){let f=a.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;a=f}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||rT.fromSchema(e.state.schema)).parseSlice(a,{preserveWhitespace:!!(c||p),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!jY.test(f.parentNode.nodeName)?{ignore:!0}:null}})),p)s=tH(PN(s,+p[1],+p[2]),p[4]);else if(s=se.maxOpen(ZY(s.content,i),!0),s.openStart||s.openEnd){let _=0,f=0;for(let g=s.content.firstChild;_<s.openStart&&!g.type.spec.isolating;_++,g=g.firstChild);for(let g=s.content.lastChild;f<s.openEnd&&!g.type.spec.isolating;f++,g=g.lastChild);s=PN(s,_,f)}return e.someProp("transformPasted",_=>{s=_(s,e)}),s}const jY=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function ZY(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,a=[];if(e.forEach(s=>{if(!a)return;let c=i.findWrapping(s.type),d;if(!c)return a=null;if(d=a.length&&o.length&&wD(c,o,s,a[a.length-1],0))a[a.length-1]=d;else{a.length&&(a[a.length-1]=xD(a[a.length-1],o.length));let p=DD(s,c);a.push(p),i=i.matchType(p.type),o=c}}),a)return J.from(a)}return e}function DD(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,J.from(e));return e}function wD(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=wD(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(J.from(DD(n,e,i+1))))}}function xD(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,xD(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(J.empty,!0);return e.copy(n.append(r))}function Ph(e,t,n,r,i,o){let a=t<0?e.firstChild:e.lastChild,s=a.content;return e.childCount>1&&(o=0),i<r-1&&(s=Ph(s,t,n,r,i+1,o)),i>=n&&(s=t<0?a.contentMatchAt(0).fillBefore(s,o<=i).append(s):s.append(a.contentMatchAt(a.childCount).fillBefore(J.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,a.copy(s))}function PN(e,t,n){return t<e.openStart&&(e=new se(Ph(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new se(Ph(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const MD={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let UN=null;function LD(){return UN||(UN=document.implementation.createHTMLDocument("title"))}function JY(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=LD().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&MD[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=e,i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function eH(e){let t=e.querySelectorAll(Rn?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function tH(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:a}=e;for(let s=r.length-2;s>=0;s-=2){let c=n.nodes[r[s]];if(!c||c.hasRequiredAttrs())break;i=J.from(c.create(r[s+1],i)),o++,a++}return new se(i,o,a)}const On={},An={},nH={touchstart:!0,touchmove:!0};class rH{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function iH(e){for(let t in On){let n=On[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{aH(e,r)&&!uT(e,r)&&(e.editable||!(r.type in An))&&n(e,r)},nH[t]?{passive:!0}:void 0)}vn&&e.dom.addEventListener("input",()=>null),Uh(e)}function To(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function oH(e){e.domObserver.stop();for(let t in e.input.event Line truncated
`).scrollIntoView()),!0)};function KD(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const a2=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=KD(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let s=n.after(),c=e.tr.replaceWith(s,s,a.createAndFill());c.setSelection(He.near(c.doc.resolve(s),1)),t(c.scrollIntoView())}return!0},s2=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof Kr||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=KD(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let a=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,s=e.tr.insert(a,o.createAndFill());s.setSelection(Ie.create(s.doc,a+1)),t(s.scrollIntoView())}return!0},l2=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Hs(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&_l(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},c2=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection(Te.create(e.doc,i))),!0)};function u2(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||Wo(e.doc,t.pos))?!1:(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),!0)}function QD(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o,a;if(r.type.spec.isolating||i.type.spec.isolating)return!1;if(u2(e,t,n))return!0;let s=t.parent.canReplace(t.index(),t.index()+1);if(s&&(o=(a=r.contentMatchAt(r.childCount)).findWrapping(i.type))&&a.matchType(o[0]||i.type).validEnd){if(n){let _=t.pos+i.nodeSize,f=J.empty;for(let T=o.length-1;T>=0;T--)f=J.from(o[T].create(null,f));f=J.from(r.copy(f));let g=e.tr.step(new zt(t.pos-1,_,t.pos,_,new se(f,1,0),o.length,!0)),E=_+2*o.length;Wo(g.doc,E)&&g.join(E),n(g.scrollIntoView())}return!0}let c=He.findFrom(t,1),d=c&&c.$from.blockRange(c.$to),p=d&&_l(d);if(p!=null&&p>=t.depth)return n&&n(e.tr.lift(d,p).scrollIntoView()),!0;if(s&&il(i,"start",!0)&&il(r,"end")){let _=r,f=[];for(;f.push(_),!_.isTextblock;)_=_.lastChild;let g=i,E=1;for(;!g.isTextblock;g=g.firstChild)E++;if(_.canReplace(_.childCount,_.childCount,g.content)){if(n){let T=J.empty;for(let S=f.length-1;S>=0;S--)T=J.from(f[S].copy(T));let b=e.tr.step(new zt(t.pos-f.length,t.pos+i.nodeSize,t.pos+E,t.pos+i.nodeSize-E,new se(T,f.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function XD(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Ie.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const d2=XD(-1),p2=XD(1);function _2(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=a&&oT(a,e,t);return s?(r&&r(n.tr.wrap(a,s).scrollIntoView()),!0):!1}}function QN(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:a},$to:{pos:s}}=n.selection.ranges[o];n.doc.nodesBetween(a,s,(c,d)=>{if(i)return!1;if(!(!c.isTextblock||c.hasMarkup(e,t)))if(c.type==e)i=!0;else{let p=n.doc.resolve(d),_=p.index();i=p.parent.canReplaceWith(_,_+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let a=0;a<n.selection.ranges.length;a++){let{$from:{pos:s},$to:{pos:c}}=n.selection.ranges[a];o.setBlockType(s,c,e,t)}r(o.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function m2(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,a=i.blockRange(o),s=!1,c=a;if(!a)return!1;if(a.depth>=2&&i.node(a.depth-1).type.compatibleContent(e)&&a.startIndex==0){if(i.index(a.depth-1)==0)return!1;let p=n.doc.resolve(a.start-2);c=new d_(p,p,a.depth),a.endIndex<a.parent.childCount&&(a=new d_(i,n.doc.resolve(o.end(a.depth)),a.depth)),s=!0}let d=oT(c,e,t,a);return d?(r&&r(f2(n.tr,a,d,s,e).scrollIntoView()),!0):!1}}function f2(e,t,n,r,i){let o=J.empty;for(let p=n.length-1;p>=0;p--)o=J.from(n[p].type.create(n[p].attrs,o));e.step(new zt(t.start-(r?2:0),t.end,t.start,t.end,new se(o,0,0),n.length,!0));let a=0;for(let p=0;p<n.length;p++)n[p].type==i&&(a=p+1);let s=n.length-a,c=t.start+n.length-(r?2:0),d=t.parent;for(let p=t.startIndex,_=t.endIndex,f=!0;p<_;p++,f=!1)!f&&Hs(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=d.child(p).nodeSize;return e}function g2(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,a=>a.childCount>0&&a.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?E2(t,n,e,o):h2(t,n,o):!0:!1}}function E2(e,t,n,r){let i=e.tr,o=r.end,a=r.$to.end(r.depth);o<a&&(i. Line truncated
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function O2(e){return typeof e=="number"}class A2{constructor(t){this.find=t.find,this.handler=t.handler}}const I2=(e,t,n)=>{if(ET(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function D2(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:a,dropEvent:s}=e,{commands:c,chain:d,can:p}=new Dm({editor:t,state:n}),_=[];return n.doc.nodesBetween(r,i,(g,E)=>{if(!g.isTextblock||g.type.spec.code)return;const T=Math.max(r,E),b=Math.min(i,E+g.content.size),S=g.textBetween(T-E,b-E,void 0,"");I2(S,o.find,a).forEach(R=>{if(R.index===void 0)return;const A=T+R.index+1,D=A+R[0].length,M={from:n.tr.mapping.map(A),to:n.tr.mapping.map(D)},k=o.handler({state:n,range:M,match:R,commands:c,chain:d,can:p,pasteEvent:a,dropEvent:s});_.push(k)})}),_.every(g=>g!==null)}const w2=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)===null||t===void 0||t.setData("text/html",e),n};function x2(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,s=typeof DragEvent<"u"?new DragEvent("drop"):null;const c=({state:p,from:_,to:f,rule:g,pasteEvt:E})=>{const T=p.tr,b=Im({state:p,transaction:T});if(!(!D2({editor:t,state:b,from:Math.max(_-1,0),to:f.b-1,rule:g,pasteEvent:E,dropEvent:s})||!T.steps.length))return s=typeof DragEvent<"u"?new DragEvent("drop"):null,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,T};return n.map(p=>new gt({view(_){const f=g=>{var E;r=!((E=_.dom.parentElement)===null||E===void 0)&&E.contains(g.target)?_.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(_,f)=>(o=r===_.dom.parentElement,s=f,!1),paste:(_,f)=>{var g;const E=(g=f.clipboardData)===null||g===void 0?void 0:g.getData("text/html");return a=f,i=!!(E!=null&&E.includes("data-pm-slice")),!1}}},appendTransaction:(_,f,g)=>{const E=_[0],T=E.getMeta("uiEvent")==="paste"&&!i,b=E.getMeta("uiEvent")==="drop"&&!o,S=E.getMeta("applyPasteRules"),y=!!S;if(!T&&!b&&!y)return;if(y){const{from:D,text:M}=S,k=D+M.length,z=w2(M);return c({rule:p,state:g,from:D,to:{b:k},pasteEvt:z})}const R=f.doc.content.findDiffStart(g.doc.content),A=f.doc.content.findDiffEnd(g.doc.content);if(!(!O2(R)||!A||R===A.b))return c({rule:p,state:g,from:R,to:A,pasteEvt:a})}}))}function M2(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return[...new Set(t)]}class Ls{constructor(t,n){this.splittableMarks=[],this.editor=n,this.extensions=Ls.resolve(t),this.schema=C2(this.extensions,n),this.setupExtensions()}static resolve(t){const n=Ls.sort(Ls.flatten(t)),r=M2(n.map(i=>i.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(i=>`'${i}'`).join(", ")}]. This can lead to issues.`),n}static flatten(t){return t.map(n=>{const r={name:n.name,options:n.options,storage:n.storage},i=pe(n,"addExtensions",r);return i?[n,...this.flatten(i())]:n}).flat(10)}static sort(t){return t.sort((r,i)=>{const o=pe(r,"priority")||100,a=pe(i,"priority")||100;return o>a?-1:o<a?1:0})}get commands(){return this.extensions.reduce((t,n)=>{const r={name:n.name,options:n.options,storage:n.storage,editor:this.editor,type:jg(n.name,this.schema)},i=pe(n,"addCommands",r);return i?{...t,...i()}:t},{})}get plugins(){const{editor:t}=this,n=Ls.sort([...this.extensions].reverse()),r=[],i=[],o=n.map(a=>{const s={name:a.name,options:a.options,storage:a.storage,editor:t,type:jg(a.name,this.schema)},c=[],d=pe(a,"addKeyboardShortcuts",s);let p={};if(a.type==="mark"&&pe(a,"exitable",s)&&(p.ArrowRight=()=>Ft.handleExit({editor:t,mark:a})),d){const T=Object.fromEntries(Object.entries(d()).map(([b,S])=>[b,()=>S({editor:t})]));p={...p,...T}}const _=qH(p);c.push(_);const f=pe(a,"addInputRules",s);ZN(a,t.options.enableInputRules)&&f&&r.push(...f());const g=pe(a,"addPasteRules",s);ZN(a,t.options.enablePasteRules)&&g&&i.push(...g());const E=pe(a,"addProseMirrorPlugins",s);if(E){const T=E();c.push(...T)}return c}).flat();return[v2({editor:t,rules:r}),...x2({editor:t,rules:i}),...o]}get attributes(){return jD(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:n}=wm(this.extensions);return Object.fromEntries(n.filter(r=>!!pe(r,"addNodeView")).map(r=>{const i=this.attributes.filter(c=>c.type===r.name),o={name:r.name,options:r.options,storage:r.storage,editor:t,type:qt(r.name,this.schema)},a=pe(r,"addNodeView",o);if(!a)return[];const s=(c,d,p,_)=>{const f=Fh(c,i);return a()({editor:t,node:c,getPos:p,decorations:_,HTMLAttributes:f,extension:r})};return[r.name,s]}))}setupExtensions(){this.extensions.forEach(t=>{var n;this.editor.extensionStorage[t.name]=t.storage;const r={name:t.name, Line truncated
`,textSerializers:a={}}=n||{};let s="";return e.nodesBetween(r,i,(c,d,p,_)=>{var f;c.isBlock&&d>r&&(s+=o);const g=a==null?void 0:a[c.type.name];if(g)return p&&(s+=g({node:c,pos:d,parent:p,index:_,range:t})),!1;c.isText&&(s+=(f=c==null?void 0:c.text)===null||f===void 0?void 0:f.slice(Math.max(r,d)-d,i-d))}),s}function ew(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}const k2=vt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new gt({key:new dt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,a=Math.min(...o.map(p=>p.$from.pos)),s=Math.max(...o.map(p=>p.$to.pos)),c=ew(n);return JD(r,{from:a,to:s},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),P2=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())===null||n===void 0||n.removeAllRanges())}),!0),U2=(e=!1)=>({commands:t})=>t.setContent("",e),F2=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:a})=>{e.doc.nodesBetween(o.pos,a.pos,(s,c)=>{if(s.type.isText)return;const{doc:d,mapping:p}=t,_=d.resolve(p.map(c)),f=d.resolve(p.map(c+s.nodeSize)),g=_.blockRange(f);if(!g)return;const E=_l(g);if(s.type.isTextblock){const{defaultType:T}=_.parent.contentMatchAt(_.index());t.setNodeMarkup(g.start,T)}(E||E===0)&&t.lift(g,E)})}),!0},B2=e=>t=>e(t),G2=()=>({state:e,dispatch:t})=>s2(e,t),Y2=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const a=r.mapping.map(t);return r.insert(a,o.content),r.setSelection(new Ie(r.doc.resolve(a-1))),!0},H2=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const s=i.before(o),c=i.after(o);e.delete(s,c).scrollIntoView()}return!0}return!1},$2=e=>({tr:t,state:n,dispatch:r})=>{const i=qt(e,n.schema),o=t.selection.$anchor;for(let a=o.depth;a>0;a-=1)if(o.node(a).type===i){if(r){const c=o.before(a),d=o.after(a);t.delete(c,d).scrollIntoView()}return!0}return!1},V2=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},z2=()=>({state:e,dispatch:t})=>QH(e,t),W2=()=>({commands:e})=>e.keyboardShortcut("Enter"),q2=()=>({state:e,dispatch:t})=>a2(e,t);function T_(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:ET(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function Bh(e,t,n={}){return e.find(r=>r.type===t&&T_(r.attrs,n))}function K2(e,t,n={}){return!!Bh(e,t,n)}function hT(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&r.offset!==0&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const i=Bh([...r.node.marks],t,n);if(!i)return;let o=r.index,a=e.start()+r.offset,s=o+1,c=a+r.node.nodeSize;for(Bh([...r.node.marks],t,n);o>0&&i.isInSet(e.parent.child(o-1).marks);)o-=1,a-=e.parent.child(o).nodeSize;for(;s<e.parent.childCount&&K2([...e.parent.child(s).marks],t,n);)c+=e.parent.child(s).nodeSize,s+=1;return{from:a,to:c}}function Ko(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}const Q2=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Ko(e,r.schema),{doc:a,selection:s}=n,{$from:c,from:d,to:p}=s;if(i){const _=hT(c,o,t);if(_&&_.from<=d&&_.to>=p){const f=Ie.create(a,_.from,_.to);n.setSelection(f)}}return!0},X2=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function tw(e){return e instanceof Ie}function bo(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function nw(e,t=null){if(!t)return null;const n=He.atStart(e),r=He.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Ie.create(e,bo(0,i,o),bo(e.content.size,i,o)):Ie.create(e,bo(t,i,o),bo(t,i,o))}function Mm(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const j2=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const a=()=>{Mm()&&r.dom.focus(),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};if(r.hasFocus()&&e===null||e===!1)return!0;if(o&&e===null&&!tw(n.state.selection))return a(),!0;const s=nw(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return o&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),a()),!0},Z2=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),J2=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t Line truncated
position: relative;
}
.ProseMirror {
word-wrap: break-word;
white-space: pre-wrap;
white-space: break-spaces;
-webkit-font-variant-ligatures: none;
font-variant-ligatures: none;
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}
.ProseMirror [contenteditable="false"] {
white-space: normal;
}
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
white-space: pre-wrap;
}
.ProseMirror pre {
white-space: pre-wrap;
}
img.ProseMirror-separator {
display: inline !important;
border: none !important;
margin: 0 !important;
width: 1px !important;
height: 1px !important;
}
.ProseMirror-gapcursor {
display: none;
pointer-events: none;
position: absolute;
margin: 0;
}
.ProseMirror-gapcursor:after {
content: "";
display: block;
position: absolute;
top: -2px;
width: 20px;
border-top: 1px solid black;
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}
@keyframes ProseMirror-cursor-blink {
to {
visibility: hidden;
}
}
.ProseMirror-hideselection *::selection {
background: transparent;
}
.ProseMirror-hideselection *::-moz-selection {
background: transparent;
}
.ProseMirror-hideselection * {
caret-color: transparent;
}
.ProseMirror-focused .ProseMirror-gapcursor {
display: block;
}
.tippy-box[data-animation=fade][data-state=hidden] {
opacity: 0
}`;function uV(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}let dV=class extends T2{constructor(t={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:n})=>{throw n}},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=uV(cV,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,n=!0){this.setOptions({editable:t}),n&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(t,n){const r=ZD(n)?n(t,[...this.state.plugins]):[...this.state.plugins,t],i=this.state.reconfigure({plugins:r});this.view.updateState(i)}unregisterPlugin(t){if(this.isDestroyed)return;const n=typeof t=="string"?`${t}$`:t.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(i=>!i.key.startsWith(n))});this.view.updateState(r)}createExtensionManager(){var t,n;const i=[...this.options.enableCoreExtensions?[oV,k2.configure({blockSeparator:(n=(t=this.options.coreExtensionOptions)===null||t===void 0?void 0:t.clipboardTextSerializer)===null||n===void 0?void 0:n.blockSeparator}),iV,aV,sV,lV]:[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o==null?void 0:o.type));this.extensionManager=new Ls(i,this)}createCommandManager(){this.commandManager=new Dm({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let t;try{t=Gh(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(a=>a.name!=="collaboration"),this.createExtensionManager()}}),t=Gh(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const n=nw(t,this.options.autofocus);this.view=new FH(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:Ms.create({doc:t,selection:n||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const i=this.view.dom;i.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(a=>{var s;return(s=this.capturedTransaction)===null||s===void 0?void 0:s.step(a)});return}const n=this.state.apply(t),r=!this.state.selection.eq(n.selection);this.view.updateState(n),this.emit("transaction",{editor:this,transaction:t}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const i=t.getMeta("focus"),o=t.getMeta("blur");i&&this.emit("focus",{ed Line truncated
`,textSerializers:r={}}=t||{};return D$(this.state.doc,{blockSeparator:n,textSerializers:{...ew(this.schema),...r}})}get isEmpty(){return P$(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var t;return!(!((t=this.view)===null||t===void 0)&&t.docView)}$node(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(t,n))||null}$nodes(t,n){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(t,n))||null}$pos(t){const n=this.state.doc.resolve(t);return new _a(n,this)}get $doc(){return this.$pos(0)}};function Ga(e){return new vu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,a=r[r.length-1],s=r[0];if(a){const c=s.search(/\S/),d=n.from+s.indexOf(a),p=d+a.length;if(yT(n.from,n.to,t.doc).filter(g=>g.mark.type.excluded.find(T=>T===e.type&&T!==g.mark.type)).filter(g=>g.to>d).length)return null;p<n.to&&o.delete(p,n.to),d>n.from&&o.delete(n.from+c,d);const f=n.from+c+a.length;o.addMark(n.from+c,f,e.type.create(i||{})),o.removeStoredMark(e.type)}}})}function ow(e){return new vu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Be(e.getAttributes,void 0,r)||{},{tr:o}=t,a=n.from;let s=n.to;const c=e.type.create(i);if(r[1]){const d=r[0].lastIndexOf(r[1]);let p=a+d;p>s?p=s:s=p+r[1].length;const _=r[0][r[0].length-1];o.insertText(_,a+r[0].length-1),o.replaceWith(p,s,c)}else if(r[0]){const d=e.type.isInline?a:a-1;o.insert(d,e.type.create(i)).delete(o.mapping.map(a),o.mapping.map(s))}o.scrollIntoView()}})}function $h(e){return new vu({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Be(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)}})}function Ot(e){return new vu({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const a=n.to;if(r[1]){const s=r[0].lastIndexOf(r[1]);i+=r[0].slice(s+r[1].length),o+=s;const c=o-a;c>0&&(i=r[0].slice(s-c,s)+i,o=a)}t.tr.insertText(i,o,a)}})}function ru(e){return new vu({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Be(e.getAttributes,void 0,r)||{},a=t.tr.delete(n.from,n.to),c=a.doc.resolve(n.from).blockRange(),d=c&&oT(c,e.type,o);if(!d)return null;if(a.wrap(c,d),e.keepMarks&&e.editor){const{selection:_,storedMarks:f}=t,{splittableMarks:g}=e.editor.extensionManager,E=f||_.$to.parentOffset&&_.$from.marks();if(E){const T=E.filter(b=>g.includes(b.type.name));a.ensureMarks(T)}}if(e.keepAttributes){const _=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(_,o).run()}const p=a.doc.resolve(n.from-1).nodeBefore;p&&p.type===e.type&&Wo(a.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,p))&&a.join(n.from-1)}})}class Ft{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Be(pe(this,"addOptions",{name:this.name}))),this.storage=Be(pe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ft(t)}configure(t={}){const n=this.extend({...this.config,addOptions(){var r;return xm(((r=this.parent)===null||r===void 0?void 0:r.call(this))||{},t)}});return n.name=this.name,n.parent=this.parent,n}extend(t={}){const n=new Ft(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=Be(pe(n,"addOptions",{name:n.name})),n.storage=Be(pe(n,"addStorage",{name:n.name,options:n.options})),n}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const a=i.marks();if(!!!a.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const c=a.find(d=>(d==null?void 0:d.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}}class ut{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHLine truncated
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var rv;function TV(){if(rv)return rE;rv=1;var e=st;function t(_,f){return _===f&&(_!==0||1/_===1/f)||_!==_&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(_,f){var g=f(),E=r({inst:{value:g,getSnapshot:f}}),T=E[0].inst,b=E[1];return o(function(){T.value=g,T.getSnapshot=f,c(T)&&b({inst:T})},[_,g,f]),i(function(){return c(T)&&b({inst:T}),_(function(){c(T)&&b({inst:T})})},[_]),a(g),g}function c(_){var f=_.getSnapshot;_=_.value;try{var g=f();return!n(_,g)}catch{return!0}}function d(_,f){return f()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:s;return rE.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,rE}var iv;function bV(){return iv||(iv=1,nE.exports=TV()),nE.exports}/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ov;function yV(){if(ov)return tE;ov=1;var e=st,t=bV();function n(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;return tE.useSyncExternalStoreWithSelector=function(d,p,_,f,g){var E=o(null);if(E.current===null){var T={hasValue:!1,value:null};E.current=T}else T=E.current;E=s(function(){function S(M){if(!y){if(y=!0,R=M,M=f(M),g!==void 0&&T.hasValue){var k=T.value;if(g(k,M))return A=k}return A=M}if(k=A,r(R,M))return k;var z=f(M);return g!==void 0&&g(k,z)?k:(R=M,A=z)}var y=!1,R,A,D=_===void 0?null:_;return[function(){return S(p())},D===null?void 0:function(){return S(D())}]},[p,_,f,g]);var b=i(d,E[0],E[1]);return a(function(){T.hasValue=!0,T.value=b},[b]),c(b),b},tE}aw.exports=yV();var CV=aw.exports;function RV(e){let t=0,n=0,r={editor:e,transactionNumber:0},i=e;const o=new Set;return{getSnapshot(){return t===n||(n=t,r={editor:i,transactionNumber:t}),r},getServerSnapshot(){return{editor:null,transactionNumber:0}},subscribe(s){return o.add(s),()=>{o.delete(s)}},watch(s){if(i=s,i){const c=()=>{t+=1,o.forEach(p=>p())},d=i;return d.on("transaction",c),()=>{d.off("transaction",c)}}}}}function NV(e){const[t]=B.useState(()=>RV(e.editor)),n=CV.useSyncExternalStoreWithSelector(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn);return B.useEffect(()=>t.watch(e.editor),[e.editor]),B.useDebugValue(n),n}const vV=!1,Vh=typeof window>"u",OV=Vh||!!(typeof window<"u"&&window.next);function AV(e={},t=[]){const n=B.useRef(!1),[r,i]=B.useState(()=>{if(e.immediatelyRender===void 0)return Vh||OV?null:new eE(e);if(e.immediatelyRender&&Vh&&vV)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return e.immediatelyRender?new eE(e):null});B.useDebugValue(r),B.useEffect(()=>{let k=r;k?k.setOptions(e):(k=new eE(e),i(k))},t);const{onBeforeCreate:o,onBlur:a,onCreate:s,onDestroy:c,onFocus:d,onSelectionUpdate:p,onTransaction:_,onUpdate:f,onContentError:g}=e,E=B.useRef(o),T=B.useRef(a),b=B.useRef(s),S=B.useRef(c),y=B.useRef(d),R=B.useRef(p),A=B.useRef(_),D=B.useRef(f),M=B.useRef(g);return B.useEffect(()=>{r&&(o&&(r.off("beforeCreate",E.current),r.on("beforeCreate",o),E.current=o),a&&(r.off("blur",T.current),r.on("blur",a),T.current=a),s&&(r.off("create",b.current),r.on("create",s),b.current=s),c&&(r.off("destroy",S.current),r.on("destroy",c),S.current=c),d&&(r.off("focus",y.current),r.on("focus",d),y.current=d),p&&(r.off("selectionUpdate",R.current),r.on("selectionUpdate",p),R.current=p),_&&(r.off("transaction",A.current),r.on("transaction",_),A.current=_),f&&(r.off("update",D.current),r.on("update",f),D.current=f),g&&(r.off("contentError",M.current),r.on("contentError",g),M.current=g))},[o,a,s,c,d,p,_,f,g,r]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1,r&&setTimeout(()=>{!n.current&&!r.isDestroyed&&r.destroy()})}),[]),NV({editor:r,selector:({transactionNumber:k})=>e.shouldRerenderOnTransaction===!1?null:e.immediatelyRender&&k===0?0:k+1}),r}const Ue=B.createContext({editor:null}),IV=Ue.Consumer;function DV({children:e,slotAfter:t,slotBefore:n,...r}){const i=AV(r);return i?st.createElement(Ue.Provider,{value:{editor:i}},n,st.createElement(IV,null,({editor:o})=>st.createElement(SV,{editor:o})),e,t):null}const sw=B.createContext({onDragStart:void 0}),lw=()=>B.useContext(sw),CT=e=>{const t=e.as||"div",{nodeViewContentRef:n}=lw();return st.createElement(t,{...e,ref:n,"data-node-view-content":"",style:{whiteSpace:"pre-wrap",...e.style}})},ml=st.forwardRef((e,t)=>{const{onDragStart:n}=lw(),r=e.as||"div";return st.createElement(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function wV(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function xV(e){var t;return typeof e=="object"&&((t=e.$$typeof)===null||t===void 0?void 0:t.toString())==="Symbol(react.forward_ref)"}class cw{constructor(t,{editor:n,props:r={},as:i="div",className:o="",attrs:a}){this.ref=null,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=n,this.props=r,this.element=document.createElement(i),this.element.classList.add("react-renderer"),o&&this.element.classList.add(...o.split(" ")),a&&Object.keys(a).forEach(s=>{this.element.setAttribute(s,a[s])}),this.render()}render(){var t,n;const r=this.component,i=this.props;(wV(r)||xV(r))&&(i.ref=o=>{this.ref=o}),this.reactElement=st.createElement(r,{...i}),(n=(t=this.editor)===null||t===void 0?void 0:t.contentComponent)===null||n===void 0||n.setRenderer(this.id,this)}updateProps(t={}){this.props={...this.props,...t},this.render()}destroy(){var t,n;(n=(t=this.editor)===null||t===void 0?void 0:t.contentComponent)===null||n===void 0||n.removeRenderer(this.id)}}class MV extends _V{mount(Line truncated
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/y_.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",d=500,p="__lodash_placeholder__",_=1,f=2,g=4,E=1,T=2,b=1,S=2,y=4,R=8,A=16,D=32,M=64,k=128,z=256,W=512,H=30,le="...",_e=800,he=16,Se=1,ge=2,ae=3,x=1/0,I=9007199254740991,Y=17976931348623157e292,$=NaN,Z=4294967295,oe=Z-1,Oe=Z>>>1,ze=[["ary",k],["bind",b],["bindKey",S],["curry",R],["curryRight",A],["flip",W],["partial",D],["partialRight",M],["rearg",z]],be="[object Arguments]",Ce="[object Array]",yt="[object AsyncFunction]",me="[object Boolean]",we="[object Date]",xn="[object DOMException]",mn="[object Error]",Mn="[object Function]",et="[object GeneratorFunction]",Ze="[object Map]",fn="[object Number]",pt="[object Null]",Ln="[object Object]",Mr="[object Promise]",te="[object Proxy]",pr="[object RegExp]",ve="[object Set]",Ee="[object String]",gn="[object Symbol]",Bt="[object Undefined]",kn="[object WeakMap]",Zr="[object WeakSet]",G="[object ArrayBuffer]",K="[object DataView]",ne="[object Float32Array]",de="[object Float64Array]",Pe="[object Int8Array]",_t="[object Int16Array]",Vi="[object Int32Array]",zi="[object Uint8Array]",Du="[object Uint8ClampedArray]",wu="[object Uint16Array]",xu="[object Uint32Array]",JT=/\b__p \+= '';/g,eb=/\b(__p \+=) '' \+/g,tb=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$m=/&(?:amp|lt|gt|quot|#39);/g,Vm=/[&<>"']/g,nb=RegExp($m.source),rb=RegExp(Vm.source),ib=/<%-([\s\S]+?)%>/g,ob=/<%([\s\S]+?)%>/g,zm=/<%=([\s\S]+?)%>/g,ab=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sb=/^\w*$/,lb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mu=/[\\^$.*+?()[\]{}|]/g,cb=RegExp(Mu.source),Lu=/^\s+/,ub=/\s/,db=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pb=/\{\n\/\* \[wrapped with (.+)\] \*/,_b=/,? & /,mb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fb=/[()=,{}\[\]\/\s]/,gb=/\\(\\)?/g,Eb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Wm=/\w*$/,hb=/^[-+]0x[0-9a-f]+$/i,Sb=/^0b[01]+$/i,Tb=/^\[object .+?Constructor\]$/,bb=/^0o[0-7]+$/i,yb=/^(?:0|[1-9]\d*)$/,Cb=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Tl=/($^)/,Rb=/['\n\r\u2028\u2029\\]/g,bl="\\ud800-\\udfff",Nb="\\u0300-\\u036f",vb="\\ufe20-\\ufe2f",Ob="\\u20d0-\\u20ff",qm=Nb+vb+Ob,Km="\\u2700-\\u27bf",Qm="a-z\\xdf-\\xf6\\xf8-\\xff",Ab="\\xac\\xb1\\xd7\\xf7",Ib="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Db="\\u2000-\\u206f",wb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xm="A-Z\\xc0-\\xd6\\xd8-\\xde",jm="\\ufe0e\\ufe0f",Zm=Ab+Ib+Db+wb,ku="['’]",xb="["+bl+"]",Jm="["+Zm+"]",yl="["+qm+"]",ef="\\d+",Mb="["+Km+"]",tf="["+Qm+"]",nf="[^"+bl+Zm+ef+Km+Qm+Xm+"]",Cl="\\ud83c[\\udffb-\\udfff]",rf="(?:"+yl+"|"+Cl+")",Pu="[^"+bl+"]",Rl="(?:\\ud83c[\\udde6-\\uddff]){2}",Nl="[\\ud800-\\udbff][\\udc00-\\udfff]",Wi="["+Xm+"]",Uu="\\u200d",vl="(?:"+tf+"|"+nf+")",Fu="(?:"+Wi+"|"+nf+")",Ol="(?:"+ku+"(?:d|ll|m|re|s|t|ve))?",Bu="(?:"+ku+"(?:D|LL|M|RE|S|T|VE))?",Gu=rf+"?",Al="["+jm+"]?",Qa="(?:"+Uu+"(?:"+[Pu,Rl,Nl].join("|")+")"+Al+Gu+")*",Il="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dl=Al+Gu+Qa,Hu="(?:"+[Mb,Rl,Nl].join("|")+")"+Dl,Lb="(?:"+[Pu+yl+"?",yl,Rl,Nl,xb].join("|")+")",kb=RegExp(ku,"g"),Wx=RegExp(yl,"g"),of=RegExp(Cl+"(?="+Cl+")|"+Lb+Dl,"g"),qx=RegExp([Wi+"?"+tf+"+"+Ol+"(?="+[Jm,Wi,"$"].join("|")+")",Fu+"+"+Bu+"(?="+[Jm,Wi+vl,"$"].join("|")+")",Wi+"?"+vl+"+"+Ol,Wi+"+"+Bu,Yu,Il,ef,Hu].join("|"),"g"),Kx=RegExp("["+Uu+bl+qm+jm+"]"),Qx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xx=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jx=-1,ot={};ot[ne]=ot[de]=ot[Pe]=ot[_t]=ot[Vi]=ot[zi]=ot[Du]=ot[wu]=ot[xu]=!0,ot[be]=ot[Ce]=ot[G]=ot[me]=ot[K]=ot[we]=ot[mn]=ot[Mn]=ot[Ze]=ot[fn]=ot[Ln]=ot[pr]=ot[ve]=ot[Ee]=ot[kn]=!1;var tt={};tt[be]=tt[Ce]=tt[G]=tt[K]=tt[me]=tt[we]=tt[ne]=tt[de]=tt[Pe]=tt[_t]=tt[Vi]=tt[Ze]=tt[fn]=tt[Ln]=tt[pr]=tt[ve]=tt[Ee]=tt[gn]=tt[zi]=tt[Du]=tt[wu]=tt[xu]=!0,tt[mn]=tt[Mn]=tt[kn]=!1;var Zx={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",Line truncated
/* [wrapped with `+u+`] */
`)}function mk(l){return De(l)||ra(l)||!!(iy&&l&&l[iy])}function yi(l,u){var m=typeof l;return u=u??I,!!u&&(m=="number"||m!="symbol"&&yb.test(l))&&l>-1&&l%1==0&&l<u}function hn(l,u,m){if(!Et(m))return!1;var h=typeof u;return(h=="number"?Un(m)&&yi(u,m.length):h=="string"&&u in m)?Pr(m[u],l):!1}function Wf(l,u){if(De(l))return!1;var m=typeof l;return m=="number"||m=="symbol"||m=="boolean"||l==null||Jn(l)?!0:sb.test(l)||!ab.test(l)||u!=null&&l in Je(u)}function fk(l){var u=typeof l;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?l!=="__proto__":l===null}function qf(l){var u=Ed(l),m=v[u];if(typeof m!="function"||!(u in Ye.prototype))return!1;if(l===m)return!0;var h=$f(m);return!!h&&l===h[0]}function gk(l){return!!ey&&ey in l}var Ek=qu?Ci:ug;function $l(l){var u=l&&l.constructor,m=typeof u=="function"&&u.prototype||es;return l===m}function eC(l){return l===l&&!Et(l)}function tC(l,u){return function(m){return m==null?!1:m[l]===u&&(u!==n||l in Je(m))}}function hk(l){var u=Cd(l,function(h){return m.size===d&&m.clear(),h}),m=u.cache;return u}function Sk(l,u){var m=l[1],h=u[1],C=m|h,O=C<(b|S|k),w=h==k&&m==R||h==k&&m==z&&l[7].length<=u[8]||h==(k|z)&&u[7].length<=u[8]&&m==R;if(!(O||w))return l;h&b&&(l[2]=u[2],C|=m&b?0:y);var L=u[3];if(L){var F=l[3];l[3]=F?Uy(F,L,u[4]):L,l[4]=F?Qi(l[3],p):u[4]}return L=u[5],L&&(F=l[5],l[5]=F?Fy(F,L,u[6]):L,l[6]=F?Qi(l[5],p):u[6]),L=u[7],L&&(l[7]=L),h&k&&(l[8]=l[8]==null?u[8]:on(l[8],u[8])),l[9]==null&&(l[9]=u[9]),l[0]=u[0],l[1]=C,l}function Tk(l){var u=[];if(l!=null)for(var m in Je(l))u.push(m);return u}function bk(l){return Qu.call(l)}function nC(l,u,m){return u=kt(u===n?l.length-1:u,0),function(){for(var h=arguments,C=-1,O=kt(h.length-u,0),w=V(O);++C<O;)w[C]=h[u+C];C=-1;for(var L=V(u+1);++C<u;)L[C]=h[C];return L[u]=m(w),Xn(l,this,L)}}function rC(l,u){return u.length<2?l:ea(l,hr(u,0,-1))}function yk(l,u){for(var m=l.length,h=on(u.length,m),C=Pn(l);h--;){var O=u[h];l[h]=yi(O,m)?C[O]:n}return l}function Kf(l,u){if(!(u==="constructor"&&typeof l[u]=="function")&&u!="__proto__")return l[u]}var iC=aC(Oy),Vl=UM||function(l,u){return Kt.setTimeout(l,u)},Qf=aC(zL);function oC(l,u,m){var h=u+"";return Qf(l,_k(h,Ck(uk(h),m)))}function aC(l){var u=0,m=0;return function(){var h=YM(),C=he-(h-m);if(m=h,C>0){if(++u>=_e)return arguments[0]}else u=0;return l.apply(n,arguments)}}function Sd(l,u){var m=-1,h=l.length,C=h-1;for(u=u===n?h:u;++m<u;){var O=wf(m,C),w=l[O];l[O]=l[m],l[m]=w}return l.length=u,l}var sC=hk(function(l){var u=[];return l.charCodeAt(0)===46&&u.push(""),l.replace(lb,function(m,h,C,O){u.push(C?O.replace(gb,"$1"):h||m)}),u});function ti(l){if(typeof l=="string"||Jn(l))return l;var u=l+"";return u=="0"&&1/l==-x?"-0":u}function na(l){if(l!=null){try{return Ku.call(l)}catch{}try{return l+""}catch{}}return""}function Ck(l,u){return mr(ze,function(m){var h="_."+m[0];u&m[1]&&!$u(l,h)&&l.push(h)}),l.sort()}function lC(l){if(l instanceof Ye)return l.clone();var u=new gr(l.__wrapped__,l.__chain__);return u.__actions__=Pn(l.__actions__),u.__index__=l.__index__,u.__values__=l.__values__,u}function Rk(l,u,m){(m?hn(l,u,m):u===n)?u=1:u=kt(xe(u),0);var h=l==null?0:l.length;if(!h||u<1)return[];for(var C=0,O=0,w=V(td(h/u));C<h;)w[O++]=hr(l,C,C+=u);return w}function Nk(l){for(var u=-1,m=l==null?0:l.length,h=0,C=[];++u<m;){var O=l[u];O&&(C[h++]=O)}return C}function vk(){var l=arguments.length;if(!l)return[];for(var u=V(l-1),m=arguments[0],h=l;h--;)u[h-1]=arguments[h];return Ki(De(m)?Pn(m):[m],Qt(u,1))}var Ok=ke(function(l,u){return At(l)?Fl(l,Qt(u,1,At,!0)):[]}),Ak=ke(function(l,u){var m=Sr(u);return At(m)&&(m=n),At(l)?Fl(l,Qt(u,1,At,!0),ye(m,2)):[]}),Ik=ke(function(l,u){var m=Sr(u);return At(m)&&(m=n),At(l)?Fl(l,Qt(u,1,At,!0),n,m):[]});function Dk(l,u,m){var h=l==null?0:l.length;return h?(u=m||u===n?1:xe(u),hr(l,u<0?0:u,h)):[]}function wk(l,u,m){var h=l==null?0:l.length;return h?(u=m||u===n?1:xe(u),u=h-u,hr(l,0,u<0?0:u)):[]}function xk(l,u){return l&&l.length?dd(l,ye(u,3),!0,!0):[]}function Mk(l,u){return l&&l.length?dd(l,ye(u,3),!0):[]}function Lk(l,u,m,h){var C=l==null?0:l.length;return C?(m&&typeof m!="number"&&hn(l,u,m)&&(m=0,h=C),vL(l,u,m,h)):[]}function cC(l,u,m){var h=l==null?0:l.length;if(!h)return-1;var C=m==null?0:xe(m);return C<0&&(C=kt(h+C,0)),Vu(l,ye(u,3),C)}function uC(l,u,m){var h=l==null?0:l.length;if(!h)return-1;var C=h-1;return m!==n&&(C=xe(m),C=m<0?kt(h+C,0):on(C,h-1)),Vu(l,ye(u,3),C,!0)}function dC(l){var u=l==null?0:l.length;return u?Qt(l,1):[]}function kk(l){var u=l==null?0:l.length;return u?Qt(l,x):[]}function Pk(l,u){var m=l==null?0:l.length;return m?(u=u===n?1:xe(u),Qt(l,u)):[]}function Uk(l){for(var u=-1,m=l==null?0:l.length,h={};++u<m;){var C=l[u];h[C[0]]=C[1]}return h}function pC(l){return l&&l.length?l[0]:n}function Fk(l,u,m){var h=l==null?0:l.length;if(!h)return-1;var C=m==null?0:xe(m);return C<0&&(C=kt(h+C,0)),Xa(l,u,C)}function Bk(l){var u=l==null?0:l.length;return u?hr(l,0,-1):[]}var Gk=ke(function(l){var u=mt(l,Pf);return u.length&&u[0]===l[0]?vf(u):[]}),Yk=ke( Line truncated
`;l.replace(ie,function(Ne,Fe,$e,er,Sn,tr){return $e||($e=er),j+=l.slice(Q,tr).replace(Rb,EM),Fe&&(L=!0,j+=`' +
__e(`+Fe+`) +
'`),Sn&&(F=!0,j+=`';
`+Sn+`;
__p += '`),$e&&(j+=`' +
((__t = (`+$e+`)) == null ? '' : __t) +
'`),Q=tr+Ne.length,Ne}),j+=`';
`;var Re=Qe.call(u,"variable")&&u.variable;if(!Re)j=`with (obj) {
`+j+`
}
`;else if(fb.test(Re))throw new Ae(s);j=(F?j.replace(JT,""):j).replace(eb,"$1").replace(tb,"$1;"),j="function("+(Re||"obj")+`) {
`+(Re?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(L?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+j+`return __p
}`;var Me=GC(function(){return qe(O,fe+"return "+j).apply(n,w)});if(Me.source=j,eg(Me))throw Me;return Me}function $1(l){return Ke(l).toLowerCase()}function V1(l){return Ke(l).toUpperCase()}function z1(l,u,m){if(l=Ke(l),l&&(m||u===n))return Qb(l);if(!l||!(u=Zn(u)))return l;var h=Lr(l),C=Lr(u),O=Xb(h,C),w=jb(h,C)+1;return eo(h,O,w).join("")}function W1(l,u,m){if(l=Ke(l),l&&(m||u===n))return l.slice(0,Jb(l)+1);if(!l||!(u=Zn(u)))return l;var h=Lr(l),C=jb(h,Lr(u))+1;return eo(h,0,C).join("")}function q1(l,u,m){if(l=Ke(l),l&&(m||u===n))return l.replace(Lu,"");if(!l||!(u=Zn(u)))return l;var h=Lr(l),C=Xb(h,Lr(u));return eo(h,C).join("")}function K1(l,u){var m=H,h=le;if(Et(u)){var C="separator"in u?u.separator:C;m="length"in u?xe(u.length):m,h="omission"in u?Zn(u.omission):h}l=Ke(l);var O=l.length;if(ja(l)){var w=Lr(l);O=w.length}if(m>=O)return l;var L=m-Za(h);if(L<1)return h;var F=w?eo(w,0,L).join(""):l.slice(0,L);if(C===n)return F+h;if(w&&(L+=F.length-L),tg(C)){if(l.slice(L).search(C)){var Q,X=F;for(C.global||(C=Ef(C.source,Ke(Wm.exec(C))+"g")),C.lastIndex=0;Q=C.exec(X);)var j=Q.index;F=F.slice(0,j===n?L:j)}}else if(l.indexOf(Zn(C),L)!=L){var ie=F.lastIndexOf(C);ie>-1&&(F=F.slice(0,ie))}return F+h}function Q1(l){return l=Ke(l),l&&nb.test(l)?l.replace($m,RM):l}var X1=as(function(l,u,m){return l+(m?" ":"")+u.toUpperCase()}),ig=Yy("toUpperCase");function BC(l,u,m){return l=Ke(l),u=m?n:u,u===n?SM(l)?OM(l):uM(l):l.match(u)||[]}var GC=ke(function(l,u){try{return Xn(l,n,u)}catch(m){return eg(m)?m:new Ae(m)}}),j1=bi(function(l,u){return mr(u,function(m){m=ti(m),Si(l,m,Zf(l[m],l))}),l});function Z1(l){var u=l==null?0:l.length,m=ye();return l=u?mt(l,function(h){if(typeof h[1]!="function")throw new fr(a);return[m(h[0]),h[1]]}):[],ke(function(h){for(var C=-1;++C<u;){var O=l[C];if(Xn(O[0],this,h))return Xn(O[1],this,h)}})}function J1(l){return RL(Er(l,_))}function og(l){return function(){return l}}function eU(l,u){return l==null||l!==l?u:l}var tU=$y(),nU=$y(!0);function Bn(l){return l}function ag(l){return Sy(typeof l=="function"?l:Er(l,_))}function rU(l){return by(Er(l,_))}function iU(l,u){return yy(l,Er(u,_))}var oU=ke(function(l,u){return function(m){return Bl(m,l,u)}}),aU=ke(function(l,u){return function(m){return Bl(l,m,u)}});function sg(l,u,m){var h=Gt(u),C=ld(u,h);m==null&&!(Et(u)&&(C.length||!h.length))&&(m=u,u=l,l=this,C=ld(u,Gt(u)));var O=!(Et(m)&&"chain"in m)||!!m.chain,w=Ci(l);return mr(C,function(L){var F=u[L];l[L]=F,w&&(l.prototype[L]=function(){var Q=this.__chain__;if(O||Q){var X=l(this.__wrapped__),j=X.__actions__=Pn(this.__actions__);return j.push({func:F,args:arguments,thisArg:l}),X.__chain__=Q,X}return F.apply(l,Ki([this.value()],arguments))})}),l}function sU(){return Kt._===this&&(Kt._=MM),this}function lg(){}function lU(l){return l=xe(l),ke(function(u){return Cy(u,l)})}var cU=Bf(mt),uU=Bf(Vb),dU=Bf(uf);function YC(l){return Wf(l)?df(ti(l)):YL(l)}function pU(l){return function(u){return l==null?n:ea(l,u)}}var _U=zy(),mU=zy(!0);function cg(){return[]}function ug(){return!1}function fU(){return{}}function gU(){return""}function EU(){return!0}function hU(l,u){if(l=xe(l),l<1||l>I)return[];var m=Z,h=on(l,Z);u=ye(u),l-=Z;for(var C=mf(h,u);++m<l;)u(m);return C}function SU(l){return De(l)?mt(l,ti):Jn(l)?[l]:Pn(sC(Ke(l)))}function TU(l){var u=++wM;return Ke(l)+u}var bU=md(function(l,u){return l+u},0),yU=Gf("ceil"),CU=md(function(l,u){return l/u},1),RU=Gf("floor");function NU(l){return l&&l.length?sd(l,Bn,Nf):n}function vU(l,u){return l&&l.length?sd(l,ye(u,2),Nf):n}function OU(l){return qb(l,Bn)}function AU(l,u){return qb(l,ye(u,2))}function IU(l){return l&&l.length?sd(l,Bn,If):n}function DU(l,u){return l&&l.length?sd(l,ye(u,2),If):n}var wU=md(function(l,u){return l*u},1),xU=Gf("round"),MU=md(function(l,u){return l-u},0);function LU(l){return l&&l.length?_f(l,Bn):0}function kU(l,u){return l&&l.length?_f(l,ye(u,2)):0}return v.after=r0,v.ary=hC,v.assign=V0,v.assignIn=xC,v.assignInWith=Od,v.assignWith=z0,v.at=W0,v.before=SC,v.bind=Zf,v.bindAll=j1,v.bindKey=TC,v.castArray=f0,v.chain=fC,v.chunk=Rk,v.compact=Nk,v.concat=vk,v.cond=Z1,v.conforms=J1,v.constant=og,v.countBy=LP,v.create=q0,v.curry=bC,v.curryRight=yC,v.debounce=CC,v.defaults=K0,v.defaultsDeep=Q0,v.defer=i0,v.delay=o0,v.difference=Ok,v.differenceBy=Ak,v.differenceWith=Ik,v.drop=Dk,v.dropRight=wk,v.dropRightWhile=xk,v.dropWhile=Mk,v.fill=Lk,v.filter=PP,v.flatMap=BP,v.flatMapDeep=GP,v.flatMapDepth=YP,v.flatten=dC,v.flattenDeep=kk,v.flattenDepth=Pk,v.flip=a0,v.flow=tU,v.flowRight=nU,v.fromPairs=Uk,v.functions=n1,v.functionsIn=r1,v.groupBy=HP,v.initial=Bk,v.intersection=Gk,v.intersectionBy=Yk,v.intersectionWith=Hk,v.invert=o1,v.invertBy=a1,v.invokeMap=VP,v.iteratee=ag,v.keyBy=zP,v.keys=Gt,v.keysIn=Fn,v.map=bd,v.mapKeys=l1,v.mapValues=c1,v.matches=rU,v.matchesProperty=iU,v.memoize=Cd,v.merge=u1,v.mergeWith=MC,v.method=oU,v.methodOf=aU,v.mixin=sg,v.negate=Rd,v.nthArg=lU,v.omit=d1,v.omitBy=p1,v.once=s0,v.orderBy=WP,v.over=cU,v.overArgs=l0,v.overEvery=uU,v.overSome=dU, Line truncated
`);return!o||!a?!1:e.chain().command(({tr:s})=>(s.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const s=i.after();return s===void 0||r.nodeAt(s)?!1:e.commands.exitCode()}}},addInputRules(){return[$h({find:KV,type:this.type,getAttributes:e=>({language:e[1]})}),$h({find:QV,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new gt({key:new dt("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:a,schema:s}=e.state,c=s.text(n.replace(/\r\n?/g,`
`));return a.replaceSelectionWith(this.type.create({language:o},c)),a.selection.$from.parent.type!==this.type&&a.setSelection(Ie.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),e.dispatch(a),!0}}})]}});function jV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gw(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&gw(n)}),e}let fv=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Ew(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function yo(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach(function(r){for(const i in r)n[i]=r[i]}),n}const ZV="</span>",gv=e=>!!e.scope,JV=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((r,i)=>`${r}${"_".repeat(i+1)}`)].join(" ")}return`${t}${e}`};let ez=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Ew(t)}openNode(t){if(!gv(t))return;const n=JV(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){gv(t)&&(this.buffer+=ZV)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}};const Ev=(e={})=>{const t={children:[]};return Object.assign(t,e),t};let tz=class hw{constructor(){this.rootNode=Ev(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=Ev({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(r=>this._walk(t,r)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{hw._collapse(n)}))}},nz=class extends tz{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const r=t.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new ez(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function iu(e){return e?typeof e=="string"?e:e.source:null}function Sw(e){return Wa("(?=",e,")")}function rz(e){return Wa("(?:",e,")*")}function iz(e){return Wa("(?:",e,")?")}function Wa(...e){return e.map(n=>iu(n)).join("")}function oz(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function RT(...e){return"("+(oz(e).capture?"":"?:")+e.map(r=>iu(r)).join("|")+")"}function Tw(e){return new RegExp(e.toString()+"|").exec("").length-1}function az(e,t){const n=e&&e.exec(t);return n&&n.index===0}const sz=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function NT(e,{joinWith:t}){let n=0;return e.map(r=>{n+=1;const i=n;let o=iu(r),a="";for(;o.length>0;){const s=sz.exec(o);if(!s){a+=o;break}a+=o.substring(0,s.index),o=o.substring(s.index+s[0].length),s[0][0]==="\\"&&s[1]?a+="\\"+String(Number(s[1])+i):(a+=s[0],s[0]==="("&&n++)}return a}).map(r=>`(${r})`).join(t)}const lz=/\b\B/,bw="[a-zA-Z]\\w*",vT="[a-zA-Z_]\\w*",yw="\\b\\d+(\\.\\d+)?",Cw="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Rw="\\b(0b[01]+)",cz="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",uz=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Wa(t,/.*\b/,e.binary,/\b.*/)),yo({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},ou={begin:"\\\\[\\s\\S]",relevance:0},dz={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ou]},pz={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ou]},_z={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Fm=function(e,t,n={}){const r=yo({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const i=RT("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Wa(/[ ] Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),Z=x,$=I),Y===void 0&&(Y=!0);const oe={code:$,language:Z};ge("before:highlight",oe);const Oe=oe.result?oe.result:_(oe.language,oe.code,Y);return Oe.code=oe.code,ge("after:highlight",Oe),Oe}function _(x,I,Y,$){const Z=Object.create(null);function oe(G,K){return G.keywords[K]}function Oe(){if(!te.keywords){ve.addText(Ee);return}let G=0;te.keywordPatternRe.lastIndex=0;let K=te.keywordPatternRe.exec(Ee),ne="";for(;K;){ne+=Ee.substring(G,K.index);const de=pt.case_insensitive?K[0].toLowerCase():K[0],Pe=oe(te,de);if(Pe){const[_t,Vi]=Pe;if(ve.addText(ne),ne="",Z[de]=(Z[de]||0)+1,Z[de]<=Vz&&(gn+=Vi),_t.startsWith("_"))ne+=K[0];else{const zi=pt.classNameAliases[_t]||_t;Ce(K[0],zi)}}else ne+=K[0];G=te.keywordPatternRe.lastIndex,K=te.keywordPatternRe.exec(Ee)}ne+=Ee.substring(G),ve.addText(ne)}function ze(){if(Ee==="")return;let G=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ve.addText(Ee);return}G=_(te.subLanguage,Ee,!0,pr[te.subLanguage]),pr[te.subLanguage]=G._top}else G=g(Ee,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(gn+=G.relevance),ve.__addSublanguage(G._emitter,G.language)}function be(){te.subLanguage!=null?ze():Oe(),Ee=""}function Ce(G,K){G!==""&&(ve.startScope(K),ve.addText(G),ve.endScope())}function yt(G,K){let ne=1;const de=K.length-1;for(;ne<=de;){if(!G._emit[ne]){ne++;continue}const Pe=pt.classNameAliases[G[ne]]||G[ne],_t=K[ne];Pe?Ce(_t,Pe):(Ee=_t,Oe(),Ee=""),ne++}}function me(G,K){return G.scope&&typeof G.scope=="string"&&ve.openNode(pt.classNameAliases[G.scope]||G.scope),G.beginScope&&(G.beginScope._wrap?(Ce(Ee,pt.classNameAliases[G.beginScope._wrap]||G.beginScope._wrap),Ee=""):G.beginScope._multi&&(yt(G.beginScope,K),Ee="")),te=Object.create(G,{parent:{value:te}}),te}function we(G,K,ne){let de=az(G.endRe,ne);if(de){if(G["on:end"]){const Pe=new fv(G);G["on:end"](K,Pe),Pe.isMatchIgnored&&(de=!1)}if(de){for(;G.endsParent&&G.parent;)G=G.parent;return G}}if(G.endsWithParent)return we(G.parent,K,ne)}function xn(G){return te.matcher.regexIndex===0?(Ee+=G[0],1):(Zr=!0,0)}function mn(G){const K=G[0],ne=G.rule,de=new fv(ne),Pe=[ne.__beforeBegin,ne["on:begin"]];for(const _t of Pe)if(_t&&(_t(G,de),de.isMatchIgnored))return xn(K);return ne.skip?Ee+=K:(ne.excludeBegin&&(Ee+=K),be(),!ne.returnBegin&&!ne.excludeBegin&&(Ee=K)),me(ne,G),ne.returnBegin?0:K.length}function Mn(G){const K=G[0],ne=I.substring(G.index),de=we(te,G,ne);if(!de)return bv;const Pe=te;te.endScope&&te.endScope._wrap?(be(),Ce(K,te.endScope._wrap)):te.endScope&&te.endScope._multi?(be(),yt(te.endScope,G)):Pe.skip?Ee+=K:(Pe.returnEnd||Pe.excludeEnd||(Ee+=K),be(),Pe.excludeEnd&&(Ee=K));do te.scope&&ve.closeNode(),!te.skip&&!te.subLanguage&&(gn+=te.relevance),te=te.parent;while(te!==de.parent);return de.starts&&me(de.starts,G),Pe.returnEnd?0:K.length}function et(){const G=[];for(let K=te;K!==pt;K=K.parent)K.scope&&G.unshift(K.scope);G.forEach(K=>ve.openNode(K))}let Ze={};function fn(G,K){const ne=K&&K[0];if(Ee+=G,ne==null)return be(),0;if(Ze.type==="begin"&&K.type==="end"&&Ze.index===K.index&&ne===""){if(Ee+=I.slice(K.index,K.index+1),!i){const de=new Error(`0 width match regex (${x})`);throw de.languageName=x,de.badRule=Ze.rule,de}return 1}if(Ze=K,K.type==="begin")return mn(K);if(K.type==="illegal"&&!Y){const de=new Error('Illegal lexeme "'+ne+'" for mode "'+(te.scope||"<unnamed>")+'"');throw de.mode=te,de}else if(K.type==="end"){const de=Mn(K);if(de!==bv)return de}if(K.type==="illegal"&&ne==="")return 1;if(kn>1e5&&kn>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ee+=ne,ne.length}const pt=W(x);if(!pt)throw Ia(o.replace("{}",x)),new Error('Unknown language: "'+x+'"');const Ln=Gz(pt);let Mr="",te=$||Ln;const pr={},ve=new s.__emitter(s);et();let Ee="",gn=0,Bt=0,kn=0,Zr=!1;try{if(pt.__emitTokens)pt.__emitTokens(I,ve);else{for(te.matcher.considerAll();;){kn++,Zr?Zr=!1:te.matcher.considerAll(),te.matcher.lastIndex=Bt;const G=te.matcher.exec(I);if(!G)break;const K=I.substring(Bt,G.index),ne=fn(K,G);Bt=G.index+ne}fn(I.substring(Bt))}return ve.finalize(),Mr=ve.toHTML(),{language:x,value:Mr,relevance:gn,illegal:!1,_emitter:ve,_top:te}}catch(G){if(G.message&&G.message.includes("Illegal"))return{language:x,value:aE(I),illegal:!0,relevance:0,_illegalBy:{message:G.message,index:Bt,context:I.slice(Bt-100,Bt+100),mode:G.mode,resultSoFar:Mr},_emitter:ve};if(i)return{language:x,value:aE(I),illegal:!1,relevance:0,errorRaised:G,_emitter:ve,_top:te};throw G}}function f(x){const I={value:aE(x),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return I._emitter.addText(x),I}function g(x,I){I=I||s.languages||Object.keys(t);const Y=f(x),$=I.filter(W).filter(le).map(be=>_(be,x,!1));$.unshift(Y);const Z=$.sort((be,Ce)=>{if(be.relevance!==Ce.relevance)return Ce.relevance-be.relevance;if(be.language&&Ce.language){if(W(be.language).supersetOf===Ce.language)return 1;if(W(Ce.language).supersetOf===be.language)return-1}return 0}),[oe,Oe]=Z, Line truncated
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function MK(e){const t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}function LK(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function kK(e){const t={className:"variable",begin:/\b_+[a-zA-Z]\w*/},n={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},r={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},i=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],o=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],a=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSouLine truncated
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},e.COMMENT("^[ ]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}function FK(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const BK=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),GK=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],YK=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],HK=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],$K=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],VK=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","backgrou Line truncated
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function qK(e){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function KK(e){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function QK(e){const t=e.regex,n=/[a-zA-Z_][a-zA-Z0-9_]*/,r={className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:t.concat(/\$/,t.optional(/::/),n,"(::",n,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r]}}function XK(e){const t=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...t,"set","list","map"]},end:">",contains:["self"]}]}}function jK(e){const t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},r={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},i={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[r,i,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT Line truncated
`},d]}}const P3=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z][A-Za-z0-9_-]*/}}),U3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],F3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],kw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],Pw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],B3=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","fon Line truncated
]`,g={scope:"string",variants:[d,c,p,_]},E={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},T=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],S=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],R={keyword:b,literal:(he=>{const Se=[];return he.forEach(ge=>{Se.push(ge),ge.toLowerCase()===ge?Se.push(ge.toUpperCase()):Se.push(ge.toLowerCase())}),Se})(T),built_in:S},A=he=>he.map(Se=>Se.replace(/\|\d+$/,"")),D={variants:[{match:[/new/,t.concat(f,"+"),t.concat("(?!",A(S).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},M=t.concat(r,"\\b(?!\\()"),k={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,t.concat(/::/,t.lookahead(/(?!class\b)/)),M],scope:{1:"title.class",3:"variable.constant"}},{match:[i,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},z={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},W={relevance:0,begin:/\(/,end:/\)/,keywords:R,contains:[z,o,k,e.C_BLOCK_COMMENT_MODE,g,E,D]},H={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",A(b).join("\\b|"),"|",A(S).join("\\b|"),"\\b)"),r,t.concat(f,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[W]};W.contains.push(H);const le=[z,k,e.C_BLOCK_COMMENT_MODE,g,E,D],_e={begin:t.concat(/#\[\s*/,i),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:T,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:T,keyword:["new","array"]},contains:["self",...le]},...le,{scope:"meta",match:i}]};return{case_insensitive:!1,keywords:R,contains:[_e,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,H,k,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},D,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:R,contains:["self",o,k,e.C_BLOCK_COMMENT_MODE,g,E]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trai Line truncated
https://github.com/highlightjs/highlight.js/issues/2277`),Z=x,$=I),Y===void 0&&(Y=!0);const oe={code:$,language:Z};ge("before:highlight",oe);const Oe=oe.result?oe.result:_(oe.language,oe.code,Y);return Oe.code=oe.code,ge("after:highlight",Oe),Oe}function _(x,I,Y,$){const Z=Object.create(null);function oe(G,K){return G.keywords[K]}function Oe(){if(!te.keywords){ve.addText(Ee);return}let G=0;te.keywordPatternRe.lastIndex=0;let K=te.keywordPatternRe.exec(Ee),ne="";for(;K;){ne+=Ee.substring(G,K.index);const de=pt.case_insensitive?K[0].toLowerCase():K[0],Pe=oe(te,de);if(Pe){const[_t,Vi]=Pe;if(ve.addText(ne),ne="",Z[de]=(Z[de]||0)+1,Z[de]<=f4&&(gn+=Vi),_t.startsWith("_"))ne+=K[0];else{const zi=pt.classNameAliases[_t]||_t;Ce(K[0],zi)}}else ne+=K[0];G=te.keywordPatternRe.lastIndex,K=te.keywordPatternRe.exec(Ee)}ne+=Ee.substring(G),ve.addText(ne)}function ze(){if(Ee==="")return;let G=null;if(typeof te.subLanguage=="string"){if(!t[te.subLanguage]){ve.addText(Ee);return}G=_(te.subLanguage,Ee,!0,pr[te.subLanguage]),pr[te.subLanguage]=G._top}else G=g(Ee,te.subLanguage.length?te.subLanguage:null);te.relevance>0&&(gn+=G.relevance),ve.__addSublanguage(G._emitter,G.language)}function be(){te.subLanguage!=null?ze():Oe(),Ee=""}function Ce(G,K){G!==""&&(ve.startScope(K),ve.addText(G),ve.endScope())}function yt(G,K){let ne=1;const de=K.length-1;for(;ne<=de;){if(!G._emit[ne]){ne++;continue}const Pe=pt.classNameAliases[G[ne]]||G[ne],_t=K[ne];Pe?Ce(_t,Pe):(Ee=_t,Oe(),Ee=""),ne++}}function me(G,K){return G.scope&&typeof G.scope=="string"&&ve.openNode(pt.classNameAliases[G.scope]||G.scope),G.beginScope&&(G.beginScope._wrap?(Ce(Ee,pt.classNameAliases[G.beginScope._wrap]||G.beginScope._wrap),Ee=""):G.beginScope._multi&&(yt(G.beginScope,K),Ee="")),te=Object.create(G,{parent:{value:te}}),te}function we(G,K,ne){let de=wQ(G.endRe,ne);if(de){if(G["on:end"]){const Pe=new Iv(G);G["on:end"](K,Pe),Pe.isMatchIgnored&&(de=!1)}if(de){for(;G.endsParent&&G.parent;)G=G.parent;return G}}if(G.endsWithParent)return we(G.parent,K,ne)}function xn(G){return te.matcher.regexIndex===0?(Ee+=G[0],1):(Zr=!0,0)}function mn(G){const K=G[0],ne=G.rule,de=new Iv(ne),Pe=[ne.__beforeBegin,ne["on:begin"]];for(const _t of Pe)if(_t&&(_t(G,de),de.isMatchIgnored))return xn(K);return ne.skip?Ee+=K:(ne.excludeBegin&&(Ee+=K),be(),!ne.returnBegin&&!ne.excludeBegin&&(Ee=K)),me(ne,G),ne.returnBegin?0:K.length}function Mn(G){const K=G[0],ne=I.substring(G.index),de=we(te,G,ne);if(!de)return kv;const Pe=te;te.endScope&&te.endScope._wrap?(be(),Ce(K,te.endScope._wrap)):te.endScope&&te.endScope._multi?(be(),yt(te.endScope,G)):Pe.skip?Ee+=K:(Pe.returnEnd||Pe.excludeEnd||(Ee+=K),be(),Pe.excludeEnd&&(Ee=K));do te.scope&&ve.closeNode(),!te.skip&&!te.subLanguage&&(gn+=te.relevance),te=te.parent;while(te!==de.parent);return de.starts&&me(de.starts,G),Pe.returnEnd?0:K.length}function et(){const G=[];for(let K=te;K!==pt;K=K.parent)K.scope&&G.unshift(K.scope);G.forEach(K=>ve.openNode(K))}let Ze={};function fn(G,K){const ne=K&&K[0];if(Ee+=G,ne==null)return be(),0;if(Ze.type==="begin"&&K.type==="end"&&Ze.index===K.index&&ne===""){if(Ee+=I.slice(K.index,K.index+1),!i){const de=new Error(`0 width match regex (${x})`);throw de.languageName=x,de.badRule=Ze.rule,de}return 1}if(Ze=K,K.type==="begin")return mn(K);if(K.type==="illegal"&&!Y){const de=new Error('Illegal lexeme "'+ne+'" for mode "'+(te.scope||"<unnamed>")+'"');throw de.mode=te,de}else if(K.type==="end"){const de=Mn(K);if(de!==kv)return de}if(K.type==="illegal"&&ne==="")return 1;if(kn>1e5&&kn>K.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Ee+=ne,ne.length}const pt=W(x);if(!pt)throw Da(o.replace("{}",x)),new Error('Unknown language: "'+x+'"');const Ln=d4(pt);let Mr="",te=$||Ln;const pr={},ve=new s.__emitter(s);et();let Ee="",gn=0,Bt=0,kn=0,Zr=!1;try{if(pt.__emitTokens)pt.__emitTokens(I,ve);else{for(te.matcher.considerAll();;){kn++,Zr?Zr=!1:te.matcher.considerAll(),te.matcher.lastIndex=Bt;const G=te.matcher.exec(I);if(!G)break;const K=I.substring(Bt,G.index),ne=fn(K,G);Bt=G.index+ne}fn(I.substring(Bt))}return ve.finalize(),Mr=ve.toHTML(),{language:x,value:Mr,relevance:gn,illegal:!1,_emitter:ve,_top:te}}catch(G){if(G.message&&G.message.includes("Illegal"))return{language:x,value:dE(I),illegal:!0,relevance:0,_illegalBy:{message:G.message,index:Bt,context:I.slice(Bt-100,Bt+100),mode:G.mode,resultSoFar:Mr},_emitter:ve};if(i)return{language:x,value:dE(I),illegal:!1,relevance:0,errorRaised:G,_emitter:ve,_top:te};throw G}}function f(x){const I={value:dE(x),illegal:!1,relevance:0,_top:a,_emitter:new s.__emitter(s)};return I._emitter.addText(x),I}function g(x,I){I=I||s.languages||Object.keys(t);const Y=f(x),$=I.filter(W).filter(le).map(be=>_(be,x,!1));$.unshift(Y);const Z=$.sort((be,Ce)=>{if(be.relevance!==Ce.relevance)return Ce.relevance-be.relevance;if(be.language&&Ce.language){if(W(be.language).supersetOf===Ce.language)return 1;if(W(Ce.language).supersetOf===be.language)return-1}return 0}),[oe,Oe]=Z, Line truncated
`);return!r||!i?!1:!!e.chain().command(({tr:o})=>(o.delete(t.pos-2,t.pos),!0)).exitCode().run()}function I4(){if(this.options.codeMode)return!1;const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?!!this.editor.commands.clearNodes():!1}function D4({editor:e}){const t=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset);return(t==null?void 0:t.split(`
`))||[]}const MT=["arduino","bash","c","cpp","csharp","css","diff","go","graphql","ini","java","javascript","json","kotlin","less","lua","makefile","markdown","objectivec","perl","php","php-template","plaintext","python","python-repl","r","ruby","rust","scss","shell","sql","swift","typescript","vbnet","wasm","xml","yaml","ipsphtml","ipscss"],w4=ut.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",We(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),cu=w4.extend({parseHTML(){return[{tag:"li",getAttrs:e=>{var t;if(((t=e.childNodes)==null?void 0:t.length)>1){const n=document.createElement("div");n.innerHTML=e.innerHTML,e.innerHTML="",e.appendChild(n)}return null}}]}});function $t(e,t="",n=!0){const r=i=>{t&&(i.message=t+": "+i.message),window.Debug[n?"warn":"error"](i)};try{const i=e();return i instanceof Promise?new Promise(o=>{i.catch(r).finally(()=>o(!1))}):!0}catch(i){return r(i),!1}}const Kn=OT.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this)}},addAttributes(){var e;return{language:{default:this.options.defaultLanguage||((e=this.options.allowedLanguages)==null?void 0:e[0])||"plaintext",parseHTML:t=>{var r,i;const n=(r=(()=>{if(t.hasAttribute("language"))return t.getAttribute("language");for(const o of t.classList)if(o.match(/^language-([a-z0-9\-_]+)$/i))return o.match(/^language-([a-z0-9\-_]+)$/i)[1];for(const o of t.querySelectorAll("code")){if(o.hasAttribute("language"))return o.getAttribute("language");for(const a of o.classList)if(a.match(/^language-([a-z0-9\-_]+)$/i))return a.match(/^language-([a-z0-9\-_]+)$/i)[1]}})())==null?void 0:r.toLowerCase();return this.options.codeMode&&(!n||!MT.includes(n)||n!==this.options.defaultLanguage&&this.options.allowedLanguages&&!this.options.allowedLanguages.includes(n))?this.options.defaultLanguage||((i=this.options.allowedLanguages)==null?void 0:i[0])||"plaintext":n}}}},addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),codeMode:!1,allowedLanguages:null}},renderHTML({HTMLAttributes:e}){var n;const t=this.options.codeMode?this.editor.options.lastLang||((n=this.editor.options.allowedLanguages)==null?void 0:n[0])||"plaintext":e.language;return["pre",{spellcheck:"false",class:`${this.options.codeMode?"":"ipsCode "}language-${t}`,"data-language":sl[t]||t},["code",{},0]]},onUpdate({editor:e}){this.options.codeMode&&e.options.lastLang&&e.options.lastLang!==e.getAttributes(this).language&&e.chain().setCodeBlock({language:e.options.lastLang}).run()},addKeyboardShortcuts(){const e=this.editor,t={"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{var s;if(!e.state.selection.empty||((s=e.state.selection.$from.parent)==null?void 0:s.type.name)!==this.name)return!1;if(I4.call(this))return!0;if(!this.options.codeMode&&(!e.state.selection.$from.parent.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(e.state.selection.$from.parent.attrs.language)))return!1;const i=e.state.selection.$from.parent.textContent.slice(0,e.state.selection.$from.parentOffset),o=e.state.selection.$from.parent.textContent.slice(e.state.selection.$from.parentOffset);if(i&&o){for(const c in Zt)if(i.endsWith(c)&&o.startsWith(Zt[c]))return e.chain().deleteRange({from:e.state.selection.from-c.length,to:e.state.selection.from+Zt[c].length}).setTextSelection(e.state.selection.from-c.length).focus().run()}const a=i.match(/(\t)[^\n]*(\n\t+)$/);return a?e.chain().deleteRange({from:e.state.selection.from-a[2].length,to:e.state.selection.from}).setTextSelection(e.state.selection.from-a[2].length).focus().run():!1},Enter:({editor:r})=>{var A,D,M,k,z,W,H,le,_e,he,Se;if(A4.call(this,{editor:r}))return!0;const{$from:o}=r.state.selection,{parent:a}=o;if(!r.state.selection.empty||(a==null?void 0:a.type.name)!==this.name||!this.options.codeMode&&(!a.attrs.language||["plaintext","bash","shell","zsh","sh"].includes(a.attrs.language)))return!1;const s=D4({editor:r});if(!s.length)return!1;const c=s[s.length-1],d=s[s.length-2];let p=((D=(A=c.match(/^\t*/))==null?void 0:A[0])==null?void 0:D.length)||0,_=!1;const f=a.attrs.language,g=["ipsphtml","xml","html","xhtml","html5"].includes(f),E=["ipscss","css","scss","sass","less"].includes(f),T=["plaintext","rtf","markdown","md","bbcode"].includes(f),b=g?/(<[^>/]*>)$/:/([{[(.:]|->)$/,S=g?/(<\/[^/>]*>)$/:/^\s*([}\])]+[,;]?)$/;let y=!1;if(!g&&!E&&!T&&c.match(/^\s+(\.|->)?[a-z0-9_-]/i))if(c.match(/^\s+(\.|->)/))y=!0,p--;else{let ge=1;for(;ge<s.length&&((z=(k=(M=s[s.length-1-ge])==null?void 0:M.match(/^\t*/))==null?void 0:k[0])==null?void 0:z.length)<=p;)ge++;(W=s[s.length-ge])!=null&&W.match(/(\.|->)\s*$/)&&(y=!0,p--)}let R=!1;i Line truncated
`+" ".repeat(p);_?(ge-=c.length,x=c.replace(/^\t/,"")+x):R&&(ae=`
`+(p>1?" ".repeat(p-1):""),x+=ae);let I=this.editor.chain().insertContentAt({from:ge,to:r.state.selection.from},{type:"text",text:x});return ae&&(I=I.setTextSelection(r.state.selection.from+x.length-ae.length)),I.focus().run()}return!1},ArrowDown:({editor:r})=>{if(!this.options.exitOnArrowDown||this.options.codeMode)return!1;const{state:i}=r,{selection:o,doc:a}=i,{$from:s,empty:c}=o;if(!c||s.parent.type!==this.type||!(s.parentOffset===s.parent.nodeSize-2))return!1;const p=s.after();return p===void 0||a.nodeAt(p)?!1:!!r.commands.exitCode()},ArrowUp:x4.bind(this),Tab:op.bind(this,!1,{editor:e}),"Shift-Tab":op.bind(this,!0,{editor:e}),"Alt-Tab":op.bind(this,!1,{editor:e},!0),"Shift-Alt-Tab":op.bind(this,!0,{editor:e},!0)},n=[];for(const r in Zt)t[r]=({editor:i})=>M4({editor:i,char:r}),n.push([r,Zt[r]]);return n.forEach(([r,i])=>{if(i in t){const o=t[i];t[i]=({editor:a,...s})=>Pv({editor:a,opener:r})||o({editor:a,...s})}else t[i]=({editor:o})=>Pv({editor:o,opener:r})}),t}});function x4({editor:e}){if(e.options.codeMode)return!1;const{$from:t,empty:n}=e.state.selection;if(t.nodeBefore||!n||t.parent.type!==this.type)return!1;let r=0,i;for(const a of[...t.path].reverse()){if(!Number.isInteger(a)&&(r++,r===2))break;i=a}return!r||!Number.isInteger(i)||i!==0||!(t.parentOffset===0)?!1:(e.chain().insertContentAt(t.before(),"<p>&nbsp;</p>",{updateSelection:!0}).run(),!0)}function op(e=!1,{editor:t=null},n=!1){var r,i,o,a;if((!t.state.selection.empty||e)&&t.isActive(this.name)&&(t.options.codeMode||[...t.state.selection.$from.path].reverse()[3]===[...t.state.selection.$to.path].reverse()[3]))return t.state.selection.empty&&e&&t.state.selection.$from.parentOffset===0||$t(()=>{t.chain().command(({tr:s,chain:c})=>{var d,p,_,f;try{const{from:g,to:E}=t.state.selection,T=[...t.state.selection.$from.path].reverse()[3]+1;let b=g;if(b>[...t.state.selection.$from.path].reverse()[3]){for(;b>[...t.state.selection.$from.path].reverse()[3]&&!((d=s.doc.slice(b-1,b--).content.content[0])!=null&&d.textContent.startsWith(`
`)););b++}const S=((p=s.doc.slice(b,E).content.content[0])==null?void 0:p.textContent)||"",y=g-b,R=S.split(`
`),A=R.map(k=>e?k.replace(/^\t/,""):" "+k).join(`
`);let D=!1;try{e&&R.length>1&&R[R.length-1].match(/^\t/)&&((f=(_=s.doc.slice(E,E+1))==null?void 0:_.content.content[0])==null?void 0:f.textContent)===" "&&(D=!0)}catch{}s.insertText(A,b,E);const M={from:b+y,to:b+A.length};e&&S.startsWith(" ")?M.from--:e||M.from++,D&&M.to++,T>M.from&&(M.from=T),c().setTextSelection(M).focus().run()}catch{}return!0}).run()},"Something went wrong when modifying indents in a codeblock selection"),!0;if(!n&&t.isActive(cu.name))return!1;if(t.state.selection.empty){if(e){if(t.state.selection.$from.parentOffset>0){const s=t.state.doc.slice(t.state.selection.from-1,t.state.selection.from);if(((i=(r=s==null?void 0:s.content)==null?void 0:r.content[0])==null?void 0:i.textContent)===" "){const{from:c}=t.state.selection;return t.chain().command(({tr:d})=>(d.deleteRange(c-1,c),!0)).setTextSelection({from:c-1,to:c-1}).run(),!0}}if(t.state.selection.$from.parentOffset<t.state.selection.$from.parent.nodeSize-2){const s=t.state.doc.slice(t.state.selection.from,t.state.selection.from+1);if(((a=(o=s==null?void 0:s.content)==null?void 0:o.content[0])==null?void 0:a.textContent)===" "){const{from:c}=t.state.selection;return t.chain().command(({tr:d})=>(d.deleteRange(c,c+1),!0)).setTextSelection({from:c,to:c}).run(),!0}}}}else return!0;return t.chain().insertContent(" ").focus().run(),!0}function M4({editor:e,char:t}){var _,f,g;if(!(t in Zt))return!1;const{$from:n,$to:r}=e.state.selection,i=n.parent,o=r.parent;if(((_=i==null?void 0:i.type)==null?void 0:_.name)!==OT.name||i!==o)return!1;if(e.state.selection.empty)return e.chain().insertContent(`${t}${Zt[t]}`).setTextSelection(e.state.selection.from+t.length).focus().run();const a=i.textContent;let s=a.slice(n.parentOffset,r.parentOffset);if(!s)return!1;if(['"',"'","`"].includes(t)){const E=new RegExp(`(^|[^\\\\])\\${t}`,"g");s=s.replaceAll(E,`$1\\${t}`).replaceAll(/\n/g,"\\n")}let c="",d=0;if(s.match(/\n/)){const T=a.slice(0,n.parentOffset).split(`
`).pop(),b=a.slice(r.parentOffset).split(`
`).shift();let S=Math.max(0,((g=(f=T.match(/^\t*/))==null?void 0:f[0])==null?void 0:g.length)+1);T.match(/^\t*$/)&&b.match(/^\t+$/)&&(S+=b.match(/^\t+$/)[0].length),b.match(/^\s*$/)&&(s=s.replace(/^\s*?\n\s*(.?)/,"$1")),d=S+1;const y=" ".repeat(S),R=new RegExp(`\\n\\t{0,${S?S-1:0}}`,"g");if(s=s.replaceAll(R,`
${y}`),s=`${t}
${y}${s}
${y?y.slice(0,y.length-1):""}${Zt[t]}`,r.parentOffset<a.length)try{const A=a.slice(r.parentOffset,r.parentOffset+1);A!=null&&A.match(/\n/)||(c=`
`+(y?y.slice(0,y.length-1):""),s+=c)}catch{}}else s=`${t}${s}${Zt[t]}`;const p={from:e.state.selection.from+t.length+d,to:e.state.selection.from+s.length-Zt[t].length-c.length-(d?d-1:0)};return e.chain().insertContentAt({from:e.state.selection.from,to:e.state.selection.to},{type:"text",text:s}).setTextSelection(p).focus().run()}function Pv({editor:e,opener:t}){var o;if(!(t in Zt)||!e.state.selection.empty)return!1;const{$from:n}=e.state.selection,r=n.parent;if((r==null?void 0:r.type.name)!==OT.name)return!1;const i=(o=n.parent)==null?void 0:o.textContent;if(n.parentOffset<1||n.parentOffset>=i.length)return!1;try{const a=n.parentOffset;let s=i==null?void 0:i.slice(a,a+Zt[t].length);if(!s)return;if(s.startsWith(Zt[t]))return a>0&&['"',"'","`"].includes(t)&&(i==null?void 0:i[a-1])==="\\"?e.chain().insertContent({type:"text",text:Zt[t]}).focus().run():e.chain().setTextSelection(e.state.selection.from+Zt[t].length).focus().run()}catch{return!1}return!1}const Zt={"{":"}","[":"]","(":")","'":"'",'"':'"',"`":"`"},ic={};function dx(e,t,n=[]){var r;if(!((r=ic[e])!=null&&r.to)){let i=!1;if(e===t)i=[e];else if(e in Ro){const o=[e];if(t in Ro[e])o.push(t);else{let a;n=[...n,...o];for(const s in Ro[e])if(!(n.includes(s)||s===e)&&Ro[s]){const c=dx(s,t,n);Array.isArray(c)&&(!a||a.length>c.length)&&(a=c)}Array.isArray(a)&&o.splice(1,0,...a)}o.length&&o[o.length-1]===t&&(i=o)}e in ic||(ic[e]={}),ic[e][t]=i}return ic[e][t]}function L4(e,t,n){const r=dx(e,t);if(!Array.isArray(r))throw new RangeError(`Cannot convert ${e} to ${t} because there is not a known conversion pathway`);r.length===1&&e===pn.name&&n.chain().toggleHeading({level:n.level||1});for(let i=0;i<r.length-1;i++){const o=Ro[r[i]][r[i+1]](n);if(o!==void 0&&!o)throw new Error(`Could not convert ${r[i]} to ${r[i+1]}`)}return!0}function LT(e){const t=[...e.state.selection.$from.path].reverse()[2],n=t==null?void 0:t.type.name;return n===pn.name?[n,{level:t.attrs.level||1}]:[n||"",{}]}function Mp(e){var n;if(e[0]===pn.name)return`Heading ${((n=e[1])==null?void 0:n.level)||""}`;const t=e[0]in Zh?e[0]:Nt.name;return Zh[t]}function k4(e){if(e in Uv)return[Uv[e],{}];const t=Mp([pn.name,{}]);if(e.startsWith(t)){const n=parseInt(e.replace("Heading","").trim())||1;return[pn.name,{level:n}]}return[Nt.name,{}]}const Zh={[Hi.name]:"Ordered List",[Yo.name]:"Bullet List",[Kn.name]:"Code Block",[Nt.name]:"Paragraph"},Uv=Object.fromEntries([...Object.entries(Zh)].map(e=>e.reverse()));function P4(e){for(let t of pn.options.levels)if(e.isActive(pn.name,{level:t}))return{level:t};return null}function px(e){const t=LT(e);return t[0]in Ro?U4(...t).filter(n=>{var r,i;return(n[0]!==pn.name||!((r=e.options.restrictions)!=null&&r.has("heading")))&&!(n[0]===pn.name&&n[1].level===1&&((i=e.options.restrictions)!=null&&i.has("heading_1")))}):[]}const oc={};function U4(e,t={}){const n=JSON.stringify({name:e,attributes:t});if(!(n in oc)){const r=_x(e);oc[n]=[];for(const i of r)if(i===pn.name)for(let o=1;o<=6;o++)oc[n].push([pn.name,{level:o}]);else oc[n].push([i,{}])}return oc[n]}function _x(e,t){if(t=t||new Set,t.add(e),e in Ro)for(const n in Ro[e])t.has(n)||_x(n,t);return t}const Ro={[Nt.name]:{[Kn.name]:({chain:e})=>e().setCodeBlock(),[pn.name]:({chain:e,level:t=1})=>e().setHeading({level:t})},[Kn.name]:{[Nt.name]:({chain:e})=>e().toggleCodeBlock()},[pn.name]:{[Nt.name]:({chain:e,editor:t,level:n})=>{var r;return n=n||((r=P4(t))==null?void 0:r.level),n?e().toggleHeading({level:n}):!1}}};function F4({...e}){const{editor:t}=B.useContext(Ue),n=LT(t);return e.dropdownOptions=e.dropdownOptions||{},e.dropdownOptions.className=e.dropdownOptions.className||"",e.dropdownOptions.className=[...e.dropdownOptions.className.split(/\s+/),"ipsRichText"].join(" "),N.jsx(za,{current:N.jsx(N.Fragment,{children:N.jsx("i",{className:"fa-solid fa-paragraph"})}),currentValue:Mp(n),blank:N.jsx(Fv,{block:[Nt.title,{}]}),items:px(t).map(r=>[Mp(r),N.jsx(Fv,{block:r},Mp(r))]),onChange:r=>{const i=k4(r);t.chain().command(o=>L4(n[0],i[0],{...i[1]||{},...o})).focus().run()},...e,dropdownOptions:{...e.dropdownOptions,location:"se"}})}function Fv({block:e,style:t=!0}){if(e[0]===pn.name){const n=`h${e[1].level}`;return t?N.jsxs(n,{children:["Heading ",e[1].level]}):N.jsxs(N.Fragment,{children:["Heading ",e[1].level]})}return e[0]===Kn.name?t?N.jsx("code",{children:"Code Block"}):N.jsx(N.Fragment,{children:"Code Block"}):N.jsx(N.Fragment,{children:"Paragraph"})}const uu=Ft.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",We(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),du=Ft.create({name:"superscript",addOptionsLine truncated
`,q4="️",K4="‍";let sp=null,lp=null;function Q4(e){e===void 0&&(e=[]);const t={};Hn.groups=t;const n=new Hn;sp==null&&(sp=$v(Y4)),lp==null&&(lp=$v(H4)),re(n,"'",H_),re(n,"{",Ic),re(n,"}",Dc),re(n,"[",O_),re(n,"]",A_),re(n,"(",I_),re(n,")",D_),re(n,"<",w_),re(n,">",x_),re(n,"(",M_),re(n,")",L_),re(n,"「",k_),re(n,"」",P_),re(n,"『",U_),re(n,"』",F_),re(n,"<",B_),re(n,">",G_),re(n,"&",Y_),re(n,"*",$_),re(n,"@",uo),re(n,"`",z_),re(n,"^",W_),re(n,":",go),re(n,",",UT),re(n,"$",q_),re(n,".",oi),re(n,"=",K_),re(n,"!",FT),re(n,"-",ai),re(n,"%",Q_),re(n,"|",X_),re(n,"+",j_),re(n,"#",Z_),re(n,"?",J_),re(n,'"',BT),re(n,"/",si),re(n,";",GT),re(n,"~",wc),re(n,"_",em),re(n,"\\",V_);const r=br(n,mE,kT,{[Jh]:!0});br(r,mE,r);const i=br(n,fs,Ai,{[eS]:!0});br(i,fs,i);const o=br(n,pE,rS,{[tS]:!0});br(o,fs),br(o,pE,o);const a=br(n,Yv,fx,{[Bv]:!0});re(n,Hv,PT,{[Bv]:!0}),re(a,Hv),br(a,Yv,a);const s=br(n,_E,gx,{[mx]:!0});br(s,_E,s),re(s,q4,s);const c=re(s,K4);br(c,_E,s);const d=[[fs,i]],p=[[fs,null],[pE,o]];for(let _=0;_<sp.length;_++)ro(n,sp[_],iS,Ai,d);for(let _=0;_<lp.length;_++)ro(n,lp[_],oS,rS,p);Ta(iS,{tld:!0,ascii:!0},t),Ta(oS,{utld:!0,alpha:!0},t),ro(n,"file",kp,Ai,d),ro(n,"mailto",kp,Ai,d),ro(n,"http",Ts,Ai,d),ro(n,"https",Ts,Ai,d),ro(n,"ftp",Ts,Ai,d),ro(n,"ftps",Ts,Ai,d),Ta(kp,{scheme:!0,ascii:!0},t),Ta(Ts,{slashscheme:!0,ascii:!0},t),e=e.sort((_,f)=>_[0]>f[0]?1:-1);for(let _=0;_<e.length;_++){const f=e[_][0],E=e[_][1]?{[$4]:!0}:{[V4]:!0};f.indexOf("-")>=0?E[nS]=!0:fs.test(f)?mE.test(f)?E[Lp]=!0:E[eS]=!0:E[Jh]=!0,Gv(n,f,f,E)}return Gv(n,"localhost",pu,{ascii:!0}),n.jd=new Hn(tm),{start:n,tokens:Ya({groups:t},Ex)}}function X4(e,t){const n=j4(t.replace(/[A-Z]/g,s=>s.toLowerCase())),r=n.length,i=[];let o=0,a=0;for(;a<r;){let s=e,c=null,d=0,p=null,_=-1,f=-1;for(;a<r&&(c=s.go(n[a]));)s=c,s.accepts()?(_=0,f=0,p=s):_>=0&&(_+=n[a].length,f++),d+=n[a].length,o+=n[a].length,a++;o-=_,a-=f,d-=_,i.push({t:p.t,v:t.slice(o-d,o),s:o-d,e:o})}return i}function j4(e){const t=[],n=e.length;let r=0;for(;r<n;){let i=e.charCodeAt(r),o,a=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}function ro(e,t,n,r,i){let o;const a=t.length;for(let s=0;s<a-1;s++){const c=t[s];e.j[c]?o=e.j[c]:(o=new Hn(r),o.jr=i.slice(),e.j[c]=o),e=o}return o=new Hn(n),o.jr=i.slice(),e.j[t[a-1]]=o,o}function $v(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let a=parseInt(e.substring(r,r+o),10);a>0;a--)n.pop();r+=o}else n.push(e[r]),r++}return t}const ll={defaultProtocol:"http",events:null,format:Vv,formatHref:Vv,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Gm(e,t){t===void 0&&(t=null);let n=Ya({},ll);e&&(n=Ya(n,e instanceof Gm?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}Gm.prototype={o:ll,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:ll[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Vv(e){return e}var Z4=Object.freeze({__proto__:null,defaults:ll,Options:Gm,assign:Ya});function hx(e,t){this.t="token",this.v=e,this.tk=t}hx.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=ll.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),a={},s=e.get("className",n,t),c=e.get("target",n,t),d=e.get("rel",n,t),p=e.getObj("attributes",n,t),_=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),c&&(a.target=c),d&&(a.rel=d),p&&Ya(a,p),{tagName:i,attributes:a,content:o,eventListeners:_}}};function Ym(e,t){class n extends hx{constructor(i,o){super(i,o),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const zv=Ym("email",{isLink:!0,toHref(){return"mailto:Line truncated
1. Must only contain digits, lowercase ASCII letters or "-"
2. Cannot start or end with "-"
3. "-" cannot repeat`);ht.customSchemes.push([e,t])}function o5(){ht.scanner=Q4(ht.customSchemes);for(let e=0;e<ht.tokenQueue.length;e++)ht.tokenQueue[e][1]({scanner:ht.scanner});ht.parser=e5(ht.scanner.tokens);for(let e=0;e<ht.pluginQueue.length;e++)ht.pluginQueue[e][1]({scanner:ht.scanner,parser:ht.parser});ht.initialized=!0}function Sx(e){return ht.initialized||o5(),t5(ht.parser.start,e,X4(ht.scanner.start,e))}function YT(e,t,n){if(t===void 0&&(t=null),n===void 0&&(n=null),t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new Gm(n),i=Sx(e),o=[];for(let a=0;a<i.length;a++){const s=i[a];s.isLink&&(!t||s.t===t)&&r.check(s)&&o.push(s.toFormattedObject(r))}return o}function a5(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function s5(e){return new gt({key:new dt("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(d=>d.docChanged)&&!n.doc.eq(r.doc),o=t.some(d=>d.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=r,s=v$(n.doc,[...t]);if(L$(s).forEach(({newRange:d})=>{const p=A$(r.doc,d,g=>g.isTextblock);let _,f;if(p.length>1?(_=p[0],f=r.doc.textBetween(_.pos,_.pos+_.node.nodeSize,void 0," ")):p.length&&r.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(_=p[0],f=r.doc.textBetween(_.pos,d.to,void 0," ")),_&&f){const g=f.split(" ").filter(S=>S!=="");if(g.length<=0)return!1;const E=g[g.length-1],T=_.pos+f.lastIndexOf(E);if(!E)return!1;const b=Sx(E).map(S=>S.toObject(e.defaultProtocol));if(!a5(b))return!1;b.filter(S=>S.isLink).map(S=>({...S,from:T+S.start+1,to:T+S.end+1})).filter(S=>r.schema.marks.code?!r.doc.rangeHasMark(S.from,S.to,r.schema.marks.code):!0).filter(S=>e.validate(S.value)).forEach(S=>{yT(S.from,S.to,r.doc).some(y=>y.mark.type===e.type)||a.addMark(S.from,S.to,e.type.create({href:S.href}))})}}),!!a.steps.length)return a}})}function l5(e){return new gt({key:new dt("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0)return!1;let a=r.target;const s=[];for(;a.nodeName!=="DIV";)s.push(a),a=a.parentNode;if(!s.find(f=>f.nodeName==="A"))return!1;const c=bT(t.state,e.type.name),d=r.target,p=(i=d==null?void 0:d.href)!==null&&i!==void 0?i:c.href,_=(o=d==null?void 0:d.target)!==null&&o!==void 0?o:c.target;return d&&p?(window.open(p,_),!0):!1}}})}function c5(e){return new gt({key:new dt("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:i}=t,{selection:o}=i,{empty:a}=o;if(a)return!1;let s="";r.content.forEach(d=>{s+=d.textContent});const c=YT(s,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===s);return!s||!c?!1:(e.editor.commands.setMark(e.type,{href:c.href}),!0)}}})}const u5=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,d5=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;function Kv(e){return!e||e.replace(u5,"").match(d5)}const ac=Ft.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(e=>{if(typeof e=="string"){qv(e);return}qv(e.scheme,e.optionalSlashes)})},onDestroy(){i5()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!Kv(t)?!1:{href:t}}}]},renderHTML({HTMLAttributes:e}){return Kv(e.href)?["a",We(this.options.HTMLAttributes,e),0]:["a",We(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Go({find:e=>{const t=[];if(e){const{validate:n}=this.options,r=YT(e).filter(i=>i.isLink&&n(i.value));r.length&&r.forEach(i=>t.push({text:i.value,data:{href:i.href},index:i.start}))}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)===null||t===void 0?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];return this.options.autolink&&e.push(s5({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick&&e.push(l5({type:this.type})),this.options.linkOnPaste&&e.push(c5({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),Qr=ut.create({name:"text",group:"inline"}),nt=ac.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),tempid:{default:null}}},addKeyboardShortcuts(){var t;const e=n=>({ Line truncated
`},addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:s}=r.extensionManager,c=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:d,dispatch:p})=>{if(p&&c&&a){const _=c.filter(f=>s.includes(f.type.name));d.ensureMarks(_)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Pp=ut.create({name:"doc",topNode:!0,content:"block+"}),Bx=vt.create({name:"ipsAutosave",addCommands(){return{clearAutosave:()=>({editor:e,chain:t})=>(e.options.autoSaveKey&&(window.ips.utils.db.remove("editorSave",e.options.autoSaveKey),t().hideMessage("autosave").run()),!0)}},onUpdate(){this.storage.updateCallback()},onCreate(){var e,t;if(this.storage.updateCallback=lr.debounce(()=>{var n;(n=this.editor)!=null&&n.options.autoSaveKey&&(this.editor.getHTML().trim()&&this.editor.getHTML()!=="<p></p>"?window.ips.utils.db.set("editorSave",this.editor.options.autoSaveKey,{content:this.editor.getHTML(),time:Math.round(Date.now()/1e3)}):this.editor.commands.clearAutosave(),this.editor.commands.hideMessage("autosave"))},500),(e=this.editor)!=null&&e.options.autoSaveKey){const n=window.ips.utils.db.get("editorSave",this.editor.options.autoSaveKey);if((t=n==null?void 0:n.content)!=null&&t.trim()&&(!n.time||Date.now()/1e3-86400*3<parseInt(n.time))){const r=new DOMParser().parseFromString(n.content,"text/html");if(!(r.body.innerText.trim().length||r.body.querySelector("iframe,img,video,audio,a,embed,.ipsEmoji,.ipsEmbeddedVideo,.ipsEmbeddedBrightcove,.ipsEmbeddedOther,.ipsEmbeddedPhoto")))return;this.storage.initial=this.editor.getHTML(),this.editor.chain().setContent(n.content).command(({tr:i,chain:o})=>(!i.docChanged||Gx(i.doc)?o().undo().hideMessage("autosave").run():o().showMessage("autosave").focus().run(),!0)).run()}}},addStorage(){return{initial:"",updateCallback:()=>{}}}});function Gx(e){var t,n,r;return e.textContent==="<p></p>"?!0:!((t=e.textContent)!=null&&t.trim().length||![Pp.name,Nt.name,Qr.name,gu.name].includes(e.type.name)||(r=(n=e.content)==null?void 0:n.content)!=null&&r.length&&!e.content.content.some(i=>!Gx(i)))}function A9(){const{editor:e}=B.useContext(Ue);return N.jsxs(N.Fragment,{children:["The content was restored from an automatically saved draft. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:()=>e.chain().clearAutosave().setContent(e.storage[Bx.name].initial||"").focus().run(),children:"clear draft."})]})}function I9({positions:e="",href:t}){const{editor:n}=B.useContext(Ue),r=()=>{if(!e.length){n.commands.hideMessage("autoembed");return}let i=n.chain();for(const o of e)i=i.command(({tr:a,chain:s})=>s().insertContentAt({from:Math.max(0,a.mapping.map(o[0])),to:Math.min(a.doc.nodeSize-2,a.mapping.map(o[1]))},`<a href="${encodeURI(t)}" >${o[2]}</a>`));i.hideMessage("autoembed").focus().run()};return N.jsxs(N.Fragment,{children:["A URL was inserted as embedded content. Click to ",N.jsx("button",{className:"ipsEditor__autosave-clear",onClick:r,children:"insert as link"})," instead."]})}function lO({name:e}){const{editor:t}=B.useContext(Ue);return N.jsxs("div",{className:`ipsEditor__global-message ipsEditor__global-message--${e}`,children:[N.jsxs("div",{className:"ipsEditor__global-message-content",children:[N.jsx("i",{className:"fa-solid fa-circle-info"}),"  ",N.jsx(D9,{name:e})]}),N.jsx("button",{className:"ipsEditor__global-message-close",onClick:()=>t==null?void 0:t.commands.hideMessage(e),children:N.jsx("i",{className:"fa-solid fa-times-circle"})})]})}function D9({name:e}){const{messages:t}=B.useContext(lS),n=t.get(e);switch(e){case"autosave":return N.jsx(A9,{});case"autoembed":return N.jsx(I9,{...n});default:return typeof n=="string"&&n?N.jsx("span",{"data-ipseditorcustommessage":"true",dangerouslySetInnerHTML:{__html:n}}):N.jsx(N.Fragment,{children:"This is a global message!"})}}const lS=B.createContext({messages:new Map,addMessage(e,t=""){this.messages.set(e,t)},removeMessage(e){this.messages.has(e)&&this.messages.delete(e)}});function w9({children:e}){var c;const[t,n]=B.useState(()=>new Map),[r,i]=B.useState(!1),{editor:o}=B.useContext(Ue),a=B.useMemo(()=>({messages:t,addMessage:(d,p="")=>{if(!t.has(d)||t.get(d)!==p){t.set(d,p);const _=new Map;for(const[f,g]of t.entries())_.set(f,g);n(_)}},removeMessage:d=>{if(t.has(d)){t.delete(d);const p=new Map;for(const[_,f]of t.entries())p.set(_,f);n(p)}},onVisibilityChange(d=!1){d!==r&&i(d)},visible:r}),[t,n,r,i]);if(B.useEffect(()=>{!o.options.codeMode&&!o.options.simpleRichText&&o.can().registerMessageInterface(a)&&(o==null||o.commands.registerMessageInterface(a))},[a,o]),o.options.codeMode||o.options.simpleRichText)return N.jsx(N.Fragment,{children:e});const s=[...t.keys()];return o.options.messagesCLine truncated
`+t.message,window.Debug.error(t),gp=null}).finally(()=>{for(const t of EO)t(gp),EO.delete(t);e(gp)})})}const h6=vt.create({name:"ipsMessages",addCommands(){let e={_messages:new Map,addMessage(n,r=""){this._messages.set(n,r)},removeMessage(n){this._messages.delete(n)},get messages(){return this._messages},onVisibilityChange(n){t=n}},t=!1;return{showMessage:(n,r="")=>()=>{e==null||e.addMessage(n,r)},hideMessage:n=>()=>{e==null||e.removeMessage(n)},registerMessageInterface:n=>()=>{var i,o,a;if(Object.is(n,e))return!1;let r=!1;for(const s in n)if(!Object.is(n[s],e[s])){r=!0;break}if(!r)return!1;if(e.messages instanceof Map)for(const s of e.messages.keys())(o=(i=n==null?void 0:n.messages)==null?void 0:i.has)!=null&&o.call(i,s)&&n.messages.get(s)===e.messages.get(s)||n.addMessage(s,e.messages.get(s));(!("visible"in n)||n.visible!==t)&&((a=n.onVisibilityChange)==null||a.call(n,t)),e=n},fireVisibilityChange:n=>()=>{var r;t=!!n,(r=e==null?void 0:e.onVisibilityChange)==null||r.call(e,t)}}}}),S6=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:i})=>new gt({key:e||new dt("fileHandler"),props:{handleDrop(o,a){var s;if(!r||!(!((s=a.dataTransfer)===null||s===void 0)&&s.files.length))return!1;const c=o.posAtCoords({left:a.clientX,top:a.clientY});let d=Array.from(a.dataTransfer.files);return i&&(d=d.filter(p=>i.includes(p.type))),d.length!==0&&(a.preventDefault(),a.stopPropagation(),r(t,d,(c==null?void 0:c.pos)||0),!0)},handlePaste(o,a){var s;if(!n||!(!((s=a.clipboardData)===null||s===void 0)&&s.files.length))return!1;let c=Array.from(a.clipboardData.files);const d=a.clipboardData.getData("text/html");return i&&(c=c.filter(p=>i.includes(p.type))),c.length!==0&&(a.preventDefault(),a.stopPropagation(),n(t,c,d),!(d.length>0))}}}),T6=vt.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:void 0}),addProseMirrorPlugins(){return[S6({key:new dt(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}});function b6({mimeTypes:e,handler:t}){let n;Array.isArray(e)&&(n=new Set(e.map(i=>i.toLowerCase())));const r=i=>{const o=i instanceof DragEvent?i.dataTransfer:i.clipboardData;if(o.files.length){const a=[];for(const s of o.files)(!n||n.has(s.type.toLowerCase()))&&a.push(s);if(a.length)return t(a),!0}};return new gt({key:new dt("ipsDataTransferFixer"),props:{handlePaste:(i,o)=>r(o),handleDrop:(i,o)=>r(o)}})}const y6=T6.extend({addCommands(){var e;return{...(e=this.parent)==null?void 0:e.call(this),injectAttachments:t=>({editor:n,chain:r})=>{var o;let i=r();for(const a of t){const s=Math.round(Math.random()*Math.pow(10,8));let c=!1;i=i.insertContent({type:ct.name,attrs:{attachmentType:"file",attachmentSrc:"",attachmentLink:"",fileId:s,attachmentTitle:"Uploading Attachment..."}}),(o=C6(n.options.postkey))==null||o.dispatchEvent(new R6({file:a,data:{ready:d=>{if(c)return;c=!0;const p=HT(n.$doc,s);p.length&&n.commands.command(({tr:_,chain:f})=>{let g=f();for(const{to:E,from:T}of p)g=g.insertContentAt({from:_.mapping.map(T),to:_.mapping.map(E)},d,{parseOptions:{preserveWhitespace:!1}});return!0})},error:d=>{c||(c=!0,d instanceof Error&&(d.message=`File upload failed:
${d.message}`,window.Debug.warn(d),n.commands.showMessage("file-attach","Couldn't insert one or more files pasted or dropped in the editor.")),n.commands.removeAttachment(s))}}}))}return i.run(),!0}}},addProseMirrorPlugins(){var e;return[b6({mimeTypes:this.options.allowedMimeTypes,handler:t=>this.options.onPaste(this.editor,t)}),...((e=this.parent)==null?void 0:e.call(this))||[]]}}).configure({onPaste(e,t){return e.commands.injectAttachments(t),!0},onDrop(e,t){return e.commands.injectAttachments(t),!0}});function C6(e){return!e||typeof e!="string"?null:document.querySelector(`[data-ipsuploader-postkey="${e}"]`)}class R6 extends Event{constructor(t){super("injectFile"),this.data=t}}const N6=["name","group","isInline","isBlock","isText","selectable","exitable","atom","addOptions","addKeyboardShortcuts","addAttributes","addGlobalAttributes","renderHTML","parseHTML","onCreate","onUpdate","onBeforeCreate","onFocus","onBlur","onBeforeCreate","onSelectionUpdate","onDestroy","onTransaction","priority","defaultOptions","addInputRules","marks","addNodeView","whitespace","defining","isolating","renderText"];function v6(e,t){var s,c,d;if(!e.ipsPlugins){e.ipsPlugins={buttons:{},extensions:[],nodes:[],marks:[]};return}e.ipsPlugins.buttons={},Array.isArray((s=e.ipsPlugins)==null?void 0:s.extensions)?a(e.ipsPlugins.extensions,vt):e.ipsPlugins.extensions=[],Array.isArray((c=e.ipsPlugins)==null?void 0:c.nodes)?a(e.ipsPlugins.nodes,ut):e.ipsPlugins.nodes=[],Array.isArray((d=e.ipsPlugins)==null?void 0:d.marks)?a(e.ipsPlugins.marks,Ft):e.ipsPlugins.marks=[],e.ipsPlugins.nestedToolbars={},e.pluginButtonKeys=new Set;const n=new Set(e.tools.toolbar);for(const p in e.ipsPlugins.buttons)for(const{before:_,after:f}of e.ipsPlugins.buttons[p].locations){let g,E=!1;if(typeof f=="string"&&f in oO){const T=oO[f];e.ipsPlugins.nestedToolbars[T]=e.ipsPlugins.nestedToolbars[T]||[...cl[T]],e.ipsPlugins.nestedToolbars[T].push(`custom:${p}`),E=!0}else if(typeof f=="string"&&n.has(f))g=e.tools.toolbar.indexOf(f)+1;else if(typeof _=="string"&&n.has(_))g=e.tools.toolbar.indexOf(_);else if(!_&&!f||_===null||f===null)g=e.tools.toolbar.length;else continue;e.pluginButtonKeys.add(`custom:${p}`),E||(n.add(`custom:${p}`),e.tools.toolbar.splice(g,0,`custom:${p}`))}function r(p){for(const _ of p.attributes)["class","style","id","src","title","rel","alt"].includes(_.name.toLowerCase())||p.removeAttribute(_.name);for(const _ of p.querySelectorAll(":scope > *"))r(_)}function i(p,_){var f;if(p.addButtons instanceof Function){const g=p.addButtons.bind(_)();if(typeof g!="object")throw new TypeError;const E=new DOMParser;for(const T in g){let{html:b,command:S,locations:y,element:R,isActive:A,isAvailable:D}=g[T];if(typeof b!="string"&&!(R instanceof HTMLElement)||!(S instanceof Function)||!Array.isArray(y))throw new TypeError;A!==void 0&&typeof A!="boolean"&&!(A instanceof Function)&&(window.Debug.warn(`Expected isActive to be a boolean or a Function, got a ${typeof A}. Casting to boolean.`),A=!!A),D!==void 0&&typeof D!="boolean"&&!(D instanceof Function)&&(window.Debug.warn(`Expected isAvailable to be a boolean or a Function, got a ${typeof D}. Casting to boolean.`),D=!!D);const M=[];for(const H of y)if(H===null)M.push({after:null,before:void 0});else if(typeof H=="object"){if(![void 0,null].includes(H.before)&&typeof H.before!="string"||![void 0,null].includes(H.after)&&typeof H.after!="string")throw new TypeError;M.push({after:H.after,before:H.before})}else typeof H=="string"?M.push({after:H,before:void 0}):M.push({after:void 0,before:void 0});y=M;const k=["script","link","style","pre","code","iframe","object","embed","noscript","video"];if(R instanceof Element)R.querySelectorAll(k.join(",")).forEach(H=>H.remove());else{const H=E.parseFromString(b,"text/html");if(!(H instanceof Document))throw new RangeError("The html passed in for the button is not readable");if(H.querySelectorAll(k.join(",")).forEach(le=>le.remove()),!(((f=H==null?void 0:H.body)==null?void 0:f.firstElementChild)instanceof HTMLElement)||!H.body.firstElementChild.innerHTML.length)throw new RangeError("The html passed in for the button is not readable");R=H.body.firstElementChild}if(r(R),k.includes(R.tagName.toLowerCase()))throw new RangeError(`The element of type ${R.tagName} cannot be used as a toolbar button`);const z=R.cloneNode(!0),W=`${p.name}_${T}`;e.ipsPlugins.buttons[W]={get element(){return z},set element(H){throw new Error("Cannot update the element of an ipsPlugin button!")},get command(){return S.bind(_)},set command(H){throw new Error("Cannot update the command of an ipsPlugin button!")},get isActive(){return A instanceof Function?A.bind(_):A},set isActive(H){throw new Error("Cannot update the isActive property of an ipsPlugin button!")},get isAvailable(){return D instanceof Function?D.bind(_):D},set isAvailable(H){throw new Error("Cannot update the isAvailable property of an ipsPlugin button!")},get locations(){return y},set locations(H){throw new Error("Cannot update properties Line truncated
${g.message}`,window.Debug.warn(g)}}}const OE=vt.create({name:"ipsHomeEnd",addKeyboardShortcuts(){return{Home:({editor:e})=>($t(()=>{var i,o,a;const{$from:t}=e.state.selection,n=t.pos-t.parentOffset;let r=t.pos;for(;r>n;){const s=e.state.doc.slice(r-1,r);if(((i=s.content.content[0])==null?void 0:i.textContent)===`
`||((a=(o=s.content.content[0])==null?void 0:o.type)==null?void 0:a.name)===gu.name)break;r--}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'Home' key press"),!0),End:({editor:e})=>($t(()=>{var i,o,a;const{$to:t}=e.state.selection,n=[...t.path].reverse()[3]+t.parent.nodeSize-1;let r=t.pos;for(;r<n;){const s=e.state.doc.slice(r,r+1);if(((i=s.content.content[0])==null?void 0:i.textContent)===`
`||((a=(o=s.content.content[0])==null?void 0:o.type)==null?void 0:a.name)===gu.name)break;r++}e.chain().setTextSelection(r).focus().run()},"Something went wrong handling the 'End' key press"),!0)}}}),O6=vt.create({name:"IPSSimpleRichText",addProseMirrorPlugins(){return[new gt({key:new dt("ipsSimpleRichTextPlugin"),filterTransaction:e=>!(this.editor.options.lengthFunction instanceof Function&&typeof this.editor.options.maxLength=="number"&&this.editor.options.lengthFunction(TT(e.doc.content,this.editor.schema))>this.editor.options.maxLength),appendTransaction:(e,t,n)=>{const r=[];let i;const{from:o,to:a}=n.selection;n.doc.descendants((c,d)=>{var p,_;if(typeof c.textContent=="string"&&!c.textContent&&!c.isInline){const f=n.doc.resolve(d),g=A6(f,n.doc),E=I6(f,n.doc);if([o,a].some(T=>g.pos<T&&E.pos>T)){if(i===void 0&&e.some(T=>{var b;return(b=T.steps)==null?void 0:b.length})){let T=1,b=c;for(;(_=(p=b.content)==null?void 0:p.content)!=null&&_.length;)T++,b=b.content.content[0];i=T+d}return!1}return r.push([d,d+c.nodeSize]),!1}if(c.isInline||!c.content.content.length)return!1});const{tr:s}=n;for(const[c,d]of r.reverse())s.delete(c,d);if(i!==void 0){const c=Ie.atStart(n.doc).from,d=Ie.atEnd(n.doc).to,p=Ie.create(n.doc,bo(i,c,d));o===p.from&&o===a||s.setSelection(p)}return s}})]},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const t=e.view.dom.closest("form");if(t){let n=t.querySelector('button:is([type="submit"], :not([type]))');n||(n=document.createElement("button"),n.setAttribute("type","button"),n.setAttribute("hidden",""),t.appendChild(n),setTimeout(()=>n.documentElement===document.documentElement&&n.remove(),200)),n.click()}return!0},"Shift-Enter":({editor:e})=>(e.isActive(cu.name)?e.commands.splitListItem(cu.name):e.commands.splitBlock(),!1)}},onCreate(){this.editor.view.dom.addEventListener("clear",e=>{var t;this.editor.commands.setContent(((t=e.detail)==null?void 0:t.content)||"")})}});function A6(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]>0){let o=n[2].content.content[n[1]-1],a=0;for(;o;)o=(i=(r=o.content)==null?void 0:r.content)!=null&&i.length?o.content.content[o.content.content.length-1]:null,a++;return t.resolve(e.pos-a)}n.splice(0,3)}return t.resolve(0)}function I6(e,t){var r,i;const n=[...e.path].reverse();for(;n.length>=3;){if(n[1]<n[2].content.content.length-1){let o=n[2].content.content[n[1]+1],a=0;for(;o;)a++,o=(i=(r=o.content)==null?void 0:r.content)==null?void 0:i[0];return t.resolve(e.pos+n[2].content.content[n[1]].nodeSize+a)}n.splice(0,3)}return t.resolve(t.nodeSize-2)}const D6=e=>Ot({find:/--$/,replace:e??"—"}),w6=e=>Ot({find:/\.\.\.$/,replace:e??"…"}),x6=e=>Ot({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??"“"}),M6=e=>Ot({find:/"$/,replace:e??"”"}),L6=e=>Ot({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??"‘"}),k6=e=>Ot({find:/'$/,replace:e??"’"}),P6=e=>Ot({find:/<-$/,replace:e??"←"}),U6=e=>Ot({find:/->$/,replace:e??"→"}),F6=e=>Ot({find:/\(c\)$/,replace:e??"©"}),B6=e=>Ot({find:/\(tm\)$/,replace:e??"™"}),G6=e=>Ot({find:/\(sm\)$/,replace:e??"℠"}),Y6=e=>Ot({find:/\(r\)$/,replace:e??"®"}),H6=e=>Ot({find:/(?:^|\s)(1\/2)\s$/,replace:e??"½"}),$6=e=>Ot({find:/\+\/-$/,replace:e??"±"}),V6=e=>Ot({find:/!=$/,replace:e??"≠"}),z6=e=>Ot({find:/<<$/,replace:e??"«"}),W6=e=>Ot({find:/>>$/,replace:e??"»"}),q6=e=>Ot({find:/\d+\s?([*x])\s?\d+$/,replace:e??"×"}),K6=e=>Ot({find:/\^2$/,replace:e??"²"}),Q6=e=>Ot({find:/\^3$/,replace:e??"³"}),X6=e=>Ot({find:/(?:^|\s)(1\/4)\s$/,replace:e??"¼"}),j6=e=>Ot({find:/(?:^|\s)(3\/4)\s$/,replace:e??"¾"}),Z6=vt.create({name:"typography",addOptions(){return{closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}},addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(D6(this.options.emDash)),this.options.ellipsis!==!1&&e.push(w6(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(x6(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(M6(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(L6(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(k6(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(P6(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(U6(this.options.rightArrow)),this.options.copyright!==!1&&e.push(F6(this.options.copyright)),this.options.trademark!==!1&&e.push(B6(this.options.trademark)),this.options.servicemark!==!1&&e.push(G6(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(Y6(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(H6(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push($6(this.options Line truncated
`}}),Fx,J6].filter(S=>!!S);return window.navigator.platform==="MacIntel"&&t.push(OE),e.autoSaveKey&&t.push(Bx),e.postkey&&(t.push(y6),t.push(ct.configure({externalImages:!((f=e.restrictions)!=null&&f.has("external_image")),externalVideos:!((g=e.restrictions)!=null&&g.has("external_video")),float:!((E=e.restrictions)!=null&&E.has("float"))}))),(T=e.restrictions)!=null&&T.has("heading")||t.push(pn.configure({levels:(b=e.restrictions)!=null&&b.has("heading_1")?[2,3,4,5,6]:[1,2,3,4,5,6]})),t}async function hO(e,t){var n,r;if(e.pluginButtonKeys=new Set,e.simpleRichText?(delete e.codeMode,e.tools={toolbar:[...Ux]},e.react&&BV(e.react)):await O4(),e.restrictions&&Symbol.iterator in e.restrictions?e.restrictions=new Set(e.restrictions):delete e.restrictions,e.jQuery=e.jQuery||window.jQuery,e.editorProps={attributes:{class:e.codeMode?"":"ipsRichText"}},e.itemStates={},e.extensions=eX(e),!(e.messagesContainer instanceof Element)&&((n=t==null?void 0:t.closest(".ipsEditor"))!=null&&n.querySelector('[data-role="editor-messages-container"]'))&&(e.messagesContainer=(r=t==null?void 0:t.closest(".ipsEditor"))==null?void 0:r.querySelector('[data-role="editor-messages-container"]')),e.codeMode)return e.tools={toolbar:["codelanguage"]},e;if(e.simpleRichText||v6(e,e.extensions),e.stockrepliesenabled){const i=await qT();Object.keys(i).length?window.Debug.log("Loaded stock replies"):(e.stockrepliesenabled=!1,window.Debug.log("No stock replies, disabling the button"))}if(!e.codeMode){for(const i in e.tools)e.tools[i]=e.tools[i].filter(o=>o==="giphy"&&!e.giphyenabled||o==="stockreply"&&!e.stockrepliesenabled?!1:!(e.hidebuttons instanceof Array&&e.hidebuttons.includes(o)));e.parseOptions=e.parseOptions||{},e.parseOptions.preserveWhitespace=!1}return e.tools.toolbar&&e.tools.toolbar[0]!=="block"&&(e.tools.toolbar=["block",...e.tools.toolbar.filter(i=>i!=="block")]),e}let SO=!1;function tX(){if(!SO){for(const e of["click","focus","keydown","keyup"])document.addEventListener(e,t=>{var n,r,i;(r=(n=t.target)==null?void 0:n.closest)!=null&&r.call(n,".ipsEditor__toolbar-item--unavailable")&&(t.preventDefault(),t.stopPropagation(),(i=t.stopImmediatePropagation)==null||i.call(t))},{capture:!0});SO=!0}}setTimeout(()=>window.ips.createModule("ips.utils.tiptap",()=>{const e={tools:{toolbar:["block","insert","bold","italic","underline","size","color","link","icon","stockreply","giphy","clear","format"]},allowedIframeDomains:window.ips.getSetting("allowedIframeDomains")||[],restrictions:new Set};return document.dispatchEvent(new CustomEvent("ipsTiptapLoaded")),{editorInstance(t,n={}){const r=AE.createRoot(t);return tX(),new Promise(i=>{hO({...e,...n},t).then(o=>{r.render(N.jsx(st.StrictMode,{children:N.jsx(x9,{resolve:a=>{i([a,r]),a.options.name&&setTimeout(()=>a.options.jQuery(a.view.dom.closest("[data-ipseditorv5]")).trigger("editorWidgetInitialized",{id:a.options.name}))},config:o})}))})})},allCodeLanguages:sl,async decorateSimpleRichTextConfig(t){return t.simpleRichText=!0,await hO(t)}}}));
@@ -45,7 +45,7 @@
"isDynamicEntry": true
},
"src/main.jsx": {
"file": "assets/main-CkrLsobl.js",
"file": "assets/main-C7yyeubP.js",
"name": "main",
"src": "src/main.jsx",
"isEntry": true,
@@ -189,6 +189,9 @@ class applications extends Controller
'title' => $application['app_title'] ?? $application['app_directory'],
'author' => $application['app_author'],
'website' => $application['app_website'],
'update_version' => ( $application['app_update_version'] ? json_decode( $application['app_update_version'], true ) : null ),
'long_version' => $application['app_long_version'],
'version' => $application['app_version']
);
if( isset( $uninstalled[ $application['app_directory'] ] ) )
@@ -209,6 +212,9 @@ class applications extends Controller
'title' => $application['app_title'] ?? $application['app_directory'],
'author' => $application['app_author'],
'website' => $application['app_website'],
'update_version' => ( $application['app_update_version'] ? json_decode( $application['app_update_version'], true ) : null ),
'long_version' => $application['app_long_version'],
'version' => $application['app_version']
);
}
}
@@ -285,6 +291,7 @@ class applications extends Controller
{
foreach ( $legacyApps as $k => $app )
{
$badge = null;
$buttons = array();
if( IPS::canManageResources() AND IPS::checkThirdParty() )
{
@@ -294,6 +301,32 @@ class applications extends Controller
'link' => Url::internal( "app=core&module=applications&controller=applications&appKey={$k}&do=upload" ),
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => Member::loggedIn()->language()->addToStack( 'upload_new_version' ) )
);
if( isset( $app['update_version'] ) and is_iterable( $app['update_version'] ) )
{
$update = null;
if ( !isset( $app['update_version'][0] ) and isset( $app['update_version']['longversion'] ) )
{
$app['update_version'] = array( $app['update_version'] );
}
foreach ( $app['update_version'] as $data )
{
if( !empty( $data['longversion'] ) and $data['longversion'] > $app['long_version'] and $data['version'] != $app['version'] )
{
if( $data['released'] AND ( (int) $data['released'] != $data['released'] OR strlen($data['released']) != 10 ) )
{
$data['released'] = strtotime( $data['released'] );
}
$update = $data;
}
}
if( $update !== null )
{
$badge = [ 'new', '', Theme::i()->getTemplate( 'global', 'core' )->updatebadge( $update['version'], $update['updateurl'] ?? '', DateTime::ts( $update['released'] )->localeDate() ) ];
}
}
}
if( Member::loggedIn()->hasAcpRestriction( 'core', 'applications', 'app_delete' ) )
@@ -307,7 +340,7 @@ class applications extends Controller
);
}
$rows[ $k ] = Theme::i()->getTemplate( 'trees' )->row( $baseUrl, $k, $app['title'], FALSE, $buttons );
$rows[ $k ] = Theme::i()->getTemplate( 'trees' )->row( $baseUrl, $k, $app['title'], FALSE, $buttons, $app['author'], null, null, false, null, null, $badge );
}
}
return $rows;
@@ -77,56 +77,11 @@ class emoticons extends Controller
*/
protected function manage() : void
{
$tabs = array(
'standard' => 'standard_emoji',
'custom' => 'custom_emoji',
);
$activeTab = ( isset( Request::i()->tab ) and array_key_exists( Request::i()->tab, $tabs ) ) ? Request::i()->tab : 'standard';
if ( $activeTab == 'standard' )
{
if ( Settings::i()->getFromConfGlobal('sql_utf8mb4') === TRUE )
{
$form = new Form;
$form->add( new Radio( 'emoji_style', Settings::i()->emoji_style, FALSE, array(
'options' => array(
'native' => 'emoji_style_native',
'twemoji' => 'emoji_style_twemoji',
'disabled' => 'emoji_style_disabled',
),
) ) );
Member::loggedIn()->language()->get( 'emoji_style_native' ); // We need to preload the word before we can add more text to it.
Member::loggedIn()->language()->words['emoji_style_native'] .= "<div class='i-font-size_2 i-margin-top_1'><span class='ipsEmoji'>😀</span><span class='ipsEmoji'>😉</span><span class='ipsEmoji'>😂</span><span class='ipsEmoji'>😍</span><span class='ipsEmoji'>🤘</span><span class='ipsEmoji'>🤦‍♀️</span><span class='ipsEmoji'>🤷‍♂️</span><span class='ipsEmoji'>🍿</span><span class='ipsEmoji'>🚀</span><span class='ipsEmoji'>🎉</span><span class='ipsEmoji'>🏳️‍🌈</span></div>"; // Have to do this here because if we try to put it in the actual language string, that will cause an error if not utf8mb4
$form->add( new YesNo( 'emoji_shortcodes', Settings::i()->emoji_shortcodes, FALSE, array(), NULL, NULL, NULL, 'emoji_shortcodes' ) );
if ( $values = $form->values() )
{
$values['emoji_cache'] = time();
$form->saveAsSettings( $values );
Output::i()->redirect( Url::internal( 'app=core&module=editor&controller=emoticons&tab=standard' ), 'saved' );
}
$activeTabContents = $form;
}
else
{
$activeTabContents = Theme::i()->getTemplate( 'global' )->message( CIC ? 'emoji_utf8mb4_required_cic' : 'emoji_utf8mb4_required', 'error', NULL, TRUE, TRUE );
}
}
else
{
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
}
Output::i()->title = Member::loggedIn()->language()->addToStack('menu__core_editor_emoticons');
$activeTabContents = Theme::i()->getTemplate( 'customization' )->emoticons( $this->_getEmoticons() );
Output::i()->title = Member::loggedIn()->language()->addToStack('custom_emoji');
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js('admin_customization.js', 'core', 'admin') );
if( Request::i()->isAjax() )
{
Output::i()->output = $activeTabContents;
}
else
{
Output::i()->output = Theme::i()->getTemplate( 'global' )->tabs( $tabs, $activeTab, $activeTabContents, Url::internal( "app=core&module=editor&controller=emoticons" ) );
}
Output::i()->output = $activeTabContents; // @todo Mayyyyyyybe we should make one tab per set, but I really think custom emoticons are too dumb for all that
}
/**
@@ -761,6 +761,10 @@ class languages extends Controller
}
$form = new Form( 'form', 'langauge_export_button' );
// This appears inside a dialog. The following instructs the dialog to handle the download via JS rather than using a native form download. This allows the dialog to close when done.
$filename = $lang->title . " {$lang->version}.xml";
$form->attributes['data-form-is-download'] = '';
$form->attributes['data-form-download-name'] = "testing to see if this works " . $filename;
$form->add( new Text( 'language_export_author_name', $lang->author_name, false ) );
$form->add( new FormUrl( 'language_export_author_url', $lang->author_url, false ) );
@@ -874,7 +878,16 @@ class languages extends Controller
/* Finish */
$xml->endDocument();
Output::i()->sendOutput( $xml->outputMemory(), 200, 'application/xml', array( 'Content-Disposition' => Output::getContentDisposition( 'attachment', $lang->title . " {$lang->version}.xml" ) ), FALSE, FALSE, FALSE );
Output::i()->sendOutput(
$xml->outputMemory(),
200,
'application/xml',
array(
'Content-Disposition' => Output::getContentDisposition( 'attachment', $filename ) ),
FALSE,
FALSE,
FALSE
);
}
/* Display */
@@ -4116,7 +4116,6 @@ class members extends Controller
/* Clean up before encoding */
Output::i()->parseFileObjectUrls( $csv );
$csv = Output::i()->replaceEmojiWithImages( $csv );
/* Excel requires a BOM this for non-ASCII characters to show properly */
$csv = chr(0xEF) . chr(0xBB) . chr(0xBF) . $csv;
@@ -87,7 +87,17 @@ class general extends Controller
$form->add( new YesNo( 'site_site_elsewhere', Settings::i()->site_site_elsewhere, FALSE, [ 'togglesOn' => [ 'site_main_url', 'site_main_title' ] ] ) );
$form->add( new FormUrl( 'site_main_url', Settings::i()->site_main_url, FALSE, [], NULL, NULL, NULL, 'site_main_url' ) );
$form->add( new Text( 'site_main_title', Settings::i()->site_main_title, FALSE, [], NULL, NULL, NULL, 'site_main_title' ) );
$form->add( new CheckboxSet( 'diagnostics_reporting', array( 'usage' => ( (bool) Settings::i()->usage_reporting ), 'diagnostics' => ( (bool) Settings::i()->diagnostics_reporting ) ), FALSE, array( 'options' => array(
$diagnosticsOptions = [];
if( (bool) Settings::i()->usage_reporting === true )
{
$diagnosticsOptions[] = 'usage';
}
if( (bool) Settings::i()->diagnostics_reporting === true )
{
$diagnosticsOptions[] = 'diagnostics';
}
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'diagnostics_reporting', $diagnosticsOptions, FALSE, array( 'options' => array(
'usage' => 'diagnostics_reporting_usage',
'diagnostics' => 'diagnostics_reporting_diagnostics',
) ) ) );
@@ -357,7 +357,7 @@ class admin extends Controller
/* Get available restrictions */
$restrictions = array();
foreach ( Application::applications() as $app )
foreach ( Application::enabledApplications() as $app )
{
if ( !CIC or !in_array( "{$app->directory}", Member::$cicBlockedAcpRestrictions ) )
{
@@ -676,6 +676,7 @@ class support extends Controller
'success' => FALSE,
'link' => Url::internal( 'app=core&module=support&controller=redis' ),
'detail' => $detail,
'button' => array( 'lang' => 'health_view_redis_config' ),
'dialogTitle' => 'health__more_information',
);
}
@@ -372,7 +372,9 @@ class profile extends Controller
$visitors = $this->member->profileVisitors;
/* Get followers */
$followers = $this->member->followers( ( Member::loggedIn()->isAdmin() OR Member::loggedIn()->member_id === $this->member->member_id ) ? \IPS\Content::FOLLOW_PUBLIC + \IPS\Content::FOLLOW_ANONYMOUS : \IPS\Content::FOLLOW_PUBLIC, array( 'immediate', 'daily', 'weekly', 'none' ), NULL, array( 0, 12 ) );
$followers = iterator_to_array(
$this->member->followers( ( Member::loggedIn()->isAdmin() OR Member::loggedIn()->member_id === $this->member->member_id ) ? \IPS\Content::FOLLOW_PUBLIC + \IPS\Content::FOLLOW_ANONYMOUS : \IPS\Content::FOLLOW_PUBLIC, array( 'immediate', 'daily', 'weekly', 'none' ), NULL, array( 0, 12 ) )
);
/* Get solutions */
$solutions = Db::i()->select( 'COUNT(*)', 'core_solved_index', array( 'member_id=? AND type=? AND hidden=0', $this->member->member_id, 'solved' ) )->first();
@@ -129,13 +129,16 @@ class register extends Controller
Output::i()->showOffline();
}
if ( Member::loggedIn()->canAccessModule( Module::get( 'nexus', 'store' ) ) and ( Settings::i()->nexus_reg_force or !isset( Request::i()->noPurchase ) ) and Package::haveRegistrationProducts() )
if( Application::appIsEnabled( 'nexus' ) )
{
Output::i()->redirect( Url::internal( 'app=nexus&module=store&controller=store&do=register', 'front', 'store' ) );
}
else if ( Member::loggedIn()->canAccessModule( Module::get( 'nexus', 'subscriptions' ) ) and ( Settings::i()->nexus_subs_register ) )
{
Output::i()->redirect( Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions&register=1', 'front', 'nexus_subscriptions' ) );
if ( Member::loggedIn()->canAccessModule( Module::get( 'nexus', 'store' ) ) and ( Settings::i()->nexus_reg_force or !isset( Request::i()->noPurchase ) ) and Package::haveRegistrationProducts() )
{
Output::i()->redirect( Url::internal( 'app=nexus&module=store&controller=store&do=register', 'front', 'store' ) );
}
else if ( Member::loggedIn()->canAccessModule( Module::get( 'nexus', 'subscriptions' ) ) and ( Settings::i()->nexus_subs_register ) )
{
Output::i()->redirect( Url::internal( 'app=nexus&module=subscriptions&controller=subscriptions&register=1', 'front', 'nexus_subscriptions' ) );
}
}
/* Set Session Location */
@@ -167,7 +167,7 @@ class themeeditor extends Controller
break;
}
if ( isset( Request::i()->{ 'delete__set__'. $type } ) )
if ( isset( Request::i()->{ 'delete__set__'. $type } ) and isset( Theme::i()->logo[ $logoKey ]['url'] ) )
{
File::get( 'core_Theme', Theme::i()->logo[ $logoKey ]['url'] )->delete();
$data['logo'][$logoKey] = [];
@@ -291,6 +291,8 @@ class themeeditor extends Controller
/* Flag our theme as no longer being edited */
Theme::i()->editingFinish();
Output::i()->redirect( Url::internal( "" ) );
$redirect = Request::i()->cookie['themeEditorLocation'] ?? Url::internal( '' );
Output::i()->redirect( $redirect );
}
}
@@ -12,7 +12,6 @@ namespace IPS\core\modules\front\system;
/* To prevent PHP errors (extending class does not exist) revealing path */
use Exception;
use IPS\Application;
use IPS\cms\Blocks\Block;
use IPS\cms\widgets\Blocks;
@@ -178,6 +177,7 @@ class widgets extends Controller
{
$config = ( isset( $block['configuration'] ) AND !empty( $block['configuration'] ) ) ? $block['configuration'] : $widgetClass::getConfiguration( $key[3] );
$widget = Widget::load( Application::load( $block['app'] ), $block['key'], $block['unique'], $config, null, Request::i()->orientation, Request::i()->layout ?: '' );
$widget->neverCache = true;
break;
}
}
@@ -0,0 +1,22 @@
{
"id": 5000027,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": true,
"theme": true,
"themeeditor": true,
"javascript": true,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": true,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": true
},
"forceMainUpgrader": true,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,23 @@
{
"files": {
"added": [
"global\/framework\/common\/utils\/ips.utils.fileDownload.js"
],
"edited": [
"global\/framework\/common\/ui\/ips.ui.dialog.js",
"global\/framework\/common\/ui\/ips.ui.editorv5.js",
"global\/framework\/common\/utils\/ips.utils.iconpicker.js",
"core\/front\/controllers\/core\/ips.core.onlineUsersWidget.js",
"global\/admin\/templates\/ips.core.templates.js",
"global\/framework\/templates\/ips.core.templates.js"
],
"removed": [
"global\/framework\/common\/ui\/ips.ui.toggle.js"
]
},
"orders": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,35 @@
{
"normal": {
"added": [
"notification_account_del_request_rejected",
"theme_editor_custom_css_done",
"theme_editor_custom_css_revert",
"theme_editor_lightness",
"theme_editor_chroma",
"theme_editor_hue",
"theme_light_mode",
"theme_dark_mode",
"theme_system"
],
"edited": [],
"removed": [
"standard_emoji",
"emoji_style",
"emoji_style_desc",
"emoji_style_native",
"emoji_style_native_desc",
"emoji_style_twemoji",
"emoji_style_twemoji_desc",
"emoji_style_disabled",
"emoji_utf8mb4_required",
"emoji_utf8mb4_required_cic",
"emoji_shortcodes",
"emoji_shortcodes_desc"
]
},
"js": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,7 @@
{
"added": [],
"edited": [],
"removed": [
"emoji_style"
]
}
@@ -0,0 +1,70 @@
{
"html": {
"added": [],
"edited": [
"admin\/api\/webhookselector",
"global\/forms\/autocomplete",
"admin\/forms\/checkbox",
"global\/forms\/checkboxset",
"global\/forms\/color",
"global\/forms\/date",
"global\/forms\/dateRange",
"global\/forms\/interval",
"global\/forms\/matrixRows",
"global\/forms\/number",
"front\/forms\/popupRegisterTemplate",
"admin\/forms\/radio",
"admin\/forms\/select",
"front\/forms\/select",
"global\/forms\/text",
"global\/forms\/textarea",
"global\/forms\/uploadFile",
"global\/forms\/widthheight",
"front\/global\/footer",
"front\/global\/globalTemplate",
"front\/global\/loginPopupForm",
"front\/global\/navColumn",
"front\/global\/prefix",
"front\/global\/reactionOverview",
"front\/modcp\/report",
"admin\/promotion\/imageMaximums",
"front\/system\/loginForm",
"front\/system\/register",
"front\/tags\/contentTableRows",
"front\/themeeditor\/themeEditorTemplate"
],
"removed": []
},
"css": {
"added": [],
"edited": [
"global\/framework\/1-1-reset.css",
"global\/framework\/1-2-settings.css",
"global\/framework\/1-4-colors.css",
"global\/framework\/3-boxes.css",
"global\/framework\/3-buttons.css",
"global\/framework\/3-color-scheme-changer.css",
"global\/framework\/3-data-tables.css",
"global\/framework\/3-editor.css",
"global\/framework\/3-entries.css",
"global\/framework\/3-images.css",
"global\/framework\/3-page-header.css",
"global\/framework\/3-richtext.css",
"global\/framework\/3-tags.css",
"global\/framework\/3-typography.css",
"global\/framework\/4-breadcrumb.css",
"global\/framework\/4-header.css",
"global\/framework\/4-mobile-footer.css",
"global\/framework\/4-navigation-panel.css",
"global\/framework\/4-offcanvas.css",
"global\/framework\/5-flex-grid-gap.css",
"global\/framework\/5-margin.css"
],
"removed": []
},
"resources": {
"added": [],
"edited": [],
"removed": []
}
}
@@ -0,0 +1,105 @@
{
"categories": {
"added": [],
"edited": [
"lightDarkMode",
"logos",
"pageLayouts",
"typography",
"header",
"sidePanel",
"content",
"footer",
"mobileNavigation",
"textLogo",
"imageLogoDesktop",
"imageLogoMobile",
"desktopHeader",
"mobileHeader",
"body",
"contentBoxes",
"desktopFooter"
],
"removed": []
},
"settings": {
"added": [],
"edited": [
"set__i-default-scheme",
"i-footer--co",
"set__i-logo-text",
"set__i-design-border",
"set__i-layout-width",
"set__i-sidebar-ui-header--he",
"set__i-mobile-header--he",
"set__i-mobile-icons-location",
"set__i-position-logo",
"set__logo-light",
"set__i-font-family",
"layout_global_view_mode",
"set__mobile-logo-light",
"set__mobile-logo-dark",
"set__logo-dark",
"set__i-font-size",
"i-footer--ba-co",
"set__i-change-scheme",
"set__i-mobile-footer-labels",
"set__i-position-navigation",
"set__i-design-radius",
"set__i-logo-slogan",
"set__i-flip-sidebar",
"i-headerMobile--ba-co",
"i-dashHeader--ba-co",
"set__i-mobile-logo--he",
"set__i-logo--he",
"i-color_root",
"i-mobileFooter--ba-co",
"set__i-position-user",
"set__i-design-shadow",
"set__i-avatar-radius",
"set__i-logo--fo-fa",
"i-dashHeader--co",
"i-headerMobile--co",
"set__i-sidebar-ui-logo--he",
"i-color_soft",
"set__i-position-breadcrumb",
"i-mobileFooter--co",
"set__i-link-panels",
"i-body--ba-co",
"i-navPanelLinkHover--co",
"set__i-logo--fo-we",
"set__i-desktop-logo--fo-si",
"i-mobileFooter-active--co",
"i-navPanelLinkActive--ba-co",
"set__i-sticky-sidebar",
"i-box--ba-co",
"set__i-position-search",
"i-color_hard",
"i-mobileFooter-active--ba-co",
"i-navPanel--ba-co",
"set__i-sidebar-ui-logo--fo-si",
"set__i-header-primary--he",
"i-box--bo-co",
"i-link--co",
"i-navPanel--co",
"i-boxHeader--ba-co",
"set__i-mobile-logo--fo-si",
"i-link-hover--co",
"set__i-header-secondary--he",
"i-navPanelLinkActive--co",
"i-boxHeader--co",
"set__i-nav-bar-icons",
"set__i-user-content-font-size",
"i-widget-header--ba-co",
"i-headerTop--ba-co",
"i-widget-header--co",
"i-headerTop--co",
"i-headerPrimary--ba-co",
"i-headerPrimary--co",
"i-headerSecondary--ba-co",
"i-headerSecondary--co",
"set__i-header-top--he"
],
"removed": []
}
}
@@ -0,0 +1,61 @@
<?php
/**
* @brief 5.0.0 Beta 2 Upgrade Code
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 11 Oct 2024
*/
namespace IPS\core\setup\upg_5000027;
use IPS\Application;
use IPS\Db;
use function defined;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* 5.0.0 Beta 2 Upgrade Code
*/
class Upgrade
{
/**
* Remove any invalid core menu rows for the core application, in our case the Promote extension
*
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
*/
public function step1() : bool|array
{
foreach( Application::applications() as $app )
{
$current = array_keys( $app->extensions( 'core', 'FrontNavigation', false ) );
Db::i()->delete( 'core_menu', [
[ 'app=?', $app->directory ],
[ Db::i()->in( 'extension', $current, true ) ]
] );
}
return TRUE;
}
public function step2() : bool|array
{
/* Remove old-style language strings for theme editor categories and settings */
Db::i()->delete( 'core_sys_lang_words', "word_key regexp '^themeeditor\\_var\\_\\d'" );
Db::i()->delete( 'core_sys_lang_words', "word_key regexp '^themeeditor\\_cat\\_\\d'" );
return true;
}
// You can create as many additional methods (step2, step3, etc.) as is necessary.
// Each step will be executed in a new HTTP request
}
@@ -0,0 +1,22 @@
{
"id": 5000028,
"name": "5.0.0 Beta 2",
"steps": {
"queries": false,
"lang": false,
"theme": false,
"themeeditor": true,
"javascript": false,
"emailTemplates": false,
"acpSearchKeywords": false,
"settings": false,
"tasks": false,
"modules": false,
"widgets": false,
"customOptions": false,
"customRoutines": false
},
"forceMainUpgrader": false,
"forceManualDownloadNoCiC": false,
"forceManualDownloadCiC": false
}
@@ -0,0 +1,105 @@
{
"categories": {
"added": [],
"edited": [
"lightDarkMode",
"logos",
"pageLayouts",
"typography",
"header",
"sidePanel",
"content",
"footer",
"mobileNavigation",
"textLogo",
"imageLogoDesktop",
"imageLogoMobile",
"desktopHeader",
"mobileHeader",
"body",
"contentBoxes",
"desktopFooter"
],
"removed": []
},
"settings": {
"added": [],
"edited": [
"set__i-default-scheme",
"i-footer--co",
"set__i-logo-text",
"set__i-design-border",
"set__i-layout-width",
"set__i-sidebar-ui-header--he",
"set__i-mobile-header--he",
"set__i-mobile-icons-location",
"set__i-position-logo",
"set__logo-light",
"set__i-font-family",
"layout_global_view_mode",
"set__mobile-logo-light",
"set__mobile-logo-dark",
"set__logo-dark",
"set__i-font-size",
"i-footer--ba-co",
"set__i-change-scheme",
"set__i-mobile-footer-labels",
"set__i-position-navigation",
"set__i-design-radius",
"set__i-logo-slogan",
"set__i-flip-sidebar",
"i-headerMobile--ba-co",
"i-dashHeader--ba-co",
"set__i-mobile-logo--he",
"set__i-logo--he",
"i-color_root",
"i-mobileFooter--ba-co",
"set__i-position-user",
"set__i-design-shadow",
"set__i-avatar-radius",
"set__i-logo--fo-fa",
"i-dashHeader--co",
"i-headerMobile--co",
"set__i-sidebar-ui-logo--he",
"i-color_soft",
"set__i-position-breadcrumb",
"i-mobileFooter--co",
"set__i-link-panels",
"i-body--ba-co",
"i-navPanelLinkHover--co",
"set__i-logo--fo-we",
"set__i-desktop-logo--fo-si",
"i-mobileFooter-active--co",
"i-navPanelLinkActive--ba-co",
"set__i-sticky-sidebar",
"i-box--ba-co",
"set__i-position-search",
"i-color_hard",
"i-mobileFooter-active--ba-co",
"i-navPanel--ba-co",
"set__i-sidebar-ui-logo--fo-si",
"set__i-header-primary--he",
"i-box--bo-co",
"i-link--co",
"i-navPanel--co",
"i-boxHeader--ba-co",
"set__i-mobile-logo--fo-si",
"i-link-hover--co",
"set__i-header-secondary--he",
"i-navPanelLinkActive--co",
"i-boxHeader--co",
"set__i-nav-bar-icons",
"set__i-user-content-font-size",
"i-widget-header--ba-co",
"i-headerTop--ba-co",
"i-widget-header--co",
"i-headerTop--co",
"i-headerPrimary--ba-co",
"i-headerPrimary--co",
"i-headerSecondary--ba-co",
"i-headerSecondary--co",
"set__i-header-top--he"
],
"removed": []
}
}
@@ -300,11 +300,15 @@ class Rank extends Model
}
/* Generate a custom SVG for this badge if we're not using a custom image */
if ( ( !array_key_exists( 'rank_use_image', $values ) and !$this->rank_use_image ) or ( array_key_exists( 'rank_use_image', $values ) and !$values['rank_use_image'] ) )
if( !array_key_exists( 'rank_use_image', $values ) or !$values['rank_use_image'] )
{
CustomBadge::saveRecordBadge( $this, CustomBadge::generateBadgeFromFormValues( $values, 'rank' ) );
}
else
{
CustomBadge::clearCustomBadgeFields( $values, 'rank' );
}
return $values;
}
@@ -154,13 +154,13 @@ class Field extends CustomField
/* If we are using the "default" formatting, set that up now */
$format = $this->format ?: "<strong data-i-el='title'>{\$title}:</strong><div data-i-el='value'>{\$processedContent}</div>";
return $this->parseHtmlLogic( $format, $value, $formattedValue, $member );
return $this->parseHtmlLogic( $format, $value ?? '', $formattedValue, $member );
case ( static::PROFILE ):
case ( static::PROFILE_COMPLETION ):
if( $this->profile_format and !$bypassCustomFormatting )
{
return $this->parseHtmlLogic( $this->profile_format, $value, $formattedValue, $member );
return $this->parseHtmlLogic( $this->profile_format, $value ?? '', $formattedValue, $member );
}
else
{
@@ -442,10 +442,10 @@ class Field extends CustomField
$formatOptions = array( 'default' => 'custom_field_format_default', 'custom' => 'custom_field_format_custom' );
$form->add( new Radio( 'pf_profile_format', $this->profile_format ? 'custom' : 'default', TRUE, array( 'options' => $formatOptions, 'toggles' => array( 'custom' => array( 'pf_profile_format_custom' ) ) ), NULL, NULL, NULL, 'pf_profile_format' ) );
$form->add( new TextArea( 'pf_profile_format_custom', $this->profile_format, FALSE, array( 'placeholder' => "<strong>{\$title}:</strong> {\$content}" ), NULL, NULL, NULL, 'pf_profile_format_custom' ) );
$form->add( new TextArea( 'pf_profile_format_custom', $this->profile_format, null, array( 'placeholder' => "<strong>{\$title}:</strong> {\$content}" ), NULL, NULL, NULL, 'pf_profile_format_custom' ) );
$form->add( new Radio( 'pf_format', $this->format ? 'custom' : 'default', TRUE, array( 'options' => $formatOptions, 'toggles' => array( 'custom' => array( 'pf_format_custom' ) ) ), NULL, NULL, NULL, 'pf_format' ) );
$form->add( new TextArea( 'pf_format_custom', $this->format, FALSE, array( 'placeholder' => "<strong>{\$title}:</strong> {\$content}" ), NULL, NULL, NULL, 'pf_format_custom' ) );
$form->add( new TextArea( 'pf_format_custom', $this->format, null, array( 'placeholder' => "<strong>{\$title}:</strong> {\$content}" ), NULL, NULL, NULL, 'pf_format_custom' ) );
}
/**
+15 -6
View File
@@ -104,12 +104,16 @@ class Rules extends Model
$form->add( new Number( 'automaticmoderation_points', $this->id ? $this->points_needed : 10, TRUE, array( 'min' => 1, 'max' => 9999 ), NULL, NULL, Member::loggedIn()->language()->addToStack('automaticmoderation_points_suffix') ) );
$options = array();
foreach(Types::roots() as $type )
if( count( Types::roots() ) > 0 )
{
$options[ $type->id ] = $type->_title;
foreach(Types::roots() as $type )
{
$options[ $type->id ] = $type->_title;
}
$form->add( new CheckboxSet( 'automaticmoderation_type', $this->types ? explode( ',', $this->types ) : array(), TRUE, array( 'options' => $options ) ) );
}
$form->add( new CheckboxSet( 'automaticmoderation_type', $this->types ? explode( ',', $this->types ) : array(), TRUE, array( 'options' => $options ) ) );
/* Loop over our member filters */
$form->addHeader( 'automaticmoderation_generic_filters' );
@@ -201,7 +205,11 @@ class Rules extends Model
$values['rule_filters'] = json_encode( $_options );
$values['rule_points_needed'] = $values['automaticmoderation_points'];
$values['rule_enabled'] = $values['automaticmoderation_enabled'];
$values['rule_types'] = $values['automaticmoderation_type'];
if( isset( $values['automaticmoderation_type'] ) )
{
$values['rule_types'] = $values['automaticmoderation_type'];
}
/* Now we have to remove any fields that aren't valid... */
foreach( $values as $k => $v )
@@ -378,10 +386,11 @@ class Rules extends Model
/* Loop over the filters */
$descriptions = array();
foreach( $this->_filters as $key => $filter )
if( $this->_filters )
{
if( isset( static::$extensions[ $key ] ) )
foreach( $this->_filters as $key => $filter )
{
if( isset( static::$extensions[ $key ] ) )
/* Ask the extension if this member matches the defined rule...if not, just return FALSE now */
if( method_exists( static::$extensions[ $key ], 'getDescription' ) and $description = static::$extensions[ $key ]->getDescription( $filter ) )
{
+1 -1
View File
@@ -28,7 +28,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
}
/**
* s3_delete Task
* s3Delete Task
*/
class s3Delete extends Task
{
+2 -1
View File
@@ -61,8 +61,9 @@ class unlockmembers extends Task
( new DateTime )->sub( new DateInterval( 'PT' . Settings::i()->ipb_bruteforce_period . 'M' ) )->getTimestamp(),
$this->member_id
];
$member->failed_login_count = max( iterator_to_array( Db::i()->select( 'count(login_ip_address)', 'core_login_failures', $where, NULL, NULL, 'login_ip_address' ) ) );
$failedLogins = iterator_to_array( Db::i()->select( 'count(login_ip_address)', 'core_login_failures', $where, NULL, NULL, 'login_ip_address' ) );
$member->failed_login_count = count( $failedLogins ) ? max( $failedLogins ) : 0;
$member->save();
}
-1
View File
@@ -66,7 +66,6 @@ class webhooks extends Task
}
Output::i()->parseFileObjectUrls( $fire['data'] );
$fire['data'] = Output::i()->replaceEmojiWithImages( $fire['data'] );
$request = Url::external( $webhooks[ $fire['webhook'] ]['url'] )
->request()
+12
View File
@@ -174,6 +174,18 @@ class clubs extends Widget implements Customizable
if ( Settings::i()->clubs and Member::loggedIn()->canAccessModule( Module::get( 'core', 'clubs', 'front' ) ) )
{
/* Strip any not existing custom field filters, e.g. when a field was deleted */
if ( isset( $this->configuration['filters'] ) and \is_array( $this->configuration['filters'] ) )
{
$fields = CustomField::roots();
foreach ( $this->configuration['filters'] as $key => $value )
{
if( !isset( $fields[ $key ] ) )
{
unset( $this->configuration['filters'][ $key ] );
}
}
}
$clubsCount = Club::clubs(
Member::loggedIn(),
$this->configuration['number_to_show'] ?? 10,
+1 -1
View File
@@ -148,7 +148,7 @@ class comments extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -210,7 +210,7 @@ class files extends ItemController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+1 -1
View File
@@ -152,7 +152,7 @@ class reviews extends CommentController
}
else
{
if ( Request::i()->author === 0 )
if ( (int) Request::i()->author === 0 )
{
$author = new Member;
$author->name = Request::i()->author_name;
+9 -9
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<javascript app="downloads">
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000200">/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/downloads" javascript_name="ips.downloads.browse.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000200">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -59,7 +59,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/pending" javascript_name="ips.pending.buttons.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000250">/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/pending" javascript_name="ips.pending.buttons.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000250">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -87,7 +87,7 @@
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000050">/**
<file javascript_app="downloads" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.settings.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000050">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -140,7 +140,7 @@
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100">/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.linkedScreenshots.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -212,7 +212,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000100"><![CDATA[/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/submit" javascript_name="ips.submit.main.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000100"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -657,7 +657,7 @@
}
});
}(jQuery, _));]]></file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150"><![CDATA[/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.changeLog.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150"><![CDATA[/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -779,7 +779,7 @@
});
}(jQuery, _));]]></file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150">/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.download.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -907,7 +907,7 @@
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="5000026" javascript_position="1000150">/**
<file javascript_app="downloads" javascript_location="front" javascript_path="controllers/view" javascript_name="ips.view.subscribe.js" javascript_type="controller" javascript_version="5000028" javascript_position="1000150">/**
* Invision Community
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
*
@@ -970,7 +970,7 @@
}
});
}(jQuery, _));</file>
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="5000026" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
<file javascript_app="downloads" javascript_location="front" javascript_path="templates" javascript_name="ips.templates.submit.js" javascript_type="template" javascript_version="5000028" javascript_position="1000050"><![CDATA[/* VIEW TEMPLATES */
ips.templates.set('downloads.submit.screenshot', " \
<div class='ipsUploader__row ipsUploader__row--image ipsAttach {{#done}}ipsAttach_done{{/done}}' id='{{id}}' data-role='file' data-fileid='{{id}}' data-filesize='{{sizeRaw}}' data-fullsizeurl='{{imagesrc}}' data-thumbnailurl='{{thumbnail}}' data-fileType='image'>\
<div class='ipsUploader__rowPreview' data-role='preview'>\
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<language>
<app key="downloads" version="5000026">
<app key="downloads" version="5000028">
<word key="__app_downloads" js="0">Downloads</word>
<word key="frontnavigation_downloads" js="0">Downloads</word>
<word key="__indefart_downloads_file_comment" js="0">a comment on a file</word>
+38 -70
View File
@@ -1126,7 +1126,7 @@
</section>
</div>]]></template>
<template template_group="nexus" template_name="fileInfo" template_data="$file" template_location="admin" template_app="downloads"><![CDATA[
<div class='i-background_2 i-padding_3'>
<div class='i-background_2 i-padding_3 i-margin-bottom_2 i-border-radius_box'>
<div class='ipsData__item'>
<a href="$file->url()" class='ipsData__image'>
{{if $file->primary_screenshot_thumb}}
@@ -1192,6 +1192,16 @@
{{if !$file->canView()}}
<p class='i-color_soft'>{lang="nexus_file_no_longer_available"}</p>
{{endif}}]]></template>
<template template_group="nexus" template_name="itemResultTemplate" template_data="$item" template_location="admin" template_app="downloads"><![CDATA[<div data-itemid="{$item->id}" data-role='contentItemRow'>
<strong>{$item->mapped('title')}</strong>
{{if $item->container()}}
<em>{lang="item_selector_added_to_container" sprintf="$item->container()->_title"}</em>
{{endif}}
<br>
<span class='i-color_soft'>{$item->author()->name} </span> &middot; {$item->price()}
</div>
]]></template>
<template template_group="stats" template_name="downloadsTable" template_data="$select, $pagination, $members, $total" template_location="admin" template_app="downloads"><![CDATA[<div class="ipsBox" data-ips-template="downloadsTable">
<h1 class="ipsBox__header">{lang="downloads_stats_downloader_count" pluralize="$total"}</h1>
{{if trim( $pagination )}}
@@ -1562,75 +1572,33 @@
</div>
</div>
</form>]]></template>
<template template_group="submit" template_name="topic" template_data="$file" template_location="front" template_app="downloads"><![CDATA[<div class='i-background_2 i-padding_3'>
{{if $file->container()->bitoptions['topic_screenshot'] and $file->primary_screenshot}}
<div class='ipsColumns'>
<div class='ipsColumns__secondary i-basis_200 i-text-align_center'>
<a href="{$file->url()}">
{{$image = ( $file->primary_screenshot instanceof \IPS\File ) ? (string) $file->primary_screenshot->url : $file->primary_screenshot;}}
<img src='{file="$image" extension="downloads_Screenshots"}' alt='{$file->name}' loading='lazy'>
</a>
<br><br>
<a href="{$file->url()}" class='ipsButton ipsButton--primary ipsButton--wide ipsButton--small'>
{lang="view_file"}
</a>
</div>
<div class='ipsColumns__primary'>
<template template_group="submit" template_name="topic" template_data="$file" template_location="front" template_app="downloads"><![CDATA[<h3>{$file->name}</h3>
{{if $file->desc}}
{$file->desc|raw}
{{endif}}
<h3 class='ipsTitle ipsTitle--h3'>{$file->name}</h3>
{{if !$file->container()->bitoptions['topic_screenshot'] or !$file->primary_screenshot}}
<a href="{$file->url()}" class='ipsButton ipsButton--primary ipsButton--wide ipsButton--small'>
{lang="view_file"}
</a>
{{endif}}
<hr class='ipsHr'>
<div class='ipsRichText '>
{$file->desc|raw}
</div>
<hr class='ipsHr'>
<i-data>
<ul class='ipsData ipsData--table ipsData--file-submitter'>
<li class='ipsData__item'>
<div class='i-basis_160'>
<strong>{lang="file_submitter"}</strong>
</div>
<div class='ipsData__main'>
{$file->author()->link( NULL, NULL, $file->isAnonymous() )|raw}
</div>
</li>
<li class='ipsData__item'>
<div class='i-basis_160'>
<strong>{lang="file_submitted"}</strong>
</div>
<div class='ipsData__main'>
{expression="\IPS\DateTime::ts( $file->submitted )->localeDate()"}
</div>
</li>
<li class='ipsData__item'>
<div class='i-basis_160'>
<strong>{lang="file_cat"}</strong>
</div>
<div class='ipsData__main'>
<a href="{$file->container()->url()}">{$file->container()->_title}</a>
</div>
</li>
{{foreach $file->customFields( TRUE ) as $k => $v}}
<li class='ipsData__item'>
<div class='i-basis_160'>
<strong>{lang="downloads_{$k}"}</strong>
</div>
<div class='ipsData__main'>
{$v|raw}
</div>
</li>
{{endforeach}}
</ul>
</i-data>
{{if $file->container()->bitoptions['topic_screenshot'] and $file->primary_screenshot}}
</div>
</div>
{{endif}}
</div>]]></template>
<div class="ipsRichTextBox ipsRichTextBox--alwaysopen">
<div class="ipsRichTextBox__title">
<p>{lang="file_information"}</p>
</div>
<p>
<strong><span data-ips-font-size="90">{lang="file_submitter"} </span></strong> {$file->author()->link( null, null, $file->isAnonymous() )|raw}
</p>
<p>
<strong><span data-ips-font-size="90">{lang="file_submitted"} </span></strong> {expression="\IPS\DateTime::ts( $file->submitted )->localeDate()"}
</p>
<p>
<strong><span data-ips-font-size="90">{lang="file_cat"} </span></strong> <a href="{$file->container()->url()}">{$file->container()->_title}</a>
</p>
{{foreach $file->customFields( TRUE ) as $k => $v}}
<p>
<strong><span data-ips-font-size="90">{lang="downloads_{$k}"} </span></strong> {$v|raw}
</p>
{{endforeach}}
</div>
<p>
<a href='{$file->url()}'>{lang="view_file"}</a>
</p>]]></template>
<template template_group="submit" template_name="wizardForm" template_data="$stepNames, $activeStep, $output, $baseUrl, $showSteps" template_location="front" template_app="downloads"><![CDATA[
{{foreach $stepNames as $step => $name}}
{{if $activeStep == $name}}
@@ -2359,7 +2327,7 @@
</article>
<aside class='ipsColumns__secondary i-basis_380'>
<div class='i-padding_3'>
<ul class="ipsButtons i-margin-bottom_4">
<ul class="ipsButtons i-margin-bottom_4" data-ips-hook="downloadButtonList">
{{if $file->canBuy()}}
{{if $file->canDownload()}}
{template="downloadButton" group="view" app="downloads" params="$file"}
+3 -1
View File
@@ -274,5 +274,7 @@
"5000023": "5.0.0 Alpha 15",
"5000024": "5.0.0 Alpha 16",
"5000025": "5.0.0 Alpha 16",
"5000026": "5.0.0 Beta 1"
"5000026": "5.0.0 Beta 1",
"5000027": "5.0.0 Beta 2",
"5000028": "5.0.0 Beta 2"
}
@@ -77,10 +77,17 @@ class Files extends EditorMediaAbstract
foreach ( Db::i()->select( '*', 'downloads_files_records', $where, 'record_time DESC', array( ( $page - 1 ) * $limit, $limit ) ) as $row )
{
$file = \IPS\downloads\File::load( $row['record_file_id'] );
$obj = File::get( 'downloads_Files', $row['record_location'], $row['record_size'] );
$obj->contextInfo = $file->name;
$obj->screenshot = $file->primary_screenshot;
$obj->originalFilename = $row['record_realname'];
$obj->contextInfo = $file->name;
$screenshot = $file->primary_screenshot_thumb;
if( $screenshot instanceof File )
{
$obj->screenshot = $screenshot;
}
$return[ (string) $file->url()->setQueryString( array( 'do' => 'download', 'r' => $row['record_id'] ) ) ] = $obj;
}
@@ -53,8 +53,8 @@ class Downloads extends Restriction
if ( $this->member->idm_block_submissions == $values['idm_block_submissions'] )
{
$return['idm_block_submissions'] = array( 'old' => $this->member->members_bitoptions['idm_block_submissions'], 'new' => !$values['idm_block_submissions'] );
$this->member->idm_block_submissions = !$values['idm_block_submissions'];
$return['idm_block_submissions'] = array( 'old' => $this->member->idm_block_submissions, 'new' => !$values['idm_block_submissions'] );
$this->member->idm_block_submissions = !$values['idm_block_submissions'];
}
return $return;
@@ -17,8 +17,10 @@ use DateInterval;
use Exception;
use IPS\DateTime;
use IPS\downloads\File as DownloadsFile;
use IPS\Helpers\Form;
use IPS\Http\Url;
use IPS\nexus\Customer;
use IPS\nexus\Invoice;
use IPS\nexus\Money;
use IPS\nexus\Purchase;
use IPS\nexus\Purchase\RenewalTerm;
@@ -44,6 +46,7 @@ class File extends \IPS\nexus\Invoice\Item\Purchase
{
/**
* @brief Application
*
*/
public static string $application = 'downloads';
@@ -211,6 +214,63 @@ class File extends \IPS\nexus\Invoice\Item\Purchase
return "";
}
/**
* Generate Invoice Form
*
* @param Form $form The form
* @param Invoice $invoice The invoice
* @return void
*/
public static function form( Form $form, Invoice $invoice ) : void
{
$form->add( new Form\Item( 'downloads_file', null, true, [
'class' => DownloadsFile::class,
'maxItems' => 1,
'where' => [
[ 'file_cost is not null' ],
[ 'file_open=?', 1 ],
[ 'file_submitter != ?', $invoice->member->member_id ]
],
'itemTemplate' => [ Theme::i()->getTemplate( 'nexus', 'downloads' ), 'itemResultTemplate' ]
] ) );
}
/**
* Create From Form
*
* @param array $values Values from form
* @param Invoice $invoice The invoice
* @return static
*/
public static function createFromForm( array $values, Invoice $invoice ): static
{
$file = array_shift( $values['downloads_file'] );
$price = $file->price( $invoice->member );
$item = new static( $file->name, $price );
$item->id = $file->id;
try
{
$item->tax = Settings::i()->item_nexus_tas ? Tax::load( Settings::i()->idm_nexus_tax ) : null;
}
catch( OutOfRangeException ){}
if ( Settings::i()->idm_nexus_gateways )
{
$item->paymentMethodIds = explode( ',', Settings::i()->idm_nexus_gateways );
}
$item->renewalTerm = $file->renewalTerm( $invoice->member );
$item->payTo = $file->author();
$item->commission = Settings::i()->idm_nexus_percent;
if ( $fees = json_decode( Settings::i()->idm_nexus_transfee, TRUE ) and isset( $fees[ $price->currency ] ) )
{
$item->fee = new Money( $fees[ $price->currency ]['amount'], $price->currency );
}
return $item;
}
/**
* URL
Loaded 100 of 181 files, more files were not shown because too many files have changed in this diff. Show more