Version Description
Download this release
Release Info
Developer | sc0ttkclark |
Plugin | Pods – Custom Content Types and Fields |
Version | 2.9.0 |
Comparing to | |
See all releases |
Code changes from version 2.8.23 to 2.9.0
- changelog.txt +915 -5
- classes/Pods.php +50 -20
- classes/PodsAPI.php +101 -24
- classes/PodsAdmin.php +287 -51
- classes/PodsComponents.php +1 -6
- classes/PodsData.php +2 -2
- classes/PodsField.php +53 -0
- classes/PodsForm.php +27 -6
- classes/PodsInit.php +13 -2
- classes/PodsMeta.php +18 -7
- classes/PodsUI.php +11 -1
- classes/fields/code.php +1 -12
- classes/fields/color.php +1 -12
- classes/fields/currency.php +0 -9
- classes/fields/date.php +0 -9
- classes/fields/datetime.php +1 -12
- classes/fields/email.php +1 -12
- classes/fields/file.php +282 -202
- classes/fields/link.php +9 -1
- classes/fields/number.php +9 -13
- classes/fields/oembed.php +1 -12
- classes/fields/paragraph.php +1 -12
- classes/fields/password.php +1 -12
- classes/fields/phone.php +1 -12
- classes/fields/slug.php +1 -3
- classes/fields/text.php +1 -12
- classes/fields/time.php +0 -9
- classes/fields/website.php +31 -12
- classes/fields/wysiwyg.php +6 -12
- components/I18n/I18n.php +3 -0
- components/Migrate-Packages/Migrate-Packages.php +123 -27
- components/Migrate-Packages/ui/wizard.php +41 -0
- components/Templates/includes/functions-view_template.php +90 -21
- includes/data.php +46 -0
- includes/general.php +247 -24
- init.php +5 -5
- readme.txt +45 -9
- sql/upgrade/PodsUpgrade.php +1 -0
- src/Pods/Admin/Config/Field.php +56 -22
- src/Pods/Blocks/API.php +12 -1
- src/Pods/CLI/Service_Provider.php +2 -1
- src/Pods/Config_Handler.php +798 -0
- src/Pods/Integrations/WPGraphQL/Connection.php +259 -0
- src/Pods/Integrations/WPGraphQL/Connection_Resolver/Custom_Simple.php +218 -0
- src/Pods/Integrations/WPGraphQL/Connection_Resolver/Pod.php +392 -0
- src/Pods/Integrations/WPGraphQL/Connection_Resolver/Pod_Type.php +289 -0
- src/Pods/Integrations/WPGraphQL/Field.php +311 -0
- src/Pods/Integrations/WPGraphQL/Integration.php +463 -0
- src/Pods/Integrations/WPGraphQL/Service_Provider.php +54 -0
- src/Pods/Integrations/WPGraphQL/Settings.php +255 -0
- src/Pods/Pod_Manager.php +162 -0
- src/Pods/REST/V1/Service_Provider.php +2 -1
- src/Pods/Service_Provider.php +4 -2
- src/Pods/Whatsit.php +25 -0
- src/Pods/Whatsit/Field.php +93 -1
- src/Pods/Whatsit/Pod.php +50 -1
- src/Pods/Whatsit/Storage.php +7 -0
- src/Pods/Whatsit/Storage/Collection.php +18 -2
- src/Pods/Whatsit/Storage/File.php +24 -0
- src/Pods/Whatsit/Storage/Post_Type.php +19 -2
- src/Pods/Whatsit/Store.php +2 -0
- ui/js/blocks/pods-blocks-api.min.asset.json +1 -1
- ui/js/blocks/pods-blocks-api.min.js +1 -1
- ui/js/dfv/pods-dfv.min.asset.json +1 -1
- ui/js/dfv/pods-dfv.min.js +0 -1
changelog.txt
CHANGED
@@ -2,6 +2,167 @@ Found a bug? Have a great feature idea? Get on GitHub and tell us about it and w
|
|
2 |
|
3 |
Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
= 2.8.9 - January 31st, 2022 =
|
6 |
|
7 |
* Added: There's a new tool at Pods Admin > Settings > Tools that will let you "Recreate missing tables". This will run the logic used to create those tables needed by Pods. This is currently just for `wp_podsrel` but will eventually include all other table-based Pods too. #5795 (@sc0ttkclark)
|
@@ -43,7 +204,7 @@ Our GitHub has the full list of all prior releases of Pods: https://github.com/p
|
|
43 |
* Fixed: Pods Pages now loads the expected value for page_template when editing a Pod Page. #6355 (@sc0ttkclark)
|
44 |
* Fixed: Pods Pages now loads the labels for Associated Pod when editing a Pod Page. #6355 (@sc0ttkclark)
|
45 |
* Fixed: Prevent potential timeouts by reducing areas of conflict in `PodsMeta`. #6349 (@sc0ttkclark)
|
46 |
-
* Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
|
47 |
* Fixed: Enforce slug characters on registration of post type / taxonomy instead of the admin config field for Custom Rewrite Slug and Archive Page Slug Override. #6354 (@sc0ttkclark)
|
48 |
* Fixed: Resolve issues with `PodsAPI::save_field()` when trying to save a field just using the name, now you can pass the `override` parameter as true to bypass duplicate field checks to force saving as matching field. #6345 (@sc0ttkclark)
|
49 |
* Fixed: More robust checking for conflicts with extended post types and taxonomies before registering them. #6348 #6342 (@sc0ttkclark)
|
@@ -59,7 +220,7 @@ Our GitHub has the full list of all prior releases of Pods: https://github.com/p
|
|
59 |
|
60 |
* Security: Escape/KSES labels and descriptions in more places. (@sc0ttkclark)
|
61 |
* Tweak: Added bbPress profile form support so that Pods fields appear like the other form fields. (@sc0ttkclark)
|
62 |
-
* Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
|
63 |
* Tweak: Added ability to force checking if a Pod has orphan fields that aren't assigned to groups and setting them to the first group. Add `pods_debug_find_orphan_fields=1` to the URL when editing a pod. (@sc0ttkclark)
|
64 |
* Tweak: Implement Block schema for Pods blocks and set the icons to use dashicons for WordPress.org. (@sc0ttkclark)
|
65 |
* Tweak: Improve performance by only checking a Pod once for a field when filtering meta related functions. (@sc0ttkclark)
|
@@ -164,6 +325,8 @@ Our GitHub has the full list of all prior releases of Pods: https://github.com/p
|
|
164 |
* Tweak: Internal API - Storage and Storage Types used in the internal Pods code has been clarified to prevent ambiguity. Storage Types have been changed to Object Storage Types in all areas regarding Whatsit Storage). (@sc0ttkclark)
|
165 |
* Tweak: Public forms now have unique IDs added to them to help in custom CSS work. (@sc0ttkclark)
|
166 |
|
|
|
|
|
167 |
= 2.8 - October 18th, 2021 =
|
168 |
|
169 |
Release post: https://pods.io/2021/10/18/pods-2-8-feature-release/
|
@@ -181,12 +344,12 @@ Read the full [Pods 2.8 Field Guide](https://pods.io/2021/02/11/pods-2-8-beta-1-
|
|
181 |
* Feature: Now you can add multiple groups of fields. (@sc0ttkclark, @zrothauser)
|
182 |
* Feature: Our Edit Pod screen is powered by our all new React form interfaces, tooltips, and they use our new Pods Admin REST API endpoints. (@sc0ttkclark, @zrothauser)
|
183 |
* Feature: All of our form fields are powered by React now in preparation for Pods 2.9 repeatable fields that we're working on next. (@sc0ttkclark, @zrothauser)
|
184 |
-
* Feature: New field types for Heading and HTML. (@sc0ttkclark, @zrothauser)
|
185 |
* Feature: New Pods Blocks available and the underlying Pods Block PHP API is compatible with ACF Blocks if you've ever used those before. (@sc0ttkclark, @zrothauser)
|
186 |
* Feature: REST API endpoints are now available to create/edit various objects: Pods, Pod Groups, and Pod Fields. (@sc0ttkclark)
|
187 |
* Feature: WP-CLI commands that mirror the REST API endpoints we have. (@sc0ttkclark)
|
188 |
* Feature: The new WYSIWYG editor option to use [Quill Editor](https://github.com/zenoamaro/react-quill) is now available and the CLEditor has been removed. (@sc0ttkclark, @zrothauser)
|
189 |
-
* Compatibility: Completely updated compatibility with WPML and Polylang plugins.
|
190 |
|
191 |
= 2.7.31 - September 23rd, 2021 =
|
192 |
|
@@ -206,7 +369,7 @@ Read the full [Pods 2.8 Field Guide](https://pods.io/2021/02/11/pods-2-8-beta-1-
|
|
206 |
* Enhancement: Optimized the PNG image assets using PNG8+Alpha with ImageAlpha and ImageOptim. #6028 (@lowwebtech)
|
207 |
* Fixed: Hidden fields now properly submit correctly. (@sc0ttkclark)
|
208 |
* Fixed: Post type `has_archive` no gets set to a false properly when disabled. #6069 (@JoryHogeveen)
|
209 |
-
* Fixed: Resolve PHP `strlen()
|
210 |
* Fixed: Sorting URLs in `PodsUI` include `post_type` and `taxonomy` when Advanced Content Types are set to be underneath a Post Type's top level menu. #6040 (@JoryHogeveen)
|
211 |
* Fixed: Fallback to the manage fields in `PodsUI` for reordering when reorder fields are not overridden. #6058 (@JoryHogeveen)
|
212 |
* Fixed: Depend on plupload when showing custom upload directory option for file fields. (@JoryHogeveen)
|
@@ -738,16 +901,20 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
738 |
* Relationships to Taxonomy have Flexible Relationships disabled as the input screen for Taxonomy was not able to be accessed in an iFrame. We’re working on this for a future release.
|
739 |
|
740 |
= 2.6.11.2 - August 4th, 2021 =
|
|
|
741 |
* Security: Clean up post type and taxonomy labels so they avoid potential output escaping problems in WordPress core (@sc0ttkclark, reported by Muhammad Daffa via WPScan)
|
742 |
|
743 |
= 2.6.11.1 - June 4th, 2020 =
|
|
|
744 |
* Security: Remove deprecated usage of escapeMarkup in Select2 (@sc0ttkclark, @miha.jirov)
|
745 |
|
746 |
= 2.6.11 - September 20th 2017 =
|
|
|
747 |
* Fixed: WordPress 4.8.2 introduced a breaking change that no longer correctly prepared number/currency queries. It did not introduce a vulnerability but only produced Database errors.
|
748 |
* Stay tuned for Pods 2.7 which will be out soon -- [Download Pods 2.7 RC1](https://github.com/pods-framework/pods/archive/release/2.7.zip) and join our [Pods Slack channel #pods-beta](https://pods.io/chat/) to help us finish the final testing
|
749 |
|
750 |
= 2.6.10 - July 14th 2017 =
|
|
|
751 |
* Fixed: Pods Templates were creating erroneous output with nested `[if _fieldname_][else][/if]` and `[each _fieldname_][/each]` template tags inside HTML entities after 2.6.9 upgrade. This fix bypasses `do_shortcode` and also bypasses `do_shortcodes_in_html_tags` which was the problem with this particular fix. Fixes (#4324,#4307,#4307). (#4335). [@pglewis]
|
752 |
* Fixed: Multi-file fields save was causing array to string conversion warning. New function & helper added called `array_filter_walker` for backwards compatibility. Also fixes the 'editable' titles in Multiple File Upload. Fixes (#4112,#4313). (#4314). [@mgratch,@JoryHogeveen,@sc0ttkclark]
|
753 |
* Added: Pods Templates & Page Capabilities have been added to the Members Cap Filter and Pods Role Manager from Components, Roles & Capabilities. This corrects an issue where Pods Templates and Pods Pages were not available to Admins, only Network Admins. Admins will still need to have the pods_templates_ and pods_pages_ capabilities added to their role, but now they'll be able to do this without additional code. Fixes (#4311). (#4342). [@JoryHogeveen]
|
@@ -756,6 +923,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
756 |
* Updated: Removed CodeClimate Integration (#4275) and updated glob 7.1 (#4242). [@Ramoonus]
|
757 |
|
758 |
= 2.6.9 - May 30th 2017 =
|
|
|
759 |
* Added: Pods Template Component is now automatically active on initial installation or reinstallation of Pods. Fixes (#3446). (#4060,#4180). [@pglewis,@sc0ttkclark]
|
760 |
* Added: Auto Template Fix: Add configurations setting to override and allow Auto Templates to run against the_content outside of the WordPress_Loop. By default now, it will only run inside the WP Loop. (#4088). [@jamesgol]
|
761 |
* Added: Allow raw value in PodsUI rows. New type "raw" that can output HTML form elements; used in i18n component. Fixes (#3959). (#3960). [@JoryHogeveen]
|
@@ -783,6 +951,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
783 |
* Updated: Brand assets for Pods (icons and banners) for WordPress Plugin Directory. Fixes (#3948). (#4268) [@jimtrue]
|
784 |
|
785 |
= 2.6.8 - January 17th 2017 =
|
|
|
786 |
* Added: WP Gallery display options for image fields. Fixes (#3905). (#3910). [@JoryHogeveen]
|
787 |
* Added: Add action after successful AJAX in admin_ajax. This allows other scripts to hook in the ajax handlers from Pods. Fixes (#3839). (#3840). [@JoryHogeveen]
|
788 |
* Added: Keep Plupload instances in `windows.pods_uploader[id]`. This makes it possible to bind event listeners to the file uploader. Fixes (#3763). (#3768). [@thirdender]
|
@@ -831,6 +1000,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
831 |
* Fixed: Allow the entry of negative numbers in Currency fields. Fixes (#3708). (#3709). [@pcfreak30]
|
832 |
|
833 |
= 2.6.7 - August 15th 2016 =
|
|
|
834 |
* Fixed: Magic Tag {@permalink} fixes for taxonomy / user / comment detail URL Mapping. Fixes (#3339). [@sc0ttkclark]
|
835 |
* Fixed: Pods Wizard for Forms now properly uses the `[podsform]` shortcode. Fixes (#3251). [@sc0ttkclark]
|
836 |
* Fixed: Issue with pll_get_post returning false instead of null. Fixes (#3596). (#3599) [@JoryHogeveen]
|
@@ -848,6 +1018,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
848 |
* Fixed: travis-ci: test with PHP 7.1 (#3702). [@Ramoonus]
|
849 |
|
850 |
= 2.6.6 - June 23rd 2016 =
|
|
|
851 |
* Added: Polylang compatibility with latest versions along with fixes to longstanding issues with editing and displaying content, relationships, and taxonomy (#3574). Fixes (#3572, #3506) [@JoryHogeveen]
|
852 |
* Added: REST API v2 Compatibility (#3584). Switches `register_api_field` to `register_rest_field`. Fixes (#3581) [@sc0ttkclark]
|
853 |
* Added: Allow changing the Auto Templates Filter. This adds a new section in the Auto Templates tab that allows overriding the default `the_content` filter (#3542). Fixes (#3540) [@Shelob9]
|
@@ -867,31 +1038,39 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
867 |
* Fixed: PodsRESTHandlers::write_handler needs to be static (#3511). Fixes (#3510) [@pcfreak30]
|
868 |
|
869 |
= 2.6.5.2 - May 4th 2016 =
|
|
|
870 |
* Fixed: Typo in PLL Compatibility check corrected. (#3504) Fixes (#3503). Thank you @JoryHogeveen and @fmommeja for tracking down, fixing and validating this fix. [@JoryHogeveen]
|
871 |
|
872 |
= 2.6.5.1 - May 4th, 2016 =
|
|
|
873 |
* Fixed: Additional Field Options tab disappears from field admin view. Fixes (#3501). [@sc0ttkclark]
|
874 |
|
875 |
= 2.6.5 - May 3rd, 2016 =
|
|
|
876 |
* Fixed: Renaming of Pods with underscores to hyphenated names that was introduced in 2.6.3. Hyphenated Pods names will remain hyphenated and Underscored Pods names will remain underscored. Fixes (#3499). [@sc0ttkclark]
|
877 |
* Fixed: Support for new Polylang Versions with much kudos to @JoryHogeveen for tackling this (#3491). Fixes (#3490,#3223) [@JoryHogeveen]
|
878 |
|
879 |
= 2.6.4 - April 25th, 2016 =
|
|
|
880 |
* Fixed: Modified Run activation/install priority to fire before plugins loaded. Fix for the Clearing Pods Cache automatically after Pods Upgrade (#3487). Fixes (#2558,#3348) [@sc0ttkclark]
|
881 |
|
882 |
= 2.6.3.1 - April 21st, 2016 =
|
|
|
883 |
* Fixed: An Git / SVN deploy bug caused some files to not be properly pushed to WordPress.org SVN, this release is just to ensure everyone who may have updated to 2.6.3 during the period which we were fixing it will be able to still get the proper file updates
|
884 |
|
885 |
= 2.6.3 - April 21st, 2016 =
|
|
|
886 |
* Fixed: Fix forcing underscores when loading Edit Pod Form (#3483). Fixes (#3095) [@sc0ttkclark] Kudos to @lkraav for helping us pin this particular issue down and bring it to resolution.
|
887 |
* Fixed: Clearing Pods Cache automatically after Pods Upgrade "Salt n'Pepa"'ing the cache keys (#3401). Fixes (#2558,#3348) [@sc0ttkclark]
|
888 |
|
889 |
= 2.6.2 - March 24th, 2016 =
|
|
|
890 |
* Added: Support for object fields when using Pods::field() with a specific $field and $option. This was also used to correct a problem with "fetching" Custom Taxonomy's Term List when using Pods Feeds in Pods Gravity Forms Plugin. (#3437) [@sc0ttkclark]
|
891 |
* Fixed: Correcting CSS used for Dashicon to remove conflict with icon usage in Divi. (#3404,#3406) [@jimtrue]
|
892 |
* Fixed: Currency/Number Validation used to correct issue with Currency Usage in the Pods Gravity Forms plugin (#3436) [@sc0ttkclark]
|
893 |
|
894 |
= 2.6.1 - February 15th, 2016 =
|
|
|
895 |
* Added: Additional Label support for Post Type / Taxonomy register functions (#3275) [@pcfreak30]
|
896 |
* Added: Add use_current option for Widget Single (#3393,#3394) [@sc0ttkclark]
|
897 |
* Added: Add option to website fields to open links in new window (#3388,#3387) [@sc0ttkclark]
|
@@ -911,6 +1090,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
911 |
* Fixed: Taxonomy custom meta fields returning false from REST API (#3365,#3369) [@anandamd]
|
912 |
|
913 |
= 2.6 - December 9th, 2015 =
|
|
|
914 |
* Added: Support for Term Meta in WP 4.4 - Now create meta-based taxonomies and Pods just magically works! (#3169,#3163) [@sc0ttkclark]
|
915 |
* Added: Add REST API Support to Post Types, Taxonomies, Users. Read the update in https://github.com/pods-framework/pods/pull/3184 for step by step details. (#3184,#3182) [@Shelob9]
|
916 |
* Added: Added compatibility with the latest Polylang version, using $polylang-model to get the current language and version. (#3223) [@JoryHogeveen]
|
@@ -942,6 +1122,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
942 |
* Removed: Composer remove coveralls. Was not being used and needs phpunit support. Could also be replaced by php codesniffer or scrutinizer. (#3174) [@Ramoonus]
|
943 |
|
944 |
= 2.5.5 - September 16th, 2015 =
|
|
|
945 |
* Added: Unit testing for PHPUnit 4.8 support. (#3090, #3069) Kudos to @Ramoonus
|
946 |
* Fixed: Drop External code coverage - timeout in Scrutinizer. (#3091) Kudos to @Ramoonus
|
947 |
* Fixed: Changed Content property to fix spacing issues with AutoComplete Field where the formatted selection fields have awkward spacing between the selection box and the selection list. (#3098, #3097, #3099) Kudos to @nicdford
|
@@ -952,6 +1133,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
952 |
* Added: License.txt changes to sync with GPL v2 (#3130, #3133) Kudos to @Ramoonus
|
953 |
|
954 |
= 2.5.4 - August 10th, 2015 =
|
|
|
955 |
* Added: Support for Compare ALL with meta_query syntax. Kudos to @pcfreak30. (#3037, #3038)
|
956 |
* Added: Query_field tests (meta_query syntax for where) (#3033, #3032, #1662, #2689)
|
957 |
* Added: Support for autoCAST()ing meta_value orderby for dates and numbers (#3043, #3041, #3058)
|
@@ -962,6 +1144,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
962 |
* Fixed: Style escaping which created a quote encoding bug in PodsMeta.php. (#3053, #3032)
|
963 |
|
964 |
= 2.5.3 - June 11th, 2015 =
|
|
|
965 |
* Added: Support for Term Splitting in WP 4.2 (#2856, #2660)
|
966 |
* Added: Support for Pod and Field names with dashes and prefixes with underscores (#3012, #3021, #3022)
|
967 |
* Added: Add git workflow and a link to it from contributing.md (#2490, #2496)
|
@@ -988,6 +1171,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
988 |
* Fixed: Allow fields to be sorted by orderby; Two separate but connected issues. First if orderby is passed then the $data array is never populated. Then looping through $ids will always give it results sorted by priority in the relationships field (data returned by lookup_related_items) (#2350, #2277)
|
989 |
|
990 |
= 2.5.2 - May 14th, 2015 =
|
|
|
991 |
* Fixed: Issues with default values for number and other types of fields.
|
992 |
* Fixed: Issue where Pods update was causing WP-API endpoints to 404. Rewirte rules now flush on wp_loaded.
|
993 |
* Fixed: Issue preventing proper display of fields in a related CPT via Pods::field()
|
@@ -1012,14 +1196,17 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
1012 |
* Improved: URL escaping in PodsUI
|
1013 |
|
1014 |
= 2.5.1.2 - March 16th, 2015 =
|
|
|
1015 |
* Security Update: We recommend all Pods 2.x installations be updated to the latest version of Pods
|
1016 |
* or replace your plugin files with the download of your version from http://wordpress.org/plugins/pods/developers/
|
1017 |
* Fixed: Pods UI orderby now strictly enforces Database column format
|
1018 |
|
1019 |
= 2.5.1.1 - January 22nd, 2015 =
|
|
|
1020 |
* Fixed missing files for font icon.
|
1021 |
|
1022 |
= 2.5.1 - January 22nd, 2015 =
|
|
|
1023 |
* Fixed: Issue preventing fields from being sorted by weight or by orderby, that was affecting image multi-select image field ordering.
|
1024 |
* Fixed: Missing gradients in UI.
|
1025 |
* Fixed: Use of anonymous function in PodsMeta.php causing issues with old versions of PHP.
|
@@ -1033,6 +1220,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
1033 |
* Fixed: Issue with custom taxonomy joins preventing "custom_tax.d.custom_field" type where clauses from working.
|
1034 |
|
1035 |
= 2.5 - December 30th, 2014 =
|
|
|
1036 |
* Major performance enhancements can now make things run up to 400% faster (props to @jamesgol!)
|
1037 |
* More unit tests -- now 1,858 tests with a total of 13,420 assertions covering all content type, storage type, and field variations (props to @sc0ttkclark, @clubduece, and @mordauk! it was a group effort)
|
1038 |
* Added Travis-CI / Scrutinizer-CI for all pushes and pull requests to unit test and check for other issues
|
@@ -1087,15 +1275,18 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
1087 |
* If you need assistance in upgrading your Pods 2.x site to the latest version of Pods, please don't hesitate to contact us at https://pods.io/help/
|
1088 |
|
1089 |
= 2.4.3 - June 23rd, 2014 =
|
|
|
1090 |
* Fixed: Pods Templates component now has better handling of the new shortcodes
|
1091 |
* Fixed: PodsUI data issue with Custom DB Table support
|
1092 |
* Fixed: Readonly fields and noncing now works properly, Pods 2.4.2 caused all forms with readonly fields to fail submission
|
1093 |
* Hardened: Further security hardening of the `[pods]` shortcode, added PODS_DISABLE_SHORTCODE constant to allow sites to disable the Pods shortcode altogether
|
1094 |
|
1095 |
= 2.4.2 - June 22nd, 2014 =
|
|
|
1096 |
* Security Update: We recommend all Pods 2.x installations be updated to the latest version of Pods to fix a noncing issue with form saving, or replace your plugin files with the download of your version from http://wordpress.org/plugins/pods/developers/
|
1097 |
|
1098 |
= 2.4.1 - June 19th, 2014 =
|
|
|
1099 |
* Fixed: Display of of hidden fields in Pods Forms
|
1100 |
* Fixed: Reordering fields in PodsUI
|
1101 |
* Fixed: PodsUI Admin Icon Display
|
@@ -1121,6 +1312,7 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
1121 |
* Added: Ability to use pods() without any parameters. Will pull the pod object based off of the current WP_Query queried object / object id
|
1122 |
|
1123 |
= 2.4 - April 16th, 2014 =
|
|
|
1124 |
* After a long road, we've got a new minor release out that fixes a large number of outstanding bugs and adds a few improvements that were within reach right away.
|
1125 |
* In Pods 3.0 we're focusing on finishing some overarching performance improvements that are necessary to support large installs with the new Loop and Repeatable fields features.
|
1126 |
* Added: Tagging feature for Relationship fields with Autocomplete (Select2) which lets you add new items on-demand when saving
|
@@ -1169,3 +1361,721 @@ Fixed: Serial comma display works again for Users, Comments, and Media relations
|
|
1169 |
* Fixed: Usage of pods_v in currency.php for optimzation purposes
|
1170 |
* Fixed: Correct parent_file to highlight the correct top level menu
|
1171 |
* Fixed: Improper wording for text at top of settings page field
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
Our GitHub has the full list of all prior releases of Pods: https://github.com/pods-framework/pods/releases
|
4 |
|
5 |
+
= 2.9 - August 9th, 2022 =
|
6 |
+
|
7 |
+
* Feature: Simple Repeatable Fields offers the ability to turn almost any field into a repeatable field. With repeatable fields, you can add multiple values for a field. You can use repeatable fields with the Pods template tag `[each your_repeatable_field]` to easily loop and display information with `{@_value}` Supported field types include: Plain Text, Website, Phone, Email, Password, Date / Time, Date, Time, oEmbed, Plain Paragraph text, WYSIWYG, Plain Number, Currency, and Color Picker. Supported Pod Types include: Post Types (meta-based), Taxonomies (meta-based), Users (meta-based), and Comments (meta-based). #1095 #6304 (@sc0ttkclark, @zrothauser)
|
8 |
+
* Feature: Register Pods configurations with JSON/YML files in your theme when stored in `pods.json`, `pods/pods.json`, `pods/templates.json`, etc. Custom paths can be registered to support third party plugins as well. Register new paths using `pods_register_config_path( $full_directory_path )` that contain a `/pods/` directory to automatically pull from or use `pods_register_config_file( $full_file_path, 'json' )` to register a specific file. #4856 (@sc0ttkclark)
|
9 |
+
* Feature: The initial integration for WPGraphQL has been merged from the WPGraphQL Integration Add-On for Pods Pro by SKCDEV. The Add-On itself will continue to be developed with new features that are focused on Advanced Content Types and other enhancements in the future that will still remain outside of Pods core. (@sc0ttkclark)
|
10 |
+
* Feature: Drag and drop fields from one group to another. #5937 #6114 #6123 #6456 (@sc0ttkclark)
|
11 |
+
* Feature: Support importing and exporting Pods Settings in Pods Packages. #6455 (@sc0ttkclark)
|
12 |
+
* Feature: Website fields can now be set to output links with `rel="nofollow"` on them. (@sc0ttkclark)
|
13 |
+
* Feature: Full support for DB (Post Types), Code (PHP), and File (JSON/YML) configurations on the Pods Admin > Edit Pods screen. If you have configurations for multiple sources, you will see a new Source column (with file path) and you can filter by source. Pods with non-DB sources currently do not have Edit/Duplicate/Reset Content/Delete links. (@sc0ttkclark)
|
14 |
+
* Feature: The file field can now support any image, video, or audio mime types that are supported by WordPress. #6577 #6578 (@sc0ttkclark, @JoryHogeveen)
|
15 |
+
* Enhancement: New `\Pods\Pod_Manager` class allows reusing Pods instances when working with the same Pod across many areas of the code. (@sc0ttkclark)
|
16 |
+
* Enhancement: Added PodsAdmin::check_requirements() helper method. (@sc0ttkclark)
|
17 |
+
* Enhancement: Migrate Packages component is now enabled by default on new Pods installs. (@sc0ttkclark)
|
18 |
+
* Tweak: Removed special logic intended for PHP 5.3 and earlier. (@sc0ttkclark)
|
19 |
+
* Tweak: Improved performance when getting Pods configs from post type storage. #6561 #6562 (@JoryHogeveen)
|
20 |
+
* Fixed: Set the default sort to Pod Label now that more sources are supported on Pods Admin > Edit Pods. (@sc0ttkclark)
|
21 |
+
* Fixed: Prevent potential issues with `$wpdb->prepare()` when a related object does not have an index field set. (@sc0ttkclark)
|
22 |
+
* Fixed: Resolve issue with not reading cache when no ID is passed into Pods objects for Settings pods. #3582 #3583 (@pcfreak30, @sc0ttkclark, @JoryHogeveen)
|
23 |
+
* Fixed: Don't show the edit link in PodsUI if access is restricted, previously going to edit would show the access message but now the link won't show at all in those restricted cases. (@sc0ttkclark)
|
24 |
+
* Fixed: Resolve issues with Media modal fields showing duplicate fields. #6564 (@JoryHogeveen)
|
25 |
+
* Fixed: Handle processing the Pods display tags in a more dynamic way for attributes and passing them down to the tag handlers. (@sc0ttkclark)
|
26 |
+
* Fixed: Enable media buttons for the post_content field like they should so that forms outside the admin screen continue to function as expected. #6525 (@sc0ttkclark)
|
27 |
+
* Fixed: Resolve issues with values that are objects and convert them to arrays for relationship value formatting in DFV field renders. #6566 (@sc0ttkclark)
|
28 |
+
* Fixed: Show the Add Media button in forms that use the post_content field. #6569 (@sc0ttkclark)
|
29 |
+
* New minimum WP version required: WordPress 5.7+ (previously: WP 5.5+)
|
30 |
+
* No minimum PHP version changes (currently: PHP 5.6+) but please be aware that PHP 7.2+ will be required for the Pods 3.0+ feature release. You should take the time to update to PHP 8.0+ because there’s major speed improvements to be had 🙂
|
31 |
+
|
32 |
+
= 2.8.23 - July 4th, 2022 =
|
33 |
+
|
34 |
+
* Tweak: Added support for exporting post types and taxonomies to PHP for debugging purposes. While logged in as an admin, add `?pods_debug_register_export=1` to expose textareas on the page to get the code. (@sc0ttkclark)
|
35 |
+
* Tweak: Added support for new `{@_current_page}` calculation value. (@sc0ttkclark)
|
36 |
+
* Tweak: Added support for calculation values in conditional display tags like `[if field="_position" value="2"]`. #6513 (@sc0ttkclark)
|
37 |
+
* Fixed: Resolved revision issues when `revisions_to_keep_limit` is set to 0 in the post type. It was supposed to see 0 and use the default revision limit. Instead, it was disabling the revisions for that post type. #6499 (@sc0ttkclark)
|
38 |
+
* Fixed: Resolved potential PHP warnings on certain sites by preparing SQL queries separately from other string processing. #6556 #6555 #6554 (@JoryHogeveen, @sc0ttkclark)
|
39 |
+
* Fixed: Resolved potential PHP notices when getting table information in `PodsData::table()`. (@JoryHogeveen)
|
40 |
+
* Fixed: Resolved potential PHP type conversion warnings by passing `SORT_REGULAR` to `array_unique()`` in the File field saving process. (@JoryHogeveen)
|
41 |
+
* Fixed: Pods Auto Templates defaults for some fields were set to "true" and that is now treated as empty. The default for those fields are now empty as intended. This resolves notices on the Edit Pod screen about templates being used for Archives when Archives are disabled, but there was no template intentionally set for Archive. (@sc0ttkclark)
|
42 |
+
|
43 |
+
= 2.8.22.1 - July 3rd, 2022 =
|
44 |
+
|
45 |
+
* Fixed: Resolve potential PHP errors from Relationship/File field saves by ensuring consistent array structures.
|
46 |
+
|
47 |
+
= 2.8.22 - July 3rd, 2022 =
|
48 |
+
|
49 |
+
* Added: Support `IN` and `NOT IN` comparisons for the Pods Templating `[if]` conditional shortcode that checks if the current value is/isn't within a comma-separated list of values. (@sc0ttkclark)
|
50 |
+
* Added: Support `=` and `!=` comparisons when the current value is an array of values, it now confirms the value is/isn't within that array. (@sc0ttkclark)
|
51 |
+
* Added: When saving pod items, support field-type specific save method for non-tableless field types for future flexibility. (@sc0ttkclark)
|
52 |
+
* Added: New `pods_query_prepare()` function maps to `pods_query()` but allows for distinct prepare usage instead of confusing array syntax. (@sc0ttkclark)
|
53 |
+
* Added: Added new `Field::get_single_multi()` helper method to determine whether a field is using a single/multi format type. (@sc0ttkclark)
|
54 |
+
* Tweak: When saving pod items, pre-process tableless field type data consistently to better support table-based storage. (@sc0ttkclark)
|
55 |
+
* Tweak: When saving pod items, allow filtering the list of processed data values that will be used to do the final save with `pods_api_save_pod_item_processed_data_to_save`. (@sc0ttkclark)
|
56 |
+
* Tweak: Adjusted the prepared SQL statements to use the new `pods_query_prepare()` when doing `wp_podsrel` table relationship lookups. (@sc0ttkclark)
|
57 |
+
* Tweak: Filter `wp_podsrel` table relationship lookup related IDs the same way as meta-based related IDs get with the `pods_api_lookup_related_items_related_ids_for_id` filter. (@sc0ttkclark)
|
58 |
+
* Tweak: Support custom heading tags for the Heading field in the DFV-powered areas like the Edit Pod screen. (@sc0ttkclark)
|
59 |
+
* Tweak: Further lock down custom heading tags in PHP-powered forms so that they can only contain basic tag names. (@sc0ttkclark)
|
60 |
+
* Fixed: Avoid setting post terms that are empty when saving pod item. (@sc0ttkclark)
|
61 |
+
* Fixed: Dot-traversal in Pods Templating `[if]` conditional shortcodes references the correct pod and expected field path. (@sc0ttkclark)
|
62 |
+
|
63 |
+
= 2.8.21 - June 27th, 2022 =
|
64 |
+
|
65 |
+
* Tweak: Allow language relationships with Polylang language taxonomy. #6541 #6540 (@JoryHogeveen)
|
66 |
+
* Fixed: When determining the first version installed of Pods, use the last known version instead of the current version. (@sc0ttkclark)
|
67 |
+
* Fixed: Increase the version used when determining defaults for Meta Integration and Meta Overrides. (@sc0ttkclark)
|
68 |
+
* Fixed: Remove empty values from list of file types to prevent PHP warnings. #6544 #6543 (@JoryHogeveen)
|
69 |
+
* Fixed: Prevent errors on List Select fields if there are empty results. #6536 #6536 (@zrothauser)
|
70 |
+
|
71 |
+
= 2.8.20 - June 17th, 2022 =
|
72 |
+
|
73 |
+
* Fixed: Use the correct defaults for the new Pods Settings of Meta Integration and Meta Overrides. (@sc0ttkclark)
|
74 |
+
* Fixed: Use the correct defaults for Pods Settings when they return as a blank string. (@sc0ttkclark)
|
75 |
+
|
76 |
+
= 2.8.19 - June 13th, 2022 =
|
77 |
+
|
78 |
+
* Fixed: Theme views now load as expected, fixing an issue introduced in 2.8.18. (@sc0ttkclark)
|
79 |
+
|
80 |
+
= 2.8.18 - June 10th, 2022 =
|
81 |
+
|
82 |
+
* Added: New helper functions `pods_clean_memory()` and `pods_maybe_clean_memory()` introduced to provide WP-CLI commands in Pods core and add-ons the ability to help reduce memory usage in long running processes. (@sc0ttkclark)
|
83 |
+
* Added: New function `Pods::is_defined()` determines whether a Pod was defined or if it was generated adhoc when calling a non-defined Pod. (@sc0ttkclark, @JoryHogeveen)
|
84 |
+
* Added: New function `Pods::is_valid()` replaces the logic in `Pods::valid()` to better follow the naming pattern used elsewhere in Pods. `Pods::valid()` is not deprecated yet. (@sc0ttkclark)
|
85 |
+
* Added: New functions `pods_static_cache_get()`, `pods_static_cache_set()`, and `pods_static_cache_clear()` abstract the static cache handling that would sometimes fail if the class was not available. (@sc0ttkclark)
|
86 |
+
* Added: New filter `pods_init_register_assets_load_pods_dfv_on_front` which allows you to force loading Pods DFV scripts on the front of the site when needed. Normally they will be included but some plugins/themes may need them enqueued sooner. (@sc0ttkclark)
|
87 |
+
* Tweak: Improved performance when using TranslatePress by optimizing how settings and blocks are handled to avoid extra `__()` translation calls. (@sc0ttkclark)
|
88 |
+
* Tweak: Improved performance with Block configurations. (@sc0ttkclark)
|
89 |
+
* Tweak: Improved performance with existing content type checks. (@sc0ttkclark)
|
90 |
+
* Tweak: Improved performance by offering a new setting to enable/disable tracking changed fields. (@sc0ttkclark)
|
91 |
+
* Tweak: Improved performance by offering a new setting to enable/disable metadata integration. (@sc0ttkclark)
|
92 |
+
* Tweak: Improved performance and third party plugin compatibility by offering a new setting to enable/disable metadata display overrides for Relationship/File fields. (@sc0ttkclark)
|
93 |
+
* Tweak: Improved file types help text on the File field to describe how limiting file types works more clearly. (@sc0ttkclark)
|
94 |
+
* Tweak: Default input type for Relationships multiple-select is now List View. (@sc0ttkclark)
|
95 |
+
* Fixed: File path checks are now more strict and consistent across all Pods Views loading. (@sybrew from The SEO Framework team, @sc0ttkclark)
|
96 |
+
* Fixed: SVG and other file types would not properly match up when certain plugins add additional mime types to be supported. (@sc0ttkclark)
|
97 |
+
* Fixed: Improved fallback handling for DB table schema errors when trying to add a column that may already exist in the table. (@sc0ttkclark)
|
98 |
+
* Fixed: Support labels for HTML field types in more form areas. (@sc0ttkclark)
|
99 |
+
* Fixed: `PodsUI` now filters all field values instead of circumventing that when it's pulled from the table row already. (@sc0ttkclark)
|
100 |
+
|
101 |
+
= 2.8.17 - May 11th, 2022 =
|
102 |
+
|
103 |
+
* Fixed: Attempting to catch potential issues where an issue is detected with loading the Tribe Common library by introducing a wrapper function `pods_container()` to be used before calling `tribe()`. (@sc0ttkclark)
|
104 |
+
|
105 |
+
= 2.8.16 - May 6th, 2022 =
|
106 |
+
|
107 |
+
* Added: More compatibility with Advanced Relationship Storage Add-On from Pods Pro by SKCDEV which allows for saving table-based relationship fields during the normal save process. (@sc0ttkclark)
|
108 |
+
* Fixed: Booleans when saving to the database now prepare as `%d` instead of the generic `%s`. (@sc0ttkclark)
|
109 |
+
* Fixed: Additional SV file escaping on exports to prevent formulas from evaluating in certain spreadsheet apps unexpectedly. (@sc0ttkclark)
|
110 |
+
* Fixed: The old Pods / Pods API CLI commands were unintentionally removed in Pods 2.8 and they have now been brought back as `wp pods-legacy` and `wp pods-legacy-api`. (@sc0ttkclark)
|
111 |
+
* Fixed: Improved the text / link for registering connections on Post Types and Taxonomies so they reference the correct object type. (@sc0ttkclark)
|
112 |
+
* Fixed: Multi-select fields were not saving properly in certain forms. #6498 #6216 (@zrothauser)
|
113 |
+
* Confirmed compatibility with WordPress 6.0.
|
114 |
+
|
115 |
+
= 2.8.15 - April 16th, 2022 =
|
116 |
+
|
117 |
+
* Added: New `pods_callback` support in `Pods::find()` so that you can pass a callback function to use for `pods()` usage with relationships using the `output` as "pods". This allows for using shared instances across large data sets to reduce time. (@sc0ttkclark)
|
118 |
+
* Added: New property `$data->fetch_full` added to `PodsData` which can be used to turn off additional fetch requests when all table data was already returned by the query with `t.*`. (@sc0ttkclark)
|
119 |
+
* Fixed: When using table-based fields and a non-simple relationship has a field in the table, it will still be expanded like a normal relationship field when requesting it by name with no traversal. (@sc0ttkclark)
|
120 |
+
* Fixed: Call `PodsField_Pick::simple_objects()` using the object instead of statically to prevent PHP notices. (@sc0ttkclark)
|
121 |
+
* Fixed: Adjust the `Pods\REST\V1\Endpoints\Base::check_permission()` method so that it references the correct `\Pods` object. (@sc0ttkclark)
|
122 |
+
|
123 |
+
= 2.8.14 - April 15th, 2022 =
|
124 |
+
|
125 |
+
* Added: New `$params` support in `Pods::total_found( $params )` to support `Pods::find( $params )` shorthand lookups for getting total number of records found more easily. (@sc0ttkclark)
|
126 |
+
* Added: New `pods_api_save_field_table_definition_mode` filter allows overriding the definition mode when saving a field (bypass/add/drop/change) for schema management. (@sc0ttkclark)
|
127 |
+
* Added: New `pods_podsrel_enabled()` arguments to allow filtering based on the field and context. (@sc0ttkclark)
|
128 |
+
* Added: New `pods_data_build_pre_traverse_args` filter allows for overriding the find/replace/traverse/params arguments for a `PodsData::build()` request before relationship traversal runs. (@sc0ttkclark)
|
129 |
+
* Added: New `pods_data_traverse_recurse_handle_join` filter allows for overriding the JOIN SQL used for relationship traversal. (@sc0ttkclark)
|
130 |
+
* Fixed: Resolved potential PHP issues with path checks in `PodsView` on certain environments. (@sc0ttkclark)
|
131 |
+
* Fixed: When a slug is set on a Pods Page, if the slug value comes through as empty due to a path issue, it will now enforce a 404 as expected. (@sc0ttkclark)
|
132 |
+
* Fixed: Resolved a few issues with the old field data coming through to the `pods_api_save_field_old_definition` filter. (@sc0ttkclark)
|
133 |
+
* Fixed: No longer showing WPDB errors from WPDB when query errors are forced off. (@sc0ttkclark)
|
134 |
+
|
135 |
+
= 2.8.13 - April 10th, 2022 =
|
136 |
+
|
137 |
+
* Fixed: Resolved PHP issues with PHP 7.x with the WPML integration. (@sc0ttkclark)
|
138 |
+
|
139 |
+
= 2.8.12 - April 8th, 2022 =
|
140 |
+
|
141 |
+
* Fixed: Resolved PHP issues with PHP 7.x with the REST API endpoints. (@sc0ttkclark)
|
142 |
+
* Fixed: Fix Auto Template logic for detecting taxonomy archives to get the correct pod name from the associated term. #6368 #6490 (@JoryHogeveen)
|
143 |
+
|
144 |
+
= 2.8.11 - April 8th, 2022 =
|
145 |
+
|
146 |
+
* Added: You can now enable types-only mode for Pods under Pods Admin > Settings. This new mode will disallow adding and managing custom groups/fields. You can force it on by defining `PODS_META_TYPES_ONLY` as true in your wp-config.php too. #6437 (@sc0ttkclark)
|
147 |
+
* Added: Now you can limit relationship fields that relate to post types to only include posts that match the current post's author. #4291 (@sc0ttkclark)
|
148 |
+
* Added: JS API - Now you can hook into right after the Pods form fields have loaded by using `window.PodsDFV.hooks.addAction( 'pods_init_complete', 'pods/dfv', () => {} );` #6482 (@zrothauser, @sc0ttkclark)
|
149 |
+
* Added: JS API - New JS helper functions to interact with fields on the screen including `window.PodsDFV.getField( pod, itemId, fieldName, formCounter )`, `window.PodsDFV.getFields( pod, itemId, formCounter )`, `window.PodsDFV.getFieldValue( pod, itemId, fieldName, formCounter )`, `window.PodsDFV.setFieldValue( pod, itemId, fieldName, value, formCounter )`. #6471 #6475 (@zrothauser, @sc0ttkclark)
|
150 |
+
* Added: CLI - New CLI command `wp pods playbook run` which can run playbook .json files which allow you to perform multiple tasks with the Pods API. Useful for coordinating renames of Pods, Groups, and Fields, along with other CLI tasks between different environments. #6460 (@sc0ttkclark)
|
151 |
+
* Fixed: Limit by post status option has been resolved but you may need to re-save your post status choices again. #6470 (@sc0ttkclark)
|
152 |
+
* Fixed: Duplicated Pods now properly set the groups for the duplicated fields. If you have a Pod that is missing fields, try adding `&pods_debug_find_orphan_fields=1` to your edit pod URL and it should automatically fix them for you. #6463 (@sc0ttkclark)
|
153 |
+
* Fixed: Advanced Content Type modals now close as expected when saving them within Flexible Relationships (Add New / Edit links for a relationship). #6457 #6481 (@zrothauser)
|
154 |
+
* Fixed: Thumbnails in file lists now properly scale down as expected. #6473 #6474 (@JoryHogeveen)
|
155 |
+
* Fixed: Simple Relationships now properly save once again for Settings pods. #6476 (@sc0ttkclark)
|
156 |
+
* Fixed: The relationship field option for Autocomplete Select fields have improved drag and drop functionality to resolve issues with larger datasets. #6428 #6466 (@zrothauser)
|
157 |
+
* Fixed: Now refreshing the language cache when WPML switches languages. #6448 #6449 (@JoryHogeveen)
|
158 |
+
* Fixed: Disabled Tribe Common shortcode handling (when loading TC for Pods in independent-mode). #6438 (@sc0ttkclark)
|
159 |
+
* Fixed: Resolved issue with the editor instance appearing over the dropdown select field options. #6452 #6453 (@JoryHogeveen)
|
160 |
+
|
161 |
+
= 2.8.10 - February 1st, 2022 =
|
162 |
+
|
163 |
+
* Fixed: Meta compatibility fix for when it was not saving to meta through direct update meta calls. #6429 #6431 (@sc0ttkclark)
|
164 |
+
* Fixed: Don't render the wrapper HTML for blocks if the contents are empty. (@sc0ttkclark)
|
165 |
+
|
166 |
= 2.8.9 - January 31st, 2022 =
|
167 |
|
168 |
* Added: There's a new tool at Pods Admin > Settings > Tools that will let you "Recreate missing tables". This will run the logic used to create those tables needed by Pods. This is currently just for `wp_podsrel` but will eventually include all other table-based Pods too. #5795 (@sc0ttkclark)
|
204 |
* Fixed: Pods Pages now loads the expected value for page_template when editing a Pod Page. #6355 (@sc0ttkclark)
|
205 |
* Fixed: Pods Pages now loads the labels for Associated Pod when editing a Pod Page. #6355 (@sc0ttkclark)
|
206 |
* Fixed: Prevent potential timeouts by reducing areas of conflict in `PodsMeta`. #6349 (@sc0ttkclark)
|
207 |
+
* Fixed: Resolved potential performance issues / timeouts with large datasets and many Pods Blocks when loading Block Editor by adding the filter `pods_blocks_types_preload_block` and returning `false` to disable preloading blocks on load of the edit post screen. #6349 (@sc0ttkclark)
|
208 |
* Fixed: Enforce slug characters on registration of post type / taxonomy instead of the admin config field for Custom Rewrite Slug and Archive Page Slug Override. #6354 (@sc0ttkclark)
|
209 |
* Fixed: Resolve issues with `PodsAPI::save_field()` when trying to save a field just using the name, now you can pass the `override` parameter as true to bypass duplicate field checks to force saving as matching field. #6345 (@sc0ttkclark)
|
210 |
* Fixed: More robust checking for conflicts with extended post types and taxonomies before registering them. #6348 #6342 (@sc0ttkclark)
|
220 |
|
221 |
* Security: Escape/KSES labels and descriptions in more places. (@sc0ttkclark)
|
222 |
* Tweak: Added bbPress profile form support so that Pods fields appear like the other form fields. (@sc0ttkclark)
|
223 |
+
* Tweak: Added ability enable more consistent responses with REST API relationship depths. Filter `pods_api_export_pod_item_level_export_ids_at_final_depth` and return true to only export IDs at the final depth (note: depth set as 1 always returns IDs). #6260 (@sc0ttkclark)
|
224 |
* Tweak: Added ability to force checking if a Pod has orphan fields that aren't assigned to groups and setting them to the first group. Add `pods_debug_find_orphan_fields=1` to the URL when editing a pod. (@sc0ttkclark)
|
225 |
* Tweak: Implement Block schema for Pods blocks and set the icons to use dashicons for WordPress.org. (@sc0ttkclark)
|
226 |
* Tweak: Improve performance by only checking a Pod once for a field when filtering meta related functions. (@sc0ttkclark)
|
325 |
* Tweak: Internal API - Storage and Storage Types used in the internal Pods code has been clarified to prevent ambiguity. Storage Types have been changed to Object Storage Types in all areas regarding Whatsit Storage). (@sc0ttkclark)
|
326 |
* Tweak: Public forms now have unique IDs added to them to help in custom CSS work. (@sc0ttkclark)
|
327 |
|
328 |
+
Found a bug? Have a great feature idea? Get on GitHub and tell us about it and we'll get right on it: https://pods.io/submit/
|
329 |
+
|
330 |
= 2.8 - October 18th, 2021 =
|
331 |
|
332 |
Release post: https://pods.io/2021/10/18/pods-2-8-feature-release/
|
344 |
* Feature: Now you can add multiple groups of fields. (@sc0ttkclark, @zrothauser)
|
345 |
* Feature: Our Edit Pod screen is powered by our all new React form interfaces, tooltips, and they use our new Pods Admin REST API endpoints. (@sc0ttkclark, @zrothauser)
|
346 |
* Feature: All of our form fields are powered by React now in preparation for Pods 2.9 repeatable fields that we're working on next. (@sc0ttkclark, @zrothauser)
|
347 |
+
* Feature: New field types for Heading and HTML. (@sc0ttkclark, @zrothauser)
|
348 |
* Feature: New Pods Blocks available and the underlying Pods Block PHP API is compatible with ACF Blocks if you've ever used those before. (@sc0ttkclark, @zrothauser)
|
349 |
* Feature: REST API endpoints are now available to create/edit various objects: Pods, Pod Groups, and Pod Fields. (@sc0ttkclark)
|
350 |
* Feature: WP-CLI commands that mirror the REST API endpoints we have. (@sc0ttkclark)
|
351 |
* Feature: The new WYSIWYG editor option to use [Quill Editor](https://github.com/zenoamaro/react-quill) is now available and the CLEditor has been removed. (@sc0ttkclark, @zrothauser)
|
352 |
+
* Compatibility: Completely updated compatibility with WPML and Polylang plugins.
|
353 |
|
354 |
= 2.7.31 - September 23rd, 2021 =
|
355 |
|
369 |
* Enhancement: Optimized the PNG image assets using PNG8+Alpha with ImageAlpha and ImageOptim. #6028 (@lowwebtech)
|
370 |
* Fixed: Hidden fields now properly submit correctly. (@sc0ttkclark)
|
371 |
* Fixed: Post type `has_archive` no gets set to a false properly when disabled. #6069 (@JoryHogeveen)
|
372 |
+
* Fixed: Resolve PHP `strlen()` warnings when validating text values being saved. #6062 (@pd-cm, @sc0ttkclark, @JoryHogeveen)
|
373 |
* Fixed: Sorting URLs in `PodsUI` include `post_type` and `taxonomy` when Advanced Content Types are set to be underneath a Post Type's top level menu. #6040 (@JoryHogeveen)
|
374 |
* Fixed: Fallback to the manage fields in `PodsUI` for reordering when reorder fields are not overridden. #6058 (@JoryHogeveen)
|
375 |
* Fixed: Depend on plupload when showing custom upload directory option for file fields. (@JoryHogeveen)
|
901 |
* Relationships to Taxonomy have Flexible Relationships disabled as the input screen for Taxonomy was not able to be accessed in an iFrame. We’re working on this for a future release.
|
902 |
|
903 |
= 2.6.11.2 - August 4th, 2021 =
|
904 |
+
|
905 |
* Security: Clean up post type and taxonomy labels so they avoid potential output escaping problems in WordPress core (@sc0ttkclark, reported by Muhammad Daffa via WPScan)
|
906 |
|
907 |
= 2.6.11.1 - June 4th, 2020 =
|
908 |
+
|
909 |
* Security: Remove deprecated usage of escapeMarkup in Select2 (@sc0ttkclark, @miha.jirov)
|
910 |
|
911 |
= 2.6.11 - September 20th 2017 =
|
912 |
+
|
913 |
* Fixed: WordPress 4.8.2 introduced a breaking change that no longer correctly prepared number/currency queries. It did not introduce a vulnerability but only produced Database errors.
|
914 |
* Stay tuned for Pods 2.7 which will be out soon -- [Download Pods 2.7 RC1](https://github.com/pods-framework/pods/archive/release/2.7.zip) and join our [Pods Slack channel #pods-beta](https://pods.io/chat/) to help us finish the final testing
|
915 |
|
916 |
= 2.6.10 - July 14th 2017 =
|
917 |
+
|
918 |
* Fixed: Pods Templates were creating erroneous output with nested `[if _fieldname_][else][/if]` and `[each _fieldname_][/each]` template tags inside HTML entities after 2.6.9 upgrade. This fix bypasses `do_shortcode` and also bypasses `do_shortcodes_in_html_tags` which was the problem with this particular fix. Fixes (#4324,#4307,#4307). (#4335). [@pglewis]
|
919 |
* Fixed: Multi-file fields save was causing array to string conversion warning. New function & helper added called `array_filter_walker` for backwards compatibility. Also fixes the 'editable' titles in Multiple File Upload. Fixes (#4112,#4313). (#4314). [@mgratch,@JoryHogeveen,@sc0ttkclark]
|
920 |
* Added: Pods Templates & Page Capabilities have been added to the Members Cap Filter and Pods Role Manager from Components, Roles & Capabilities. This corrects an issue where Pods Templates and Pods Pages were not available to Admins, only Network Admins. Admins will still need to have the pods_templates_ and pods_pages_ capabilities added to their role, but now they'll be able to do this without additional code. Fixes (#4311). (#4342). [@JoryHogeveen]
|
923 |
* Updated: Removed CodeClimate Integration (#4275) and updated glob 7.1 (#4242). [@Ramoonus]
|
924 |
|
925 |
= 2.6.9 - May 30th 2017 =
|
926 |
+
|
927 |
* Added: Pods Template Component is now automatically active on initial installation or reinstallation of Pods. Fixes (#3446). (#4060,#4180). [@pglewis,@sc0ttkclark]
|
928 |
* Added: Auto Template Fix: Add configurations setting to override and allow Auto Templates to run against the_content outside of the WordPress_Loop. By default now, it will only run inside the WP Loop. (#4088). [@jamesgol]
|
929 |
* Added: Allow raw value in PodsUI rows. New type "raw" that can output HTML form elements; used in i18n component. Fixes (#3959). (#3960). [@JoryHogeveen]
|
951 |
* Updated: Brand assets for Pods (icons and banners) for WordPress Plugin Directory. Fixes (#3948). (#4268) [@jimtrue]
|
952 |
|
953 |
= 2.6.8 - January 17th 2017 =
|
954 |
+
|
955 |
* Added: WP Gallery display options for image fields. Fixes (#3905). (#3910). [@JoryHogeveen]
|
956 |
* Added: Add action after successful AJAX in admin_ajax. This allows other scripts to hook in the ajax handlers from Pods. Fixes (#3839). (#3840). [@JoryHogeveen]
|
957 |
* Added: Keep Plupload instances in `windows.pods_uploader[id]`. This makes it possible to bind event listeners to the file uploader. Fixes (#3763). (#3768). [@thirdender]
|
1000 |
* Fixed: Allow the entry of negative numbers in Currency fields. Fixes (#3708). (#3709). [@pcfreak30]
|
1001 |
|
1002 |
= 2.6.7 - August 15th 2016 =
|
1003 |
+
|
1004 |
* Fixed: Magic Tag {@permalink} fixes for taxonomy / user / comment detail URL Mapping. Fixes (#3339). [@sc0ttkclark]
|
1005 |
* Fixed: Pods Wizard for Forms now properly uses the `[podsform]` shortcode. Fixes (#3251). [@sc0ttkclark]
|
1006 |
* Fixed: Issue with pll_get_post returning false instead of null. Fixes (#3596). (#3599) [@JoryHogeveen]
|
1018 |
* Fixed: travis-ci: test with PHP 7.1 (#3702). [@Ramoonus]
|
1019 |
|
1020 |
= 2.6.6 - June 23rd 2016 =
|
1021 |
+
|
1022 |
* Added: Polylang compatibility with latest versions along with fixes to longstanding issues with editing and displaying content, relationships, and taxonomy (#3574). Fixes (#3572, #3506) [@JoryHogeveen]
|
1023 |
* Added: REST API v2 Compatibility (#3584). Switches `register_api_field` to `register_rest_field`. Fixes (#3581) [@sc0ttkclark]
|
1024 |
* Added: Allow changing the Auto Templates Filter. This adds a new section in the Auto Templates tab that allows overriding the default `the_content` filter (#3542). Fixes (#3540) [@Shelob9]
|
1038 |
* Fixed: PodsRESTHandlers::write_handler needs to be static (#3511). Fixes (#3510) [@pcfreak30]
|
1039 |
|
1040 |
= 2.6.5.2 - May 4th 2016 =
|
1041 |
+
|
1042 |
* Fixed: Typo in PLL Compatibility check corrected. (#3504) Fixes (#3503). Thank you @JoryHogeveen and @fmommeja for tracking down, fixing and validating this fix. [@JoryHogeveen]
|
1043 |
|
1044 |
= 2.6.5.1 - May 4th, 2016 =
|
1045 |
+
|
1046 |
* Fixed: Additional Field Options tab disappears from field admin view. Fixes (#3501). [@sc0ttkclark]
|
1047 |
|
1048 |
= 2.6.5 - May 3rd, 2016 =
|
1049 |
+
|
1050 |
* Fixed: Renaming of Pods with underscores to hyphenated names that was introduced in 2.6.3. Hyphenated Pods names will remain hyphenated and Underscored Pods names will remain underscored. Fixes (#3499). [@sc0ttkclark]
|
1051 |
* Fixed: Support for new Polylang Versions with much kudos to @JoryHogeveen for tackling this (#3491). Fixes (#3490,#3223) [@JoryHogeveen]
|
1052 |
|
1053 |
= 2.6.4 - April 25th, 2016 =
|
1054 |
+
|
1055 |
* Fixed: Modified Run activation/install priority to fire before plugins loaded. Fix for the Clearing Pods Cache automatically after Pods Upgrade (#3487). Fixes (#2558,#3348) [@sc0ttkclark]
|
1056 |
|
1057 |
= 2.6.3.1 - April 21st, 2016 =
|
1058 |
+
|
1059 |
* Fixed: An Git / SVN deploy bug caused some files to not be properly pushed to WordPress.org SVN, this release is just to ensure everyone who may have updated to 2.6.3 during the period which we were fixing it will be able to still get the proper file updates
|
1060 |
|
1061 |
= 2.6.3 - April 21st, 2016 =
|
1062 |
+
|
1063 |
* Fixed: Fix forcing underscores when loading Edit Pod Form (#3483). Fixes (#3095) [@sc0ttkclark] Kudos to @lkraav for helping us pin this particular issue down and bring it to resolution.
|
1064 |
* Fixed: Clearing Pods Cache automatically after Pods Upgrade "Salt n'Pepa"'ing the cache keys (#3401). Fixes (#2558,#3348) [@sc0ttkclark]
|
1065 |
|
1066 |
= 2.6.2 - March 24th, 2016 =
|
1067 |
+
|
1068 |
* Added: Support for object fields when using Pods::field() with a specific $field and $option. This was also used to correct a problem with "fetching" Custom Taxonomy's Term List when using Pods Feeds in Pods Gravity Forms Plugin. (#3437) [@sc0ttkclark]
|
1069 |
* Fixed: Correcting CSS used for Dashicon to remove conflict with icon usage in Divi. (#3404,#3406) [@jimtrue]
|
1070 |
* Fixed: Currency/Number Validation used to correct issue with Currency Usage in the Pods Gravity Forms plugin (#3436) [@sc0ttkclark]
|
1071 |
|
1072 |
= 2.6.1 - February 15th, 2016 =
|
1073 |
+
|
1074 |
* Added: Additional Label support for Post Type / Taxonomy register functions (#3275) [@pcfreak30]
|
1075 |
* Added: Add use_current option for Widget Single (#3393,#3394) [@sc0ttkclark]
|
1076 |
* Added: Add option to website fields to open links in new window (#3388,#3387) [@sc0ttkclark]
|
1090 |
* Fixed: Taxonomy custom meta fields returning false from REST API (#3365,#3369) [@anandamd]
|
1091 |
|
1092 |
= 2.6 - December 9th, 2015 =
|
1093 |
+
|
1094 |
* Added: Support for Term Meta in WP 4.4 - Now create meta-based taxonomies and Pods just magically works! (#3169,#3163) [@sc0ttkclark]
|
1095 |
* Added: Add REST API Support to Post Types, Taxonomies, Users. Read the update in https://github.com/pods-framework/pods/pull/3184 for step by step details. (#3184,#3182) [@Shelob9]
|
1096 |
* Added: Added compatibility with the latest Polylang version, using $polylang-model to get the current language and version. (#3223) [@JoryHogeveen]
|
1122 |
* Removed: Composer remove coveralls. Was not being used and needs phpunit support. Could also be replaced by php codesniffer or scrutinizer. (#3174) [@Ramoonus]
|
1123 |
|
1124 |
= 2.5.5 - September 16th, 2015 =
|
1125 |
+
|
1126 |
* Added: Unit testing for PHPUnit 4.8 support. (#3090, #3069) Kudos to @Ramoonus
|
1127 |
* Fixed: Drop External code coverage - timeout in Scrutinizer. (#3091) Kudos to @Ramoonus
|
1128 |
* Fixed: Changed Content property to fix spacing issues with AutoComplete Field where the formatted selection fields have awkward spacing between the selection box and the selection list. (#3098, #3097, #3099) Kudos to @nicdford
|
1133 |
* Added: License.txt changes to sync with GPL v2 (#3130, #3133) Kudos to @Ramoonus
|
1134 |
|
1135 |
= 2.5.4 - August 10th, 2015 =
|
1136 |
+
|
1137 |
* Added: Support for Compare ALL with meta_query syntax. Kudos to @pcfreak30. (#3037, #3038)
|
1138 |
* Added: Query_field tests (meta_query syntax for where) (#3033, #3032, #1662, #2689)
|
1139 |
* Added: Support for autoCAST()ing meta_value orderby for dates and numbers (#3043, #3041, #3058)
|
1144 |
* Fixed: Style escaping which created a quote encoding bug in PodsMeta.php. (#3053, #3032)
|
1145 |
|
1146 |
= 2.5.3 - June 11th, 2015 =
|
1147 |
+
|
1148 |
* Added: Support for Term Splitting in WP 4.2 (#2856, #2660)
|
1149 |
* Added: Support for Pod and Field names with dashes and prefixes with underscores (#3012, #3021, #3022)
|
1150 |
* Added: Add git workflow and a link to it from contributing.md (#2490, #2496)
|
1171 |
* Fixed: Allow fields to be sorted by orderby; Two separate but connected issues. First if orderby is passed then the $data array is never populated. Then looping through $ids will always give it results sorted by priority in the relationships field (data returned by lookup_related_items) (#2350, #2277)
|
1172 |
|
1173 |
= 2.5.2 - May 14th, 2015 =
|
1174 |
+
|
1175 |
* Fixed: Issues with default values for number and other types of fields.
|
1176 |
* Fixed: Issue where Pods update was causing WP-API endpoints to 404. Rewirte rules now flush on wp_loaded.
|
1177 |
* Fixed: Issue preventing proper display of fields in a related CPT via Pods::field()
|
1196 |
* Improved: URL escaping in PodsUI
|
1197 |
|
1198 |
= 2.5.1.2 - March 16th, 2015 =
|
1199 |
+
|
1200 |
* Security Update: We recommend all Pods 2.x installations be updated to the latest version of Pods
|
1201 |
* or replace your plugin files with the download of your version from http://wordpress.org/plugins/pods/developers/
|
1202 |
* Fixed: Pods UI orderby now strictly enforces Database column format
|
1203 |
|
1204 |
= 2.5.1.1 - January 22nd, 2015 =
|
1205 |
+
|
1206 |
* Fixed missing files for font icon.
|
1207 |
|
1208 |
= 2.5.1 - January 22nd, 2015 =
|
1209 |
+
|
1210 |
* Fixed: Issue preventing fields from being sorted by weight or by orderby, that was affecting image multi-select image field ordering.
|
1211 |
* Fixed: Missing gradients in UI.
|
1212 |
* Fixed: Use of anonymous function in PodsMeta.php causing issues with old versions of PHP.
|
1220 |
* Fixed: Issue with custom taxonomy joins preventing "custom_tax.d.custom_field" type where clauses from working.
|
1221 |
|
1222 |
= 2.5 - December 30th, 2014 =
|
1223 |
+
|
1224 |
* Major performance enhancements can now make things run up to 400% faster (props to @jamesgol!)
|
1225 |
* More unit tests -- now 1,858 tests with a total of 13,420 assertions covering all content type, storage type, and field variations (props to @sc0ttkclark, @clubduece, and @mordauk! it was a group effort)
|
1226 |
* Added Travis-CI / Scrutinizer-CI for all pushes and pull requests to unit test and check for other issues
|
1275 |
* If you need assistance in upgrading your Pods 2.x site to the latest version of Pods, please don't hesitate to contact us at https://pods.io/help/
|
1276 |
|
1277 |
= 2.4.3 - June 23rd, 2014 =
|
1278 |
+
|
1279 |
* Fixed: Pods Templates component now has better handling of the new shortcodes
|
1280 |
* Fixed: PodsUI data issue with Custom DB Table support
|
1281 |
* Fixed: Readonly fields and noncing now works properly, Pods 2.4.2 caused all forms with readonly fields to fail submission
|
1282 |
* Hardened: Further security hardening of the `[pods]` shortcode, added PODS_DISABLE_SHORTCODE constant to allow sites to disable the Pods shortcode altogether
|
1283 |
|
1284 |
= 2.4.2 - June 22nd, 2014 =
|
1285 |
+
|
1286 |
* Security Update: We recommend all Pods 2.x installations be updated to the latest version of Pods to fix a noncing issue with form saving, or replace your plugin files with the download of your version from http://wordpress.org/plugins/pods/developers/
|
1287 |
|
1288 |
= 2.4.1 - June 19th, 2014 =
|
1289 |
+
|
1290 |
* Fixed: Display of of hidden fields in Pods Forms
|
1291 |
* Fixed: Reordering fields in PodsUI
|
1292 |
* Fixed: PodsUI Admin Icon Display
|
1312 |
* Added: Ability to use pods() without any parameters. Will pull the pod object based off of the current WP_Query queried object / object id
|
1313 |
|
1314 |
= 2.4 - April 16th, 2014 =
|
1315 |
+
|
1316 |
* After a long road, we've got a new minor release out that fixes a large number of outstanding bugs and adds a few improvements that were within reach right away.
|
1317 |
* In Pods 3.0 we're focusing on finishing some overarching performance improvements that are necessary to support large installs with the new Loop and Repeatable fields features.
|
1318 |
* Added: Tagging feature for Relationship fields with Autocomplete (Select2) which lets you add new items on-demand when saving
|
1361 |
* Fixed: Usage of pods_v in currency.php for optimzation purposes
|
1362 |
* Fixed: Correct parent_file to highlight the correct top level menu
|
1363 |
* Fixed: Improper wording for text at top of settings page field
|
1364 |
+
|
1365 |
+
= 2.3.18 - November 4th, 2013 =
|
1366 |
+
|
1367 |
+
* Be on the look out for Pods 2.4, officially in development and in Beta soon! It will include our new Loop and Repeatable fields
|
1368 |
+
* Fixed: PodsData row handling during fetch loop, thanks to a number of users who helped find this one
|
1369 |
+
|
1370 |
+
= 2.3.17 - November 4th, 2013 =
|
1371 |
+
|
1372 |
+
* Fixed: PodsData item caching now disabled for WP objects, relying on core WP caching entirely
|
1373 |
+
* Fixed: PodsAPI::save_pod_item default value handling for new items no goes through all fields, even if not included in form
|
1374 |
+
|
1375 |
+
= 2.3.16 - November 4th, 2013 =
|
1376 |
+
|
1377 |
+
* Fixed: PodsMeta pod caching is now different between meta calls and the form methods, avoiding potential issues with functions used that call their own meta (TinyMCE)
|
1378 |
+
* Fixed: Properly add/drop column for table-based Pods when switching between a custom simple relationship and a normal relationship
|
1379 |
+
* Fixed: Session starting for memcache-based sessions and other tcp:// configs improved
|
1380 |
+
* Fixed: Media saving bug, where the custom fields were not saving when going to Media Library > Edit
|
1381 |
+
|
1382 |
+
= 2.3.15 - October 31st, 2013 =
|
1383 |
+
|
1384 |
+
* Added: New 'calc_rows' option in Pods::find, this allows for SQL_CALC_FOUND_ROWS to be run selectively (default is off, since we run a separate count query on demand by default)
|
1385 |
+
* Added: You can now override the 'manage' action link in PodsUI 'action_links'
|
1386 |
+
* Added: `shortcodes="1"` attribute for the Pods shortcode will allow for running of shortcodes output through templates or fields included
|
1387 |
+
* Fixed: PHP warnings with role restriction when limited to one role
|
1388 |
+
* Fixed: 2.3.14 introduced a regression bug that would not save fields in the user profile, so values never changed
|
1389 |
+
* Fixed: Quick Edit on terms could potentially save empty values for the custom fields
|
1390 |
+
* Fixed: Traversal handling of Pods::field for related_item.ID would cache into object as related_item, so a subsequent lookup of related_item would come back as the ID and return the wrong value
|
1391 |
+
|
1392 |
+
= 2.3.14 - October 29th, 2013 =
|
1393 |
+
|
1394 |
+
* Fixed: Some users experienced and issue with user registration when there were required fields
|
1395 |
+
|
1396 |
+
= 2.3.13 - N/A =
|
1397 |
+
|
1398 |
+
= 2.3.12 - October 15th, 2013 =
|
1399 |
+
|
1400 |
+
* Improved: Meta object caching improved
|
1401 |
+
* Fixed: Some users experienced an issue with a reference error
|
1402 |
+
|
1403 |
+
= 2.3.11 - October 12th, 2013 =
|
1404 |
+
|
1405 |
+
* Fixed: User / Post field value saving with better nonce handling
|
1406 |
+
* Fixed: pods_v_set saving for user meta
|
1407 |
+
|
1408 |
+
= 2.3.10 - October 11th, 2013 =
|
1409 |
+
|
1410 |
+
* Added: Ability to set 'output' type in Pods::field() to 'pods' for Relationship fields related to a Pod, which will return an array of fully functional 'pods' objects for further advanced code
|
1411 |
+
* Added: Pod Pages now have an option to redirect to the login page or a custom URL if the user does not have permission to view it (based on restrict settings on the Pod Page itself)
|
1412 |
+
* Added: Ability to set Taxonomy terms for a Post Type item through the normal Pods 'add' / 'save' / etc methods
|
1413 |
+
* Added: Ability to set User 'role' for a User through the normal Pods 'add' / 'save' methods
|
1414 |
+
* Added: Taxonomy-specific capabilities added to the Pods Roles component
|
1415 |
+
* Added: New Days of Week and Months in Year pre-defined relationships added for simplistic date-oriented fields
|
1416 |
+
* Added: Support for $offset handling in Pods::pagination()
|
1417 |
+
* Added: YARPP integration for Post Types
|
1418 |
+
* Added: Default Select Text customization for Relationship fields that are set to a Dropdown input
|
1419 |
+
* Added: Default Post Status to use for Custom Post Types created by Pods, when utilizing the Pods 'add' method
|
1420 |
+
* Added: mu-plugins support for Pods as a Must-Use plugin on WordPress Multisite installations (props @studioanino)
|
1421 |
+
* Improved: Smarter handling of post_status for Post Types, easier to override to show other post statuses, and if you don't provide it in the 'where', it will fall back to the default(s)
|
1422 |
+
* Improved: Pods::remove_from() now removes all values if you provide no 'value' for a specific field
|
1423 |
+
* Fixed: Comment queries using comment_type should allow for a blank string (props @sirbeagle)
|
1424 |
+
* Fixed: Date / Time saving for 24 hour formats
|
1425 |
+
* Fixed: Timezone notices on certain configurations
|
1426 |
+
|
1427 |
+
= 2.3.9 - August 5th, 2013 =
|
1428 |
+
|
1429 |
+
* A big welcome to the newest contributor to our team, David Cramer (@desertsnowman)!
|
1430 |
+
* Added: Theme-based Pod Templates now available, when using $pod->template( 'your-template' ) or other places a template can be used (shortcode, widget, etc), with $obj variable available for use like in a normal template -- this will automatically include your template file from the following locations, child-theme aware: pods/your-template.php, pods-your-template.php, or your-template.php -- Get the code out of the database and get rid of the need for the Templates component!
|
1431 |
+
* Added: When saving items via the API, relationship fields now accept slugs (previously only IDs)
|
1432 |
+
* Added: When saving items via the API, file fields now accept URLs or GUIDs (previously only IDs), if you provide a URL and it isn't already in WordPress, it will automatically import as a new WP attachment
|
1433 |
+
* Added: Read Only option for fields, works like Hidden option, under Advanced tab of field editor
|
1434 |
+
* Added: New '_src_relative' and '_src_schemeless' field options for returning an attachment field's URL that's schemeless (// instead of http://)
|
1435 |
+
* Added: New 'list' option for pagination, a clone of the 'paginate' option that's Bootstrap compatible
|
1436 |
+
* Added: Added Chinese translations
|
1437 |
+
* Fixed: Updated compatibility for WordPress 3.6 slashing changes while maintaining compatibility for WP 3.4+
|
1438 |
+
* Fixed: Custom Taxonomies now have their menu icon option available, previously hidden due to a bug
|
1439 |
+
* Fixed: Various PHP notices/warnings
|
1440 |
+
* Fixed: Translation tweaks and fixes
|
1441 |
+
|
1442 |
+
= 2.3.8 - June 8th, 2013 =
|
1443 |
+
|
1444 |
+
* Fixed: Hide field from UI option now works properly for admins
|
1445 |
+
* Fixed: User data handling for `pods( 'user' )`
|
1446 |
+
* Fixed: jpeg extension now included in built-in 'images' option for File field type
|
1447 |
+
* Fixed: iThemes Builder / Markdown components weren't loading properly (no errors, just didn't load)
|
1448 |
+
|
1449 |
+
= 2.3.7 - June 7th, 2013 =
|
1450 |
+
|
1451 |
+
* Added: New filter to allow searching across different fields in autocomplete relationship fields: https://github.com/pods-framework/pods/issues/1464
|
1452 |
+
* Improved: JS performance used for the field manager drastically improved (props @pglewis)
|
1453 |
+
* Improved: PHP optimization tweaks for how we handle $_POST sanitization
|
1454 |
+
* Fixed: Parent Menu ID handling for the Pods that support it
|
1455 |
+
* Fixed: E_STRICT PHP notices
|
1456 |
+
* Fixed: Shortcode popup JS building logic
|
1457 |
+
* Fixed: Issue with find() queries using number decimals matching the relationship traversal regex rules
|
1458 |
+
|
1459 |
+
= 2.3.6 - May 24th, 2013 =
|
1460 |
+
|
1461 |
+
* Fixed: Issue with the Pod list when you delete or empty a Pod, it would repeat the same row in the list until you went back to the Edit Pods screen without the id=X in the URL
|
1462 |
+
* Fixed: Issue with renaming a field to another name would rename the field name and then delete it due to a missing ID validation check
|
1463 |
+
|
1464 |
+
= 2.3.5.1 - May 20th, 2013 =
|
1465 |
+
|
1466 |
+
* Fixed: Issue with the Upgrade wizard from 1.x to 2.x showing up properly
|
1467 |
+
|
1468 |
+
= 2.3.5 - May 19th, 2013 =
|
1469 |
+
|
1470 |
+
* Added: Ability to add new global field options (separate from field types) and new field editor tabs
|
1471 |
+
* Various fixes that can be found on GitHub
|
1472 |
+
|
1473 |
+
= 2.3.4 - April 29th, 2013 =
|
1474 |
+
|
1475 |
+
* Added: Ability to iterate through the Pods object with `foreach ( $pod as $item ) { echo $item->display( 'name' ); }`
|
1476 |
+
* Added: Ability to override serial array parameters in Pods::display() `$pod->display( array( 'name' => 'field_name', 'serial_params' => array( 'and' => '' ) ) )`
|
1477 |
+
* Added: Ability to override related field parameters in Pods::field() to further filter related field arrays beyond the defaults `$pod->field( array( 'name' => 'related_field', 'params' => array( 'where' => 't.active = 1' ) ) )`
|
1478 |
+
* Added: Ability to use RegEx in Pod Page URI's, just filter 'pods_page_regex_matching' and return true (default is false, normal wildcard * handling)
|
1479 |
+
* Improved: Pod Page detection on URLs is cleaner and more performant, the tricky MySQL query from the days of Pods 1.x has been completely replaced with a process similar to WP Rewrites
|
1480 |
+
* And 15 other bug fixes that can be found on GitHub
|
1481 |
+
|
1482 |
+
= 2.3.3.1 - April 21st, 2013 =
|
1483 |
+
|
1484 |
+
* Fixed: Advanced Content Types were missing their 'Advanced' tab
|
1485 |
+
* Fixed: IE 8-10 issue with plupload implementation for the 'Add File' button
|
1486 |
+
|
1487 |
+
= 2.3.3 - April 21st, 2013 =
|
1488 |
+
|
1489 |
+
* Added: Ability to change the output type of relationship fields with pods_field_related_output_type filter - Options are arrays (default), objects, ids, or names
|
1490 |
+
* Added: Traversal for detail_url (related_post.detail_url maps to get_permalink, same for Taxonomies, Users, or Comments)
|
1491 |
+
* Added: Pods::is( $field, $value ) to check if a field is a specific value
|
1492 |
+
* Added: Pods::has( $field, $value ) to check if a field has a specific value in it - Check for value(s) in related/file fields, get stripos for text-based fields, uses Pods::is for all other fields
|
1493 |
+
* Added: Pods::remove_from( $field, $value ) to remove a value for relationship (remove ID), file (remove ID), and number (subtract) and saves (see Pods::add_to for the reverse of this)
|
1494 |
+
* Added: Ability to change the default file upload type (default images) with the pods_form_ui_field_file_type_default filter
|
1495 |
+
* Improved: Pods class caching now better and utilized object caching for primary object init
|
1496 |
+
* Translated: Full pt_BR translation provided by [Luciana](https://github.com/yammye)
|
1497 |
+
* And 40+ other enhancements and bug fixes that can be found on GitHub
|
1498 |
+
|
1499 |
+
= 2.3.2 - April 11th, 2013 =
|
1500 |
+
|
1501 |
+
* Added: You can now select 'ID' from the list of available columns to show in Admin UI for Advanced Content Types
|
1502 |
+
* Various fixes that can be found on GitHub
|
1503 |
+
|
1504 |
+
= 2.3.1 - April 9th, 2013 =
|
1505 |
+
|
1506 |
+
* Added: New ability to set the menu location of Custom Taxonomies (expose a Custom Taxonomy that isn't associated to a Post Type)
|
1507 |
+
* Various fixes that can be found on GitHub
|
1508 |
+
|
1509 |
+
= 2.3 - April 7th, 2013 =
|
1510 |
+
|
1511 |
+
* Added: Custom Settings Pages - now you can add new settings pages with their own custom fields!
|
1512 |
+
* Added: Pods find() 'where' / 'having' parameters now accepts the standard WP_Query meta_query format! With the added ability to nest AND/OR 'relation' too!
|
1513 |
+
* Added: When using pods() function and `[pods]` shortcode, Pod and ID will be auto-detected from current post type and ID if on singular post page or in the loop
|
1514 |
+
* Added: Pods fields() method now takes two new arguments, $field and $option to get an option from a specific field
|
1515 |
+
* Added: `{@detail_url}` handling for taxonomies, users, and comments
|
1516 |
+
* Added: New find() traversal capabilities https://github.com/pods-framework/pods/issues/972
|
1517 |
+
* Added: New field() value and traversal capabilities https://github.com/pods-framework/pods/issues/971
|
1518 |
+
* Added: When saving a relationship field that's bidirectional, and the related field is required - if the save would cause that field to be empty a warning will now be shown on save
|
1519 |
+
* Added: New Pods first_id/last_id methods for getting the first/last ID of find()
|
1520 |
+
* Added: New Pods nth( $pos ) method for when in a fetch() loop, works like CSS nth-child and accepts the same format `5`, `3n+3`, etc: http://css-tricks.com/how-nth-child-works/
|
1521 |
+
* Added: New Pods position() method for when in a fetch() loop, returns current row number (1+)
|
1522 |
+
* Added: New Pods add_to() method to add a value to relationship (add ID), file (add ID), number (add/subtract), and text (append) fields to their existing values and saves
|
1523 |
+
* Added: New Pods import() method maps to PodsAPI import() method
|
1524 |
+
* Added: New Pods export() method maps to PodsAPI export() and accepts find $params and the ability to choose depth level
|
1525 |
+
* Added: Advanced Content Types now have Admin UI settings available which expose the most popular PodsUI options
|
1526 |
+
* Added: Advanced Content Types now have the ability to be Hierarchical, by selecting a relationship field to itself
|
1527 |
+
* Added: Now you can Duplicate Pods themselves!
|
1528 |
+
* Added: Pods now automatically adds Post Type capabilities (based on the Post Type options) for each Custom Post Type you create in Pods, works with Members capabilities filter
|
1529 |
+
* Added: Additional support in the Pods API for (eventually) extending WP Multisite Sites / Networks, and Custom Tables
|
1530 |
+
* Added: New shortcode / widget / Builder module for including a file from the theme (using PodsView)
|
1531 |
+
* Added: New shortcode option for including a field value from the current post/page
|
1532 |
+
* Added: New WordPress 3.5 Media Library integration, more on the way soon!
|
1533 |
+
* Added: New shortcode option for including Pod Page content
|
1534 |
+
* Added: New Pod Page option to associate a Pod and choose the slug {@url.2} to use for populating the pod
|
1535 |
+
* Added: New translations! Join us in further translating the Pods interface at: http://translate.rocksta.rs/projects/pods-framework
|
1536 |
+
* Revamped: Admin interface for editing Pods has been updated with tabs and better organization, includes the new ability to add your own tabs and options using the pods_admin_setup_edit_tabs and pods_admin_setup_edit_options filters
|
1537 |
+
* Revamped: Relationships saving has been revamped to provide better abstraction (less code, more reusable)
|
1538 |
+
* Updated: Additional Polylang and WPML support throughout the Pods API
|
1539 |
+
* Updated: Pods Edit list now separated by Pod Type for easier management on large sites
|
1540 |
+
* Updated: Pods Components list now separated by Category, getting us ready for many new components that will be separately available soon
|
1541 |
+
* Updated: Pods export() method now exports to JSON and you can choose the depth of the export (whether to include relationships and their related items, etc)
|
1542 |
+
* Updated: Better handling for Pods prev/next methods, detecting if there's a find() already on that page
|
1543 |
+
* Updated: More phpDoc updates
|
1544 |
+
* Updated: More refined caching and optimization of specific calls to get only what they need
|
1545 |
+
* Updated: Now enforcing maximum post type (20 chars) / taxonomy (32 chars) naming
|
1546 |
+
* Changed: Advanced Content Types have been split off into their own component which you can enable to be able to add new Advanced Content Types
|
1547 |
+
* Changed: Table-based storage for WordPress objects (Post Types, Taxonomies, Media, Users, and Comments) has been split off into it's own component which you can enable to add the table-based storage option to the Pods Add New interface
|
1548 |
+
* Various fixes that can be found on GitHub
|
1549 |
+
|
1550 |
+
= 2.2 - January 5th, 2013 =
|
1551 |
+
|
1552 |
+
* Added: New 'Duplicate Field' option, that lets you copy a field's settings into a new field in the Pod editor
|
1553 |
+
* Added: New iThemes Builder component - Adds four new modules available for use in Builder Layouts -- Field Value, Form, List Items, and Single Item
|
1554 |
+
* Updated: Split up the old Pods Admin > Setup menu into two separate items -- Edit Pods and Add New
|
1555 |
+
* Fixed: Upgrade from Pods 1.x to Pods 2.x now fixed, in Pods 2.1 the upgrade wizard was not shown
|
1556 |
+
* Various fixes that can be found on GitHub
|
1557 |
+
|
1558 |
+
= 2.1 - December 7th, 2012 =
|
1559 |
+
|
1560 |
+
* Pods is now WordPress 3.5 compatible as we've added a number of fixes for all the 3.5 media goodness! We're also working on some tighter integration with the new 3.5 media popups (thanks to the awesome work of @jchristopher) - watch for that in Pods 2.2 soon
|
1561 |
+
* Added: New Tableless mode (for WordPress VIP compatibility!) lets Pods run on any site w/ table-based storage turned off and wp_podsrel won't be utilized (or even created if tableless mode is on during activation) - define( 'PODS_TABLELESS', true )
|
1562 |
+
* Added: New Light mode disables all Components - define( 'PODS_LIGHT', true )
|
1563 |
+
* Added: New Avatar field type available for when you extend the Users object with Pods - Automatically takes over get_avatar calls!
|
1564 |
+
* Added: New Relate to options available for relationships fields for Post Formats and WP Nav Menus
|
1565 |
+
* Added: API to register pods and fields from a theme or another plugin (doesn't save into the DB): pods_register_type and pods_register_field - See https://github.com/pods-framework/pods/issues/700
|
1566 |
+
* Added: Now you can look up meta field values within find() calls, just use the field_name.meta_value syntax (instead of t.field_name) and Pods will auto-join the table needed
|
1567 |
+
* Updated: Relationship 'where' option in Field editor now more robust and has all fields (including relationships, or meta like above) can be referenced
|
1568 |
+
* Updated: Relationship 'where' option in Field editor now supports {@user.ID} lookups which maps to pods_var( 'ID', 'user' ) to sanitize (ex. user.ID != '{@user.ID}' in the Pick WHERE will return all users not the current user); You can use any pods_var enabled option, documentation coming this month
|
1569 |
+
* Updated: Relationship saving has been optimized for both bi-directional relationships and regular relationships
|
1570 |
+
* Various fixes that can be found on GitHub
|
1571 |
+
|
1572 |
+
= 2.0.5.1 - November 25th, 2012 =
|
1573 |
+
|
1574 |
+
* Fixed: 'Edit' link wasn't appearing for Pod Pages / Templates / Helpers (you could click the title though)
|
1575 |
+
|
1576 |
+
= 2.0.5 - November 24th, 2012 =
|
1577 |
+
|
1578 |
+
* Another big set of stability fixes to improve performance and functionality
|
1579 |
+
* Added: Migrate Packages component - Our Package manager makes a return! You may remember it from Pods 1.x, but we've cleaned it up and improved the interface to make it easier to migrate your settings between sites or share them with others
|
1580 |
+
|
1581 |
+
= 2.0.4.1 - October 17th, 2012 =
|
1582 |
+
|
1583 |
+
* Updated: Pods UI duplicate method labels were confusing
|
1584 |
+
* Fixed: Simple Relationships were returning raw data for table-based Pods
|
1585 |
+
* Fixed: Specify specific content types to import in Migrate Custom Post Types UI component
|
1586 |
+
* Fixed: Add Custom Capabilities bug with first text box wouldn't save in Roles component
|
1587 |
+
* Fixed: Various Widget fixes to Widget UI
|
1588 |
+
* Fixed: XHTML balance tags option in Writing settings was adding a space in <?php tags for Pod Pages / Helpers / Templates
|
1589 |
+
* Fixed: Date / Time field now allows an empty value to be saved rather than setting the current date / time, this is an option that can be turned off
|
1590 |
+
* Fixed: WP Rewrites are properly flushed upon adding / editing / deleting Pods
|
1591 |
+
|
1592 |
+
= 2.0.4 - October 15th, 2012 =
|
1593 |
+
|
1594 |
+
* Big bug fix release, we've fixed tons of bugs and improved backwards compatibility even further - stability, stability, stability!
|
1595 |
+
|
1596 |
+
= 2.0.3.1 - October 5th, 2012 =
|
1597 |
+
|
1598 |
+
* Fixed an upgrade issue a few users were reporting where the upgrade wouldn't start
|
1599 |
+
* Fixed reserved post_name issues with our internal post types for Pods and Fields (rss, date, and any other feeds)
|
1600 |
+
|
1601 |
+
= 2.0.3 - October 4th, 2012 =
|
1602 |
+
|
1603 |
+
* We've fixed many more bugs, that means even more stability and backwards compatibility for those who have been holding off on upgrading
|
1604 |
+
* Added: 'expires' parameter to find() / findRecords() calls, defaults to null, but set it to 0 or above (in seconds) and it will cache the results for as long as you'd like.
|
1605 |
+
* Added: 'cache_mode' parameter to find() / findRecords() calls, defaults to 'cache', additional options are 'transient' and 'site-transient' and it kicks in when 'expires' is 0 or above
|
1606 |
+
* Added: 'search_across' parameter to find() / findRecords() calls, defaults to false, set it to true to have your searches search across all of the fields on your pod (excluding relationship / files)
|
1607 |
+
* Added: 'search_across_pick' parameter to find() / findRecords() calls, defaults to false, set it to true to have your searches search across all of the relationship fields on your pod
|
1608 |
+
* Added: 'search_across_file' parameter to find() / findRecords() calls, defaults to false, set it to true to have your searches search across all of the file fields on your pod
|
1609 |
+
* Added: Bidirectional fields are now available again in Pods 2.0, our new fully revamped functionality takes care of the headaches and will keep your relationships in sync with each other. As a result of the revamp, any previous bidirectional fields will need to be set again. Those now upgrading from Pods 1.x will have their existing bidirectional fields upgraded automatically and won't have to worry about setting them up again.
|
1610 |
+
* Added: Widgets are now available to use to List Pod items, Show a specific Pod item, or to Show a specific field from a Pod item much like our TinyMCE shortcode popup -- enjoy!
|
1611 |
+
* Improved: Search handling has been improved along with the above tweaks
|
1612 |
+
* Check out the new screenshots we added to our plugin page if you're new to the plugin
|
1613 |
+
* While we have been working on our new Pods 2.0 documentation for our site, we went ahead and synced all of that good stuff over into the code comments along with links back to the documentation.
|
1614 |
+
|
1615 |
+
= 2.0.2 - September 27th, 2012 =
|
1616 |
+
|
1617 |
+
* Even more bugs have now been fixed including additional backwards compatibility fixes
|
1618 |
+
* Caching improvements and fixes, things should be even more responsive, try enabling object caching to see super speed!
|
1619 |
+
|
1620 |
+
= 2.0.1 - September 25th, 2012 =
|
1621 |
+
|
1622 |
+
* With the help of our awesome users, we've been able to quickly fix 14 bugs
|
1623 |
+
* Improved backwards compatibility
|
1624 |
+
* Fixed Pods UI reordering saving bug
|
1625 |
+
|
1626 |
+
= 2.0 - September 21st, 2012 =
|
1627 |
+
|
1628 |
+
* An all new, fully revamped Pods has arrived! Check our plugin page for all the details
|
1629 |
+
* Please backup your site database before upgrading, even though we've tested migration it's never a bad idea to be safe
|
1630 |
+
* Create and extend WP objects like Post Types, Taxonomies, Media, Users, and Comments, plus everything you love about Pods from before
|
1631 |
+
|
1632 |
+
= 1.14.4 - September 16th, 2012 =
|
1633 |
+
|
1634 |
+
* Security Update Reminder: As of Pods 1.12+, AJAX API calls all utilize _wpnonce hashes, update your customized publicForm / input helper code AJAX (api.php and misc.php expect `wp_create_nonce('pods-' . $action)` usage)
|
1635 |
+
* Note: Oh hey, Pods 2.0 is coming out September 21st! Please help us continue to test the beta this week: http://dev.pods.io/tag/pods2/
|
1636 |
+
* Changed: get_current_url was an older function added by Pods a while back, pods_get_current_url is the new function name which is future-proof (get_current_url will point at the new one)
|
1637 |
+
* Added: A new check will deactivate the plugin if you happen to have another version of the plugin activated for testing purposes
|
1638 |
+
* Added: A quick enhancement for all to enjoy as a final farewell to Pods 1.x, File Browser now has a mouse-over image enlarge function (props @WallabyKid), see: http://pods.io/forums/topic/add-thumbnail-preview-to-jqmwindow-file-browser-for-image-files/
|
1639 |
+
* Fixed: Some plugins/themes use the wp_title filter incorrectly and do not pass the $sep and $seplocation variables, we now set defaults in those cases
|
1640 |
+
* Fixed: Some sites experienced PHP notices from the way we've been using parse_url, we now have a fallback for that handling which clears those up
|
1641 |
+
* Q & A: What's going to happen to Pods 1.x when Pods 2.0 comes out? We're going to release maintenence updates to Pods 1.14.x for a period of time, but there will be no further features added
|
1642 |
+
|
1643 |
+
= 1.14.3 - September 6th, 2012 =
|
1644 |
+
|
1645 |
+
* Added: Reordering a Pod (using pods_ui_manage) now has a new capability check for pods_reorder_pod_podname (Custom WP capability you can add to the user's role if they don't have pod_podname access already)
|
1646 |
+
* Added: New pods_page_precode_X action, where X is the Pod Page URI
|
1647 |
+
* Fixed: get_field from returning values if an id is not set (no data found)
|
1648 |
+
* Fixed: Moved wp_editor support into an if/else statement to avoid potential overlaps
|
1649 |
+
* Fixed: Pods UI pagination and search parameter naming for 'num' usage
|
1650 |
+
|
1651 |
+
= 1.14.2 - June 8th, 2012 =
|
1652 |
+
|
1653 |
+
* Changed: More strictness to the above security update, also setting tighter defaults for security access w/ uploader
|
1654 |
+
|
1655 |
+
= 1.14.1 - May 31st, 2012 =
|
1656 |
+
|
1657 |
+
* Changed: Uploaded files now uses data-post-id attribute in file row div to avoid issues with IDs, backwards compatibility maintained for old input helpers using IDs
|
1658 |
+
* Fixed: Uploaded files not showing in form in the order of upload on subsequent edits
|
1659 |
+
* Fixed: Fixed an issue with adding / editing fields where "Related to" dropdown would not show
|
1660 |
+
|
1661 |
+
= 1.14 - May 21, 2012 =
|
1662 |
+
|
1663 |
+
* Important Change / Addition: For installations using WordPress 3.3+, we have switched the default uploader to Plupload from SWFUpload due to incompatibilities introduced in WP 3.3.2 that effect all plugins and themes using the styled button. Be sure to update your file upload helpers using our examples at http://pods.io/packages/file-uploader-input-helpers/
|
1664 |
+
* Added: edit_where_any option in Pods UI now lets you set (true/false) whether for edit_where to be an ANY or ALL match (default false = ALL)
|
1665 |
+
* Fixed: Date Input field was throwing a JS error if you used YYYY-mm-dd format without the time included
|
1666 |
+
* Fixed: parse_url fixes for when path isn't set (localhost or custom ports usually causes this)
|
1667 |
+
* Fixed: When there was extra output above or below JSON strings like errors from other plugins, whitespace, or anything else - we now explicitly match the JSON {...} string before using it in JS to avoid confusing errors for the user
|
1668 |
+
* Fixed: .pods_form style tweaks to help cover themes which display the form incorrectly
|
1669 |
+
* Fixed: Forcing (int) on getRecordById when is_numeric( $id )
|
1670 |
+
* Fixed: Resolved incompatibility issues with certain MySQL configurations which were throwing errors when saving a Pod
|
1671 |
+
|
1672 |
+
= 1.12.4 - April 5, 2012 =
|
1673 |
+
|
1674 |
+
* Added: 'offset' parameter to Pod::findRecords, allows you to offset what results to start with, which is added to the offset calculated based on current page number and limit
|
1675 |
+
* Added: 'page_var' parameter to Pod::findRecords, allows you to set a custom page_var (default is 'pg'), setting it will reset the current page number, set during Pod::construct()
|
1676 |
+
* Added: New 'pods_rel_lookup_data' filter to filter the data array itself (not just the MySQL resource given in 'pods_rel_lookup' filter above), great for customizing drop-downs for PICK fields
|
1677 |
+
* Fixed: 'page' parameter in Pod::findRecords wasn't being validated as a number greater than 0, now forces a minimum of 1; Anything less will also reset the current page number, set during Pod::construct()
|
1678 |
+
* Fixed: Pods UI 'label_add' wasn't being used on button at top of manage table list
|
1679 |
+
* Fixed: Pagination bug with custom page_var set in Pod object, would add the custom page_var to the URL over and over
|
1680 |
+
* Fixed: Upgrade script updated to include all upgrades prior to 1.6, which had been left out in a previous release
|
1681 |
+
* Fixed: More strict matching in Pod::findRecords for field names, instead of just removing '(' and ')', it now removes 'function_name(' first, so that fields with the same name as function names won't be pulled
|
1682 |
+
|
1683 |
+
= 1.12.3 - February 19, 2012 =
|
1684 |
+
|
1685 |
+
* Added: Pods UI findRecords parameters array now goes through a new filter called "pods_ui_findrecords"
|
1686 |
+
* Fixed: Forcing boolean check if true in bypass_helpers in PodAPI
|
1687 |
+
* Fixed: Pod Page automatic title generation now removed WP home path (for WP sites in sub-directories) (props @chrisbliss18)
|
1688 |
+
* Fixed: nicEdit JS "A.createRange()||document.createRange()" fix for JS errors on certain browsers / uses
|
1689 |
+
* Fixed: Pagination page_var usage (was forcing 'pg' var name no matter what), and fixed query array handling; Props to @thangaswamyarun for finding this one so we could fix it!
|
1690 |
+
* Fixed: Pods UI search settings set correctly now (had to flip a true/false check and not have search_across take the bool value of search)
|
1691 |
+
* Fixed: Pods UI filtering sets emptied values now, wasn't setting right if you had emptied a filter value when submitting (unselected drop-down)
|
1692 |
+
|
1693 |
+
= 1.12.2 - December 14, 2011 =
|
1694 |
+
|
1695 |
+
* Fixed: WP 3.3 TinyMCE Editor bug with HTML tab (wouldn't save if HTML tab was active during initial form load) and other minor fixes
|
1696 |
+
|
1697 |
+
= 1.12.1 - December 12, 2011 =
|
1698 |
+
|
1699 |
+
* Fixed: findRecords Order bug
|
1700 |
+
|
1701 |
+
= 1.12 - December 12, 2011 =
|
1702 |
+
|
1703 |
+
* Important: As with all upgrades, we take them seriously. If you experience any major issues when upgrading to this version from a previous version, immediately contact uhoh@pods.io and we'll help get your upgrade issue figured out (critical bugs only please)
|
1704 |
+
* Security Update: AJAX API calls all utilize _wpnonce hashes, update your customized publicForm / input helper code AJAX (api.php and misc.php expect `wp_create_nonce('pods-' . $action)` usage)
|
1705 |
+
* Added: Multi-level references in field names when referenced in Pod :: findRecords $params (`select, where, groupby, having, orderby`) - ex. `'where' => 'pick_field.another_pick_field.another_pick.field = "Example"'` **(donation-funded by @chriscarvache)**
|
1706 |
+
* Added: Multi-level references in search filters when referenced in Pod :: findRecords $params (`select, where, groupby, having, orderby`) or Pod :: traverse variable (when not mentioned in params but you want it filterable) **(donation-funded by @chriscarvache)**
|
1707 |
+
* Added: Lightweight Relationship (PICK) field support in Pod :: findRecords (2.0 full support in UI) **(donation-funded by @chriscarvache)**
|
1708 |
+
* Added: Fully revamped JOINs based on field names when referenced in Pod :: findRecords $params (`select, where, groupby, having, orderby`) **(donation-funded by @chriscarvache)**
|
1709 |
+
* Added: RegEx auto-sanitizing of field names when referenced in Pod :: findRecords $params (`select, where, groupby, having, orderby`) **(donation-funded by @chriscarvache)**
|
1710 |
+
* Added: PodAPI :: duplicate_pod_item with $params as `'datatype' => 'podname', 'tbl_row_id' => $item_id_to_duplicate` (returns new id) **(donation-funded by @gr0b1)**
|
1711 |
+
* Added: PodAPI :: export_pod_item with $params as `'datatype' => 'podname', 'tbl_row_id' => $item_id_to_export` (returns array of data - pick/file columns are arrays of their data) **(donation-funded by @gr0b1)**
|
1712 |
+
* Added: PODS_STRICT_MODE constant to enable many features at once which are common settings for advanced developers including - Pagination defaults to off; Search defaults to off; PodAPI $params are auto-sanitized (stripslashes_deep if you already sanitized or are dealing with sanitized values in your $params)
|
1713 |
+
* Added: Pod('pod_name', $params) ability to run findRecords straight away with one single line that also sets up the Pod object, $params must be an array
|
1714 |
+
* Added: Option to use SQL_CALC_FOUND_ROWS or COUNT(*) for getting the total rows available (for use with pagination / Pod :: getTotalRows) setting 'calc_found_rows' or 'count_found_rows' to true in Pod :: findRecords $params (useful for complex queries on data)
|
1715 |
+
* Added: Option to disable pagination altogether (separate from setting page to 1, but also forces page to be 1) in findRecords $params `'pagination' => false`
|
1716 |
+
* Added: PODS_GLOBAL_POD_PAGINATION constant to globally disable pagination by setting the constant to false (can be renabled as needed in findRecords $params `'pagination' => true`)
|
1717 |
+
* Added: PODS_GLOBAL_POD_SEARCH constant to globally disable search by setting the constant to false (can be renabled as needed in findRecords $params `'search' => true`)
|
1718 |
+
* Added: PODS_GLOBAL_POD_SEARCH_MODE constant to globally set the search_mode to 'text', 'int', or 'text_like' (default 'int' which references field IDs) - can be overrided as needed in findRecords $params `'search_mode' => 'text'`)
|
1719 |
+
* Added: PODS_DISABLE_EVAL constant to globally disable PHP eval() on PHP-enabled areas of Pods (Templates, Helpers, Pod Pages)
|
1720 |
+
* Added: PODS_WP_VERSION_MINIMUM constant to disable WP minimum version requirement
|
1721 |
+
* Added: PODS_PHP_VERSION_MINIMUM constant to disable PHP minimum version requirement
|
1722 |
+
* Added: PODS_MYSQL_VERSION_MINIMUM constant to disable MySQL minimum version requirement
|
1723 |
+
* Added: Pod :: getRowNumber() to get current row number and Pod :: row_number variable to internally be used to keep track of which row_number you're on in findRecords loop (incremented in fetchRecord)
|
1724 |
+
* Added: Pod :: raw_sql contains SQL without @ table references replaced and Pod :: sql now should reflect the same query as hits the DB (@ table references replaced)
|
1725 |
+
* Added: Pod :: getZebra() which uses a switch (Pod :: zebra) that goes from false to true during fetchRecord loops (initial value is false, first fetch switches it to true and reverses each additional fetch)
|
1726 |
+
* Added: PodAPI :: save_template / save_page / save_helper now allow 'name' / 'uri' to be renamed on save (only in API, not UI)
|
1727 |
+
* Added: PodAPI :: save_pod_item now accepts an array for $params->tbl_row_id which will let you save multiple items at a time using the rest of the $params
|
1728 |
+
* Added: PodAPI :: delete_pod_item now accepts an array for $params->tbl_row_id which will let you delete multiple items at a time
|
1729 |
+
* Added: Having trouble updating Pods but you know things should be OK (advanced users)? Try adding ?pods_bypass_update=1 to the page URL you're on to bypass the update
|
1730 |
+
* Added: Pagination / Filters to pods_shortcode (ex. `[pods name="mypod" limit="15" pagination="1" pagination_label="Go to page:" pagination_location="after" filters="status,category" filters_label="Filter:" filters_location="before"]`)
|
1731 |
+
* Added: pods_page_templates filter to get $page_templates for use in Pod Page editor, which allows support for Pods built into **iThemes Builder** coming soon (to select layouts)
|
1732 |
+
* Added: When using pods_query and setting $error to false, will bypass die on MySQL error
|
1733 |
+
* Added: When using Pods UI as an admin (manage_options capability), add 'debug=1' to the URL to see the currently used SQL query for a manage screen
|
1734 |
+
* Added: pods_manage now returns $object
|
1735 |
+
* Added: Sort classes now used to show current sort direction
|
1736 |
+
* Added: PodAPI :: load_column now accepts 'name' and 'datatype' (id) parameters for lookup instead of only just 'id' of field
|
1737 |
+
* Added: PodAPI :: load_helper now accepts 'type' parameter for lookup instead of only just 'id' and 'name' of helper
|
1738 |
+
* Added: New function 'pods_function_or_file' that checks if a function or file exists based on a number of locations, used for Helpers / Templates / Pod Pages, filter available called 'pods_function_or_file' if you want to customize further
|
1739 |
+
* Changed: Pod Page Precode now runs on 'after_setup_theme' action instead of 'plugins_loaded'
|
1740 |
+
* Changed: pods_generate_key / pods_validate_key revamped to work off of wpnonce, though $_SESSION is still used for holding the columns from that form usage
|
1741 |
+
* Changed: pods_sanitize now sanitizes keys (previously only values)
|
1742 |
+
* Changed: Now using wp_hash instead of md5 to get the hash of a value
|
1743 |
+
* Changed: PODS_VERSION_FULL removed and PODS_VERSION now set as real point version (ex. `1.12`), updated all checks for version to use PHP version_compare
|
1744 |
+
* Changed: input_helper in column options returns only value instead of the actual 'phpcode' now during publicForm, which then enables file-based / function-based checks during input_field.php loop
|
1745 |
+
* Changed: pods_unique_slug to work more efficiently
|
1746 |
+
* Removed: $this->wpdb from Pod class (just a vestige of the past, now using global $wpdb)
|
1747 |
+
* Removed: PodAPI / UI References to old Pods Menu functionality
|
1748 |
+
* Fixed: jQuery Sortable include fix
|
1749 |
+
* Fixed: WP 3.3 errors fixed in regards to new WP Editor API for TinyMCE (via @azzozz)
|
1750 |
+
* Fixed: Tightened up uninstall.php and when it can be run to avoid accidental uninstalls (Reminder: When you delete Pods (and other plugins) within WP, you'll delete the files AND your data as we follow the WP Plugin data standard for uninstalling)
|
1751 |
+
* Fixed: Pods >> Setup UI updated with lots of fixes when editing Pods / Columns, and Helpers (no more refreshes needed where they may have been needed before)
|
1752 |
+
* Fixed: PodAPI setting of defaults for $params to avoid isset checks
|
1753 |
+
* Fixed: PodAPI :: save_column now sets pick-related extra data to empty if not a pick column
|
1754 |
+
* Fixed: Pod :: getRecordById() now gets all of the same data as findRecords pulls in (pod_id, created, modified)
|
1755 |
+
* Fixed: pods_url_variable references updated to pods_var
|
1756 |
+
* Fixed: SQL cleaned up (extra line breaks removed so it's not as ugly) and standardized to escape field names in SQL references
|
1757 |
+
|
1758 |
+
= 1.11 - August 12, 2011 =
|
1759 |
+
|
1760 |
+
* Improved: MySQL performance enhanced with a number of MySQL indexes and column type tweaks, your DB will be automatically upgraded for you
|
1761 |
+
* Added: PodInit :: setup now has filters / actions that run before / after install and updates
|
1762 |
+
* Added: PodInit :: setup now explicitly sets CHARSET / COLLATE options as defined in wp-config ($wpdb->charset / $wpdb->collate)
|
1763 |
+
* Added: PodInit :: precode now runs action 'pods_page_precode' after a Pod Page's precode is run (if any) and allows you to intercept the global $pods variable to force a Pod Page to stop running (issue a 404 by $pods = 404;) and other modifications to $pods global
|
1764 |
+
* Added: PodInit :: admin_menu now checks if PODS_DISABLE_ADMIN_MENU is defined and set to true, which will hide all of the Pods menus (except for top-level Pod menus)
|
1765 |
+
* Added: PodInit :: wp_head now checks if PODS_DISABLE_VERSION_OUTPUT is defined and set to true, which will hide the Pods version from Pod Pages
|
1766 |
+
* Added: Set Meta Property Tags in your Pod Page precode, just setup $pods on your Pod object, and assign $pods->meta_properties as an array with any other meta property tags you want put on that page (useful for quick and dynamic meta tags dependant on Pod information)
|
1767 |
+
* Fixed: Pods UI bug with filters / searches not working fixed, added a $strict variable to pods_ui_var and pods_var for clearer values (strict mode returns default if value found is empty)
|
1768 |
+
* Fixed: pods_var bug with strtolower PHP warning when managing content
|
1769 |
+
* Fixed: PodAPI :: export_package now removes sister_field_id from field data being exported as it could cause issues with incorrect bi-directional mapping to fields on reimport (expect to rebuild bi-directional field relationships upon import of packages going forward)
|
1770 |
+
* Fixed: PodAPI :: save_column now reserves the field names 't' and 'p' for internal use as aliases
|
1771 |
+
* Fixed: Pod :: lookup_row_ids now forces (int) on values given, also allows $tbl_row_ids to be array instead of only just comma-separate string as before
|
1772 |
+
* Fixed: Pod :: findRecords now looks in 'select' parameter to find fields that need to be included
|
1773 |
+
* Fixed: Pod :: showform now forces (int) on explicitly values that hit the DB
|
1774 |
+
* Fixed: Various PHP notice fixes and query updates to improve performance (to maximize performance on custom queries, update wp_pod queries to use datatype first then tbl_row_id if it's not already in WHERE statements, do same for wp_pod_rel on field_id and pod_id)
|
1775 |
+
|
1776 |
+
= 1.10.7 - August 9, 2011 =
|
1777 |
+
|
1778 |
+
* Fixed: /ui/ajax/api.php which added extra slashes unnecessarily
|
1779 |
+
|
1780 |
+
= 1.10.6 - August 9, 2011 =
|
1781 |
+
|
1782 |
+
* Added: pods_var function to replace pods_url_variable (better name, more functionality), now handles URL segments, $_GET, $_POST, $_SESSION, $_COOKIE, $_SERVER, CONSTANT, User meta, custom arrays, and custom objects - also added a $default option to set what it should default to if not found (default: null) - also added a $allowed option to set what values are allowed to be returned, if $output is not $allowed ($allowed is array and not in $allowed OR $allowed is not array and does not equal $allowed) then $default is returned
|
1783 |
+
* Added: pods_var_set function to set variables, operates similar to pods_var, has three variables ($value, $key, $type) and returns $value on success (if $type is an array or object it will return the updated $type, if $type is 'url' it will return the full updated $url)
|
1784 |
+
* Fixed: Now using get_current_url() and parse_url to get path versus $_SERVER['REQUEST_URI']
|
1785 |
+
* Fixed: Replaced mysql_real_escape_string usage with esc_sql
|
1786 |
+
* Fixed: Backslashes being automatically added and causing issues with additional urlencoding and esc_attr usage
|
1787 |
+
|
1788 |
+
= 1.10.5 - August 9, 2011 =
|
1789 |
+
|
1790 |
+
* Added: $pods->meta_extra now outputs after the meta tags when wp_head runs in case you want to output one-off meta tags for a specific page using pre-code without extra WP functions
|
1791 |
+
* Fixed: When adding a helper, it will now be added to the 'input helper' drop-down too
|
1792 |
+
* Fixed: Pods non-top-level management has session filters turned off now by default
|
1793 |
+
* Fixed: Taxonomy PICK unique values handler fixed to reference 't.term_id' instead of just 'id'
|
1794 |
+
* Fixed: Pagination now using esc_url correctly, which wasn't being used right in 1.10.4
|
1795 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1796 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1797 |
+
|
1798 |
+
= 1.10.4 - August 1, 2011 =
|
1799 |
+
|
1800 |
+
* Fixed: Pods UI was breaking 'view' links
|
1801 |
+
* Fixed: Pods UI reordering fixed
|
1802 |
+
* Fixed: Better errors for when a Pod doesn't exist to replace SQL errors
|
1803 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1804 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1805 |
+
|
1806 |
+
= 1.10.3 - July 30, 2011 =
|
1807 |
+
|
1808 |
+
* Fixed: Shortcode 'where' parameter fixed
|
1809 |
+
* Fixed: Body Class for Pod Pages not replacing / with - correctly and leaving an extra - at the end with wildcards
|
1810 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1811 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1812 |
+
|
1813 |
+
= 1.10.2 - July 29, 2011 =
|
1814 |
+
|
1815 |
+
* Added: Moved the demo.php file from the Pods UI plugin over as pods-ui-demo.php and can now be found distributed with this plugin in the /demo/ plugin.
|
1816 |
+
* Fixed: PHP error with new Version to Point function
|
1817 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1818 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1819 |
+
|
1820 |
+
= 1.10.1 - July 28, 2011 =
|
1821 |
+
|
1822 |
+
* Added: New wp_pod and wp_pod_tbl_* table fix tool under Pods >> Setup >> Settings tab to resync your wp_pod table (clear orphans in wp_pod, and sync from wp_pod_tbl_* to wp_pod what doesn't already exist) - Useful for those who imported directly to wp_pod_tbl_* but forgot to import into wp_pod
|
1823 |
+
* Added: Set Meta Tags in your Pod Page precode, just setup $pods on your Pod object, and assign $pods->meta as an array with 'description', 'keywords', or any other meta tags you want put on that page
|
1824 |
+
* Added: Set Title Tag via $pods->meta['title'] (see Meta Tags feature listed directly above) which overrides what you might have in your Pod Page Title field
|
1825 |
+
* Added: Set Body Classes via $pods->body_classes (as a string, like $pods->body_classes = 'one-class another-class')
|
1826 |
+
* Added: Dynamically set your Pod Page template via $pods->page_template to set the filename, compatible with parent / child themes (fallback on currently selected Pod Page template, pods.php or default output)
|
1827 |
+
* Improved: Added many new filters / actions to PodInit functions for advanced customization via other plugins
|
1828 |
+
* Improved: On duplicate, Pods UI will now show the 'Add Another' and 'Add another based on this item' links again (instead of only on first add but not after duplicating)
|
1829 |
+
* Improved: PodAPI :: save_pod now returns the $pod data (via PodAPI :: load_pod) if $params->return_pod is set to true
|
1830 |
+
* Fixed: Pod :: getFilters now using the correct 'label' for the search button
|
1831 |
+
* Fixed: On uninstall, now deleting options WHERE option_name LIKE 'pods_%'
|
1832 |
+
* Fixed: Various minor bug fixes
|
1833 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1834 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1835 |
+
|
1836 |
+
= 1.10 - July 28, 2011 =
|
1837 |
+
|
1838 |
+
* Added: Full revamped UI for Content Management via Pods UI (you no longer need two separate plugins - Pods and Pods UI)
|
1839 |
+
* Added: TinyMCE is now the default visual editor in WP Admin pages (nicEdit remains default for frontend forms), you can still use the newly updated TinyMCE for Pods package to customize this
|
1840 |
+
* Improved: Added many new filters across functions.php for advanced customization via other plugins
|
1841 |
+
* Improved: Admin Notices are now shown if you aren't running the minimum version of WordPress, PHP, and/or MySQL
|
1842 |
+
* Improved: Updated version handling of PODS_VERSION
|
1843 |
+
* Fixed: Updated Pod :: get_dropdown_values to work off of $params object instead of the old ${$key} = $value
|
1844 |
+
* Fixed: Updated Pod :: findRecords to check if 'select' from $params is empty (and only to set it if it's not empty)
|
1845 |
+
* Fixed: Updated Pod :: findRecords to cast (int) on certain values set via $params
|
1846 |
+
* Fixed: Updated Pod :: findRecords to INNER JOIN the wp_pod_tbl_podname table prior to other joins (now you can reference t.field_name in your custom 'join' from $params)
|
1847 |
+
* Fixed: Updated Pod :: getFilters to use the field label (if set), falling back on name (used to only be based on name)
|
1848 |
+
* Fixed: publicForm now sets columns explicitly to those that exist instead of passing null if fields not set
|
1849 |
+
* Fixed: PodAPI :: __construct now uses PodAPI :: load_pod to setup the pod and it's fields instead of doing the calls itself
|
1850 |
+
* Fixed: PodAPI :: load_pod simplified
|
1851 |
+
* Fixed: PodInit :: init now checks if WP_DEBUG is on in addition to if headers_sent to set session_start()
|
1852 |
+
* Fixed: Moved Package Manager to below Setup and above Manage Content to keep Manage Content next to the Add podname sub-menu items
|
1853 |
+
* Fixed: Pods >> Setup >> Pods tab updated so when you add/remove Pods it will adjust the related to drop-down in field settings (previously it didn't show it until you refreshed the page)
|
1854 |
+
* Fixed: Pods >> Setup >> Pods tab under Field settings section updated to show/hide relevant fields if a pick (or not)
|
1855 |
+
* Fixed: Pods >> Setup >> Pods tab to reset the Pod settings fields correctly when switching to different Pods or adding / removing them
|
1856 |
+
* Fixed: Pods >> Setup >> Helpers tab updated so when you add/remove Helpers it will adjust the pre/post save/drop helpers drop-downs in the Pods tab (previously it didn't show it until you refreshed the page)
|
1857 |
+
* Fixed: Pods >> Setup >> Helpers tab updated so when you add Helpers it will set the helper_type in parentheses correctly (previously it didn't show it until you refreshed the page)
|
1858 |
+
* Fixed: misc.php updated to work off of $params object instead of the old ${$key} = $value
|
1859 |
+
* Fixed: Updated TinyMCE $wp_editor (developed by @azaozz) to hide WP 3.2 fullscreen buttons and only show native TinyMCE fullscreen button
|
1860 |
+
* Fixed: Various PHP notice fixes and escape/sanitization on output across Pods
|
1861 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1862 |
+
* Reminder: Pods 2.0 and How You Can Help - http://dev.pods.io/2011/06/16/pods-2-0-and-how-you-can-help/
|
1863 |
+
|
1864 |
+
= 1.9.8 - July 24, 2011 =
|
1865 |
+
|
1866 |
+
* Added: New Option to override existing packages during package import
|
1867 |
+
* Added: Pods and additional database calls are not initiated (but you can run the code as the files are included) when SHORTINIT is defined and set to true (also does not load much of WP itself)
|
1868 |
+
* Added: Pods will now check the version of Pods a package was exported from and display notices if it 'might' be incompatible (based on the minor version in major.minor.patch), and an additional two variables (compatible_from and compatible_to) are available within the 'meta' array which will get utilized in the new Pods site revamp within the Package Directory
|
1869 |
+
* Improved: Enhanced display / error information and implementation for package import
|
1870 |
+
* Fixed: Package export bug that generated an 'empty' package when you click 'Export' without anything selected
|
1871 |
+
* Fixed: No longer calling $pods_roles immediately, only used when needed in the code
|
1872 |
+
* Fixed: &$referenced the $pods_cache variable to $cache for backwards compatibility - use $pods_cache going forward
|
1873 |
+
* Fixed: Minor PHP warnings/notices that come up when WP_DEBUG is defined and set to true
|
1874 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1875 |
+
|
1876 |
+
= 1.9.7.4 - July 14, 2011 =
|
1877 |
+
|
1878 |
+
* Fixed: esc_html replaced with esc_textarea for Package Export and textarea usages to prevent breaking html entities
|
1879 |
+
* Fixed: Errors when you enter a field that doesn't exist, for inclusion in a publicForm
|
1880 |
+
|
1881 |
+
= 1.9.7.3 - July 6, 2011 =
|
1882 |
+
|
1883 |
+
* Fixed: Uploader cookie-handling for advanced usage (1.9.7.2 wouldn't appear on wp.org)
|
1884 |
+
|
1885 |
+
= 1.9.7.1 - July 6, 2011 =
|
1886 |
+
|
1887 |
+
* Fixed: Fix for relationships / file saving (error 500 fix)
|
1888 |
+
|
1889 |
+
= 1.9.7 - July 5, 2011 =
|
1890 |
+
|
1891 |
+
* Added: 'having' parameter to Pod :: findRecords
|
1892 |
+
* Added: #spacer_$name ID is now set on the spacer (div.pods_form div.clear) directly after a field) for clean UI when utilizing advanced CSS / jQuery usage; Also increased spacing by 5px
|
1893 |
+
* Improved: Increased integer limits on IDs throughout the database to allow for more (or just higher ID #'s)
|
1894 |
+
* Improved: File Uploader now links after upload, instead of only on loading a form with existing files (or after saving)
|
1895 |
+
* Fixed: Now looking at 'groupby' parameter for any additional PICK fields to be JOINed
|
1896 |
+
* Fixed: PodAPI :: fields now gets label in addition to name
|
1897 |
+
* Fixed: Sometimes when a non integer is sent, SQL errors show up (but not a sanitization issue, it was a casting issue)
|
1898 |
+
* Fixed: Using esc_html in place of htmlentities (out with the old, in with the standards, more in 2.0)
|
1899 |
+
* Fixed: Now explicitly sending content encoding type (based on WP settings) in AJAX returns
|
1900 |
+
* Fixed: TinyMCE API update from @azaozz with additional WP 3.2 support
|
1901 |
+
* Fixed: File Upload field now checks if user has access to upload and/or browse before showing the UI for those (regardless, access when trying to actually use the UI before was still closed off)
|
1902 |
+
* Fixed: Removed htaccess.txt which was no longer referenced or used
|
1903 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1904 |
+
|
1905 |
+
= 1.9.6.3 - June 24, 2011 =
|
1906 |
+
|
1907 |
+
* Fixed: JS optimization and fixes for nicEdit (also now no longer outputting pods-ui.js on every page)
|
1908 |
+
* Fixed: Non Top-level menu Pods now appearing in alphabetical order under Pods menu
|
1909 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1910 |
+
|
1911 |
+
= 1.9.6.2 - June 23, 2011 =
|
1912 |
+
|
1913 |
+
* Fixed: TinyMCE API update from @azaozz with additional WP 3.2 support
|
1914 |
+
* Fixed: Pod Page Precode $pods = 404; bug that wouldn't produce the default WordPress 404 error page
|
1915 |
+
* Fixed: Fix for nicEdit JS error during init that breaks forms (when on a non top-level menu Pod AJAX-loaded form)
|
1916 |
+
* Fixed: Fix for PICK error during save that errors out trying to save selections as 'undefined' (when on a non top-level menu Pod AJAX-loaded form)
|
1917 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1918 |
+
|
1919 |
+
= 1.9.6.1 - June 23, 2011 =
|
1920 |
+
|
1921 |
+
* Fixed: Fix for nicEdit JS error during init that breaks forms
|
1922 |
+
* Reminder: 1.9.6 Security Update information can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1923 |
+
|
1924 |
+
= 1.9.6 - June 22, 2011 =
|
1925 |
+
|
1926 |
+
* Full Details can be found at: http://dev.pods.io/2011/06/22/pods-1-9-6-security-update-new-features-bug-fixes/
|
1927 |
+
* Security Update: New security settings section in the Pods >> Setup >> Settings tab to restrict access to the File Browser / Uploader used in publicForm, adjust the settings to fit your site if you experience any problems
|
1928 |
+
* Added: New TinyMCE API for use with the new TinyMCE package update at http://pods.io/packages/tinymce-for-pods/
|
1929 |
+
* Added: New get_current_url() function to get current page URL
|
1930 |
+
* Fixed: pod_page_exists() bug with $home path
|
1931 |
+
* Fixed: publicForm bug with $css_id always using form_count 1 (now uses correct $form_count)
|
1932 |
+
* Fixed: Access to Pod Pages tab in Pods >> Setup menu (manage_pages >> manage_pod_pages)
|
1933 |
+
* Fixed: Added $params and $columns to actions for pods_pre_save_pod_item and pods_post_save_pod_item in PodAPI :: save_pod_item
|
1934 |
+
* Fixed: Moved $params->pod_id and $params->tbl_row_id setup to above pre_save_helpers run in PodAPI :: save_pod_item
|
1935 |
+
* Fixed: tbl_row_id now sent in publicForm (not just pod_id)
|
1936 |
+
* Fixed: WP 3.2 bugs regarding jQuery upgrade to 1.6.1
|
1937 |
+
* Fixed: PHP warnings dependant on error_reporting level and PHP version
|
1938 |
+
|
1939 |
+
= 1.9.5.1 - April 7, 2011 =
|
1940 |
+
|
1941 |
+
* Fixed: dot-traversal in Pod :: get_field
|
1942 |
+
|
1943 |
+
= 1.9.5 - April 7, 2011 =
|
1944 |
+
|
1945 |
+
* Added: Multisite (3.0+) Network Activation support - Now when you click Network Activate, Pods will install itself correctly across all sites (and new sites as they are added)
|
1946 |
+
* Added: Third option "$thankyou_url" in publicForm($columns, $label, $thankyou_url) which changes what happens when a form is submitted
|
1947 |
+
* Added: Pod :: findRecords - New 'total' variable separate from getTotalRows(), call $record->total to get the number of results in _current_ query
|
1948 |
+
* Added: For sites that don't use Pod Pages, there is now a new check if defined('PODS_DISABLE_POD_PAGE_CHECK') to disable the Pod Page check on each page load
|
1949 |
+
* Improved: Drop / Reset Pod now does a little validations on ID / Name of Pod
|
1950 |
+
* Fixed: File Uploads failed to save to the Pod item when themes / plugins output erroneous whitespace during their init
|
1951 |
+
* Fixed: Various PHP warnings cleaned up (was showing when WP_DEBUG and other debugging is turned on)
|
1952 |
+
|
1953 |
+
= 1.9.4 - October 20, 2010 =
|
1954 |
+
|
1955 |
+
* Fixed: Pod Pages - Only match Pod Page URIs that match current depth (specifically when using wildcards)
|
1956 |
+
* Fixed: $groupby referenced but not used - and $orderby should be allowed to be empty (gives error if it is)
|
1957 |
+
* Fixed: Allow Pod Pages on domains other than contained in wpurl
|
1958 |
+
* Fixed: Pod :: get_dropdown_values wp_taxonomy Filter Query fix
|
1959 |
+
|
1960 |
+
= 1.9.3.1 - October 4, 2010 =
|
1961 |
+
|
1962 |
+
* Fixed / Added: Pod :: findRecords - Add param for groupby since where is now surrounded in ( ) - resolving the issue introduced in 1.9.3
|
1963 |
+
* Fixed: Pod :: findRecords - Filtering should run through $search variable instead of $where
|
1964 |
+
|
1965 |
+
= 1.9.3 - October 1, 2010 =
|
1966 |
+
|
1967 |
+
* Fixed: PodAPI :: csv_to_php - Field Name not un-escaped like Field Values (quotes)
|
1968 |
+
* Fixed: Pod :: findRecords - $limit / $where / etc should only run if $sql is empty
|
1969 |
+
* Fixed: Pod :: findRecords - $where (if not empty) should be surrounded in parethesis
|
1970 |
+
* Fixed: mysql_real_escape_string - Needs an identifier to avoid PHP warnings
|
1971 |
+
* Fixed: $this->page should be no lower than 1
|
1972 |
+
* Fixed: PodAPI :: load_pod_item - Undefined Property fix
|
1973 |
+
* Fixed: Manage Pods - JS Error with .length on null var
|
1974 |
+
* Fixed: Manage Content - Browse / Edit tabs + Filtering fixes
|
1975 |
+
* Fixed: Pod :: publicForm - CSS .hidden not targeted in stylesheet
|
1976 |
+
* Fixed: PodInit :: body_class - Pulling REQUEST_URI instead of Pod Page URI
|
1977 |
+
* Fixed: PodInit :: init - htaccess check not necessary, not all users will use Pod Pages
|
1978 |
+
|
1979 |
+
= 1.9.2.2 - September 23, 2010 =
|
1980 |
+
|
1981 |
+
* Fixed: Older method of array('datatype'=>'x','columns'=>array('name','other_col'),'name'=>$name,'other_col'=>$other_col) with save_pod_item now work when saving (to allow an easier upgrade path for those using already built code that utilize it)
|
1982 |
+
|
1983 |
+
= 1.9.2.1 - September 23, 2010 =
|
1984 |
+
|
1985 |
+
* Fixed: Adding / Editing items weren't saving properly
|
1986 |
+
|
1987 |
+
= 1.9.2 - September 23, 2010 =
|
1988 |
+
|
1989 |
+
* Added: Ability to use filters / actions to add new Column Types to Pods
|
1990 |
+
* Added: Filters - pods_admin_menu_name / pods_admin_menu_label / pods_admin_submenu_name / pods_admin_submenu_label / pods_rel_lookup / pods_get_dropdown_values / pods_findrecords_the_join / pods_findrecords_join / pods_showform_save_button_atts / pods_showform_save_button / pods_column_dbtypes / pods_column_types
|
1991 |
+
* Added: Actions - pods_pre_pod_helper / pods_pre_pod_helper_$helper / pods_post_pod_helper / pods_post_pod_helper_$helper / pods_pre_showtemplate / pods_pre_showtemplate_$tpl / pods_post_showtemplate / pods_post_showtemplate_$tpl / pods_pre_input_field / pods_pre_input_field_$name / pods_pre_input_field_type_$coltype / pods_input_field_type_$coltype / pods_post_input_field / pods_post_input_field_$name / pods_post_input_field_type_$coltype / pods_pre_form / pods_pre_form_{Pod :: datatype} / pods_post_form / pods_post_form_{Pod :: datatype}
|
1992 |
+
* Added: Automatic File Column Upgrade during DB Update from Pods below version 1.7.6
|
1993 |
+
* Added: Pod :: findRecords($params) can now be used where $params is an key/value array containing 'select' (t.*, p.id AS pod_id, p.created, p.modified), 'where' (null), 'join' (empty), 'orderby' (t.id DESC), 'limit' (15), 'page' (Pod :: page), 'search' (Pod :: search), and 'sql' (null) for future proofing variable expansion
|
1994 |
+
* Added: save_pod_item has a new var in $params to be used - bypass_helpers (default: true) which can be set to false to not run any pre/post save helpers
|
1995 |
+
* Improved: Parent / Child Theme integration uses core WP functions to lookup templates
|
1996 |
+
* Improved: pods_access now uses current_user_can for 'administrator' role check, converts $method to upper case, also looks for a capability of pods_administrator for full access
|
1997 |
+
* Improved: DB Update code revised
|
1998 |
+
* Improved: Using $wpdb->tablename format for WP Core table names in all code
|
1999 |
+
* Improved: PodAPI :: import now checks if the $data is an array of items or if it's a single-item array
|
2000 |
+
* Improved: Input fields have name attribute * Added to them (except multi-select pick field which works off of a div and the file upload field)
|
2001 |
+
* Fixed: File Upload field checks version of WP to get correct button height
|
2002 |
+
* Fixed: PodAPI :: import and pick values work correctly now
|
2003 |
+
* Fixed: PodAPI :: save_pod_item works with tbl_row_id parameter correctly now
|
2004 |
+
* Fixed: PodAPI :: reset_pod works correctly now
|
2005 |
+
* Fixed: PodAPI :: drop_pod_item works with tbl_row_id parameter correctly now
|
2006 |
+
* Fixed: pods_url_variable now removes the hash (#) part of the url - On a side note, avoid use of pods_url_variable(-1) and other negative numbers as it is not always the level you expect in wildcard Pod Pages
|
2007 |
+
* Fixed: Revised AJAX-based drop_pod_item access check, you can now drop an item if a user has pod_$podname access but NOT manage_content access (previously denied)
|
2008 |
+
* Fixed: Date Input offset uses this.input.position() instead of this.input.offset() now
|
2009 |
+
* Fixed: Pod Page Template select gets/saves page.php correctly now when page.php doesn't have a Template Name
|
2010 |
+
* Fixed: File Browser display CSS fix
|
2011 |
+
* Deprecated: Instead of using wp_users you should use $wpdb->users (along with other Core WP table names)
|
2012 |
+
|
2013 |
+
= 1.9.1 - August 13, 2010 =
|
2014 |
+
|
2015 |
+
* Added: Support for Multisite Environment URLs and Super Admin role
|
2016 |
+
* Added: Filters for Manage Tabs (to allow Pods UI to enhance these areas)
|
2017 |
+
* Added: page.php now appears as "Page (WP Default)" in the Page Template list if page.php has no "Template Name" and exists in the theme (previously did not show up)
|
2018 |
+
* Added: $is_new_item to save_pod_item() in PodAPI for use in Pre-save and Post-save Helpers -- $is_new_item = true if adding an item, $is_new_item = false if editing an item
|
2019 |
+
* Fixed: drop_pod() in PodAPI function reference fix
|
2020 |
+
* Fixed: validate_package() in PodAPI assumed array, now it checks if the $data is an array
|
2021 |
+
|
2022 |
+
= 1.9.0 - July 29, 2010 =
|
2023 |
+
|
2024 |
+
* Added: Integration with body_class() - When on a Pod Page, two classes are added: pods, pod-page-URI-GOES-HERE; and if $pods is defined as a Pod another is added: pod-POD-NAME-GOES-HERE
|
2025 |
+
* Added: pods_admin css class to wrap divs in Admin UI
|
2026 |
+
* Added: New Pods Icon set for primary Pods menu and Pods Setup heading
|
2027 |
+
* Added: pods_api_$action filter runs before $action runs in AJAX API operations
|
2028 |
+
* Added: Support for tbl_row_id in save_pod_item, drop_pod_item, and load_pod_item params as alternative to pod_id (to eventually fully replace pod_id support)
|
2029 |
+
* Added: reset_pod() added to PodAPI class to delete all Pod Items from a Pod without deleting the Pod itself
|
2030 |
+
* Added: reorder_pod_item() added to PodAPI class to quickly and easily mass edit a number field for reordering purpose
|
2031 |
+
* Added: Bulk save_pod_item() operations added in PodAPI class with new 'data' parameter ('data' should contain an array of 'columns' arrays)
|
2032 |
+
* Added: Files previously uploaded will now be linked to the location in the file list for a column
|
2033 |
+
* Improved: New $api->snap variable can be set to true in PodAPI class to silence all die() functions and throw them as Exceptions to improve API-based operations in advanced setups
|
2034 |
+
* Improved: pod_query() now trims $sql once instead of three times
|
2035 |
+
* Improved: pod_page_exists() now has a $uri parameter to pull data on a Pod Page at another URI than REQUEST_URI gives
|
2036 |
+
* Improved: pods_access() now supports checking multiple at a time with addition of second parameter $method (AND/OR) and accepting an array for $priv
|
2037 |
+
* Improved: Admin UI / Form Fields now have maxlength attributes on input fields with length restrictions
|
2038 |
+
* Improved: Extended maximum length for Helper names, Template names, and and Field Comments to 255 characters
|
2039 |
+
* Improved: Made Debug Information on Settings tab easier to read
|
2040 |
+
* Improved: drop_pod() in PodAPI class now clears Pod items in a more efficient way
|
2041 |
+
* Changed: DB update trims all Pod Pages of their beginning and trailing slashes "/" which previously were allowed but are now stripped during the saving process (normalization)
|
2042 |
+
* Changed: save_page() in PodAPI class now strips beginning and trailing slashes "/" from URI before save
|
2043 |
+
* Changed: Moved Package operations into PodAPI class
|
2044 |
+
* Changed: Moved jqmWindow in Admin UI into wrap div and the pods_form div in the content form
|
2045 |
+
* Changed: PodAPI class now returns all IDs instead of die("$id")
|
2046 |
+
* Changed: import() in PodAPI class now uses save_pod_item() which gives it full support for bi-directional relationships
|
2047 |
+
* Fixed: load_pod_item() in PodAPI class no longer interferes with input helpers access to the data of a Pod Item as the Pod class is now initiated with an $id
|
2048 |
+
* Fixed: api.php now requires manage_pods priv to run load_sister_fields action
|
2049 |
+
* Fixed: Menu now runs after most plugins to avoid conflicts
|
2050 |
+
* Fixed: Menu no longer shows to any user, checks access via Pod roles
|
2051 |
+
* Fixed: pod_query() now checks against FOUND_ROWS() instead of FOUND ROWS() to cache or not
|
2052 |
+
* Fixed: style.css now uses the .pods_admin and .pods_form class selectors for each style defined to avoid overwriting other element styles on a page
|
2053 |
+
* Removed: package.php has been removed from AJAX operations as code has been moved into PodAPI class
|
2054 |
+
|
2055 |
+
= 1.8.9 - July 7, 2010 =
|
2056 |
+
|
2057 |
+
* Changed: Minor UI changes
|
2058 |
+
* Changed: author_id now getting stored
|
2059 |
+
* Fixed: Add / Edit javascript fix
|
2060 |
+
|
2061 |
+
= 1.8.8 - May 23, 2010 =
|
2062 |
+
|
2063 |
+
* Fixed: bi-directional relationships
|
2064 |
+
|
2065 |
+
= 1.8.7 - April 16, 2010 =
|
2066 |
+
|
2067 |
+
* Fixed: error when editing a unique field
|
2068 |
+
* Fixed: API handling for drop_pod_item
|
2069 |
+
|
2070 |
+
= 1.8.6 - April 14, 2010 =
|
2071 |
+
|
2072 |
+
* Fixed: saving an empty pick column throws an error
|
2073 |
+
|
2074 |
+
= 1.8.5 - April 13, 2010 =
|
2075 |
+
|
2076 |
+
* Changed: save_pod_item improvements, see http://bit.ly/d4EWDM
|
2077 |
+
* Changed: proper PHPdoc commenting
|
2078 |
+
* Fixed: timezone issues
|
2079 |
+
* Added: ability to override pager var ($this->page_var)
|
2080 |
+
* Added: load_helper, load_pod, load_template, drop_helper, drop_pod, drop_template methods support the "name" field as well as the id
|
2081 |
+
* Added: load_page, drop_page methods support the "uri" field as well as the id
|
classes/Pods.php
CHANGED
@@ -806,9 +806,10 @@ class Pods implements Iterator {
|
|
806 |
}
|
807 |
|
808 |
// Store field info.
|
809 |
-
$field_type
|
810 |
-
$field_options
|
811 |
-
$is_tableless_field
|
|
|
812 |
|
813 |
// Simple fields have no other output options.
|
814 |
if ( 'pick' === $field_type && in_array( $field_data['pick_object'], $simple_tableless_objects, true ) ) {
|
@@ -949,9 +950,9 @@ class Pods implements Iterator {
|
|
949 |
}
|
950 |
}
|
951 |
|
952 |
-
if ( ! $is_traversal && ( $simple || ! $is_field_set || ! $is_tableless_field ) ) {
|
953 |
if ( null === $params->single ) {
|
954 |
-
if ( $is_field_set && ! $is_tableless_field ) {
|
955 |
$params->single = true;
|
956 |
} else {
|
957 |
$params->single = false;
|
@@ -992,10 +993,14 @@ class Pods implements Iterator {
|
|
992 |
$single_multi = 'single';
|
993 |
|
994 |
if ( $is_field_set ) {
|
995 |
-
|
|
|
|
|
|
|
|
|
996 |
}
|
997 |
|
998 |
-
if ( $simple && ! is_array( $value ) && 'single' !== $single_multi ) {
|
999 |
$value = get_metadata( $metadata_type, $id, $params->name );
|
1000 |
}
|
1001 |
} elseif ( 'settings' === $pod_type ) {
|
@@ -1050,11 +1055,12 @@ class Pods implements Iterator {
|
|
1050 |
}
|
1051 |
}//end if
|
1052 |
|
1053 |
-
$last_type
|
1054 |
-
$last_object
|
1055 |
-
$last_pick_val
|
1056 |
-
$last_options
|
1057 |
-
$last_object_options
|
|
|
1058 |
|
1059 |
$single_multi = pods_v( $field_type . '_format_type', $field_data, 'single' );
|
1060 |
|
@@ -1074,8 +1080,8 @@ class Pods implements Iterator {
|
|
1074 |
|
1075 |
$field_exists = isset( $all_fields[ $pod ][ $field ] );
|
1076 |
|
1077 |
-
$current_field
|
1078 |
-
$simple
|
1079 |
|
1080 |
if ( $field_exists ) {
|
1081 |
/** @var \Pods\Whatsit\Field $current_field */
|
@@ -1088,6 +1094,16 @@ class Pods implements Iterator {
|
|
1088 |
$simple = true;
|
1089 |
}
|
1090 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1091 |
}
|
1092 |
|
1093 |
// Tableless handler.
|
@@ -1188,6 +1204,8 @@ class Pods implements Iterator {
|
|
1188 |
} else {
|
1189 |
$table = $last_options->get_table_info();
|
1190 |
}
|
|
|
|
|
1191 |
}
|
1192 |
|
1193 |
$join = array();
|
@@ -1558,7 +1576,7 @@ class Pods implements Iterator {
|
|
1558 |
/** This filter is documented earlier in this method */
|
1559 |
$metadata_object_id = apply_filters( 'pods_pods_field_get_metadata_object_id', $metadata_object_id, $metadata_type, $params, $this );
|
1560 |
|
1561 |
-
$meta_value = get_metadata( $metadata_type, $metadata_object_id, $field,
|
1562 |
|
1563 |
$value[] = pods_traverse( $traverse_fields, $meta_value );
|
1564 |
} elseif ( 'settings' === $object_type ) {
|
@@ -1679,15 +1697,27 @@ class Pods implements Iterator {
|
|
1679 |
if ( $value_reset ) {
|
1680 |
$value = reset( $value );
|
1681 |
}
|
1682 |
-
} elseif ( 1 === (int) pods_v( 'display_process', $field_data, 1 ) ) {
|
1683 |
-
if (
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1687 |
// Attempt to process each value independently.
|
1688 |
foreach ( $value as $k => $val ) {
|
1689 |
$value[ $k ] = PodsForm::display( $field_data['type'], $val, $params->name, $field_data, $this->pod_data, $this->id() );
|
1690 |
}
|
|
|
|
|
|
|
1691 |
}
|
1692 |
}
|
1693 |
|
806 |
}
|
807 |
|
808 |
// Store field info.
|
809 |
+
$field_type = pods_v( 'type', $field_data, '' );
|
810 |
+
$field_options = $field_data;
|
811 |
+
$is_tableless_field = in_array( $field_type, $tableless_field_types, true );
|
812 |
+
$is_repeatable_field = $field_data instanceof Field && $field_data->is_repeatable();
|
813 |
|
814 |
// Simple fields have no other output options.
|
815 |
if ( 'pick' === $field_type && in_array( $field_data['pick_object'], $simple_tableless_objects, true ) ) {
|
950 |
}
|
951 |
}
|
952 |
|
953 |
+
if ( ! $is_traversal && ( $simple || $is_repeatable_field || ! $is_field_set || ! $is_tableless_field ) ) {
|
954 |
if ( null === $params->single ) {
|
955 |
+
if ( $is_field_set && ! $is_tableless_field && ! $is_repeatable_field ) {
|
956 |
$params->single = true;
|
957 |
} else {
|
958 |
$params->single = false;
|
993 |
$single_multi = 'single';
|
994 |
|
995 |
if ( $is_field_set ) {
|
996 |
+
if ( $is_repeatable_field ) {
|
997 |
+
$single_multi = 'multi';
|
998 |
+
} else {
|
999 |
+
$single_multi = pods_v( $field_type . '_format_type', $field_data, $single_multi );
|
1000 |
+
}
|
1001 |
}
|
1002 |
|
1003 |
+
if ( ( $simple || $is_repeatable_field ) && ! is_array( $value ) && 'single' !== $single_multi ) {
|
1004 |
$value = get_metadata( $metadata_type, $id, $params->name );
|
1005 |
}
|
1006 |
} elseif ( 'settings' === $pod_type ) {
|
1055 |
}
|
1056 |
}//end if
|
1057 |
|
1058 |
+
$last_type = '';
|
1059 |
+
$last_object = '';
|
1060 |
+
$last_pick_val = '';
|
1061 |
+
$last_options = [];
|
1062 |
+
$last_object_options = [];
|
1063 |
+
$last_is_repeatable_field = false;
|
1064 |
|
1065 |
$single_multi = pods_v( $field_type . '_format_type', $field_data, 'single' );
|
1066 |
|
1080 |
|
1081 |
$field_exists = isset( $all_fields[ $pod ][ $field ] );
|
1082 |
|
1083 |
+
$current_field = null;
|
1084 |
+
$simple = false;
|
1085 |
|
1086 |
if ( $field_exists ) {
|
1087 |
/** @var \Pods\Whatsit\Field $current_field */
|
1094 |
$simple = true;
|
1095 |
}
|
1096 |
}
|
1097 |
+
} elseif ( $last_options ) {
|
1098 |
+
$current_related_pod = $last_options->get_related_object();
|
1099 |
+
|
1100 |
+
if ( $current_related_pod ) {
|
1101 |
+
$current_related_pod_field = $current_related_pod->get_field( $field );
|
1102 |
+
|
1103 |
+
if ( $current_related_pod_field ) {
|
1104 |
+
$current_field = $current_related_pod_field;
|
1105 |
+
}
|
1106 |
+
}
|
1107 |
}
|
1108 |
|
1109 |
// Tableless handler.
|
1204 |
} else {
|
1205 |
$table = $last_options->get_table_info();
|
1206 |
}
|
1207 |
+
|
1208 |
+
$last_is_repeatable_field = $current_field instanceof Field && $current_field->is_repeatable();
|
1209 |
}
|
1210 |
|
1211 |
$join = array();
|
1576 |
/** This filter is documented earlier in this method */
|
1577 |
$metadata_object_id = apply_filters( 'pods_pods_field_get_metadata_object_id', $metadata_object_id, $metadata_type, $params, $this );
|
1578 |
|
1579 |
+
$meta_value = get_metadata( $metadata_type, $metadata_object_id, $field, ! $last_is_repeatable_field );
|
1580 |
|
1581 |
$value[] = pods_traverse( $traverse_fields, $meta_value );
|
1582 |
} elseif ( 'settings' === $object_type ) {
|
1697 |
if ( $value_reset ) {
|
1698 |
$value = reset( $value );
|
1699 |
}
|
1700 |
+
} elseif ( $is_repeatable_field || 1 === (int) pods_v( 'display_process', $field_data, 1 ) ) {
|
1701 |
+
if ( $is_repeatable_field && $value && ! is_array( $value ) ) {
|
1702 |
+
$value = [
|
1703 |
+
$value,
|
1704 |
+
];
|
1705 |
+
}
|
1706 |
+
|
1707 |
+
if (
|
1708 |
+
is_array( $value )
|
1709 |
+
&& (
|
1710 |
+
$is_repeatable_field
|
1711 |
+
|| $params->display_process_individually
|
1712 |
+
)
|
1713 |
+
) {
|
1714 |
// Attempt to process each value independently.
|
1715 |
foreach ( $value as $k => $val ) {
|
1716 |
$value[ $k ] = PodsForm::display( $field_data['type'], $val, $params->name, $field_data, $this->pod_data, $this->id() );
|
1717 |
}
|
1718 |
+
} else {
|
1719 |
+
// Do the normal display handling.
|
1720 |
+
$value = PodsForm::display( $field_data['type'], $value, $params->name, $field_data, $this->pod_data, $this->id() );
|
1721 |
}
|
1722 |
}
|
1723 |
|
classes/PodsAPI.php
CHANGED
@@ -269,12 +269,21 @@ class PodsAPI {
|
|
269 |
// Enforce boolean integer values.
|
270 |
$meta_value = pods_bool_to_int( $meta_value );
|
271 |
|
272 |
-
$simple
|
273 |
-
$is_single
|
|
|
274 |
|
275 |
if ( isset( $fields[ $meta_key ] ) ) {
|
276 |
$field_data = $fields[ $meta_key ];
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
$simple = ( 'pick' === pods_v( 'type', $field_data ) && in_array( pods_v( 'pick_object', $field_data ), $simple_tableless_objects, true ) );
|
279 |
|
280 |
if ( $simple ) {
|
@@ -283,7 +292,7 @@ class PodsAPI {
|
|
283 |
}
|
284 |
|
285 |
if ( null === $original_meta_value || ( $strict && '' === $original_meta_value ) ) {
|
286 |
-
if ( $simple ) {
|
287 |
delete_metadata( $meta_type, $id, $meta_key );
|
288 |
delete_metadata( $meta_type, $id, '_pods_' . $meta_key );
|
289 |
} else {
|
@@ -295,18 +304,20 @@ class PodsAPI {
|
|
295 |
|
296 |
delete_metadata( $meta_type, $id, $meta_key, $old_meta_value );
|
297 |
}
|
298 |
-
} elseif ( $simple ) {
|
299 |
delete_metadata( $meta_type, $id, $meta_key );
|
300 |
|
301 |
if ( ! is_array( $meta_value ) ) {
|
302 |
$meta_value = [ $meta_value ];
|
303 |
}
|
304 |
|
305 |
-
if ( $
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
|
|
|
|
310 |
}
|
311 |
|
312 |
foreach ( $meta_value as $value ) {
|
@@ -861,6 +872,7 @@ class PodsAPI {
|
|
861 |
'alias' => [ 'content' ],
|
862 |
'options' => [
|
863 |
'wysiwyg_allowed_html_tags' => '',
|
|
|
864 |
'display_filter' => 'the_content',
|
865 |
'pre_save' => 0,
|
866 |
],
|
@@ -2521,7 +2533,7 @@ class PodsAPI {
|
|
2521 |
}
|
2522 |
|
2523 |
// Skip if not using table storage.
|
2524 |
-
if ( isset( $pod['storage'] )
|
2525 |
return;
|
2526 |
}
|
2527 |
|
@@ -5030,7 +5042,7 @@ class PodsAPI {
|
|
5030 |
|
5031 |
$value = $field_data['value'];
|
5032 |
$type = $field_data['type'];
|
5033 |
-
$options = pods_v( 'options', $field_data, [] );
|
5034 |
|
5035 |
$field_object = $field_data;
|
5036 |
|
@@ -5042,6 +5054,12 @@ class PodsAPI {
|
|
5042 |
continue;
|
5043 |
}
|
5044 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5045 |
// WPML AJAX compatibility
|
5046 |
if (
|
5047 |
is_admin()
|
@@ -5062,8 +5080,21 @@ class PodsAPI {
|
|
5062 |
$options['required'] = 0;
|
5063 |
$fields[ $field ]['required'] = 0;
|
5064 |
} else {
|
5065 |
-
|
5066 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5067 |
|
5068 |
if ( false === $validate ) {
|
5069 |
$validate = sprintf( __( 'There was an issue validating the field %s', 'pods' ), $field_data['label'] );
|
@@ -5076,7 +5107,16 @@ class PodsAPI {
|
|
5076 |
}
|
5077 |
}
|
5078 |
|
5079 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5080 |
|
5081 |
$field_data['value'] = $value;
|
5082 |
|
@@ -5093,6 +5133,25 @@ class PodsAPI {
|
|
5093 |
$simple = ( 'pick' === $type && in_array( pods_v( 'pick_object', $field_data ), $simple_tableless_objects, true ) );
|
5094 |
$simple = (boolean) $this->do_hook( 'tableless_custom', $simple, $field_data, $field, $fields, $pod, $params );
|
5095 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5096 |
// Handle Simple Relationships
|
5097 |
if ( $simple ) {
|
5098 |
if ( ! is_array( $value ) ) {
|
@@ -5187,8 +5246,8 @@ class PodsAPI {
|
|
5187 |
}
|
5188 |
|
5189 |
// Prepare all table / meta data.
|
5190 |
-
if ( ! $is_tableless_field || $simple || $save_non_simple_to_table ) {
|
5191 |
-
if (
|
5192 |
// Don't save an empty array, just make it an empty string
|
5193 |
if ( empty( $value ) ) {
|
5194 |
$value = '';
|
@@ -5209,7 +5268,7 @@ class PodsAPI {
|
|
5209 |
$save_simple_to_meta = $simple && ( $is_settings_pod || pods_relationship_meta_storage_enabled_for_simple_relationships( $field_object, $pod ) );
|
5210 |
|
5211 |
// Check if we should save to the table, and then check if the field is not a simple relationship OR the simple relationship field is allowed to be saved to the table.
|
5212 |
-
if ( $save_to_table && ( ! $simple || $save_simple_to_table || $save_non_simple_to_table ) ) {
|
5213 |
$table_data[ $field ] = $value;
|
5214 |
|
5215 |
// Use pre-processed table save value if found.
|
@@ -5416,8 +5475,23 @@ class PodsAPI {
|
|
5416 |
|
5417 |
// Handle other save processes based on field type.
|
5418 |
foreach ( $fields_to_run_save as $field_name => $field_save_value ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5419 |
// Run save function for field type (where needed).
|
5420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5421 |
}
|
5422 |
|
5423 |
// Save relationship / file data
|
@@ -5677,8 +5751,11 @@ class PodsAPI {
|
|
5677 |
$v_data = false;
|
5678 |
|
5679 |
if ( false !== $find_rel_params ) {
|
5680 |
-
$rel_params
|
5681 |
-
|
|
|
|
|
|
|
5682 |
|
5683 |
$search_data->select( $rel_params );
|
5684 |
|
@@ -11320,10 +11397,10 @@ class PodsAPI {
|
|
11320 |
*/
|
11321 |
public function get_storage_types() {
|
11322 |
$storage_types = [
|
11323 |
-
'none'
|
11324 |
-
'
|
11325 |
-
'meta'
|
11326 |
-
'table'
|
11327 |
];
|
11328 |
|
11329 |
/**
|
269 |
// Enforce boolean integer values.
|
270 |
$meta_value = pods_bool_to_int( $meta_value );
|
271 |
|
272 |
+
$simple = false;
|
273 |
+
$is_single = false;
|
274 |
+
$is_repeatable_field = false;
|
275 |
|
276 |
if ( isset( $fields[ $meta_key ] ) ) {
|
277 |
$field_data = $fields[ $meta_key ];
|
278 |
|
279 |
+
$is_repeatable_field = (
|
280 |
+
(
|
281 |
+
$field_data instanceof Field
|
282 |
+
|| $field_data instanceof Value_Field
|
283 |
+
)
|
284 |
+
&& $field_data->is_repeatable()
|
285 |
+
);
|
286 |
+
|
287 |
$simple = ( 'pick' === pods_v( 'type', $field_data ) && in_array( pods_v( 'pick_object', $field_data ), $simple_tableless_objects, true ) );
|
288 |
|
289 |
if ( $simple ) {
|
292 |
}
|
293 |
|
294 |
if ( null === $original_meta_value || ( $strict && '' === $original_meta_value ) ) {
|
295 |
+
if ( $simple || $is_repeatable_field ) {
|
296 |
delete_metadata( $meta_type, $id, $meta_key );
|
297 |
delete_metadata( $meta_type, $id, '_pods_' . $meta_key );
|
298 |
} else {
|
304 |
|
305 |
delete_metadata( $meta_type, $id, $meta_key, $old_meta_value );
|
306 |
}
|
307 |
+
} elseif ( $simple || $is_repeatable_field ) {
|
308 |
delete_metadata( $meta_type, $id, $meta_key );
|
309 |
|
310 |
if ( ! is_array( $meta_value ) ) {
|
311 |
$meta_value = [ $meta_value ];
|
312 |
}
|
313 |
|
314 |
+
if ( ! $is_repeatable_field ) {
|
315 |
+
if ( $is_single ) {
|
316 |
+
// Delete it because it is not needed for single values.
|
317 |
+
delete_metadata( $meta_type, $id, '_pods_' . $meta_key );
|
318 |
+
} else {
|
319 |
+
update_metadata( $meta_type, $id, '_pods_' . $meta_key, $meta_value );
|
320 |
+
}
|
321 |
}
|
322 |
|
323 |
foreach ( $meta_value as $value ) {
|
872 |
'alias' => [ 'content' ],
|
873 |
'options' => [
|
874 |
'wysiwyg_allowed_html_tags' => '',
|
875 |
+
'wysiwyg_media_buttons' => 1,
|
876 |
'display_filter' => 'the_content',
|
877 |
'pre_save' => 0,
|
878 |
],
|
2533 |
}
|
2534 |
|
2535 |
// Skip if not using table storage.
|
2536 |
+
if ( ! isset( $pod['storage'] ) || 'table' !== $pod['storage'] ) {
|
2537 |
return;
|
2538 |
}
|
2539 |
|
5042 |
|
5043 |
$value = $field_data['value'];
|
5044 |
$type = $field_data['type'];
|
5045 |
+
$options = $field_data instanceof Value_Field ? $field_data->get_field_object() : pods_v( 'options', $field_data, [] );
|
5046 |
|
5047 |
$field_object = $field_data;
|
5048 |
|
5054 |
continue;
|
5055 |
}
|
5056 |
|
5057 |
+
$is_multi_repeatable_field = (
|
5058 |
+
is_array( $value )
|
5059 |
+
&& $options instanceof Field
|
5060 |
+
&& $options->is_repeatable()
|
5061 |
+
);
|
5062 |
+
|
5063 |
// WPML AJAX compatibility
|
5064 |
if (
|
5065 |
is_admin()
|
5080 |
$options['required'] = 0;
|
5081 |
$fields[ $field ]['required'] = 0;
|
5082 |
} else {
|
5083 |
+
if ( $is_multi_repeatable_field ) {
|
5084 |
+
// Handle repeatable field values (if an array was sent).
|
5085 |
+
foreach ( $value as $repeatable_value ) {
|
5086 |
+
// Validate value.
|
5087 |
+
$validate = $this->handle_field_validation( $repeatable_value, $field, $object_fields, $fields, $pod, $params );
|
5088 |
+
|
5089 |
+
// Maybe pass $validate to the logic later to show error message.
|
5090 |
+
if ( true !== $validate ) {
|
5091 |
+
break;
|
5092 |
+
}
|
5093 |
+
}
|
5094 |
+
} else {
|
5095 |
+
// Validate value
|
5096 |
+
$validate = $this->handle_field_validation( $value, $field, $object_fields, $fields, $pod, $params );
|
5097 |
+
}
|
5098 |
|
5099 |
if ( false === $validate ) {
|
5100 |
$validate = sprintf( __( 'There was an issue validating the field %s', 'pods' ), $field_data['label'] );
|
5107 |
}
|
5108 |
}
|
5109 |
|
5110 |
+
$merged_fields = pods_config_merge_fields( $fields, $object_fields );
|
5111 |
+
|
5112 |
+
if ( $is_multi_repeatable_field ) {
|
5113 |
+
// Handle repeatable field values (if an array was sent).
|
5114 |
+
foreach ( $value as $k => $repeatable_value ) {
|
5115 |
+
$value[ $k ] = PodsForm::pre_save( $field_data['type'], $repeatable_value, $params->id, $field, $field_data, $merged_fields, $pod, $params );
|
5116 |
+
}
|
5117 |
+
} else {
|
5118 |
+
$value = PodsForm::pre_save( $field_data['type'], $value, $params->id, $field, $field_data, $merged_fields, $pod, $params );
|
5119 |
+
}
|
5120 |
|
5121 |
$field_data['value'] = $value;
|
5122 |
|
5133 |
$simple = ( 'pick' === $type && in_array( pods_v( 'pick_object', $field_data ), $simple_tableless_objects, true ) );
|
5134 |
$simple = (boolean) $this->do_hook( 'tableless_custom', $simple, $field_data, $field, $fields, $pod, $params );
|
5135 |
|
5136 |
+
$is_repeatable_field = (
|
5137 |
+
(
|
5138 |
+
(
|
5139 |
+
$field_data instanceof Field
|
5140 |
+
|| $field_data instanceof Value_Field
|
5141 |
+
)
|
5142 |
+
&& $field_data->is_repeatable()
|
5143 |
+
)
|
5144 |
+
|| (
|
5145 |
+
is_array( $field_data )
|
5146 |
+
&& in_array( $type, $repeatable_field_types, true )
|
5147 |
+
&& 1 === (int) pods_v( 'repeatable', $field_data )
|
5148 |
+
&& (
|
5149 |
+
'wysiwyg' !== $type
|
5150 |
+
|| 'tinymce' !== pods_v( 'wysiwyg_editor', $field_data, 'tinymce', true )
|
5151 |
+
)
|
5152 |
+
)
|
5153 |
+
);
|
5154 |
+
|
5155 |
// Handle Simple Relationships
|
5156 |
if ( $simple ) {
|
5157 |
if ( ! is_array( $value ) ) {
|
5246 |
}
|
5247 |
|
5248 |
// Prepare all table / meta data.
|
5249 |
+
if ( $is_repeatable_field || ! $is_tableless_field || $simple || $save_non_simple_to_table ) {
|
5250 |
+
if ( $is_repeatable_field ) {
|
5251 |
// Don't save an empty array, just make it an empty string
|
5252 |
if ( empty( $value ) ) {
|
5253 |
$value = '';
|
5268 |
$save_simple_to_meta = $simple && ( $is_settings_pod || pods_relationship_meta_storage_enabled_for_simple_relationships( $field_object, $pod ) );
|
5269 |
|
5270 |
// Check if we should save to the table, and then check if the field is not a simple relationship OR the simple relationship field is allowed to be saved to the table.
|
5271 |
+
if ( $save_to_table && ! $is_repeatable_field && ( ! $simple || $save_simple_to_table || $save_non_simple_to_table ) ) {
|
5272 |
$table_data[ $field ] = $value;
|
5273 |
|
5274 |
// Use pre-processed table save value if found.
|
5475 |
|
5476 |
// Handle other save processes based on field type.
|
5477 |
foreach ( $fields_to_run_save as $field_name => $field_save_value ) {
|
5478 |
+
$field_obj = $fields[ $field_name ];
|
5479 |
+
|
5480 |
+
$is_multi_repeatable_field = (
|
5481 |
+
is_array( $field_save_value )
|
5482 |
+
&& $field_obj instanceof Field
|
5483 |
+
&& $field_obj->is_repeatable()
|
5484 |
+
);
|
5485 |
+
|
5486 |
// Run save function for field type (where needed).
|
5487 |
+
if ( $is_multi_repeatable_field ) {
|
5488 |
+
// Handle repeatable field values (if an array was sent).
|
5489 |
+
foreach ( $field_save_value as $k => $repeatable_value ) {
|
5490 |
+
PodsForm::save( $field_obj['type'], $repeatable_value, $params->id, $field_name, $field_obj, $all_fields, $pod, $params );
|
5491 |
+
}
|
5492 |
+
} else {
|
5493 |
+
PodsForm::save( $field_obj['type'], $field_save_value, $params->id, $field_name, $field_obj, $all_fields, $pod, $params );
|
5494 |
+
}
|
5495 |
}
|
5496 |
|
5497 |
// Save relationship / file data
|
5751 |
$v_data = false;
|
5752 |
|
5753 |
if ( false !== $find_rel_params ) {
|
5754 |
+
$rel_params = $find_rel_params;
|
5755 |
+
|
5756 |
+
$prepared_data = array_fill( 0, substr_count( $rel_params['where'], '%s' ), $v );
|
5757 |
+
|
5758 |
+
$rel_params['where'] = $wpdb->prepare( $rel_params['where'], $prepared_data );
|
5759 |
|
5760 |
$search_data->select( $rel_params );
|
5761 |
|
11397 |
*/
|
11398 |
public function get_storage_types() {
|
11399 |
$storage_types = [
|
11400 |
+
'none' => _x( 'None (No Fields)', 'storage type label', 'pods' ),
|
11401 |
+
'option' => _x( 'Options', 'storage type label', 'pods' ),
|
11402 |
+
'meta' => _x( 'Meta', 'storage type label', 'pods' ),
|
11403 |
+
'table' => _x( 'Table', 'storage type label', 'pods' ),
|
11404 |
];
|
11405 |
|
11406 |
/**
|
classes/PodsAdmin.php
CHANGED
@@ -917,15 +917,28 @@ class PodsAdmin {
|
|
917 |
|
918 |
$row = false;
|
919 |
|
920 |
-
$pod_types_found =
|
|
|
|
|
921 |
|
922 |
$include_row_counts = filter_var( pods_v( 'pods_include_row_counts' ), FILTER_VALIDATE_BOOLEAN );
|
923 |
$include_row_counts_refresh = filter_var( pods_v( 'pods_include_row_counts_refresh' ), FILTER_VALIDATE_BOOLEAN );
|
924 |
|
925 |
$fields = [
|
926 |
-
'label' => [
|
927 |
-
|
928 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
929 |
'storage' => [
|
930 |
'label' => __( 'Storage Type', 'pods' ),
|
931 |
'width' => '10%',
|
@@ -940,11 +953,6 @@ class PodsAdmin {
|
|
940 |
],
|
941 |
];
|
942 |
|
943 |
-
// Do not show Groups/Fields if in types-only mode.
|
944 |
-
if ( pods_is_types_only() ) {
|
945 |
-
unset( $fields['group_count'], $fields['field_count'] );
|
946 |
-
}
|
947 |
-
|
948 |
if ( $include_row_counts ) {
|
949 |
$fields['row_count'] = [
|
950 |
'label' => __( 'Data Rows', 'pods' ),
|
@@ -982,6 +990,9 @@ class PodsAdmin {
|
|
982 |
|
983 |
$is_tableless = pods_tableless();
|
984 |
|
|
|
|
|
|
|
985 |
foreach ( $pods as $k => $pod ) {
|
986 |
$pod_type = $pod['type'];
|
987 |
$pod_type_label = null;
|
@@ -1000,7 +1011,11 @@ class PodsAdmin {
|
|
1000 |
}
|
1001 |
|
1002 |
if ( 'settings' === $pod_type ) {
|
1003 |
-
$pod_storage = '
|
|
|
|
|
|
|
|
|
1004 |
}
|
1005 |
|
1006 |
if ( isset( $pod_types[ $pod_type ] ) ) {
|
@@ -1011,8 +1026,8 @@ class PodsAdmin {
|
|
1011 |
|
1012 |
$storage_type_label = ucwords( $pod_storage );
|
1013 |
|
1014 |
-
if ( isset( $storage_types[ $
|
1015 |
-
$storage_type_label = $storage_types[ $
|
1016 |
}
|
1017 |
|
1018 |
if ( null !== $pod_type_label ) {
|
@@ -1047,11 +1062,6 @@ class PodsAdmin {
|
|
1047 |
continue;
|
1048 |
}//end if
|
1049 |
|
1050 |
-
// @codingStandardsIgnoreLine
|
1051 |
-
if ( 'delete' !== pods_v( 'action' ) && $pod['id'] === (int) pods_v( 'id' ) ) {
|
1052 |
-
$row = $pod;
|
1053 |
-
}
|
1054 |
-
|
1055 |
$group_count = 0;
|
1056 |
$field_count = 0;
|
1057 |
$row_count = 0;
|
@@ -1097,14 +1107,81 @@ class PodsAdmin {
|
|
1097 |
}
|
1098 |
}
|
1099 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1100 |
$pod = [
|
1101 |
-
'id'
|
1102 |
-
'label'
|
1103 |
-
'name'
|
1104 |
-
'object'
|
1105 |
-
'type'
|
1106 |
-
'real_type'
|
1107 |
-
'storage'
|
|
|
|
|
1108 |
];
|
1109 |
|
1110 |
if ( ! pods_is_types_only() ) {
|
@@ -1136,9 +1213,46 @@ class PodsAdmin {
|
|
1136 |
}
|
1137 |
}
|
1138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1139 |
$pod_list[] = $pod;
|
1140 |
}//end foreach
|
1141 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1142 |
if ( false === $row && 0 < pods_v( 'id' ) && 'delete' !== pods_v( 'action' ) ) {
|
1143 |
pods_message( 'Pod not found', 'error' );
|
1144 |
|
@@ -1173,6 +1287,8 @@ class PodsAdmin {
|
|
1173 |
);
|
1174 |
}
|
1175 |
|
|
|
|
|
1176 |
$ui = [
|
1177 |
'data' => $pod_list,
|
1178 |
'row' => $row,
|
@@ -1187,15 +1303,20 @@ class PodsAdmin {
|
|
1187 |
'field_id' => 'id',
|
1188 |
'field_index' => 'label',
|
1189 |
],
|
1190 |
-
'actions_disabled' => [ 'view', 'export', 'delete' ],
|
1191 |
'actions_custom' => [
|
1192 |
-
'add'
|
1193 |
-
'edit'
|
1194 |
-
|
|
|
|
|
|
|
|
|
1195 |
'callback' => [ $this, 'admin_setup_duplicate' ],
|
1196 |
'restrict_callback' => [ $this, 'admin_setup_duplicate_restrict' ],
|
|
|
1197 |
],
|
1198 |
-
'
|
1199 |
'label' => __( 'Delete All Items', 'pods' ),
|
1200 |
'confirm' => __( 'Are you sure you want to delete all items from this Pod? If this is an extended Pod, it will remove the original items extended too.', 'pods' ),
|
1201 |
'callback' => [ $this, 'admin_setup_reset' ],
|
@@ -1203,22 +1324,33 @@ class PodsAdmin {
|
|
1203 |
'nonce' => true,
|
1204 |
'span_class' => 'delete',
|
1205 |
],
|
1206 |
-
'delete_pod'
|
1207 |
-
'label'
|
1208 |
-
'confirm'
|
1209 |
-
'callback'
|
1210 |
-
'
|
1211 |
-
'
|
|
|
1212 |
],
|
1213 |
],
|
1214 |
-
'action_links'
|
1215 |
-
'add'
|
1216 |
'page' => 'pods-add-new',
|
1217 |
'action' => '',
|
1218 |
'id' => '',
|
1219 |
'do' => '',
|
1220 |
'_wpnonce' => '',
|
1221 |
] ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1222 |
],
|
1223 |
'search' => false,
|
1224 |
'searchable' => false,
|
@@ -1236,7 +1368,22 @@ class PodsAdmin {
|
|
1236 |
$ui['filters_enhanced'] = true;
|
1237 |
|
1238 |
foreach ( $pod_types_found as $pod_type => $number_found ) {
|
1239 |
-
$ui['views'][ $pod_type ] =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1240 |
}
|
1241 |
}
|
1242 |
|
@@ -1375,7 +1522,7 @@ class PodsAdmin {
|
|
1375 |
public function admin_setup_edit( $duplicate, $obj ) {
|
1376 |
$api = pods_api();
|
1377 |
|
1378 |
-
$pod = $obj->row;
|
1379 |
|
1380 |
if ( ! $pod instanceof Pod ) {
|
1381 |
$obj->id = null;
|
@@ -1511,7 +1658,7 @@ class PodsAdmin {
|
|
1511 |
}
|
1512 |
|
1513 |
if ( 'settings' === $config['currentPod']['type'] ) {
|
1514 |
-
$config['currentPod']['storageType']['name'] = '
|
1515 |
}
|
1516 |
|
1517 |
$config['currentPod']['storageType']['label'] = ucwords( $config['currentPod']['storageType']['name'] );
|
@@ -1536,6 +1683,27 @@ class PodsAdmin {
|
|
1536 |
pods_view( PODS_DIR . 'ui/admin/setup-edit.php', compact( array_keys( get_defined_vars() ) ) );
|
1537 |
}
|
1538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1539 |
/**
|
1540 |
* Get list of field related objects.
|
1541 |
*
|
@@ -1938,7 +2106,7 @@ class PodsAdmin {
|
|
1938 |
* @param PodsUI $obj PodsUI object.
|
1939 |
*/
|
1940 |
public function admin_setup_duplicate( $obj ) {
|
1941 |
-
$new_id = pods_api()->duplicate_pod( array( '
|
1942 |
|
1943 |
if ( 0 < $new_id ) {
|
1944 |
pods_redirect(
|
@@ -1947,6 +2115,7 @@ class PodsAdmin {
|
|
1947 |
'action' => 'edit',
|
1948 |
'id' => $new_id,
|
1949 |
'do' => 'duplicate',
|
|
|
1950 |
)
|
1951 |
)
|
1952 |
);
|
@@ -1971,7 +2140,6 @@ class PodsAdmin {
|
|
1971 |
* @return bool
|
1972 |
*/
|
1973 |
public function admin_setup_duplicate_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
1974 |
-
|
1975 |
if ( in_array(
|
1976 |
$row['real_type'], array(
|
1977 |
'user',
|
@@ -1983,26 +2151,23 @@ class PodsAdmin {
|
|
1983 |
}
|
1984 |
|
1985 |
return $restricted;
|
1986 |
-
|
1987 |
}
|
1988 |
|
1989 |
/**
|
1990 |
* Reset a pod
|
1991 |
*
|
1992 |
-
* @param PodsUI
|
1993 |
-
* @param int|string $id Item ID.
|
1994 |
*
|
1995 |
* @return mixed
|
1996 |
*/
|
1997 |
-
public function admin_setup_reset( $obj
|
1998 |
-
|
1999 |
-
$pod = pods_api()->load_pod( array( 'id' => $id ), false );
|
2000 |
|
2001 |
if ( empty( $pod ) ) {
|
2002 |
return $obj->error( __( 'Pod not found.', 'pods' ) );
|
2003 |
}
|
2004 |
|
2005 |
-
pods_api()->reset_pod( array( '
|
2006 |
|
2007 |
$obj->message( __( 'Pod reset successfully.', 'pods' ) );
|
2008 |
|
@@ -2021,7 +2186,6 @@ class PodsAdmin {
|
|
2021 |
* @since 2.3.10
|
2022 |
*/
|
2023 |
public function admin_setup_reset_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
2024 |
-
|
2025 |
if ( in_array(
|
2026 |
$row['real_type'], array(
|
2027 |
'user',
|
@@ -2032,7 +2196,6 @@ class PodsAdmin {
|
|
2032 |
}
|
2033 |
|
2034 |
return $restricted;
|
2035 |
-
|
2036 |
}
|
2037 |
|
2038 |
/**
|
@@ -2067,6 +2230,27 @@ class PodsAdmin {
|
|
2067 |
$obj->manage();
|
2068 |
}
|
2069 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2070 |
/**
|
2071 |
* Get advanced administration view.
|
2072 |
*/
|
@@ -3217,4 +3401,56 @@ class PodsAdmin {
|
|
3217 |
return $tests;
|
3218 |
}
|
3219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3220 |
}
|
917 |
|
918 |
$row = false;
|
919 |
|
920 |
+
$pod_types_found = [];
|
921 |
+
$sources_found = [];
|
922 |
+
$source_types = [];
|
923 |
|
924 |
$include_row_counts = filter_var( pods_v( 'pods_include_row_counts' ), FILTER_VALIDATE_BOOLEAN );
|
925 |
$include_row_counts_refresh = filter_var( pods_v( 'pods_include_row_counts_refresh' ), FILTER_VALIDATE_BOOLEAN );
|
926 |
|
927 |
$fields = [
|
928 |
+
'label' => [
|
929 |
+
'label' => __( 'Label', 'pods' ),
|
930 |
+
],
|
931 |
+
'name' => [
|
932 |
+
'label' => __( 'Name', 'pods' ),
|
933 |
+
],
|
934 |
+
'type' => [
|
935 |
+
'label' => __( 'Type', 'pods' ),
|
936 |
+
],
|
937 |
+
'source' => [
|
938 |
+
'label' => __( 'Source', 'pods' ),
|
939 |
+
'width' => '10%',
|
940 |
+
'type' => 'raw',
|
941 |
+
],
|
942 |
'storage' => [
|
943 |
'label' => __( 'Storage Type', 'pods' ),
|
944 |
'width' => '10%',
|
953 |
],
|
954 |
];
|
955 |
|
|
|
|
|
|
|
|
|
|
|
956 |
if ( $include_row_counts ) {
|
957 |
$fields['row_count'] = [
|
958 |
'label' => __( 'Data Rows', 'pods' ),
|
990 |
|
991 |
$is_tableless = pods_tableless();
|
992 |
|
993 |
+
$has_source = false;
|
994 |
+
$has_storage_type = false;
|
995 |
+
|
996 |
foreach ( $pods as $k => $pod ) {
|
997 |
$pod_type = $pod['type'];
|
998 |
$pod_type_label = null;
|
1011 |
}
|
1012 |
|
1013 |
if ( 'settings' === $pod_type ) {
|
1014 |
+
$pod_storage = 'option';
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
if ( 'meta' !== $pod_storage ) {
|
1018 |
+
$has_storage_type = true;
|
1019 |
}
|
1020 |
|
1021 |
if ( isset( $pod_types[ $pod_type ] ) ) {
|
1026 |
|
1027 |
$storage_type_label = ucwords( $pod_storage );
|
1028 |
|
1029 |
+
if ( isset( $storage_types[ $pod_storage ] ) ) {
|
1030 |
+
$storage_type_label = $storage_types[ $pod_storage ];
|
1031 |
}
|
1032 |
|
1033 |
if ( null !== $pod_type_label ) {
|
1062 |
continue;
|
1063 |
}//end if
|
1064 |
|
|
|
|
|
|
|
|
|
|
|
1065 |
$group_count = 0;
|
1066 |
$field_count = 0;
|
1067 |
$row_count = 0;
|
1107 |
}
|
1108 |
}
|
1109 |
|
1110 |
+
$object_storage_type = $pod->get_object_storage_type();
|
1111 |
+
$source = $pod->get_object_storage_type_label();
|
1112 |
+
|
1113 |
+
if ( $source ) {
|
1114 |
+
$source_types[ $object_storage_type ] = $source;
|
1115 |
+
|
1116 |
+
if ( ! isset( $sources_found[ $object_storage_type ] ) ) {
|
1117 |
+
$sources_found[ $object_storage_type ] = 1;
|
1118 |
+
} else {
|
1119 |
+
$sources_found[ $object_storage_type ] ++;
|
1120 |
+
}
|
1121 |
+
}
|
1122 |
+
|
1123 |
+
$source = esc_html( $source );
|
1124 |
+
|
1125 |
+
if ( 'post_type' !== $object_storage_type ) {
|
1126 |
+
$has_source = true;
|
1127 |
+
|
1128 |
+
if ( 'file' === $object_storage_type ) {
|
1129 |
+
$file_source = $pod->get_arg( '_pods_file_source' );
|
1130 |
+
|
1131 |
+
if ( $file_source ) {
|
1132 |
+
if ( 0 === strpos( $file_source, ABSPATH ) ) {
|
1133 |
+
$file_source = str_replace( ABSPATH, '', $file_source );
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
ob_start();
|
1137 |
+
|
1138 |
+
pods_help(
|
1139 |
+
sprintf(
|
1140 |
+
'<strong>%s:</strong> %s',
|
1141 |
+
esc_html__( 'File source', 'pods' ),
|
1142 |
+
esc_html( $file_source )
|
1143 |
+
),
|
1144 |
+
null,
|
1145 |
+
'.pods-admin-container'
|
1146 |
+
);
|
1147 |
+
|
1148 |
+
$source .= ' ' . ob_get_clean();
|
1149 |
+
}
|
1150 |
+
} elseif ( 'collection' === $object_storage_type ) {
|
1151 |
+
$code_source = $pod->get_arg( '_pods_code_source' );
|
1152 |
+
|
1153 |
+
if ( $code_source ) {
|
1154 |
+
if ( 0 === strpos( $code_source, ABSPATH ) ) {
|
1155 |
+
$code_source = str_replace( ABSPATH, '', $code_source );
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
ob_start();
|
1159 |
+
|
1160 |
+
pods_help(
|
1161 |
+
sprintf(
|
1162 |
+
'<strong>%s:</strong> %s',
|
1163 |
+
esc_html__( 'Code source', 'pods' ),
|
1164 |
+
esc_html( $code_source )
|
1165 |
+
),
|
1166 |
+
null,
|
1167 |
+
'.pods-admin-container'
|
1168 |
+
);
|
1169 |
+
|
1170 |
+
$source .= ' ' . ob_get_clean();
|
1171 |
+
}
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
|
1175 |
$pod = [
|
1176 |
+
'id' => $pod['id'],
|
1177 |
+
'label' => $pod['label'],
|
1178 |
+
'name' => $pod['name'],
|
1179 |
+
'object' => $pod['object'],
|
1180 |
+
'type' => $pod_type,
|
1181 |
+
'real_type' => $pod_real_type,
|
1182 |
+
'storage' => $storage_type_label,
|
1183 |
+
'source' => $source,
|
1184 |
+
'pod_object' => $pod,
|
1185 |
];
|
1186 |
|
1187 |
if ( ! pods_is_types_only() ) {
|
1213 |
}
|
1214 |
}
|
1215 |
|
1216 |
+
// @codingStandardsIgnoreLine
|
1217 |
+
if ( 'manage' !== pods_v( 'action' ) ) {
|
1218 |
+
$found_id = (int) pods_v( 'id' );
|
1219 |
+
$found_name = pods_v( 'name' );
|
1220 |
+
|
1221 |
+
if (
|
1222 |
+
(
|
1223 |
+
$found_id
|
1224 |
+
&& $pod['id'] === $found_id
|
1225 |
+
)
|
1226 |
+
|| (
|
1227 |
+
$found_name
|
1228 |
+
&& $pod['name'] === $found_name
|
1229 |
+
)
|
1230 |
+
) {
|
1231 |
+
$row = $pod;
|
1232 |
+
}
|
1233 |
+
}
|
1234 |
+
|
1235 |
$pod_list[] = $pod;
|
1236 |
}//end foreach
|
1237 |
|
1238 |
+
if ( ! $has_storage_type ) {
|
1239 |
+
unset( $fields['storage'] );
|
1240 |
+
}
|
1241 |
+
|
1242 |
+
if ( ! $has_source ) {
|
1243 |
+
unset( $fields['source'] );
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
if (
|
1247 |
+
(
|
1248 |
+
0 === $total_groups
|
1249 |
+
&& 0 === $total_fields
|
1250 |
+
)
|
1251 |
+
|| pods_is_types_only()
|
1252 |
+
) {
|
1253 |
+
unset( $fields['group_count'], $fields['field_count'] );
|
1254 |
+
}
|
1255 |
+
|
1256 |
if ( false === $row && 0 < pods_v( 'id' ) && 'delete' !== pods_v( 'action' ) ) {
|
1257 |
pods_message( 'Pod not found', 'error' );
|
1258 |
|
1287 |
);
|
1288 |
}
|
1289 |
|
1290 |
+
$pod_list = wp_list_sort( $pod_list, 'label', 'ASC', true );
|
1291 |
+
|
1292 |
$ui = [
|
1293 |
'data' => $pod_list,
|
1294 |
'row' => $row,
|
1303 |
'field_id' => 'id',
|
1304 |
'field_index' => 'label',
|
1305 |
],
|
1306 |
+
'actions_disabled' => [ 'view', 'export', 'delete', 'duplicate' ],
|
1307 |
'actions_custom' => [
|
1308 |
+
'add' => [ $this, 'admin_setup_add' ],
|
1309 |
+
'edit' => [
|
1310 |
+
'callback' => [ $this, 'admin_setup_edit' ],
|
1311 |
+
'restrict_callback' => [ $this, 'admin_setup_edit_restrict' ],
|
1312 |
+
],
|
1313 |
+
'duplicate_pod' => [
|
1314 |
+
'label' => __( 'Duplicate', 'pods' ),
|
1315 |
'callback' => [ $this, 'admin_setup_duplicate' ],
|
1316 |
'restrict_callback' => [ $this, 'admin_setup_duplicate_restrict' ],
|
1317 |
+
'nonce' => true,
|
1318 |
],
|
1319 |
+
'reset_pod' => [
|
1320 |
'label' => __( 'Delete All Items', 'pods' ),
|
1321 |
'confirm' => __( 'Are you sure you want to delete all items from this Pod? If this is an extended Pod, it will remove the original items extended too.', 'pods' ),
|
1322 |
'callback' => [ $this, 'admin_setup_reset' ],
|
1324 |
'nonce' => true,
|
1325 |
'span_class' => 'delete',
|
1326 |
],
|
1327 |
+
'delete_pod' => [
|
1328 |
+
'label' => __( 'Delete', 'pods' ),
|
1329 |
+
'confirm' => __( 'Are you sure you want to delete this Pod? All of the content and items will remain in the database, you may want to Delete All Items first.', 'pods' ),
|
1330 |
+
'callback' => [ $this, 'admin_setup_delete' ],
|
1331 |
+
'restrict_callback' => [ $this, 'admin_setup_delete_restrict' ],
|
1332 |
+
'nonce' => true,
|
1333 |
+
'span_class' => 'delete',
|
1334 |
],
|
1335 |
],
|
1336 |
+
'action_links' => [
|
1337 |
+
'add' => pods_query_arg( [
|
1338 |
'page' => 'pods-add-new',
|
1339 |
'action' => '',
|
1340 |
'id' => '',
|
1341 |
'do' => '',
|
1342 |
'_wpnonce' => '',
|
1343 |
] ),
|
1344 |
+
'duplicate_pod' => pods_query_arg( [
|
1345 |
+
'action' => 'duplicate_pod',
|
1346 |
+
'id' => '{@id}',
|
1347 |
+
'name' => '{@name}',
|
1348 |
+
] ),
|
1349 |
+
'reset_pod' => pods_query_arg( [
|
1350 |
+
'action' => 'reset_pod',
|
1351 |
+
'id' => '{@id}',
|
1352 |
+
'name' => '{@name}',
|
1353 |
+
] ),
|
1354 |
],
|
1355 |
'search' => false,
|
1356 |
'searchable' => false,
|
1368 |
$ui['filters_enhanced'] = true;
|
1369 |
|
1370 |
foreach ( $pod_types_found as $pod_type => $number_found ) {
|
1371 |
+
$ui['views'][ $pod_type ] = sprintf(
|
1372 |
+
'%1$s (%2$s)',
|
1373 |
+
$pod_types[ $pod_type ],
|
1374 |
+
number_format_i18n( $number_found )
|
1375 |
+
);
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
if ( $has_source && 1 < count( $sources_found ) ) {
|
1379 |
+
foreach ( $sources_found as $source_type => $number_found ) {
|
1380 |
+
$ui['views'][ 'source/' . $source_type ] = sprintf(
|
1381 |
+
'%1$s: %2$s (%3$s)',
|
1382 |
+
__( 'Source', 'pods' ),
|
1383 |
+
$source_types[ $source_type ],
|
1384 |
+
$number_found
|
1385 |
+
);
|
1386 |
+
}
|
1387 |
}
|
1388 |
}
|
1389 |
|
1522 |
public function admin_setup_edit( $duplicate, $obj ) {
|
1523 |
$api = pods_api();
|
1524 |
|
1525 |
+
$pod = $obj->row['pod_object'];
|
1526 |
|
1527 |
if ( ! $pod instanceof Pod ) {
|
1528 |
$obj->id = null;
|
1658 |
}
|
1659 |
|
1660 |
if ( 'settings' === $config['currentPod']['type'] ) {
|
1661 |
+
$config['currentPod']['storageType']['name'] = 'option';
|
1662 |
}
|
1663 |
|
1664 |
$config['currentPod']['storageType']['label'] = ucwords( $config['currentPod']['storageType']['name'] );
|
1683 |
pods_view( PODS_DIR . 'ui/admin/setup-edit.php', compact( array_keys( get_defined_vars() ) ) );
|
1684 |
}
|
1685 |
|
1686 |
+
/**
|
1687 |
+
* Restrict Edit action.
|
1688 |
+
*
|
1689 |
+
* @param bool $restricted Whether action is restricted.
|
1690 |
+
* @param array $restrict Restriction array.
|
1691 |
+
* @param string $action Current action.
|
1692 |
+
* @param array $row Item data row.
|
1693 |
+
* @param PodsUI $obj PodsUI object.
|
1694 |
+
*
|
1695 |
+
* @since 2.3.10
|
1696 |
+
*
|
1697 |
+
* @return bool
|
1698 |
+
*/
|
1699 |
+
public function admin_setup_edit_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
1700 |
+
if ( __( 'DB', 'pods' ) !== $row['source'] ) {
|
1701 |
+
$restricted = true;
|
1702 |
+
}
|
1703 |
+
|
1704 |
+
return $restricted;
|
1705 |
+
}
|
1706 |
+
|
1707 |
/**
|
1708 |
* Get list of field related objects.
|
1709 |
*
|
2106 |
* @param PodsUI $obj PodsUI object.
|
2107 |
*/
|
2108 |
public function admin_setup_duplicate( $obj ) {
|
2109 |
+
$new_id = pods_api()->duplicate_pod( array( 'name' => $obj->row['name'] ) );
|
2110 |
|
2111 |
if ( 0 < $new_id ) {
|
2112 |
pods_redirect(
|
2115 |
'action' => 'edit',
|
2116 |
'id' => $new_id,
|
2117 |
'do' => 'duplicate',
|
2118 |
+
'name' => null,
|
2119 |
)
|
2120 |
)
|
2121 |
);
|
2140 |
* @return bool
|
2141 |
*/
|
2142 |
public function admin_setup_duplicate_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
|
|
2143 |
if ( in_array(
|
2144 |
$row['real_type'], array(
|
2145 |
'user',
|
2151 |
}
|
2152 |
|
2153 |
return $restricted;
|
|
|
2154 |
}
|
2155 |
|
2156 |
/**
|
2157 |
* Reset a pod
|
2158 |
*
|
2159 |
+
* @param PodsUI $obj PodsUI object.
|
|
|
2160 |
*
|
2161 |
* @return mixed
|
2162 |
*/
|
2163 |
+
public function admin_setup_reset( $obj ) {
|
2164 |
+
$pod = pods_api()->load_pod( array( 'name' => $obj->row['name'] ), false );
|
|
|
2165 |
|
2166 |
if ( empty( $pod ) ) {
|
2167 |
return $obj->error( __( 'Pod not found.', 'pods' ) );
|
2168 |
}
|
2169 |
|
2170 |
+
pods_api()->reset_pod( array( 'name' => $obj->row['name'] ) );
|
2171 |
|
2172 |
$obj->message( __( 'Pod reset successfully.', 'pods' ) );
|
2173 |
|
2186 |
* @since 2.3.10
|
2187 |
*/
|
2188 |
public function admin_setup_reset_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
|
|
2189 |
if ( in_array(
|
2190 |
$row['real_type'], array(
|
2191 |
'user',
|
2196 |
}
|
2197 |
|
2198 |
return $restricted;
|
|
|
2199 |
}
|
2200 |
|
2201 |
/**
|
2230 |
$obj->manage();
|
2231 |
}
|
2232 |
|
2233 |
+
/**
|
2234 |
+
* Restrict Delete action.
|
2235 |
+
*
|
2236 |
+
* @param bool $restricted Whether action is restricted.
|
2237 |
+
* @param array $restrict Restriction array.
|
2238 |
+
* @param string $action Current action.
|
2239 |
+
* @param array $row Item data row.
|
2240 |
+
* @param PodsUI $obj PodsUI object.
|
2241 |
+
*
|
2242 |
+
* @since 2.3.10
|
2243 |
+
*
|
2244 |
+
* @return bool
|
2245 |
+
*/
|
2246 |
+
public function admin_setup_delete_restrict( $restricted, $restrict, $action, $row, $obj ) {
|
2247 |
+
if ( __( 'DB', 'pods' ) !== $row['source'] ) {
|
2248 |
+
$restricted = true;
|
2249 |
+
}
|
2250 |
+
|
2251 |
+
return $restricted;
|
2252 |
+
}
|
2253 |
+
|
2254 |
/**
|
2255 |
* Get advanced administration view.
|
2256 |
*/
|
3401 |
return $tests;
|
3402 |
}
|
3403 |
|
3404 |
+
/**
|
3405 |
+
* Check whether the requirements were met and maybe display error messages.
|
3406 |
+
*
|
3407 |
+
* @since 2.9.0
|
3408 |
+
*
|
3409 |
+
* @param array $requirements List of requirements.
|
3410 |
+
*
|
3411 |
+
* @return bool Whether the requirements were met.
|
3412 |
+
*/
|
3413 |
+
public function check_requirements( array $requirements ) {
|
3414 |
+
foreach ( $requirements as $requirement ) {
|
3415 |
+
// Check if requirement passed.
|
3416 |
+
if ( $requirement['check'] ) {
|
3417 |
+
continue;
|
3418 |
+
}
|
3419 |
+
|
3420 |
+
// Show admin notice if there's a message to be shown.
|
3421 |
+
if ( ! empty( $requirement['message'] ) && $this->should_show_notices() ) {
|
3422 |
+
pods_message( $requirement['message'], 'error' );
|
3423 |
+
}
|
3424 |
+
|
3425 |
+
return false;
|
3426 |
+
}
|
3427 |
+
|
3428 |
+
return true;
|
3429 |
+
}
|
3430 |
+
|
3431 |
+
/**
|
3432 |
+
* Check whether we should show notices.
|
3433 |
+
*
|
3434 |
+
* @since 2.9.0
|
3435 |
+
*
|
3436 |
+
* @return bool Whether we should show notices.
|
3437 |
+
*/
|
3438 |
+
public function should_show_notices() {
|
3439 |
+
global $pagenow;
|
3440 |
+
|
3441 |
+
// We only show notices on admin pages.
|
3442 |
+
if ( ! is_admin() ) {
|
3443 |
+
return false;
|
3444 |
+
}
|
3445 |
+
|
3446 |
+
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
3447 |
+
|
3448 |
+
// We only show on the plugins.php page or on Pods Admin pages.
|
3449 |
+
if ( ( 'plugins.php' !== $pagenow && 0 !== strpos( $page, 'pods' ) ) || 0 === strpos( $page, 'pods-content' ) ) {
|
3450 |
+
return false;
|
3451 |
+
}
|
3452 |
+
|
3453 |
+
return true;
|
3454 |
+
}
|
3455 |
+
|
3456 |
}
|
classes/PodsComponents.php
CHANGED
@@ -838,12 +838,7 @@ class PodsComponents {
|
|
838 |
* @param array $settings Component settings.
|
839 |
*/
|
840 |
public function update_settings( $settings ) {
|
841 |
-
|
842 |
-
if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
|
843 |
-
$settings = wp_json_encode( $settings, JSON_UNESCAPED_UNICODE );
|
844 |
-
} else {
|
845 |
-
$settings = wp_json_encode( $settings );
|
846 |
-
}
|
847 |
|
848 |
update_option( 'pods_component_settings', $settings );
|
849 |
|
838 |
* @param array $settings Component settings.
|
839 |
*/
|
840 |
public function update_settings( $settings ) {
|
841 |
+
$settings = wp_json_encode( $settings, JSON_UNESCAPED_UNICODE );
|
|
|
|
|
|
|
|
|
|
|
842 |
|
843 |
update_option( 'pods_component_settings', $settings );
|
844 |
|
classes/PodsData.php
CHANGED
@@ -2040,8 +2040,8 @@ class PodsData {
|
|
2040 |
$mode = 'id';
|
2041 |
$id = pods_absint( $row );
|
2042 |
|
2043 |
-
if ( ! is_numeric( $row ) || 0 === strpos( $row, '0' ) || (string) $row !== (string) preg_replace( '/[^0-9]/', '', $row ) ) {
|
2044 |
-
if ( $this->id && is_numeric( $this->id ) ) {
|
2045 |
$id = $this->id;
|
2046 |
} else {
|
2047 |
$mode = 'slug';
|
2040 |
$mode = 'id';
|
2041 |
$id = pods_absint( $row );
|
2042 |
|
2043 |
+
if ( null !== $row && ( ! is_numeric( $row ) || 0 === strpos( $row, '0' ) || (string) $row !== (string) preg_replace( '/[^0-9]/', '', $row ) ) ) {
|
2044 |
+
if ( 'settings' === $this->pod_data['type'] || ( $this->id && is_numeric( $this->id ) ) ) {
|
2045 |
$id = $this->id;
|
2046 |
} else {
|
2047 |
$mode = 'slug';
|
classes/PodsField.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
use Pods\Whatsit\Field;
|
4 |
use Pods\Whatsit\Pod;
|
|
|
5 |
use Pod as Pod_Deprecated;
|
6 |
|
7 |
/**
|
@@ -574,6 +575,11 @@ class PodsField {
|
|
574 |
public function build_dfv_field_config( $args ) {
|
575 |
if ( $args->options instanceof Field ) {
|
576 |
$config = $args->options->export();
|
|
|
|
|
|
|
|
|
|
|
577 |
} else {
|
578 |
$config = (array) $args->options;
|
579 |
}
|
@@ -972,6 +978,53 @@ class PodsField {
|
|
972 |
return trim( $value );
|
973 |
}
|
974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
975 |
/**
|
976 |
* Placeholder function to allow var_export() use with classes.
|
977 |
*
|
2 |
|
3 |
use Pods\Whatsit\Field;
|
4 |
use Pods\Whatsit\Pod;
|
5 |
+
use Pods\Whatsit\Value_Field;
|
6 |
use Pod as Pod_Deprecated;
|
7 |
|
8 |
/**
|
575 |
public function build_dfv_field_config( $args ) {
|
576 |
if ( $args->options instanceof Field ) {
|
577 |
$config = $args->options->export();
|
578 |
+
|
579 |
+
$config['repeatable'] = $args->options->is_repeatable();
|
580 |
+
$config['repeatable_add_new_label'] = $args->options->get_arg( 'repeatable_add_new_label', __( 'Add New', 'pods' ), true );
|
581 |
+
$config['repeatable_reorder'] = filter_var( $args->options->get_arg( 'repeatable_reorder', true ), FILTER_VALIDATE_BOOLEAN );
|
582 |
+
$config['repeatable_limit'] = $args->options->get_limit();
|
583 |
} else {
|
584 |
$config = (array) $args->options;
|
585 |
}
|
978 |
return trim( $value );
|
979 |
}
|
980 |
|
981 |
+
/**
|
982 |
+
* Normalize the field value for the input.
|
983 |
+
*
|
984 |
+
* @param mixed $value The field value.
|
985 |
+
* @param Field|array $field The field object or the field options array.
|
986 |
+
* @param string $separator The separator to use if the field does not support multiple values.
|
987 |
+
*
|
988 |
+
* @return mixed The field normalized value.
|
989 |
+
*/
|
990 |
+
public function normalize_value_for_input( $value, $field, $separator = ' ' ) {
|
991 |
+
if (
|
992 |
+
(
|
993 |
+
(
|
994 |
+
$field instanceof Field
|
995 |
+
|| $field instanceof Value_Field
|
996 |
+
)
|
997 |
+
&& $field->is_repeatable()
|
998 |
+
)
|
999 |
+
|| (
|
1000 |
+
is_array( $field )
|
1001 |
+
&& 1 === (int) pods_v( 'repeatable', $field )
|
1002 |
+
&& (
|
1003 |
+
'wysiwyg' !== pods_v( 'type', $field )
|
1004 |
+
|| 'tinymce' !== pods_v( 'wysiwyg_editor', $field, 'tinymce', true )
|
1005 |
+
)
|
1006 |
+
)
|
1007 |
+
) {
|
1008 |
+
if ( ! is_array( $value ) ) {
|
1009 |
+
if ( '' === $value || null === $value ) {
|
1010 |
+
$value = [
|
1011 |
+
'',
|
1012 |
+
];
|
1013 |
+
} else {
|
1014 |
+
$value = (array) $value;
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
return $value;
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
if ( ! is_array( $value ) ) {
|
1022 |
+
return $value;
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
return implode( $separator, $value );
|
1026 |
+
}
|
1027 |
+
|
1028 |
/**
|
1029 |
* Placeholder function to allow var_export() use with classes.
|
1030 |
*
|
classes/PodsForm.php
CHANGED
@@ -221,8 +221,6 @@ class PodsForm {
|
|
221 |
$value = apply_filters( "pods_form_ui_field_{$type}_value", $value, $name, $options, $pod, $id );
|
222 |
$form_field_type = self::$field_type;
|
223 |
|
224 |
-
ob_start();
|
225 |
-
|
226 |
$helper = false;
|
227 |
|
228 |
/**
|
@@ -246,6 +244,9 @@ class PodsForm {
|
|
246 |
$data = $options['data'];
|
247 |
}
|
248 |
|
|
|
|
|
|
|
249 |
/**
|
250 |
* pods_form_ui_field_{$type}_override filter leaves too much to be done by developer.
|
251 |
*
|
@@ -1008,8 +1009,27 @@ class PodsForm {
|
|
1008 |
|
1009 |
self::field_loader( $type );
|
1010 |
|
1011 |
-
|
1012 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1013 |
$simple = @json_decode( $value, true );
|
1014 |
|
1015 |
if ( is_array( $simple ) ) {
|
@@ -1018,7 +1038,7 @@ class PodsForm {
|
|
1018 |
$value = (array) $value;
|
1019 |
}
|
1020 |
} else {
|
1021 |
-
$value =
|
1022 |
}
|
1023 |
}
|
1024 |
|
@@ -1734,14 +1754,15 @@ class PodsForm {
|
|
1734 |
|
1735 |
if ( null === $field_types ) {
|
1736 |
$field_types = [
|
1737 |
-
'code',
|
1738 |
'color',
|
1739 |
'currency',
|
1740 |
'date',
|
1741 |
'datetime',
|
1742 |
'email',
|
1743 |
'number',
|
|
|
1744 |
'paragraph',
|
|
|
1745 |
'phone',
|
1746 |
'text',
|
1747 |
'time',
|
221 |
$value = apply_filters( "pods_form_ui_field_{$type}_value", $value, $name, $options, $pod, $id );
|
222 |
$form_field_type = self::$field_type;
|
223 |
|
|
|
|
|
224 |
$helper = false;
|
225 |
|
226 |
/**
|
244 |
$data = $options['data'];
|
245 |
}
|
246 |
|
247 |
+
// Start field render.
|
248 |
+
ob_start();
|
249 |
+
|
250 |
/**
|
251 |
* pods_form_ui_field_{$type}_override filter leaves too much to be done by developer.
|
252 |
*
|
1009 |
|
1010 |
self::field_loader( $type );
|
1011 |
|
1012 |
+
$is_repeatable_field = (
|
1013 |
+
(
|
1014 |
+
(
|
1015 |
+
$options instanceof Field
|
1016 |
+
|| $options instanceof Value_Field
|
1017 |
+
)
|
1018 |
+
&& $options->is_repeatable()
|
1019 |
+
)
|
1020 |
+
|| (
|
1021 |
+
is_array( $options )
|
1022 |
+
&& in_array( $type, self::repeatable_field_types(), true )
|
1023 |
+
&& 1 === (int) pods_v( 'repeatable', $options )
|
1024 |
+
&& (
|
1025 |
+
'wysiwyg' !== $type
|
1026 |
+
|| 'tinymce' !== pods_v( 'wysiwyg_editor', $options, 'tinymce', true )
|
1027 |
+
)
|
1028 |
+
)
|
1029 |
+
);
|
1030 |
+
|
1031 |
+
if ( $is_repeatable_field && ! is_array( $value ) ) {
|
1032 |
+
if ( is_string( $value ) && 0 < strlen( $value ) ) {
|
1033 |
$simple = @json_decode( $value, true );
|
1034 |
|
1035 |
if ( is_array( $simple ) ) {
|
1038 |
$value = (array) $value;
|
1039 |
}
|
1040 |
} else {
|
1041 |
+
$value = [];
|
1042 |
}
|
1043 |
}
|
1044 |
|
1754 |
|
1755 |
if ( null === $field_types ) {
|
1756 |
$field_types = [
|
|
|
1757 |
'color',
|
1758 |
'currency',
|
1759 |
'date',
|
1760 |
'datetime',
|
1761 |
'email',
|
1762 |
'number',
|
1763 |
+
'oembed',
|
1764 |
'paragraph',
|
1765 |
+
'password',
|
1766 |
'phone',
|
1767 |
'text',
|
1768 |
'time',
|
classes/PodsInit.php
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
<?php
|
2 |
|
|
|
3 |
use Pods\Static_Cache;
|
4 |
use Pods\Whatsit\Pod;
|
5 |
use Pods\Wisdom_Tracker;
|
@@ -1199,6 +1200,9 @@ class PodsInit {
|
|
1199 |
$args = self::object_label_fix( $args, 'post_type' );
|
1200 |
|
1201 |
register_post_type( '_pods_field', apply_filters( 'pods_internal_register_post_type_field', $args ) );
|
|
|
|
|
|
|
1202 |
}
|
1203 |
|
1204 |
/**
|
@@ -1286,6 +1290,10 @@ class PodsInit {
|
|
1286 |
|
1287 |
$save_transient = ! did_action( 'pods_init' ) && ( doing_action( 'init' ) || did_action( 'init' ) );
|
1288 |
|
|
|
|
|
|
|
|
|
1289 |
$post_types = PodsMeta::$post_types;
|
1290 |
$taxonomies = PodsMeta::$taxonomies;
|
1291 |
|
@@ -1842,7 +1850,8 @@ class PodsInit {
|
|
1842 |
}
|
1843 |
|
1844 |
if ( 1 === (int) pods_v( 'pods_debug_register_export', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
|
1845 |
-
echo '<
|
|
|
1846 |
}
|
1847 |
|
1848 |
register_taxonomy( $taxonomy, $ct_post_types, $options );
|
@@ -1894,7 +1903,8 @@ class PodsInit {
|
|
1894 |
}
|
1895 |
|
1896 |
if ( 1 === (int) pods_v( 'pods_debug_register_export', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
|
1897 |
-
echo '<
|
|
|
1898 |
}
|
1899 |
|
1900 |
register_post_type( $post_type, $options );
|
@@ -2536,6 +2546,7 @@ class PodsInit {
|
|
2536 |
tribe_register_provider( \Pods\Blocks\Service_Provider::class );
|
2537 |
tribe_register_provider( \Pods\Integrations\Service_Provider::class );
|
2538 |
tribe_register_provider( \Pods\REST\V1\Service_Provider::class );
|
|
|
2539 |
|
2540 |
// Add WP-CLI commands.
|
2541 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
1 |
<?php
|
2 |
|
3 |
+
use Pods\Config_Handler;
|
4 |
use Pods\Static_Cache;
|
5 |
use Pods\Whatsit\Pod;
|
6 |
use Pods\Wisdom_Tracker;
|
1200 |
$args = self::object_label_fix( $args, 'post_type' );
|
1201 |
|
1202 |
register_post_type( '_pods_field', apply_filters( 'pods_internal_register_post_type_field', $args ) );
|
1203 |
+
|
1204 |
+
$config_handler = pods_container( Config_Handler::class );
|
1205 |
+
$config_handler->setup();
|
1206 |
}
|
1207 |
|
1208 |
/**
|
1290 |
|
1291 |
$save_transient = ! did_action( 'pods_init' ) && ( doing_action( 'init' ) || did_action( 'init' ) );
|
1292 |
|
1293 |
+
if ( $save_transient ) {
|
1294 |
+
PodsMeta::enqueue();
|
1295 |
+
}
|
1296 |
+
|
1297 |
$post_types = PodsMeta::$post_types;
|
1298 |
$taxonomies = PodsMeta::$taxonomies;
|
1299 |
|
1850 |
}
|
1851 |
|
1852 |
if ( 1 === (int) pods_v( 'pods_debug_register_export', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
|
1853 |
+
echo '<h3>' . esc_html( $taxonomy ) . '</h3>';
|
1854 |
+
echo '<textarea rows="15" style="width:100%">' . esc_textarea( 'register_taxonomy( ' . var_export( $taxonomy, true ) . ', ' . var_export( $ct_post_types, true ) . ', ' . var_export( $options, true ) . ' );' ) . '</textarea>';
|
1855 |
}
|
1856 |
|
1857 |
register_taxonomy( $taxonomy, $ct_post_types, $options );
|
1903 |
}
|
1904 |
|
1905 |
if ( 1 === (int) pods_v( 'pods_debug_register_export', 'get', 0 ) && pods_is_admin( array( 'pods' ) ) ) {
|
1906 |
+
echo '<h3>' . esc_html( $post_type ) . '</h3>';
|
1907 |
+
echo '<textarea rows="15" style="width:100%">' . esc_textarea( 'register_post_type( ' . var_export( $post_type, true ) . ', ' . var_export( $options, true ) . ' );' ) . '</textarea>';
|
1908 |
}
|
1909 |
|
1910 |
register_post_type( $post_type, $options );
|
2546 |
tribe_register_provider( \Pods\Blocks\Service_Provider::class );
|
2547 |
tribe_register_provider( \Pods\Integrations\Service_Provider::class );
|
2548 |
tribe_register_provider( \Pods\REST\V1\Service_Provider::class );
|
2549 |
+
tribe_register_provider( \Pods\Integrations\WPGraphQL\Service_Provider::class );
|
2550 |
|
2551 |
// Add WP-CLI commands.
|
2552 |
if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
classes/PodsMeta.php
CHANGED
@@ -241,13 +241,22 @@ class PodsMeta {
|
|
241 |
*
|
242 |
*/
|
243 |
public static function enqueue() {
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
foreach ( self::$queue as $type => $objects ) {
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
248 |
}
|
249 |
|
250 |
-
|
251 |
}
|
252 |
}
|
253 |
|
@@ -1486,6 +1495,8 @@ class PodsMeta {
|
|
1486 |
|
1487 |
$meta_nonce = PodsForm::field( 'pods_meta', wp_create_nonce( 'pods_meta_media' ), 'hidden' );
|
1488 |
|
|
|
|
|
1489 |
foreach ( $groups as $group ) {
|
1490 |
if ( empty( $group['fields'] ) ) {
|
1491 |
continue;
|
@@ -1499,8 +1510,6 @@ class PodsMeta {
|
|
1499 |
$pod = $this->maybe_set_up_pod( $group['pod']['name'], $id, 'media' );
|
1500 |
}
|
1501 |
|
1502 |
-
$did_init = false;
|
1503 |
-
|
1504 |
foreach ( $group['fields'] as $field ) {
|
1505 |
if ( ! pods_permission( $field ) ) {
|
1506 |
if ( ! pods_var( 'hidden', $field, false ) ) {
|
@@ -3611,11 +3620,13 @@ class PodsMeta {
|
|
3611 |
|
3612 |
// Return first created by Pods, save extended for later
|
3613 |
foreach ( $objects as $pod ) {
|
3614 |
-
|
|
|
|
|
3615 |
$recheck[] = $pod;
|
3616 |
}
|
3617 |
|
3618 |
-
if ( '' === $
|
3619 |
return $pod;
|
3620 |
}
|
3621 |
}
|
241 |
*
|
242 |
*/
|
243 |
public static function enqueue() {
|
244 |
+
$type_map = [
|
245 |
+
'post_type' => 'post_types',
|
246 |
+
'taxonomies' => 'taxonomies',
|
247 |
+
'setting' => 'settings',
|
248 |
+
];
|
249 |
|
250 |
foreach ( self::$queue as $type => $objects ) {
|
251 |
+
if ( isset( $type_map[ $type ] ) ) {
|
252 |
+
$type = $type_map[ $type ];
|
253 |
+
}
|
254 |
+
|
255 |
+
foreach ( $objects as $name => $object ) {
|
256 |
+
self::${$type}[ $name ] = $object;
|
257 |
}
|
258 |
|
259 |
+
unset( self::$queue[ $type ] );
|
260 |
}
|
261 |
}
|
262 |
|
1495 |
|
1496 |
$meta_nonce = PodsForm::field( 'pods_meta', wp_create_nonce( 'pods_meta_media' ), 'hidden' );
|
1497 |
|
1498 |
+
$did_init = false;
|
1499 |
+
|
1500 |
foreach ( $groups as $group ) {
|
1501 |
if ( empty( $group['fields'] ) ) {
|
1502 |
continue;
|
1510 |
$pod = $this->maybe_set_up_pod( $group['pod']['name'], $id, 'media' );
|
1511 |
}
|
1512 |
|
|
|
|
|
1513 |
foreach ( $group['fields'] as $field ) {
|
1514 |
if ( ! pods_permission( $field ) ) {
|
1515 |
if ( ! pods_var( 'hidden', $field, false ) ) {
|
3620 |
|
3621 |
// Return first created by Pods, save extended for later
|
3622 |
foreach ( $objects as $pod ) {
|
3623 |
+
$pod_object = pods_v( 'object', $pod );
|
3624 |
+
|
3625 |
+
if ( $object_name === $pod_object ) {
|
3626 |
$recheck[] = $pod;
|
3627 |
}
|
3628 |
|
3629 |
+
if ( '' === $pod_object && $object_name === $pod['name'] ) {
|
3630 |
return $pod;
|
3631 |
}
|
3632 |
}
|
classes/PodsUI.php
CHANGED
@@ -4171,7 +4171,17 @@ class PodsUI {
|
|
4171 |
*/
|
4172 |
$row_value = apply_filters( 'pods_ui_field_display_value', $row_value, $field, $attributes, $row, $this );
|
4173 |
|
4174 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4175 |
$link = pods_query_arg(
|
4176 |
array(
|
4177 |
$this->num_prefix . 'action' . $this->num => 'edit',
|
4171 |
*/
|
4172 |
$row_value = apply_filters( 'pods_ui_field_display_value', $row_value, $field, $attributes, $row, $this );
|
4173 |
|
4174 |
+
if (
|
4175 |
+
'edit' === $default_action
|
4176 |
+
&& ! in_array( 'edit', $this->actions_disabled, true )
|
4177 |
+
&& ! in_array( 'edit', $this->actions_hidden, true )
|
4178 |
+
&& (
|
4179 |
+
false === $reorder
|
4180 |
+
|| in_array( 'reorder', $this->actions_disabled, true )
|
4181 |
+
|| false === $this->reorder['on']
|
4182 |
+
)
|
4183 |
+
&& ! $this->restricted( 'edit', $row )
|
4184 |
+
) {
|
4185 |
$link = pods_query_arg(
|
4186 |
array(
|
4187 |
$this->num_prefix . 'action' . $this->num => 'edit',
|
classes/fields/code.php
CHANGED
@@ -42,15 +42,6 @@ class PodsField_Code extends PodsField {
|
|
42 |
public function options() {
|
43 |
|
44 |
$options = array(
|
45 |
-
static::$type . '_repeatable' => array(
|
46 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
47 |
-
'default' => 0,
|
48 |
-
'type' => 'boolean',
|
49 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
50 |
-
'boolean_yes_label' => '',
|
51 |
-
'dependency' => true,
|
52 |
-
'developer_mode' => true,
|
53 |
-
),
|
54 |
'output_options' => array(
|
55 |
'label' => __( 'Output Options', 'pods' ),
|
56 |
'type' => 'boolean_group',
|
@@ -116,9 +107,7 @@ class PodsField_Code extends PodsField {
|
|
116 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
117 |
$form_field_type = PodsForm::$field_type;
|
118 |
|
119 |
-
|
120 |
-
$value = implode( "\n", $value );
|
121 |
-
}
|
122 |
|
123 |
$field_type = 'codemirror';
|
124 |
|
42 |
public function options() {
|
43 |
|
44 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
'output_options' => array(
|
46 |
'label' => __( 'Output Options', 'pods' ),
|
47 |
'type' => 'boolean_group',
|
107 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
108 |
$form_field_type = PodsForm::$field_type;
|
109 |
|
110 |
+
$value = $this->normalize_value_for_input( $value, $options, "\n" );
|
|
|
|
|
111 |
|
112 |
$field_type = 'codemirror';
|
113 |
|
classes/fields/color.php
CHANGED
@@ -34,15 +34,6 @@ class PodsField_Color extends PodsField {
|
|
34 |
public function options() {
|
35 |
|
36 |
$options = array(
|
37 |
-
static::$type . '_repeatable' => array(
|
38 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
39 |
-
'default' => 0,
|
40 |
-
'type' => 'boolean',
|
41 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
42 |
-
'boolean_yes_label' => '',
|
43 |
-
'dependency' => true,
|
44 |
-
'developer_mode' => true,
|
45 |
-
),
|
46 |
static::$type . '_select_label' => array(
|
47 |
'label' => __( 'Select Color Label', 'pods' ),
|
48 |
'placeholder' => __( 'Select Color', 'pods' ),
|
@@ -78,9 +69,7 @@ class PodsField_Color extends PodsField {
|
|
78 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
79 |
$form_field_type = PodsForm::$field_type;
|
80 |
|
81 |
-
|
82 |
-
$value = implode( ' ', $value );
|
83 |
-
}
|
84 |
|
85 |
// WP Color Picker for 3.5+
|
86 |
$field_type = 'color';
|
34 |
public function options() {
|
35 |
|
36 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
static::$type . '_select_label' => array(
|
38 |
'label' => __( 'Select Color Label', 'pods' ),
|
39 |
'placeholder' => __( 'Select Color', 'pods' ),
|
69 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
70 |
$form_field_type = PodsForm::$field_type;
|
71 |
|
72 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
73 |
|
74 |
// WP Color Picker for 3.5+
|
75 |
$field_type = 'color';
|
classes/fields/currency.php
CHANGED
@@ -60,15 +60,6 @@ class PodsField_Currency extends PodsField_Number {
|
|
60 |
}
|
61 |
|
62 |
$options = array(
|
63 |
-
static::$type . '_repeatable' => array(
|
64 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
65 |
-
'default' => 0,
|
66 |
-
'type' => 'boolean',
|
67 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
68 |
-
'boolean_yes_label' => '',
|
69 |
-
'dependency' => true,
|
70 |
-
'developer_mode' => true,
|
71 |
-
),
|
72 |
static::$type . '_format_type' => array(
|
73 |
'label' => __( 'Input Type', 'pods' ),
|
74 |
'default' => 'number',
|
60 |
}
|
61 |
|
62 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
static::$type . '_format_type' => array(
|
64 |
'label' => __( 'Input Type', 'pods' ),
|
65 |
'default' => 'number',
|
classes/fields/date.php
CHANGED
@@ -50,15 +50,6 @@ class PodsField_Date extends PodsField_DateTime {
|
|
50 |
public function options() {
|
51 |
|
52 |
$options = array(
|
53 |
-
static::$type . '_repeatable' => array(
|
54 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
55 |
-
'default' => 0,
|
56 |
-
'type' => 'boolean',
|
57 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
58 |
-
'boolean_yes_label' => '',
|
59 |
-
'dependency' => true,
|
60 |
-
'developer_mode' => true,
|
61 |
-
),
|
62 |
static::$type . '_type' => array(
|
63 |
'label' => __( 'Date Format Type', 'pods' ),
|
64 |
'default' => 'format',
|
50 |
public function options() {
|
51 |
|
52 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
static::$type . '_type' => array(
|
54 |
'label' => __( 'Date Format Type', 'pods' ),
|
55 |
'default' => 'format',
|
classes/fields/datetime.php
CHANGED
@@ -59,15 +59,6 @@ class PodsField_DateTime extends PodsField {
|
|
59 |
public function options() {
|
60 |
|
61 |
$options = array(
|
62 |
-
static::$type . '_repeatable' => array(
|
63 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
64 |
-
'default' => 0,
|
65 |
-
'type' => 'boolean',
|
66 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
67 |
-
'boolean_yes_label' => '',
|
68 |
-
'dependency' => true,
|
69 |
-
'developer_mode' => true,
|
70 |
-
),
|
71 |
static::$type . '_type' => array(
|
72 |
'label' => __( 'Date Format Type', 'pods' ),
|
73 |
'default' => 'format',
|
@@ -289,9 +280,7 @@ class PodsField_DateTime extends PodsField {
|
|
289 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
290 |
$form_field_type = PodsForm::$field_type;
|
291 |
|
292 |
-
|
293 |
-
$value = implode( ' ', $value );
|
294 |
-
}
|
295 |
|
296 |
// @todo Remove? Format Value (done in field template).
|
297 |
//$value = $this->format_value_display( $value, $options, true );
|
59 |
public function options() {
|
60 |
|
61 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
static::$type . '_type' => array(
|
63 |
'label' => __( 'Date Format Type', 'pods' ),
|
64 |
'default' => 'format',
|
280 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
281 |
$form_field_type = PodsForm::$field_type;
|
282 |
|
283 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
284 |
|
285 |
// @todo Remove? Format Value (done in field template).
|
286 |
//$value = $this->format_value_display( $value, $options, true );
|
classes/fields/email.php
CHANGED
@@ -40,15 +40,6 @@ class PodsField_Email extends PodsField {
|
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
43 |
-
static::$type . '_repeatable' => array(
|
44 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
45 |
-
'default' => 0,
|
46 |
-
'type' => 'boolean',
|
47 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
48 |
-
'boolean_yes_label' => '',
|
49 |
-
'dependency' => true,
|
50 |
-
'developer_mode' => true,
|
51 |
-
),
|
52 |
static::$type . '_max_length' => array(
|
53 |
'label' => __( 'Maximum Length', 'pods' ),
|
54 |
'default' => 255,
|
@@ -98,9 +89,7 @@ class PodsField_Email extends PodsField {
|
|
98 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
99 |
$form_field_type = PodsForm::$field_type;
|
100 |
|
101 |
-
|
102 |
-
$value = implode( ' ', $value );
|
103 |
-
}
|
104 |
|
105 |
$field_type = 'email';
|
106 |
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
static::$type . '_max_length' => array(
|
44 |
'label' => __( 'Maximum Length', 'pods' ),
|
45 |
'default' => 255,
|
89 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
90 |
$form_field_type = PodsForm::$field_type;
|
91 |
|
92 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
93 |
|
94 |
$field_type = 'email';
|
95 |
|
classes/fields/file.php
CHANGED
@@ -1,5 +1,7 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
/**
|
4 |
* @package Pods\Fields
|
5 |
*/
|
@@ -95,6 +97,45 @@ class PodsField_File extends PodsField {
|
|
95 |
'pick_show_select_text' => 0,
|
96 |
'dependency' => true,
|
97 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
static::$type . '_attachment_tab' => array(
|
99 |
'label' => __( 'Media Library Default Tab', 'pods' ),
|
100 |
'depends-on' => array( static::$type . '_uploader' => 'attachment' ),
|
@@ -169,36 +210,15 @@ class PodsField_File extends PodsField {
|
|
169 |
'text_placeholder' => '10MB',
|
170 |
'type' => 'text',
|
171 |
),
|
172 |
-
static::$type . '_type' => array(
|
173 |
-
'label' => __( 'Restrict File Types', 'pods' ),
|
174 |
-
'default' => apply_filters( "pods_form_ui_field_{$type}_type_default", 'images' ),
|
175 |
-
'type' => 'pick',
|
176 |
-
'data' => apply_filters(
|
177 |
-
"pods_form_ui_field_{$type}_type_options",
|
178 |
-
array(
|
179 |
-
'images' => __( 'Images (jpg, jpeg, png, gif)', 'pods' ),
|
180 |
-
'video' => __( 'Video (mpg, mov, flv, mp4, etc..)', 'pods' ),
|
181 |
-
'audio' => __( 'Audio (mp3, m4a, wav, wma, etc..)', 'pods' ),
|
182 |
-
'text' => __( 'Text (txt, csv, tsv, rtx, etc..)', 'pods' ),
|
183 |
-
'any' => __( 'Any Type (no restriction)', 'pods' ),
|
184 |
-
'other' => __( 'Other (customize allowed extensions)', 'pods' ),
|
185 |
-
)
|
186 |
-
),
|
187 |
-
'pick_show_select_text' => 0,
|
188 |
-
'dependency' => true,
|
189 |
-
),
|
190 |
-
static::$type . '_allowed_extensions' => array(
|
191 |
-
'label' => __( 'Allowed File Extensions', 'pods' ),
|
192 |
-
'description' => __( 'Separate file extensions with a comma (ex. jpg,png,mp4,mov). This only applies to the file uploader, media library selection will continue to fallback to the mime-type group like Images, Video, etc.', 'pods' ),
|
193 |
-
'depends-on' => array( static::$type . '_type' => 'other' ),
|
194 |
-
'default' => apply_filters( "pods_form_ui_field_{$type}_extensions_default", '' ),
|
195 |
-
'text_placeholder' => 'jpg,png,mp4,mov',
|
196 |
-
'type' => 'text',
|
197 |
-
),
|
198 |
static::$type . '_field_template' => array(
|
199 |
'label' => __( 'List Style', 'pods' ),
|
200 |
'help' => __( 'You can choose which style you would like the files to appear within the form.', 'pods' ),
|
201 |
-
'depends-on' => array(
|
|
|
|
|
|
|
|
|
|
|
202 |
'default' => apply_filters( "pods_form_ui_field_{$type}_template_default", 'rows' ),
|
203 |
'type' => 'pick',
|
204 |
'data' => apply_filters(
|
@@ -232,7 +252,12 @@ class PodsField_File extends PodsField {
|
|
232 |
static::$type . '_wp_gallery_output' => array(
|
233 |
'label' => __( 'Output as a WP Gallery', 'pods' ),
|
234 |
'help' => sprintf( __( '<a href="%s" target="_blank" rel="noopener noreferrer">Click here for more info</a>', 'pods' ), 'https://wordpress.org/support/article/inserting-images-into-posts-and-pages/' ),
|
235 |
-
'depends-on' =>
|
|
|
|
|
|
|
|
|
|
|
236 |
'dependency' => true,
|
237 |
'type' => 'boolean',
|
238 |
),
|
@@ -418,7 +443,7 @@ class PodsField_File extends PodsField {
|
|
418 |
$options[ $args->type . '_type' ] = $limit_file_type;
|
419 |
|
420 |
// Non-image file types are forced to rows template right now.
|
421 |
-
if ( 'images'
|
422 |
$file_field_template = 'rows';
|
423 |
}
|
424 |
|
@@ -437,88 +462,16 @@ class PodsField_File extends PodsField {
|
|
437 |
|
438 |
$options[ $args->type . '_limit' ] = $file_limit;
|
439 |
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
$limit_extensions = 'jpg,jpeg,png,gif';
|
444 |
-
} elseif ( 'video' === $limit_file_type ) {
|
445 |
-
$limit_types = 'video';
|
446 |
-
$limit_extensions = 'mpg,mov,flv,mp4';
|
447 |
-
} elseif ( 'audio' === $limit_file_type ) {
|
448 |
-
$limit_types = 'audio';
|
449 |
-
$limit_extensions = 'mp3,m4a,wav,wma';
|
450 |
-
} elseif ( 'text' === $limit_file_type ) {
|
451 |
-
$limit_types = 'text';
|
452 |
-
$limit_extensions = 'txt,rtx,csv,tsv';
|
453 |
-
} elseif ( 'any' === $limit_file_type ) {
|
454 |
$limit_types = '';
|
455 |
$limit_extensions = '*';
|
456 |
} else {
|
457 |
-
$limit_types
|
458 |
-
|
459 |
-
$limit_extensions = $limit_types;
|
460 |
}
|
461 |
|
462 |
-
// Find and replace certain characters to properly split by commas.
|
463 |
-
$find = array(
|
464 |
-
' ',
|
465 |
-
'.',
|
466 |
-
"\n",
|
467 |
-
"\t",
|
468 |
-
';',
|
469 |
-
);
|
470 |
-
|
471 |
-
$replace = array(
|
472 |
-
'',
|
473 |
-
',',
|
474 |
-
',',
|
475 |
-
',',
|
476 |
-
);
|
477 |
-
|
478 |
-
$limit_types = trim( str_replace( $find, $replace, $limit_types ), ',' );
|
479 |
-
$limit_extensions = trim( str_replace( $find, $replace, $limit_extensions ), ',' );
|
480 |
-
$mime_types = get_allowed_mime_types();
|
481 |
-
|
482 |
-
if ( ! in_array( $limit_file_type, array( 'images', 'video', 'audio', 'text', 'any' ), true ) ) {
|
483 |
-
$new_limit_types = array();
|
484 |
-
|
485 |
-
$limit_types = array_filter( explode( ',', $limit_types ) );
|
486 |
-
|
487 |
-
foreach ( $limit_types as $k => $limit_type ) {
|
488 |
-
if ( isset( $mime_types[ $limit_type ] ) ) {
|
489 |
-
$mime = explode( '/', $mime_types[ $limit_type ] );
|
490 |
-
$mime = $mime[0];
|
491 |
-
|
492 |
-
if ( ! in_array( $mime, $new_limit_types, true ) ) {
|
493 |
-
$new_limit_types[] = $mime;
|
494 |
-
}
|
495 |
-
} else {
|
496 |
-
$found = false;
|
497 |
-
|
498 |
-
foreach ( $mime_types as $type => $mime ) {
|
499 |
-
if ( false !== strpos( $type, $limit_type ) ) {
|
500 |
-
$mime = explode( '/', $mime );
|
501 |
-
$mime = $mime[0];
|
502 |
-
|
503 |
-
if ( ! in_array( $mime, $new_limit_types, true ) ) {
|
504 |
-
$new_limit_types[] = $mime;
|
505 |
-
}
|
506 |
-
|
507 |
-
$found = true;
|
508 |
-
}
|
509 |
-
}
|
510 |
-
|
511 |
-
if ( ! $found ) {
|
512 |
-
$new_limit_types[] = $limit_type;
|
513 |
-
}
|
514 |
-
}//end if
|
515 |
-
}//end foreach
|
516 |
-
|
517 |
-
if ( ! empty( $new_limit_types ) ) {
|
518 |
-
$limit_types = implode( ',', $new_limit_types );
|
519 |
-
}
|
520 |
-
}//end if
|
521 |
-
|
522 |
$options['limit_types'] = $limit_types;
|
523 |
$options['limit_extensions'] = $limit_extensions;
|
524 |
|
@@ -552,7 +505,7 @@ class PodsField_File extends PodsField {
|
|
552 |
'filters' => [
|
553 |
[
|
554 |
'title' => __( 'Allowed Files', 'pods' ),
|
555 |
-
'extensions' =>
|
556 |
],
|
557 |
],
|
558 |
'multipart' => true,
|
@@ -1098,7 +1051,7 @@ class PodsField_File extends PodsField {
|
|
1098 |
if ( 'upload' === $method ) {
|
1099 |
$file = $_FILES['Filedata'];
|
1100 |
|
1101 |
-
$limit_size = pods_v( $field['type'] . '_restrict_filesize', $field
|
1102 |
|
1103 |
if ( ! empty( $limit_size ) ) {
|
1104 |
if ( false !== stripos( $limit_size, 'GB' ) ) {
|
@@ -1120,93 +1073,21 @@ class PodsField_File extends PodsField {
|
|
1120 |
}
|
1121 |
|
1122 |
if ( 0 < $limit_size && $limit_size < $file['size'] ) {
|
1123 |
-
$error =
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
}
|
1128 |
-
}//end if
|
1129 |
-
|
1130 |
-
$limit_file_type = pods_v( $field['type'] . '_type', $field['options'], 'images' );
|
1131 |
-
|
1132 |
-
if ( 'images' === $limit_file_type ) {
|
1133 |
-
$limit_types = 'jpg,jpeg,png,gif';
|
1134 |
-
} elseif ( 'video' === $limit_file_type ) {
|
1135 |
-
$limit_types = 'mpg,mov,flv,mp4';
|
1136 |
-
} elseif ( 'audio' === $limit_file_type ) {
|
1137 |
-
$limit_types = 'mp3,m4a,wav,wma';
|
1138 |
-
} elseif ( 'text' === $limit_file_type ) {
|
1139 |
-
$limit_types = 'txt,rtx,csv,tsv';
|
1140 |
-
} elseif ( 'any' === $limit_file_type ) {
|
1141 |
-
$limit_types = '';
|
1142 |
-
} else {
|
1143 |
-
$limit_types = pods_v( $field['type'] . '_allowed_extensions', $field['options'], '', true );
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
$limit_types = trim(
|
1147 |
-
str_replace(
|
1148 |
-
array( ' ', '.', "\n", "\t", ';' ), array(
|
1149 |
-
'',
|
1150 |
-
',',
|
1151 |
-
',',
|
1152 |
-
',',
|
1153 |
-
), $limit_types
|
1154 |
-
), ','
|
1155 |
-
);
|
1156 |
-
|
1157 |
-
$mime_types = get_allowed_mime_types();
|
1158 |
-
|
1159 |
-
if ( in_array( $limit_file_type, array( 'images', 'audio', 'video' ), true ) ) {
|
1160 |
-
$new_limit_types = array();
|
1161 |
-
|
1162 |
-
foreach ( $mime_types as $type => $mime ) {
|
1163 |
-
if ( 0 === strpos( $mime, $limit_file_type ) ) {
|
1164 |
-
$type = explode( '|', $type );
|
1165 |
-
|
1166 |
-
$new_limit_types = array_merge( $new_limit_types, $type );
|
1167 |
-
}
|
1168 |
-
}
|
1169 |
|
1170 |
-
|
1171 |
-
$limit_types = implode( ',', $new_limit_types );
|
1172 |
-
}
|
1173 |
-
} elseif ( 'any' !== $limit_file_type ) {
|
1174 |
-
$new_limit_types = array();
|
1175 |
-
|
1176 |
-
$limit_types = explode( ',', $limit_types );
|
1177 |
-
|
1178 |
-
foreach ( $limit_types as $k => $limit_type ) {
|
1179 |
-
$found = false;
|
1180 |
-
|
1181 |
-
foreach ( $mime_types as $type => $mime ) {
|
1182 |
-
if ( 0 === strpos( $mime, $limit_type ) ) {
|
1183 |
-
$type = explode( '|', $type );
|
1184 |
-
|
1185 |
-
foreach ( $type as $t ) {
|
1186 |
-
if ( ! in_array( $t, $new_limit_types, true ) ) {
|
1187 |
-
$new_limit_types[] = $t;
|
1188 |
-
}
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
$found = true;
|
1192 |
-
}
|
1193 |
-
}
|
1194 |
-
|
1195 |
-
if ( ! $found ) {
|
1196 |
-
$new_limit_types[] = $limit_type;
|
1197 |
-
}
|
1198 |
-
}//end foreach
|
1199 |
-
|
1200 |
-
if ( ! empty( $new_limit_types ) ) {
|
1201 |
-
$limit_types = implode( ',', $new_limit_types );
|
1202 |
}
|
1203 |
}//end if
|
1204 |
|
1205 |
-
$
|
1206 |
|
1207 |
-
|
|
|
|
|
1208 |
|
1209 |
-
if ( ! empty( $limit_types ) ) {
|
1210 |
$file_info = pathinfo( $file['name'] );
|
1211 |
$ok = false;
|
1212 |
|
@@ -1214,22 +1095,42 @@ class PodsField_File extends PodsField {
|
|
1214 |
// Enforce lowercase for the extension checking.
|
1215 |
$file_info['extension'] = strtolower( $file_info['extension'] );
|
1216 |
|
1217 |
-
|
1218 |
-
|
1219 |
|
1220 |
-
|
1221 |
-
|
|
|
|
|
|
|
1222 |
|
1223 |
-
|
1224 |
-
}
|
1225 |
-
}
|
1226 |
}
|
1227 |
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1231 |
|
1232 |
-
|
|
|
1233 |
}
|
1234 |
}//end if
|
1235 |
|
@@ -1238,10 +1139,10 @@ class PodsField_File extends PodsField {
|
|
1238 |
if ( null === $custom_handler ) {
|
1239 |
|
1240 |
// Start custom directory.
|
1241 |
-
$upload_dir = pods_v( $field['type'] . '_upload_dir', $field
|
1242 |
|
1243 |
if ( 'wp' !== $upload_dir ) {
|
1244 |
-
$custom_dir = pods_v( $field['type'] . '_upload_dir_custom', $field
|
1245 |
$context_pod = null;
|
1246 |
|
1247 |
if ( $params->item_id ) {
|
@@ -1397,4 +1298,183 @@ class PodsField_File extends PodsField {
|
|
1397 |
return $data;
|
1398 |
}
|
1399 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1400 |
}
|
1 |
<?php
|
2 |
|
3 |
+
use Pods\Whatsit\Field;
|
4 |
+
|
5 |
/**
|
6 |
* @package Pods\Fields
|
7 |
*/
|
97 |
'pick_show_select_text' => 0,
|
98 |
'dependency' => true,
|
99 |
),
|
100 |
+
static::$type . '_type' => array(
|
101 |
+
'label' => __( 'Restrict File Types', 'pods' ),
|
102 |
+
'default' => apply_filters( "pods_form_ui_field_{$type}_type_default", 'images' ),
|
103 |
+
'type' => 'pick',
|
104 |
+
'data' => apply_filters(
|
105 |
+
"pods_form_ui_field_{$type}_type_options",
|
106 |
+
[
|
107 |
+
'Images' => [
|
108 |
+
'images' => __( 'Images (ONLY jpg, jpeg, png, gif, and webp)', 'pods' ),
|
109 |
+
'images-any' => __( 'Images - Any (jpg, jpeg, png, gif, webp, and others supported by WP)', 'pods' ),
|
110 |
+
],
|
111 |
+
'Video' => [
|
112 |
+
'video' => __( 'Video (ONLY mpg, mov, flv, and mp4)', 'pods' ),
|
113 |
+
'video-any' => __( 'Video - Any (mpg, mov, flv, mp4, and others supported by WP)', 'pods' ),
|
114 |
+
],
|
115 |
+
'Audio' => [
|
116 |
+
'audio' => __( 'Audio (ONLY mp3, m4a, wav, and wma)', 'pods' ),
|
117 |
+
'audio-any' => __( 'Audio - Any (mp3, m4a, wav, wma, and others supported by WP)', 'pods' ),
|
118 |
+
],
|
119 |
+
'Text' => [
|
120 |
+
'text' => __( 'Text (txt, csv, tsv, rtx)', 'pods' ),
|
121 |
+
],
|
122 |
+
'More Options' => [
|
123 |
+
'any' => __( 'Any Type (no restriction)', 'pods' ),
|
124 |
+
'other' => __( 'Other (customize allowed extensions)', 'pods' ),
|
125 |
+
],
|
126 |
+
]
|
127 |
+
),
|
128 |
+
'pick_show_select_text' => 0,
|
129 |
+
'dependency' => true,
|
130 |
+
),
|
131 |
+
static::$type . '_allowed_extensions' => array(
|
132 |
+
'label' => __( 'Allowed File Extensions', 'pods' ),
|
133 |
+
'description' => __( 'Separate file extensions with a comma (ex. jpg,png,mp4,mov). This only applies to the file uploader, media library selection will continue to fallback to the mime type group like Images, Video, etc.', 'pods' ),
|
134 |
+
'depends-on' => array( static::$type . '_type' => 'other' ),
|
135 |
+
'default' => apply_filters( "pods_form_ui_field_{$type}_extensions_default", '' ),
|
136 |
+
'text_placeholder' => 'jpg,png,mp4,mov',
|
137 |
+
'type' => 'text',
|
138 |
+
),
|
139 |
static::$type . '_attachment_tab' => array(
|
140 |
'label' => __( 'Media Library Default Tab', 'pods' ),
|
141 |
'depends-on' => array( static::$type . '_uploader' => 'attachment' ),
|
210 |
'text_placeholder' => '10MB',
|
211 |
'type' => 'text',
|
212 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
static::$type . '_field_template' => array(
|
214 |
'label' => __( 'List Style', 'pods' ),
|
215 |
'help' => __( 'You can choose which style you would like the files to appear within the form.', 'pods' ),
|
216 |
+
'depends-on' => array(
|
217 |
+
static::$type . '_type' => [
|
218 |
+
'images',
|
219 |
+
'images-any',
|
220 |
+
]
|
221 |
+
),
|
222 |
'default' => apply_filters( "pods_form_ui_field_{$type}_template_default", 'rows' ),
|
223 |
'type' => 'pick',
|
224 |
'data' => apply_filters(
|
252 |
static::$type . '_wp_gallery_output' => array(
|
253 |
'label' => __( 'Output as a WP Gallery', 'pods' ),
|
254 |
'help' => sprintf( __( '<a href="%s" target="_blank" rel="noopener noreferrer">Click here for more info</a>', 'pods' ), 'https://wordpress.org/support/article/inserting-images-into-posts-and-pages/' ),
|
255 |
+
'depends-on' => [
|
256 |
+
static::$type . '_type' => [
|
257 |
+
'images',
|
258 |
+
'images-any',
|
259 |
+
]
|
260 |
+
],
|
261 |
'dependency' => true,
|
262 |
'type' => 'boolean',
|
263 |
),
|
443 |
$options[ $args->type . '_type' ] = $limit_file_type;
|
444 |
|
445 |
// Non-image file types are forced to rows template right now.
|
446 |
+
if ( ! in_array( $limit_file_type, [ 'images', 'images-any' ], true ) ) {
|
447 |
$file_field_template = 'rows';
|
448 |
}
|
449 |
|
462 |
|
463 |
$options[ $args->type . '_limit' ] = $file_limit;
|
464 |
|
465 |
+
$file_mime_types = $this->get_file_mime_types_for_field( $options );
|
466 |
+
|
467 |
+
if ( null === $file_mime_types ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
468 |
$limit_types = '';
|
469 |
$limit_extensions = '*';
|
470 |
} else {
|
471 |
+
$limit_types = implode( ',', $file_mime_types['mime_types'] );
|
472 |
+
$limit_extensions = implode( ',', $file_mime_types['extensions'] );
|
|
|
473 |
}
|
474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
$options['limit_types'] = $limit_types;
|
476 |
$options['limit_extensions'] = $limit_extensions;
|
477 |
|
505 |
'filters' => [
|
506 |
[
|
507 |
'title' => __( 'Allowed Files', 'pods' ),
|
508 |
+
'extensions' => $limit_extensions,
|
509 |
],
|
510 |
],
|
511 |
'multipart' => true,
|
1051 |
if ( 'upload' === $method ) {
|
1052 |
$file = $_FILES['Filedata'];
|
1053 |
|
1054 |
+
$limit_size = pods_v( $field['type'] . '_restrict_filesize', $field );
|
1055 |
|
1056 |
if ( ! empty( $limit_size ) ) {
|
1057 |
if ( false !== stripos( $limit_size, 'GB' ) ) {
|
1073 |
}
|
1074 |
|
1075 |
if ( 0 < $limit_size && $limit_size < $file['size'] ) {
|
1076 |
+
$error = sprintf(
|
1077 |
+
__( 'Error: File size too large, max size is %s', 'pods' ),
|
1078 |
+
pods_v( $field['type'] . '_restrict_filesize', $field )
|
1079 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1080 |
|
1081 |
+
pods_error( '<div style="color:#FF0000">' . $error . '</div>' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1082 |
}
|
1083 |
}//end if
|
1084 |
|
1085 |
+
$file_mime_types = $this->get_file_mime_types_for_field( $field );
|
1086 |
|
1087 |
+
if ( null !== $file_mime_types ) {
|
1088 |
+
$file_mime_types_extensions = $file_mime_types['extensions'];
|
1089 |
+
$file_mime_types_mapping = $file_mime_types['mapping'];
|
1090 |
|
|
|
1091 |
$file_info = pathinfo( $file['name'] );
|
1092 |
$ok = false;
|
1093 |
|
1095 |
// Enforce lowercase for the extension checking.
|
1096 |
$file_info['extension'] = strtolower( $file_info['extension'] );
|
1097 |
|
1098 |
+
$ok = isset( $file_mime_types_mapping[ $file_info['extension'] ] );
|
1099 |
+
}
|
1100 |
|
1101 |
+
if ( false === $ok ) {
|
1102 |
+
$error = sprintf(
|
1103 |
+
__( 'Error: File type not allowed, please use one of the following: %s', 'pods' ),
|
1104 |
+
'.' . implode( ', .', $file_mime_types_extensions )
|
1105 |
+
);
|
1106 |
|
1107 |
+
pods_error( '<div style="color:#FF0000"><p>' . esc_html( $error ) . '</p></div>' );
|
|
|
|
|
1108 |
}
|
1109 |
|
1110 |
+
// Confirm mime type if we can.
|
1111 |
+
if ( ! empty( $file_mime_types_mapping[ $file_info['extension'] ] ) ) {
|
1112 |
+
if ( 0 === strpos( $file_mime_types_mapping[ $file_info['extension'] ], 'image/' ) ) {
|
1113 |
+
$real_mime = wp_get_image_mime( $file['name'] );
|
1114 |
+
} elseif ( extension_loaded( 'fileinfo' ) ) {
|
1115 |
+
// Use finfo to get the mime type information.
|
1116 |
+
$finfo_resource = finfo_open( FILEINFO_MIME_TYPE );
|
1117 |
+
$real_mime = finfo_file( $finfo_resource, $file['name'] );
|
1118 |
+
finfo_close( $finfo_resource );
|
1119 |
+
} else {
|
1120 |
+
// No other validation we can do, just make the mime type match to bypass the next check.
|
1121 |
+
$real_mime = $file_mime_types_mapping[ $file_info['extension'] ];
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
// Do not allow if the mime type was found and it does not match.
|
1125 |
+
if ( $real_mime && $real_mime !== $file_mime_types_mapping[ $file_info['extension'] ] ) {
|
1126 |
+
$error = sprintf(
|
1127 |
+
__( 'Error: File mime type "%s" not expected, please ensure your file is valid: %s', 'pods' ),
|
1128 |
+
$real_mime,
|
1129 |
+
'.' . $file_info['extension'] . ' (' . $file_mime_types_mapping[ $file_info['extension'] ] . ')'
|
1130 |
+
);
|
1131 |
|
1132 |
+
pods_error( '<div style="color:#FF0000"><p>' . esc_html( $error ) . '</p></div>' );
|
1133 |
+
}
|
1134 |
}
|
1135 |
}//end if
|
1136 |
|
1139 |
if ( null === $custom_handler ) {
|
1140 |
|
1141 |
// Start custom directory.
|
1142 |
+
$upload_dir = pods_v( $field['type'] . '_upload_dir', $field, 'wp' );
|
1143 |
|
1144 |
if ( 'wp' !== $upload_dir ) {
|
1145 |
+
$custom_dir = pods_v( $field['type'] . '_upload_dir_custom', $field, '' );
|
1146 |
$context_pod = null;
|
1147 |
|
1148 |
if ( $params->item_id ) {
|
1298 |
return $data;
|
1299 |
}
|
1300 |
|
1301 |
+
/**
|
1302 |
+
* Get the file mime type information for a field.
|
1303 |
+
*
|
1304 |
+
* @since 2.9.0
|
1305 |
+
*
|
1306 |
+
* @param Field|array $field The field to use.
|
1307 |
+
*
|
1308 |
+
* @return null|array Null if any are allowed, otherwise an array with the file mime type information including the
|
1309 |
+
* list of extensions, mime types, and mapping of extensions to mime types.
|
1310 |
+
*/
|
1311 |
+
public function get_file_mime_types_for_field( $field ) {
|
1312 |
+
$media_type = pods_v( $field['type'] . '_type', $field, 'images', true );
|
1313 |
+
|
1314 |
+
$other_extensions = [];
|
1315 |
+
|
1316 |
+
if ( 'images' === $media_type ) {
|
1317 |
+
// Limit to basic images.
|
1318 |
+
$media_type = 'other';
|
1319 |
+
$other_extensions = [
|
1320 |
+
'jpg',
|
1321 |
+
'jpeg',
|
1322 |
+
'png',
|
1323 |
+
'gif',
|
1324 |
+
'webp',
|
1325 |
+
];
|
1326 |
+
} elseif ( 'video' === $media_type ) {
|
1327 |
+
// Limit to basic video.
|
1328 |
+
$media_type = 'other';
|
1329 |
+
$other_extensions = [
|
1330 |
+
'mpg',
|
1331 |
+
'mov',
|
1332 |
+
'flv',
|
1333 |
+
'mp4',
|
1334 |
+
];
|
1335 |
+
} elseif ( 'audio' === $media_type ) {
|
1336 |
+
// Limit to basic audio.
|
1337 |
+
$media_type = 'other';
|
1338 |
+
$other_extensions = [
|
1339 |
+
'mp3',
|
1340 |
+
'm4a',
|
1341 |
+
'wav',
|
1342 |
+
'wma',
|
1343 |
+
];
|
1344 |
+
} elseif ( 'text' === $media_type ) {
|
1345 |
+
// Limit to basic text.
|
1346 |
+
$media_type = 'other';
|
1347 |
+
$other_extensions = [
|
1348 |
+
'txt',
|
1349 |
+
'csv',
|
1350 |
+
'tsv',
|
1351 |
+
'rtx'
|
1352 |
+
];
|
1353 |
+
} elseif ( 'other' === $media_type ) {
|
1354 |
+
// Allow specifying allowed extensions.
|
1355 |
+
$other_extensions = pods_v( $field['type'] . '_allowed_extensions', $field, '', true );
|
1356 |
+
|
1357 |
+
$other_extensions = trim(
|
1358 |
+
str_replace(
|
1359 |
+
[
|
1360 |
+
' ',
|
1361 |
+
'.',
|
1362 |
+
"\n",
|
1363 |
+
"\t",
|
1364 |
+
';',
|
1365 |
+
'|',
|
1366 |
+
],
|
1367 |
+
[
|
1368 |
+
',',
|
1369 |
+
',',
|
1370 |
+
',',
|
1371 |
+
',',
|
1372 |
+
',',
|
1373 |
+
],
|
1374 |
+
$other_extensions
|
1375 |
+
),
|
1376 |
+
', '
|
1377 |
+
);
|
1378 |
+
} elseif ( false !== strpos( $media_type, '-any' ) ) {
|
1379 |
+
// Handle cases where we want to support any of a specific mime type grouping.
|
1380 |
+
$media_type = str_replace( '-any', '', $media_type );
|
1381 |
+
|
1382 |
+
// Images should map to 'image/' mime type.
|
1383 |
+
if ( 'images' === $media_type ) {
|
1384 |
+
$media_type = 'image';
|
1385 |
+
}
|
1386 |
+
}
|
1387 |
+
|
1388 |
+
return $this->get_file_mime_types_for_media_type( $media_type, $other_extensions );
|
1389 |
+
}
|
1390 |
+
|
1391 |
+
/**
|
1392 |
+
* Get the file mime type information for a specific media type and other file extensions.
|
1393 |
+
*
|
1394 |
+
* @since 2.9.0
|
1395 |
+
*
|
1396 |
+
* @param string $media_type The media type to use for looking up by mime type.
|
1397 |
+
* @param string|array $other_extensions The other file extensions that may have been provided.
|
1398 |
+
*
|
1399 |
+
* @return null|array Null if any are allowed, otherwise an array with the file mime type information including the
|
1400 |
+
* list of extensions, mime types, and mapping of extensions to mime types.
|
1401 |
+
*/
|
1402 |
+
public function get_file_mime_types_for_media_type( $media_type, $other_extensions = [] ) {
|
1403 |
+
if ( 'any' === $media_type ) {
|
1404 |
+
return null;
|
1405 |
+
}
|
1406 |
+
|
1407 |
+
if ( ! $other_extensions ) {
|
1408 |
+
$other_extensions = [];
|
1409 |
+
} elseif ( ! is_array( $other_extensions ) ) {
|
1410 |
+
$other_extensions = explode( ',', $other_extensions );
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
$mime_types = get_allowed_mime_types();
|
1414 |
+
|
1415 |
+
$file_extensions = [];
|
1416 |
+
|
1417 |
+
if ( $other_extensions ) {
|
1418 |
+
// Handle custom list of extensions and map them to mime types if we can.
|
1419 |
+
foreach ( $other_extensions as $other_extension ) {
|
1420 |
+
$found = false;
|
1421 |
+
|
1422 |
+
foreach ( $mime_types as $extension => $mime_type ) {
|
1423 |
+
$extensions = explode( '|', $extension );
|
1424 |
+
|
1425 |
+
if ( ! in_array( $other_extension, $extensions, true ) ) {
|
1426 |
+
continue;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
$found = true;
|
1430 |
+
|
1431 |
+
$file_extensions[ $other_extension ] = $mime_type;
|
1432 |
+
|
1433 |
+
break;
|
1434 |
+
}
|
1435 |
+
|
1436 |
+
if ( ! $found ) {
|
1437 |
+
$file_extensions[ $other_extension ] = '';
|
1438 |
+
}
|
1439 |
+
}
|
1440 |
+
} elseif ( 'other' !== $media_type ) {
|
1441 |
+
// Handle specific media type as a mime type prefix like (image/, audio/, video/, etc).
|
1442 |
+
foreach ( $mime_types as $extension => $mime_type ) {
|
1443 |
+
if ( 0 !== strpos( $mime_type, $media_type . '/' ) ) {
|
1444 |
+
continue;
|
1445 |
+
}
|
1446 |
+
|
1447 |
+
$extensions = explode( '|', $extension );
|
1448 |
+
|
1449 |
+
foreach ( $extensions as $file_extension ) {
|
1450 |
+
$file_extensions[ $file_extension ] = $mime_type;
|
1451 |
+
}
|
1452 |
+
}
|
1453 |
+
}
|
1454 |
+
|
1455 |
+
/**
|
1456 |
+
* Allow filtering the file extensions allowed for a media type and other file extensions provided.
|
1457 |
+
*
|
1458 |
+
* @since 2.9.0
|
1459 |
+
*
|
1460 |
+
* @param null|array $file_extensions Null if any are allowed, otherwise an array with the file mime type
|
1461 |
+
* information including the list of extensions, mime types, and mapping
|
1462 |
+
* of extensions to mime types.
|
1463 |
+
* @param string $media_type The media type to use for looking up by mime type.
|
1464 |
+
* @param string|array $other_extensions The other file extensions that may have been provided.
|
1465 |
+
*/
|
1466 |
+
$file_extensions = apply_filters(
|
1467 |
+
'pods_form_ui_field_file_mime_types_for_media_type',
|
1468 |
+
$file_extensions,
|
1469 |
+
$media_type,
|
1470 |
+
$other_extensions
|
1471 |
+
);
|
1472 |
+
|
1473 |
+
return [
|
1474 |
+
'mime_types' => array_filter( array_unique( array_values( $file_extensions ) ) ),
|
1475 |
+
'extensions' => array_filter( array_unique( array_keys( $file_extensions ) ) ),
|
1476 |
+
'mapping' => $file_extensions,
|
1477 |
+
];
|
1478 |
+
}
|
1479 |
+
|
1480 |
}
|
classes/fields/link.php
CHANGED
@@ -201,8 +201,16 @@ class PodsField_Link extends PodsField_Website {
|
|
201 |
$form_field_type = PodsForm::$field_type;
|
202 |
$field_type = 'link';
|
203 |
|
|
|
|
|
204 |
// Ensure proper format
|
205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
|
207 |
pods_view( PODS_DIR . 'ui/fields/' . $field_type . '.php', compact( array_keys( get_defined_vars() ) ) );
|
208 |
}
|
201 |
$form_field_type = PodsForm::$field_type;
|
202 |
$field_type = 'link';
|
203 |
|
204 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
205 |
+
|
206 |
// Ensure proper format
|
207 |
+
if ( is_array( $value ) ) {
|
208 |
+
foreach ( $value as $k => $repeatable_value ) {
|
209 |
+
$value[ $k ] = $this->pre_save( $repeatable_value, $id, $name, $options, null, $pod );
|
210 |
+
}
|
211 |
+
} else {
|
212 |
+
$value = $this->pre_save( $value, $id, $name, $options, null, $pod );
|
213 |
+
}
|
214 |
|
215 |
pods_view( PODS_DIR . 'ui/fields/' . $field_type . '.php', compact( array_keys( get_defined_vars() ) ) );
|
216 |
}
|
classes/fields/number.php
CHANGED
@@ -40,15 +40,6 @@ class PodsField_Number extends PodsField {
|
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
43 |
-
static::$type . '_repeatable' => array(
|
44 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
45 |
-
'default' => 0,
|
46 |
-
'type' => 'boolean',
|
47 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
48 |
-
'boolean_yes_label' => '',
|
49 |
-
'dependency' => true,
|
50 |
-
'developer_mode' => true,
|
51 |
-
),
|
52 |
static::$type . '_format_type' => array(
|
53 |
'label' => __( 'Input Type', 'pods' ),
|
54 |
'default' => 'number',
|
@@ -215,9 +206,7 @@ class PodsField_Number extends PodsField {
|
|
215 |
$form_field_type = PodsForm::$field_type;
|
216 |
$is_read_only = false;
|
217 |
|
218 |
-
|
219 |
-
$value = implode( '', $value );
|
220 |
-
}
|
221 |
|
222 |
if ( 'slider' === pods_v( static::$type . '_format_type', $options, 'number' ) ) {
|
223 |
$field_type = 'slider';
|
@@ -247,7 +236,14 @@ class PodsField_Number extends PodsField {
|
|
247 |
|
248 |
// Only format the value for non-HTML5 inputs.
|
249 |
if ( ! $options[ static::$type . '_html5' ] ) {
|
250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
}
|
252 |
|
253 |
if ( ! empty( $options['disable_dfv'] ) ) {
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
static::$type . '_format_type' => array(
|
44 |
'label' => __( 'Input Type', 'pods' ),
|
45 |
'default' => 'number',
|
206 |
$form_field_type = PodsForm::$field_type;
|
207 |
$is_read_only = false;
|
208 |
|
209 |
+
$value = $this->normalize_value_for_input( $value, $options, '' );
|
|
|
|
|
210 |
|
211 |
if ( 'slider' === pods_v( static::$type . '_format_type', $options, 'number' ) ) {
|
212 |
$field_type = 'slider';
|
236 |
|
237 |
// Only format the value for non-HTML5 inputs.
|
238 |
if ( ! $options[ static::$type . '_html5' ] ) {
|
239 |
+
// Ensure proper format
|
240 |
+
if ( is_array( $value ) ) {
|
241 |
+
foreach ( $value as $k => $repeatable_value ) {
|
242 |
+
$value[ $k ] = $this->format( $repeatable_value, $name, $options, $pod, $id );
|
243 |
+
}
|
244 |
+
} else {
|
245 |
+
$value = $this->format( $value, $name, $options, $pod, $id );
|
246 |
+
}
|
247 |
}
|
248 |
|
249 |
if ( ! empty( $options['disable_dfv'] ) ) {
|
classes/fields/oembed.php
CHANGED
@@ -73,15 +73,6 @@ class PodsField_OEmbed extends PodsField {
|
|
73 |
public function options() {
|
74 |
|
75 |
$options = array(
|
76 |
-
static::$type . '_repeatable' => array(
|
77 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
78 |
-
'default' => 0,
|
79 |
-
'type' => 'boolean',
|
80 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
81 |
-
'boolean_yes_label' => '',
|
82 |
-
'dependency' => true,
|
83 |
-
'developer_mode' => true,
|
84 |
-
),
|
85 |
static::$type . '_width' => array(
|
86 |
'label' => __( 'Embed Width', 'pods' ),
|
87 |
'default' => 0,
|
@@ -178,9 +169,7 @@ class PodsField_OEmbed extends PodsField {
|
|
178 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
179 |
$form_field_type = PodsForm::$field_type;
|
180 |
|
181 |
-
|
182 |
-
$value = implode( ' ', $value );
|
183 |
-
}
|
184 |
|
185 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
186 |
if ( pods_v( 'read_only', $options, false ) ) {
|
73 |
public function options() {
|
74 |
|
75 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
static::$type . '_width' => array(
|
77 |
'label' => __( 'Embed Width', 'pods' ),
|
78 |
'default' => 0,
|
169 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
170 |
$form_field_type = PodsForm::$field_type;
|
171 |
|
172 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
173 |
|
174 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
175 |
if ( pods_v( 'read_only', $options, false ) ) {
|
classes/fields/paragraph.php
CHANGED
@@ -44,15 +44,6 @@ class PodsField_Paragraph extends PodsField {
|
|
44 |
public function options() {
|
45 |
|
46 |
$options = array(
|
47 |
-
static::$type . '_repeatable' => array(
|
48 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
49 |
-
'default' => 0,
|
50 |
-
'type' => 'boolean',
|
51 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
52 |
-
'boolean_yes_label' => '',
|
53 |
-
'dependency' => true,
|
54 |
-
'developer_mode' => true,
|
55 |
-
),
|
56 |
'output_options' => array(
|
57 |
'label' => __( 'Output Options', 'pods' ),
|
58 |
'type' => 'boolean_group',
|
@@ -217,9 +208,7 @@ class PodsField_Paragraph extends PodsField {
|
|
217 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
218 |
$form_field_type = PodsForm::$field_type;
|
219 |
|
220 |
-
|
221 |
-
$value = implode( "\n", $value );
|
222 |
-
}
|
223 |
|
224 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
225 |
if ( pods_v( 'read_only', $options, false ) ) {
|
44 |
public function options() {
|
45 |
|
46 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
'output_options' => array(
|
48 |
'label' => __( 'Output Options', 'pods' ),
|
49 |
'type' => 'boolean_group',
|
208 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
209 |
$form_field_type = PodsForm::$field_type;
|
210 |
|
211 |
+
$value = $this->normalize_value_for_input( $value, $options, "\n" );
|
|
|
|
|
212 |
|
213 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
214 |
if ( pods_v( 'read_only', $options, false ) ) {
|
classes/fields/password.php
CHANGED
@@ -39,15 +39,6 @@ class PodsField_Password extends PodsField {
|
|
39 |
*/
|
40 |
public function options() {
|
41 |
$options = [
|
42 |
-
static::$type . '_repeatable' => [
|
43 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
44 |
-
'default' => 0,
|
45 |
-
'type' => 'boolean',
|
46 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
47 |
-
'boolean_yes_label' => '',
|
48 |
-
'dependency' => true,
|
49 |
-
'developer_mode' => true,
|
50 |
-
],
|
51 |
static::$type . '_max_length' => [
|
52 |
'label' => __( 'Maximum Length', 'pods' ),
|
53 |
'default' => 255,
|
@@ -92,9 +83,7 @@ class PodsField_Password extends PodsField {
|
|
92 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
93 |
$form_field_type = PodsForm::$field_type;
|
94 |
|
95 |
-
|
96 |
-
$value = implode( ' ', $value );
|
97 |
-
}
|
98 |
|
99 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
100 |
if ( pods_v( 'read_only', $options, false ) ) {
|
39 |
*/
|
40 |
public function options() {
|
41 |
$options = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
static::$type . '_max_length' => [
|
43 |
'label' => __( 'Maximum Length', 'pods' ),
|
44 |
'default' => 255,
|
83 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
84 |
$form_field_type = PodsForm::$field_type;
|
85 |
|
86 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
87 |
|
88 |
if ( isset( $options['name'] ) && ! pods_permission( $options ) ) {
|
89 |
if ( pods_v( 'read_only', $options, false ) ) {
|
classes/fields/phone.php
CHANGED
@@ -40,15 +40,6 @@ class PodsField_Phone extends PodsField {
|
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
43 |
-
static::$type . '_repeatable' => array(
|
44 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
45 |
-
'default' => 0,
|
46 |
-
'type' => 'boolean',
|
47 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
48 |
-
'boolean_yes_label' => '',
|
49 |
-
'dependency' => true,
|
50 |
-
'developer_mode' => true,
|
51 |
-
),
|
52 |
static::$type . '_format' => array(
|
53 |
'label' => __( 'Format', 'pods' ),
|
54 |
'default' => '999-999-9999 x999',
|
@@ -125,9 +116,7 @@ class PodsField_Phone extends PodsField {
|
|
125 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
126 |
$form_field_type = PodsForm::$field_type;
|
127 |
|
128 |
-
|
129 |
-
$value = implode( ' ', $value );
|
130 |
-
}
|
131 |
|
132 |
$field_type = 'phone';
|
133 |
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
static::$type . '_format' => array(
|
44 |
'label' => __( 'Format', 'pods' ),
|
45 |
'default' => '999-999-9999 x999',
|
116 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
117 |
$form_field_type = PodsForm::$field_type;
|
118 |
|
119 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
120 |
|
121 |
$field_type = 'phone';
|
122 |
|
classes/fields/slug.php
CHANGED
@@ -75,9 +75,7 @@ class PodsField_Slug extends PodsField {
|
|
75 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
76 |
$form_field_type = PodsForm::$field_type;
|
77 |
|
78 |
-
|
79 |
-
$value = implode( '-', $value );
|
80 |
-
}
|
81 |
|
82 |
$field_type = 'slug';
|
83 |
|
75 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
76 |
$form_field_type = PodsForm::$field_type;
|
77 |
|
78 |
+
$value = $this->normalize_value_for_input( $value, $options, '-' );
|
|
|
|
|
79 |
|
80 |
$field_type = 'slug';
|
81 |
|
classes/fields/text.php
CHANGED
@@ -40,15 +40,6 @@ class PodsField_Text extends PodsField {
|
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
43 |
-
static::$type . '_repeatable' => array(
|
44 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
45 |
-
'default' => 0,
|
46 |
-
'type' => 'boolean',
|
47 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
48 |
-
'boolean_yes_label' => '',
|
49 |
-
'dependency' => true,
|
50 |
-
'developer_mode' => true,
|
51 |
-
),
|
52 |
'output_options' => array(
|
53 |
'label' => __( 'Output Options', 'pods' ),
|
54 |
'type' => 'boolean_group',
|
@@ -138,9 +129,7 @@ class PodsField_Text extends PodsField {
|
|
138 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
139 |
$form_field_type = PodsForm::$field_type;
|
140 |
|
141 |
-
|
142 |
-
$value = implode( ' ', $value );
|
143 |
-
}
|
144 |
|
145 |
$is_read_only = (boolean) pods_v( 'read_only', $options, false );
|
146 |
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
'output_options' => array(
|
44 |
'label' => __( 'Output Options', 'pods' ),
|
45 |
'type' => 'boolean_group',
|
129 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
130 |
$form_field_type = PodsForm::$field_type;
|
131 |
|
132 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
|
|
|
|
133 |
|
134 |
$is_read_only = (boolean) pods_v( 'read_only', $options, false );
|
135 |
|
classes/fields/time.php
CHANGED
@@ -56,15 +56,6 @@ class PodsField_Time extends PodsField_DateTime {
|
|
56 |
public function options() {
|
57 |
|
58 |
$options = array(
|
59 |
-
static::$type . '_repeatable' => array(
|
60 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
61 |
-
'default' => 0,
|
62 |
-
'type' => 'boolean',
|
63 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
64 |
-
'boolean_yes_label' => '',
|
65 |
-
'dependency' => true,
|
66 |
-
'developer_mode' => true,
|
67 |
-
),
|
68 |
static::$type . '_type' => array(
|
69 |
'label' => __( 'Time Format Type', 'pods' ),
|
70 |
'default' => '12',
|
56 |
public function options() {
|
57 |
|
58 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
static::$type . '_type' => array(
|
60 |
'label' => __( 'Time Format Type', 'pods' ),
|
61 |
'default' => '12',
|
classes/fields/website.php
CHANGED
@@ -39,15 +39,6 @@ class PodsField_Website extends PodsField {
|
|
39 |
*/
|
40 |
public function options() {
|
41 |
$options = array(
|
42 |
-
static::$type . '_repeatable' => array(
|
43 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
44 |
-
'default' => 0,
|
45 |
-
'type' => 'boolean',
|
46 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
47 |
-
'boolean_yes_label' => '',
|
48 |
-
'dependency' => true,
|
49 |
-
'developer_mode' => true,
|
50 |
-
),
|
51 |
static::$type . '_format' => array(
|
52 |
'label' => __( 'Format', 'pods' ),
|
53 |
'default' => 'normal',
|
@@ -82,6 +73,12 @@ class PodsField_Website extends PodsField {
|
|
82 |
'type' => 'boolean',
|
83 |
'depends-on' => array( static::$type . '_clickable' => true ),
|
84 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
static::$type . '_max_length' => array(
|
86 |
'label' => __( 'Maximum Length', 'pods' ),
|
87 |
'default' => 255,
|
@@ -133,9 +130,21 @@ class PodsField_Website extends PodsField {
|
|
133 |
$link = '<a href="%s"%s>%s</a>';
|
134 |
|
135 |
$atts = '';
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
if ( 1 === (int) pods_v( static::$type . '_new_window', $options ) ) {
|
138 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
|
141 |
$value = sprintf( $link, esc_url( $value ), $atts, esc_html( $value ) );
|
@@ -151,8 +160,16 @@ class PodsField_Website extends PodsField {
|
|
151 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
152 |
$form_field_type = PodsForm::$field_type;
|
153 |
|
|
|
|
|
154 |
// Ensure proper format
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
$field_type = 'website';
|
158 |
|
@@ -228,7 +245,9 @@ class PodsField_Website extends PodsField {
|
|
228 |
if ( isset( $value['url'] ) ) {
|
229 |
$value = $value['url'];
|
230 |
} else {
|
231 |
-
$value =
|
|
|
|
|
232 |
}
|
233 |
}
|
234 |
|
39 |
*/
|
40 |
public function options() {
|
41 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
static::$type . '_format' => array(
|
43 |
'label' => __( 'Format', 'pods' ),
|
44 |
'default' => 'normal',
|
73 |
'type' => 'boolean',
|
74 |
'depends-on' => array( static::$type . '_clickable' => true ),
|
75 |
),
|
76 |
+
static::$type . '_nofollow' => array(
|
77 |
+
'label' => __( 'Make link "nofollow" to exclude from search engines', 'pods' ),
|
78 |
+
'default' => apply_filters( 'pods_form_ui_field_website_nofollow', 0, static::$type ),
|
79 |
+
'type' => 'boolean',
|
80 |
+
'depends-on' => array( static::$type . '_clickable' => true ),
|
81 |
+
),
|
82 |
static::$type . '_max_length' => array(
|
83 |
'label' => __( 'Maximum Length', 'pods' ),
|
84 |
'default' => 255,
|
130 |
$link = '<a href="%s"%s>%s</a>';
|
131 |
|
132 |
$atts = '';
|
133 |
+
$rel = [];
|
134 |
+
|
135 |
+
if ( 1 === (int) pods_v( static::$type . '_nofollow', $options ) ) {
|
136 |
+
$rel[] = 'nofollow';
|
137 |
+
}
|
138 |
|
139 |
if ( 1 === (int) pods_v( static::$type . '_new_window', $options ) ) {
|
140 |
+
$rel[] = 'noopener';
|
141 |
+
$rel[] = 'noreferrer';
|
142 |
+
|
143 |
+
$atts .= ' target="_blank"';
|
144 |
+
}
|
145 |
+
|
146 |
+
if ( ! empty( $rel ) ) {
|
147 |
+
$atts .= ' rel="' . esc_attr( implode( ' ', $rel ) ) . '"';
|
148 |
}
|
149 |
|
150 |
$value = sprintf( $link, esc_url( $value ), $atts, esc_html( $value ) );
|
160 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
161 |
$form_field_type = PodsForm::$field_type;
|
162 |
|
163 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
164 |
+
|
165 |
// Ensure proper format
|
166 |
+
if ( is_array( $value ) ) {
|
167 |
+
foreach ( $value as $k => $repeatable_value ) {
|
168 |
+
$value[ $k ] = $this->pre_save( $repeatable_value, $id, $name, $options, null, $pod );
|
169 |
+
}
|
170 |
+
} else {
|
171 |
+
$value = $this->pre_save( $value, $id, $name, $options, null, $pod );
|
172 |
+
}
|
173 |
|
174 |
$field_type = 'website';
|
175 |
|
245 |
if ( isset( $value['url'] ) ) {
|
246 |
$value = $value['url'];
|
247 |
} else {
|
248 |
+
$value = $this->normalize_value_for_input( $value, $options );
|
249 |
+
|
250 |
+
// @todo Eventually rework this further.
|
251 |
}
|
252 |
}
|
253 |
|
classes/fields/wysiwyg.php
CHANGED
@@ -40,15 +40,6 @@ class PodsField_WYSIWYG extends PodsField {
|
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
43 |
-
static::$type . '_repeatable' => array(
|
44 |
-
'label' => __( 'Repeatable Field', 'pods' ),
|
45 |
-
'default' => 0,
|
46 |
-
'type' => 'boolean',
|
47 |
-
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add/Remove/Reorder additional values. These values are saved in the database as an array, so searching and filtering by them may require further adjustments".', 'pods' ),
|
48 |
-
'boolean_yes_label' => '',
|
49 |
-
'dependency' => true,
|
50 |
-
'developer_mode' => true,
|
51 |
-
),
|
52 |
static::$type . '_editor' => array(
|
53 |
'label' => __( 'Editor', 'pods' ),
|
54 |
'default' => 'tinymce',
|
@@ -238,9 +229,7 @@ class PodsField_WYSIWYG extends PodsField {
|
|
238 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
239 |
$form_field_type = PodsForm::$field_type;
|
240 |
|
241 |
-
|
242 |
-
$value = implode( "\n", $value );
|
243 |
-
}
|
244 |
|
245 |
// Normalize the line breaks for React.
|
246 |
$value = str_replace( "\r\n", "\n", $value );
|
@@ -259,6 +248,11 @@ class PodsField_WYSIWYG extends PodsField {
|
|
259 |
|
260 |
$field_type = 'textarea';
|
261 |
} elseif ( 'tinymce' === pods_v( static::$type . '_editor', $options ) ) {
|
|
|
|
|
|
|
|
|
|
|
262 |
$field_type = 'tinymce';
|
263 |
|
264 |
// Enforce boolean.
|
40 |
public function options() {
|
41 |
|
42 |
$options = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
static::$type . '_editor' => array(
|
44 |
'label' => __( 'Editor', 'pods' ),
|
45 |
'default' => 'tinymce',
|
229 |
$options = ( is_array( $options ) || is_object( $options ) ) ? $options : (array) $options;
|
230 |
$form_field_type = PodsForm::$field_type;
|
231 |
|
232 |
+
$value = $this->normalize_value_for_input( $value, $options, "\n" );
|
|
|
|
|
233 |
|
234 |
// Normalize the line breaks for React.
|
235 |
$value = str_replace( "\r\n", "\n", $value );
|
248 |
|
249 |
$field_type = 'textarea';
|
250 |
} elseif ( 'tinymce' === pods_v( static::$type . '_editor', $options ) ) {
|
251 |
+
// TinyMCE does not support repeatable.
|
252 |
+
if ( is_array( $value ) ) {
|
253 |
+
$value = implode( "\n", $value );
|
254 |
+
}
|
255 |
+
|
256 |
$field_type = 'tinymce';
|
257 |
|
258 |
// Enforce boolean.
|
components/I18n/I18n.php
CHANGED
@@ -48,6 +48,9 @@ class Pods_Component_I18n extends PodsComponent {
|
|
48 |
'placeholder' => [],
|
49 |
'menu_name' => [],
|
50 |
'name_admin_bar' => [],
|
|
|
|
|
|
|
51 |
'boolean_yes_label' => [
|
52 |
'depends-on' => [ 'type' => 'boolean' ],
|
53 |
],
|
48 |
'placeholder' => [],
|
49 |
'menu_name' => [],
|
50 |
'name_admin_bar' => [],
|
51 |
+
'repeatable_add_new_label' => [
|
52 |
+
'depends-on' => [ 'repeatable' => true ],
|
53 |
+
],
|
54 |
'boolean_yes_label' => [
|
55 |
'depends-on' => [ 'type' => 'boolean' ],
|
56 |
],
|
components/Migrate-Packages/Migrate-Packages.php
CHANGED
@@ -1,8 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
*
|
|
|
|
|
6 |
*
|
7 |
* Description: Import/Export your Pods, Fields, and other settings from any Pods site; Includes an API to Import/Export Packages via PHP
|
8 |
*
|
@@ -183,21 +185,21 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
183 |
|
184 |
self::$api = pods_api();
|
185 |
|
186 |
-
|
|
|
|
|
187 |
return false;
|
188 |
}
|
189 |
|
190 |
-
|
191 |
-
// Pods 1.x < 1.10
|
192 |
-
$data['meta']['version'] = implode( '.', str_split( $data['meta']['version'] ) );
|
193 |
-
} elseif ( false === strpos( $data['meta']['version'], '.' ) ) {
|
194 |
-
// Pods 1.10 <= 2.0
|
195 |
-
$data['meta']['version'] = pods_version_to_point( $data['meta']['version'] );
|
196 |
-
}
|
197 |
|
198 |
-
|
199 |
|
200 |
-
$
|
|
|
|
|
|
|
|
|
201 |
|
202 |
if ( isset( $data['pods'] ) && is_array( $data['pods'] ) ) {
|
203 |
foreach ( $data['pods'] as $pod_data ) {
|
@@ -281,6 +283,59 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
281 |
return false;
|
282 |
}
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
/**
|
285 |
* Handle importing of the pod.
|
286 |
*
|
@@ -828,28 +883,27 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
828 |
}
|
829 |
|
830 |
/**
|
831 |
-
* Export a Package
|
832 |
*
|
833 |
* $params['pods'] string|array|bool Pod IDs to export, or set to true to export all
|
834 |
* $params['templates'] string|array|bool Template IDs to export, or set to true to export all
|
835 |
* $params['pages'] string|array|bool Page IDs to export, or set to true to export all
|
836 |
* $params['helpers'] string|array|bool Helper IDs to export, or set to true to export all
|
837 |
*
|
838 |
-
* @
|
839 |
*
|
840 |
-
* @
|
|
|
|
|
841 |
*
|
842 |
-
* @static
|
843 |
-
* @since 2.0.5
|
844 |
*/
|
845 |
public static function export( $params ) {
|
846 |
-
|
847 |
-
|
848 |
-
'meta' => array(
|
849 |
'version' => PODS_VERSION,
|
850 |
'build' => time(),
|
851 |
-
|
852 |
-
|
853 |
|
854 |
if ( is_object( $params ) ) {
|
855 |
$params = get_object_vars( $params );
|
@@ -857,11 +911,41 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
857 |
|
858 |
self::$api = pods_api();
|
859 |
|
|
|
860 |
$pod_ids = pods_v( 'pods', $params );
|
861 |
$template_ids = pods_v( 'templates', $params );
|
862 |
$page_ids = pods_v( 'pages', $params );
|
863 |
$helper_ids = pods_v( 'helpers', $params );
|
864 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
if ( ! empty( $pod_ids ) ) {
|
866 |
$api_params = [];
|
867 |
|
@@ -930,7 +1014,7 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
930 |
|
931 |
foreach ( $export['pods'] as $pod_key => $pod ) {
|
932 |
foreach ( $pod as $option => $option_value ) {
|
933 |
-
if ( in_array( $option, $options_ignore, true )
|
934 |
unset( $pod[ $option ] );
|
935 |
}
|
936 |
}
|
@@ -938,7 +1022,7 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
938 |
if ( ! empty( $pod['groups'] ) ) {
|
939 |
foreach ( $pod['groups'] as $group_key => $group ) {
|
940 |
foreach ( $group as $option => $option_value ) {
|
941 |
-
if ( in_array( $option, $options_ignore, true )
|
942 |
unset( $group[ $option ] );
|
943 |
}
|
944 |
}
|
@@ -946,7 +1030,7 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
946 |
if ( ! empty( $group['fields'] ) ) {
|
947 |
foreach ( $group['fields'] as $field_key => $field ) {
|
948 |
foreach ( $field as $option => $option_value ) {
|
949 |
-
if ( in_array( $option, $options_ignore, true )
|
950 |
unset( $field[ $option ] );
|
951 |
}
|
952 |
}
|
@@ -957,7 +1041,11 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
957 |
}
|
958 |
|
959 |
foreach ( $options as $option_data ) {
|
960 |
-
if (
|
|
|
|
|
|
|
|
|
961 |
if ( isset( $field[ $option_data['name'] ] ) ) {
|
962 |
unset( $field[ $option_data['name'] ] );
|
963 |
}
|
@@ -1064,9 +1152,17 @@ class Pods_Migrate_Packages extends PodsComponent {
|
|
1064 |
}
|
1065 |
}
|
1066 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1067 |
$export = apply_filters( 'pods_packages_export', $export, $params );
|
1068 |
|
1069 |
-
if ( 1
|
1070 |
return false;
|
1071 |
}
|
1072 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* ID: migrate-packages
|
4 |
*
|
5 |
+
* Name: Import/Export Packages
|
6 |
+
*
|
7 |
+
* Menu Name: Import/Export Packages
|
8 |
*
|
9 |
* Description: Import/Export your Pods, Fields, and other settings from any Pods site; Includes an API to Import/Export Packages via PHP
|
10 |
*
|
185 |
|
186 |
self::$api = pods_api();
|
187 |
|
188 |
+
$meta = self::get_meta_from_package( $data );
|
189 |
+
|
190 |
+
if ( ! $meta ) {
|
191 |
return false;
|
192 |
}
|
193 |
|
194 |
+
self::$package_meta_version = $meta['version'];
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
+
$found = [];
|
197 |
|
198 |
+
if ( isset( $data['settings'] ) && is_array( $data['settings'] ) ) {
|
199 |
+
self::import_settings( $data['settings'] );
|
200 |
+
|
201 |
+
$found['settings']['all'] = __( 'All Settings', 'pods' );
|
202 |
+
}//end if
|
203 |
|
204 |
if ( isset( $data['pods'] ) && is_array( $data['pods'] ) ) {
|
205 |
foreach ( $data['pods'] as $pod_data ) {
|
283 |
return false;
|
284 |
}
|
285 |
|
286 |
+
/**
|
287 |
+
* Get the metadata from the package data.
|
288 |
+
*
|
289 |
+
* @since 2.9.0
|
290 |
+
*
|
291 |
+
* @param array $data The package data.
|
292 |
+
*
|
293 |
+
* @return false|array The metadata or false if no metadata is found.
|
294 |
+
*/
|
295 |
+
public static function get_meta_from_package( array $data ) {
|
296 |
+
// Get the meta property if set.
|
297 |
+
if ( isset( $data['@meta'] ) ) {
|
298 |
+
$meta = $data['@meta'];
|
299 |
+
} elseif ( isset( $data['meta'] ) ) {
|
300 |
+
$meta = $data['meta'];
|
301 |
+
} else {
|
302 |
+
return false;
|
303 |
+
}
|
304 |
+
|
305 |
+
if ( empty( $meta['version'] ) ) {
|
306 |
+
return false;
|
307 |
+
}
|
308 |
+
|
309 |
+
// Attempt to adjust the version if needed for compatibility.
|
310 |
+
$has_dot_versioning = false !== strpos( $meta['version'], '.' );
|
311 |
+
|
312 |
+
if ( ! $has_dot_versioning ) {
|
313 |
+
if ( (int) $meta['version'] < 1000 ) {
|
314 |
+
// Pods 1.x < 1.10
|
315 |
+
$meta['version'] = implode( '.', str_split( $meta['version'] ) );
|
316 |
+
} elseif ( function_exists( 'pods_version_to_point' ) ) {
|
317 |
+
// Pods 1.10 <= 2.0
|
318 |
+
$meta['version'] = pods_version_to_point( $meta['version'] );
|
319 |
+
} else {
|
320 |
+
// Default to 1.10 if we can't convert it.
|
321 |
+
$meta['version'] = '1.10';
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
return $meta;
|
326 |
+
}
|
327 |
+
|
328 |
+
/**
|
329 |
+
* Handle importing of the settings.
|
330 |
+
*
|
331 |
+
* @since 2.9.0
|
332 |
+
*
|
333 |
+
* @param array $data The import data.
|
334 |
+
*/
|
335 |
+
public static function import_settings( $data ) {
|
336 |
+
pods_update_settings( $data );
|
337 |
+
}
|
338 |
+
|
339 |
/**
|
340 |
* Handle importing of the pod.
|
341 |
*
|
883 |
}
|
884 |
|
885 |
/**
|
886 |
+
* Export a Package.
|
887 |
*
|
888 |
* $params['pods'] string|array|bool Pod IDs to export, or set to true to export all
|
889 |
* $params['templates'] string|array|bool Template IDs to export, or set to true to export all
|
890 |
* $params['pages'] string|array|bool Page IDs to export, or set to true to export all
|
891 |
* $params['helpers'] string|array|bool Helper IDs to export, or set to true to export all
|
892 |
*
|
893 |
+
* @since 2.0.5
|
894 |
*
|
895 |
+
* @param array $params The list of things to export.
|
896 |
+
*
|
897 |
+
* @return array|false The package export or false if there was a failure.
|
898 |
*
|
|
|
|
|
899 |
*/
|
900 |
public static function export( $params ) {
|
901 |
+
$export = [
|
902 |
+
'@meta' => [
|
|
|
903 |
'version' => PODS_VERSION,
|
904 |
'build' => time(),
|
905 |
+
],
|
906 |
+
];
|
907 |
|
908 |
if ( is_object( $params ) ) {
|
909 |
$params = get_object_vars( $params );
|
911 |
|
912 |
self::$api = pods_api();
|
913 |
|
914 |
+
$setting_keys = pods_v( 'settings', $params );
|
915 |
$pod_ids = pods_v( 'pods', $params );
|
916 |
$template_ids = pods_v( 'templates', $params );
|
917 |
$page_ids = pods_v( 'pages', $params );
|
918 |
$helper_ids = pods_v( 'helpers', $params );
|
919 |
|
920 |
+
if ( ! empty( $setting_keys ) ) {
|
921 |
+
$export['settings'] = [];
|
922 |
+
|
923 |
+
if ( in_array( 'all', $setting_keys, true ) ) {
|
924 |
+
$export['settings'] = pods_get_settings();
|
925 |
+
|
926 |
+
if ( isset( $export['settings']['wisdom_registered_setting'] ) ) {
|
927 |
+
unset( $export['settings']['wisdom_registered_setting'] );
|
928 |
+
}
|
929 |
+
} else {
|
930 |
+
foreach ( $setting_keys as $setting_key ) {
|
931 |
+
$setting = pods_get_setting( $setting_key );
|
932 |
+
|
933 |
+
if ( null !== $setting ) {
|
934 |
+
$export['settings'][ $setting_key ] = $setting;
|
935 |
+
}
|
936 |
+
}
|
937 |
+
}
|
938 |
+
|
939 |
+
/**
|
940 |
+
* Allow filtering the list of settings being exported to prevent potentially sensitive third-party settings from being exposed.
|
941 |
+
*
|
942 |
+
* @since 2.9.0
|
943 |
+
*
|
944 |
+
* @param array $settings The list of settings being exported.
|
945 |
+
*/
|
946 |
+
$export['settings'] = apply_filters( 'pods_migrate_packages_export_settings', $export['settings'] );
|
947 |
+
}
|
948 |
+
|
949 |
if ( ! empty( $pod_ids ) ) {
|
950 |
$api_params = [];
|
951 |
|
1014 |
|
1015 |
foreach ( $export['pods'] as $pod_key => $pod ) {
|
1016 |
foreach ( $pod as $option => $option_value ) {
|
1017 |
+
if ( null === $option_value || in_array( $option, $options_ignore, true ) ) {
|
1018 |
unset( $pod[ $option ] );
|
1019 |
}
|
1020 |
}
|
1022 |
if ( ! empty( $pod['groups'] ) ) {
|
1023 |
foreach ( $pod['groups'] as $group_key => $group ) {
|
1024 |
foreach ( $group as $option => $option_value ) {
|
1025 |
+
if ( null === $option_value || in_array( $option, $options_ignore, true ) ) {
|
1026 |
unset( $group[ $option ] );
|
1027 |
}
|
1028 |
}
|
1030 |
if ( ! empty( $group['fields'] ) ) {
|
1031 |
foreach ( $group['fields'] as $field_key => $field ) {
|
1032 |
foreach ( $field as $option => $option_value ) {
|
1033 |
+
if ( null === $option_value || in_array( $option, $options_ignore, true ) ) {
|
1034 |
unset( $field[ $option ] );
|
1035 |
}
|
1036 |
}
|
1041 |
}
|
1042 |
|
1043 |
foreach ( $options as $option_data ) {
|
1044 |
+
if (
|
1045 |
+
isset( $option_data['group'] )
|
1046 |
+
&& is_array( $option_data['group'] )
|
1047 |
+
&& ! empty( $option_data['group'] )
|
1048 |
+
) {
|
1049 |
if ( isset( $field[ $option_data['name'] ] ) ) {
|
1050 |
unset( $field[ $option_data['name'] ] );
|
1051 |
}
|
1152 |
}
|
1153 |
}
|
1154 |
|
1155 |
+
/**
|
1156 |
+
* Allow filtering the package being exported.
|
1157 |
+
*
|
1158 |
+
* @since 2.0.5
|
1159 |
+
*
|
1160 |
+
* @param array $export The export package.
|
1161 |
+
* @param array $params The list of things to export.
|
1162 |
+
*/
|
1163 |
$export = apply_filters( 'pods_packages_export', $export, $params );
|
1164 |
|
1165 |
+
if ( 1 === count( $export ) ) {
|
1166 |
return false;
|
1167 |
}
|
1168 |
|
components/Migrate-Packages/ui/wizard.php
CHANGED
@@ -117,6 +117,47 @@
|
|
117 |
<p><?php _e( 'Packages allow you to import/export your Pods, Groups, Fields, and other settings between any Pods sites.', 'pods' ); ?></p>
|
118 |
</div>
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
<?php
|
121 |
if ( ! empty( $pods ) ) {
|
122 |
$data = $pods;
|
117 |
<p><?php _e( 'Packages allow you to import/export your Pods, Groups, Fields, and other settings between any Pods sites.', 'pods' ); ?></p>
|
118 |
</div>
|
119 |
|
120 |
+
<div class="stuffbox pods-package-import-group">
|
121 |
+
<h3>
|
122 |
+
<label for="link_name"><?php _e( 'Choose whether to export Settings', 'pods' ); ?></label>
|
123 |
+
</h3>
|
124 |
+
|
125 |
+
<div class="inside pods-manage-field pods-dependency">
|
126 |
+
<div class="pods-field-option-group">
|
127 |
+
<div class="pods-pick-values pods-pick-checkbox pods-zebra">
|
128 |
+
<ul>
|
129 |
+
<?php
|
130 |
+
$data_name = 'settings';
|
131 |
+
$data = [
|
132 |
+
'all' => __( 'All Settings', 'pods' ),
|
133 |
+
];
|
134 |
+
|
135 |
+
$zebra = false;
|
136 |
+
|
137 |
+
foreach ( $data as $key => $label ) {
|
138 |
+
$checked = true;
|
139 |
+
|
140 |
+
$class = ( $zebra ? 'even' : 'odd' );
|
141 |
+
|
142 |
+
$zebra = ( ! $zebra );
|
143 |
+
?>
|
144 |
+
<li class="pods-zebra-<?php echo esc_attr( $class ); ?>">
|
145 |
+
<?php
|
146 |
+
echo PodsForm::field( $data_name . '[' . $key . ']', true, 'boolean', [
|
147 |
+
'boolean_yes_label' => $label,
|
148 |
+
'disable_dfv' => true,
|
149 |
+
] );
|
150 |
+
?>
|
151 |
+
</li>
|
152 |
+
<?php
|
153 |
+
}
|
154 |
+
?>
|
155 |
+
</ul>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
|
161 |
<?php
|
162 |
if ( ! empty( $pods ) ) {
|
163 |
$data = $pods;
|
components/Templates/includes/functions-view_template.php
CHANGED
@@ -77,7 +77,7 @@ function frontier_decode_template( $code, $atts ) {
|
|
77 |
$code = base64_decode( $code );
|
78 |
|
79 |
if ( isset( $atts['pod'] ) ) {
|
80 |
-
$code = str_replace( '@pod', $atts['pod'], $code );
|
81 |
}
|
82 |
if ( isset( $atts['id'] ) ) {
|
83 |
$code = str_replace( '{@EntryID}', $atts['id'], $code );
|
@@ -409,8 +409,7 @@ function frontier_template_once_blocks( $atts, $code ) {
|
|
409 |
* @since 2.4.0
|
410 |
*/
|
411 |
function frontier_do_subtemplate( $atts, $content ) {
|
412 |
-
|
413 |
-
$out = null;
|
414 |
$field_name = $atts['field'];
|
415 |
|
416 |
$pod = Pods_Templates::get_obj( $atts['pod'], $atts['id'] );
|
@@ -419,21 +418,49 @@ function frontier_do_subtemplate( $atts, $content ) {
|
|
419 |
return '';
|
420 |
}
|
421 |
|
422 |
-
$entries = $pod->field( $field_name );
|
423 |
-
|
424 |
$field = $pod->fields( $field_name );
|
425 |
|
426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
$entries = (array) $entries;
|
428 |
|
429 |
// Force array even for single items since the logic below is using loops.
|
430 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
$entries = array( $entries );
|
432 |
}
|
433 |
|
434 |
// Object types that could be Pods
|
435 |
$object_types = array( 'post_type', 'pod' );
|
436 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
/**
|
438 |
* Note on the change below for issue #3018:
|
439 |
* ... || 'taxonomy' == $pod->fields[ $atts[ 'field' ] ][ 'type' ]
|
@@ -445,7 +472,7 @@ function frontier_do_subtemplate( $atts, $content ) {
|
|
445 |
* the $pod->fields array and is something to not expect to be there in
|
446 |
* 3.0 as this was unintentional.
|
447 |
*/
|
448 |
-
|
449 |
// Match any Pod object or taxonomy
|
450 |
foreach ( $entries as $key => $entry ) {
|
451 |
$subpod = pods( $field['pick_val'] );
|
@@ -460,6 +487,8 @@ function frontier_do_subtemplate( $atts, $content ) {
|
|
460 |
);
|
461 |
|
462 |
$template = frontier_decode_template( $content, array_merge( $atts, $subatts ) );
|
|
|
|
|
463 |
$template = str_replace( '{_index}', $key, $template );
|
464 |
$template = str_replace( '{@' . $field_name . '.', '{@', $template );
|
465 |
|
@@ -488,28 +517,30 @@ function frontier_do_subtemplate( $atts, $content ) {
|
|
488 |
$media_pod = pods( 'media' );
|
489 |
|
490 |
foreach ( $entries as $key => $entry ) {
|
491 |
-
$
|
|
|
|
|
492 |
|
493 |
if ( $media_pod && $media_pod->valid() && $media_pod->fetch( $entry['ID'] ) ) {
|
494 |
-
$
|
495 |
|
496 |
$entry_pod = $media_pod;
|
497 |
} else {
|
498 |
-
$
|
499 |
-
$
|
500 |
-
$
|
501 |
|
502 |
// Fix for lowercase ID's.
|
503 |
$entry['id'] = $entry['ID'];
|
504 |
|
505 |
// Allow array-like tags.
|
506 |
-
$
|
507 |
|
508 |
// Fallback to parent Pod so above tags still work.
|
509 |
$entry_pod = $pod;
|
510 |
}
|
511 |
|
512 |
-
$out .= pods_do_shortcode( $entry_pod->do_magic_tags( $
|
513 |
}
|
514 |
} elseif ( isset( $field['table_info'], $field['table_info']['pod'] ) ) {
|
515 |
// Relationship to something that is extended by Pods
|
@@ -518,25 +549,36 @@ function frontier_do_subtemplate( $atts, $content ) {
|
|
518 |
$subatts = array(
|
519 |
'id' => $entry->id,
|
520 |
'pod' => $entry->pod,
|
|
|
521 |
);
|
522 |
|
523 |
$template = frontier_decode_template( $content, array_merge( $atts, $subatts ) );
|
|
|
|
|
|
|
524 |
$template = str_replace( '{_index}', $key, $template );
|
525 |
$template = str_replace( '{@' . $field_name . '.', '{@', $template );
|
526 |
|
527 |
$out .= pods_do_shortcode( $entry->do_magic_tags( $template ), frontier_get_shortcodes() );
|
528 |
}
|
529 |
} else {
|
|
|
|
|
530 |
// Relationship to something other than a Pod (ie: user)
|
531 |
foreach ( $entries as $key => $entry ) {
|
532 |
$template = frontier_decode_template( $content, $atts );
|
533 |
-
|
|
|
|
|
|
|
|
|
534 |
if ( ! is_array( $entry ) ) {
|
535 |
$entry = array(
|
536 |
-
'
|
537 |
'_value' => $entry,
|
538 |
);
|
539 |
}
|
|
|
540 |
$out .= pods_do_shortcode( frontier_pseudo_magic_tags( $template, $entry, $pod ), frontier_get_shortcodes() );
|
541 |
}
|
542 |
}//end if
|
@@ -806,19 +848,46 @@ function frontier_backtrack_template( $code, $aliases ) {
|
|
806 |
$shortcodes = explode( '__', $alias );
|
807 |
$content = $used[5][ $key ];
|
808 |
$atts = shortcode_parse_atts( $used[3][ $key ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
809 |
if ( ! empty( $atts ) ) {
|
810 |
if ( ! empty( $atts['field'] ) && false !== strpos( $atts['field'], '.' ) ) {
|
811 |
$content = str_replace( $atts['field'] . '.', '', $content );
|
812 |
}
|
|
|
813 |
preg_match_all( '/' . $regex . '/s', $content, $subused );
|
|
|
814 |
if ( ! empty( $subused[2] ) ) {
|
815 |
$content = frontier_backtrack_template( $content, $aliases );
|
816 |
}
|
817 |
-
|
818 |
-
|
819 |
-
$codecontent = '[' . $shortcodes[0] . ' seq="' . $shortcodes[1] . '"]' . base64_encode( $content ) . '[/' . $shortcodes[0] . ']';
|
820 |
}
|
821 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
}
|
823 |
}//end if
|
824 |
|
77 |
$code = base64_decode( $code );
|
78 |
|
79 |
if ( isset( $atts['pod'] ) ) {
|
80 |
+
$code = str_replace( '{@pod}', $atts['pod'], $code );
|
81 |
}
|
82 |
if ( isset( $atts['id'] ) ) {
|
83 |
$code = str_replace( '{@EntryID}', $atts['id'], $code );
|
409 |
* @since 2.4.0
|
410 |
*/
|
411 |
function frontier_do_subtemplate( $atts, $content ) {
|
412 |
+
$out = '';
|
|
|
413 |
$field_name = $atts['field'];
|
414 |
|
415 |
$pod = Pods_Templates::get_obj( $atts['pod'], $atts['id'] );
|
418 |
return '';
|
419 |
}
|
420 |
|
|
|
|
|
421 |
$field = $pod->fields( $field_name );
|
422 |
|
423 |
+
$is_repeatable_field = $field && $field->is_repeatable();
|
424 |
+
|
425 |
+
$entries = $pod->field( [
|
426 |
+
'name' => $field_name,
|
427 |
+
'display' => $is_repeatable_field,
|
428 |
+
'display_process_individually' => $is_repeatable_field,
|
429 |
+
] );
|
430 |
+
|
431 |
+
if ( $field && ! empty( $entries ) ) {
|
432 |
$entries = (array) $entries;
|
433 |
|
434 |
// Force array even for single items since the logic below is using loops.
|
435 |
+
if (
|
436 |
+
(
|
437 |
+
$is_repeatable_field
|
438 |
+
|| 'single' === $field->get_single_multi()
|
439 |
+
)
|
440 |
+
&& ! isset( $entries[0] )
|
441 |
+
) {
|
442 |
$entries = array( $entries );
|
443 |
}
|
444 |
|
445 |
// Object types that could be Pods
|
446 |
$object_types = array( 'post_type', 'pod' );
|
447 |
|
448 |
+
if ( $is_repeatable_field ) {
|
449 |
+
foreach ( $entries as $key => $entry ) {
|
450 |
+
$template = frontier_decode_template( $content, $atts );
|
451 |
+
|
452 |
+
$template = str_replace( '{_key}', '{@_index}', $template );
|
453 |
+
$template = str_replace( '{@_key}', '{@_index}', $template );
|
454 |
+
$template = str_replace( '{_index}', '{@_index}', $template );
|
455 |
+
|
456 |
+
$entry = array(
|
457 |
+
'_index' => $key,
|
458 |
+
'_value' => $entry,
|
459 |
+
);
|
460 |
+
|
461 |
+
$out .= frontier_pseudo_magic_tags( $template, $entry, $pod, true );
|
462 |
+
}
|
463 |
+
}
|
464 |
/**
|
465 |
* Note on the change below for issue #3018:
|
466 |
* ... || 'taxonomy' == $pod->fields[ $atts[ 'field' ] ][ 'type' ]
|
472 |
* the $pod->fields array and is something to not expect to be there in
|
473 |
* 3.0 as this was unintentional.
|
474 |
*/
|
475 |
+
elseif ( 'taxonomy' === $field['type'] || in_array( $field['pick_object'], $object_types, true ) ) {
|
476 |
// Match any Pod object or taxonomy
|
477 |
foreach ( $entries as $key => $entry ) {
|
478 |
$subpod = pods( $field['pick_val'] );
|
487 |
);
|
488 |
|
489 |
$template = frontier_decode_template( $content, array_merge( $atts, $subatts ) );
|
490 |
+
$template = str_replace( '{_key}', $key, $template );
|
491 |
+
$template = str_replace( '{@_key}', $key, $template );
|
492 |
$template = str_replace( '{_index}', $key, $template );
|
493 |
$template = str_replace( '{@' . $field_name . '.', '{@', $template );
|
494 |
|
517 |
$media_pod = pods( 'media' );
|
518 |
|
519 |
foreach ( $entries as $key => $entry ) {
|
520 |
+
$template = str_replace( '{_key}', $key, $template );
|
521 |
+
$template = str_replace( '{@_key}', $key, $template );
|
522 |
+
$template = str_replace( '{_index}', $key, $template );
|
523 |
|
524 |
if ( $media_pod && $media_pod->valid() && $media_pod->fetch( $entry['ID'] ) ) {
|
525 |
+
$template = str_replace( '{@' . $field_name . '.', '{@', $template );
|
526 |
|
527 |
$entry_pod = $media_pod;
|
528 |
} else {
|
529 |
+
$template = str_replace( '{@_img', '{@image_attachment.' . $entry['ID'], $template );
|
530 |
+
$template = str_replace( '{@_src', '{@image_attachment_url.' . $entry['ID'], $template );
|
531 |
+
$template = str_replace( '{@' . $field_name . '}', '{@image_attachment.' . $entry['ID'] . '}', $template );
|
532 |
|
533 |
// Fix for lowercase ID's.
|
534 |
$entry['id'] = $entry['ID'];
|
535 |
|
536 |
// Allow array-like tags.
|
537 |
+
$template = frontier_pseudo_magic_tags( $template, $entry, $pod, true );
|
538 |
|
539 |
// Fallback to parent Pod so above tags still work.
|
540 |
$entry_pod = $pod;
|
541 |
}
|
542 |
|
543 |
+
$out .= pods_do_shortcode( $entry_pod->do_magic_tags( $template ), frontier_get_shortcodes() );
|
544 |
}
|
545 |
} elseif ( isset( $field['table_info'], $field['table_info']['pod'] ) ) {
|
546 |
// Relationship to something that is extended by Pods
|
549 |
$subatts = array(
|
550 |
'id' => $entry->id,
|
551 |
'pod' => $entry->pod,
|
552 |
+
'index' => $key,
|
553 |
);
|
554 |
|
555 |
$template = frontier_decode_template( $content, array_merge( $atts, $subatts ) );
|
556 |
+
|
557 |
+
$template = str_replace( '{_key}', $key, $template );
|
558 |
+
$template = str_replace( '{@_key}', $key, $template );
|
559 |
$template = str_replace( '{_index}', $key, $template );
|
560 |
$template = str_replace( '{@' . $field_name . '.', '{@', $template );
|
561 |
|
562 |
$out .= pods_do_shortcode( $entry->do_magic_tags( $template ), frontier_get_shortcodes() );
|
563 |
}
|
564 |
} else {
|
565 |
+
$template = frontier_decode_template( $content, $atts );
|
566 |
+
|
567 |
// Relationship to something other than a Pod (ie: user)
|
568 |
foreach ( $entries as $key => $entry ) {
|
569 |
$template = frontier_decode_template( $content, $atts );
|
570 |
+
|
571 |
+
$template = str_replace( '{_key}', '{@_index}', $template );
|
572 |
+
$template = str_replace( '{@_key}', '{@_index}', $template );
|
573 |
+
$template = str_replace( '{_index}', '{@_index}', $template );
|
574 |
+
|
575 |
if ( ! is_array( $entry ) ) {
|
576 |
$entry = array(
|
577 |
+
'_index' => $key,
|
578 |
'_value' => $entry,
|
579 |
);
|
580 |
}
|
581 |
+
|
582 |
$out .= pods_do_shortcode( frontier_pseudo_magic_tags( $template, $entry, $pod ), frontier_get_shortcodes() );
|
583 |
}
|
584 |
}//end if
|
848 |
$shortcodes = explode( '__', $alias );
|
849 |
$content = $used[5][ $key ];
|
850 |
$atts = shortcode_parse_atts( $used[3][ $key ] );
|
851 |
+
|
852 |
+
$new_shortcode_name = $shortcodes[0];
|
853 |
+
|
854 |
+
$new_shortcode_atts_data = [
|
855 |
+
'seq' => $shortcodes[1],
|
856 |
+
];
|
857 |
+
|
858 |
if ( ! empty( $atts ) ) {
|
859 |
if ( ! empty( $atts['field'] ) && false !== strpos( $atts['field'], '.' ) ) {
|
860 |
$content = str_replace( $atts['field'] . '.', '', $content );
|
861 |
}
|
862 |
+
|
863 |
preg_match_all( '/' . $regex . '/s', $content, $subused );
|
864 |
+
|
865 |
if ( ! empty( $subused[2] ) ) {
|
866 |
$content = frontier_backtrack_template( $content, $aliases );
|
867 |
}
|
868 |
+
|
869 |
+
$new_shortcode_atts_data[] = trim( $used[3][ $key ] );
|
|
|
870 |
}
|
871 |
+
|
872 |
+
$new_shortcode_atts = '';
|
873 |
+
|
874 |
+
foreach ( $new_shortcode_atts_data as $new_shortcode_att_key => $new_shortcode_att_data ) {
|
875 |
+
if ( is_int( $new_shortcode_att_key ) ) {
|
876 |
+
$new_shortcode_atts .= ' ' . $new_shortcode_att_data;
|
877 |
+
} else {
|
878 |
+
$new_shortcode_atts .= ' ' . $new_shortcode_att_key . '="' . esc_attr( $new_shortcode_att_data ) . '"';
|
879 |
+
}
|
880 |
+
}
|
881 |
+
|
882 |
+
// Build the new shortcode.
|
883 |
+
$new_shortcode = sprintf(
|
884 |
+
'[%1$s %2$s]%3$s[/%1$s]',
|
885 |
+
$new_shortcode_name,
|
886 |
+
$new_shortcode_atts,
|
887 |
+
base64_encode( $content )
|
888 |
+
);
|
889 |
+
|
890 |
+
$code = str_replace( $used[0][ $key ], $new_shortcode, $code );
|
891 |
}
|
892 |
}//end if
|
893 |
|
includes/data.php
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
/**
|
3 |
* @package Pods\Global\Functions\Data
|
4 |
*/
|
|
|
|
|
|
|
5 |
/**
|
6 |
* Filter input and return sanitized output
|
7 |
*
|
@@ -1917,6 +1920,24 @@ function pods_serial_comma( $value, $field = null, $fields = null, $and = null,
|
|
1917 |
|
1918 |
$original_value = $value;
|
1919 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1920 |
if ( in_array( $params->separator, array( '', null ), true ) ) {
|
1921 |
$params->separator = ', ';
|
1922 |
}
|
@@ -2573,3 +2594,28 @@ function pods_clean_memory( $sleep_time = 0 ) {
|
|
2573 |
call_user_func( [ $wp_object_cache, '__remoteset' ] ); // important
|
2574 |
}
|
2575 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/**
|
3 |
* @package Pods\Global\Functions\Data
|
4 |
*/
|
5 |
+
|
6 |
+
use Pods\Whatsit\Field;
|
7 |
+
|
8 |
/**
|
9 |
* Filter input and return sanitized output
|
10 |
*
|
1920 |
|
1921 |
$original_value = $value;
|
1922 |
|
1923 |
+
$separator_excluded = [
|
1924 |
+
'avatar',
|
1925 |
+
'code',
|
1926 |
+
'link',
|
1927 |
+
'oembed',
|
1928 |
+
'paragraph',
|
1929 |
+
'website',
|
1930 |
+
'wysiwyg',
|
1931 |
+
];
|
1932 |
+
|
1933 |
+
$basic_separator = $params->field && in_array( $params->field['type'], $separator_excluded, true );
|
1934 |
+
|
1935 |
+
if ( $basic_separator ) {
|
1936 |
+
$params->separator = ' ';
|
1937 |
+
$params->and = ' ';
|
1938 |
+
$params->serial = false;
|
1939 |
+
}
|
1940 |
+
|
1941 |
if ( in_array( $params->separator, array( '', null ), true ) ) {
|
1942 |
$params->separator = ', ';
|
1943 |
}
|
2594 |
call_user_func( [ $wp_object_cache, '__remoteset' ] ); // important
|
2595 |
}
|
2596 |
}
|
2597 |
+
|
2598 |
+
/**
|
2599 |
+
* Get the host from a URL.
|
2600 |
+
*
|
2601 |
+
* @since 2.9.0
|
2602 |
+
*
|
2603 |
+
* @param string $url The URL to get the host from.
|
2604 |
+
*
|
2605 |
+
* @return string The host if found, otherwise the URL.
|
2606 |
+
*/
|
2607 |
+
function pods_host_from_url( $url ) {
|
2608 |
+
$url_parsed = wp_parse_url( $url );
|
2609 |
+
|
2610 |
+
// Check if we have a valid URL.
|
2611 |
+
if ( empty( $url_parsed ) || count( $url_parsed ) < 2 ) {
|
2612 |
+
return esc_html( $url );
|
2613 |
+
}
|
2614 |
+
|
2615 |
+
// Check if we should remove the www from the host.
|
2616 |
+
if ( 0 === strpos( $url_parsed['host'], 'www.' ) ) {
|
2617 |
+
$url_parsed['host'] = substr( $url_parsed['host'], 4 );
|
2618 |
+
}
|
2619 |
+
|
2620 |
+
return esc_html( $url_parsed['host'] );
|
2621 |
+
}
|
includes/general.php
CHANGED
@@ -5,12 +5,12 @@
|
|
5 |
|
6 |
use Pods\Admin\Settings;
|
7 |
use Pods\API\Whatsit\Value_Field;
|
|
|
|
|
8 |
use Pods\Whatsit;
|
9 |
use Pods\Whatsit\Field;
|
10 |
use Pods\Whatsit\Pod;
|
11 |
use Pods\Whatsit\Store;
|
12 |
-
use Pods\Permissions;
|
13 |
-
use Pods\Static_Cache;
|
14 |
|
15 |
/**
|
16 |
* Standardize queries and error reporting. It replaces @wp_ with $wpdb->prefix.
|
@@ -343,11 +343,23 @@ function pods_debug( $debug = '_null', $die = false, $prefix = '_null' ) {
|
|
343 |
$pods_debug ++;
|
344 |
|
345 |
if ( function_exists( 'codecept_debug' ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
346 |
if ( ! is_string( $debug ) ) {
|
347 |
$debug = var_export( $debug, true );
|
348 |
}
|
349 |
|
350 |
-
codecept_debug( 'Pods Debug: ' . $debug );
|
|
|
|
|
351 |
|
352 |
return;
|
353 |
}
|
@@ -368,12 +380,24 @@ function pods_debug( $debug = '_null', $die = false, $prefix = '_null' ) {
|
|
368 |
var_dump( $prefix );
|
369 |
}
|
370 |
|
|
|
|
|
371 |
if ( '_null' !== $debug ) {
|
372 |
var_dump( $debug );
|
|
|
|
|
373 |
} else {
|
374 |
var_dump( 'Pods Debug #' . $pods_debug );
|
|
|
|
|
375 |
}
|
376 |
|
|
|
|
|
|
|
|
|
|
|
|
|
377 |
$debug = ob_get_clean();
|
378 |
|
379 |
if ( false === strpos( $debug, "<pre class='xdebug-var-dump'" ) ) {
|
@@ -382,6 +406,19 @@ function pods_debug( $debug = '_null', $die = false, $prefix = '_null' ) {
|
|
382 |
}
|
383 |
|
384 |
$debug = '<pre>' . $debug . '</pre>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
}
|
386 |
|
387 |
$debug = '<e>' . $debug;
|
@@ -748,16 +785,18 @@ function pods_deprecated( $function, $version, $replacement = null ) {
|
|
748 |
/**
|
749 |
* Inline help
|
750 |
*
|
751 |
-
* @param string
|
752 |
-
* @param string $url
|
|
|
753 |
*
|
754 |
* @return void
|
755 |
*
|
756 |
* @since 2.0.0
|
757 |
*/
|
758 |
-
function pods_help( $text, $url = null ) {
|
759 |
if ( ! wp_script_is( 'jquery-qtip2', 'registered' ) ) {
|
760 |
wp_register_script( 'jquery-qtip2', PODS_URL . 'ui/js/qtip/jquery.qtip.min.js', array( 'jquery' ), '3.0.3' );
|
|
|
761 |
} elseif ( ! wp_script_is( 'jquery-qtip2', 'queue' ) && ! wp_script_is( 'jquery-qtip2', 'to_do' ) && ! wp_script_is( 'jquery-qtip2', 'done' ) ) {
|
762 |
wp_enqueue_script( 'jquery-qtip2' );
|
763 |
}
|
@@ -772,6 +811,24 @@ function pods_help( $text, $url = null ) {
|
|
772 |
pods_form_enqueue_script( 'pods-qtip-init' );
|
773 |
}
|
774 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
775 |
if ( is_array( $text ) ) {
|
776 |
if ( isset( $text[1] ) ) {
|
777 |
$url = $text[1];
|
@@ -2507,31 +2564,103 @@ function pods_template_part( $template, $data = null, $return = false ) {
|
|
2507 |
}
|
2508 |
|
2509 |
/**
|
2510 |
-
* Add a new Pod outside of the DB
|
2511 |
-
*
|
2512 |
-
* @see PodsMeta::register
|
2513 |
*
|
2514 |
* @param string $type The pod type ('post_type', 'taxonomy', 'media', 'user', 'comment')
|
2515 |
* @param string $name The pod name
|
2516 |
-
* @
|
2517 |
*
|
2518 |
* @return array|boolean Pod data or false if unsuccessful
|
2519 |
* @since 2.1.0
|
2520 |
*/
|
2521 |
function pods_register_type( $type, $name, $object = null ) {
|
2522 |
if ( empty( $object ) ) {
|
2523 |
-
$object =
|
2524 |
}
|
2525 |
|
2526 |
if ( ! empty( $name ) ) {
|
2527 |
$object['name'] = $name;
|
2528 |
}
|
2529 |
|
2530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2531 |
}
|
2532 |
|
2533 |
/**
|
2534 |
-
* Add a new Pod field outside of the DB
|
2535 |
*
|
2536 |
* @see PodsMeta::register_field
|
2537 |
*
|
@@ -2539,19 +2668,23 @@ function pods_register_type( $type, $name, $object = null ) {
|
|
2539 |
* @param string $name The name of the Pod
|
2540 |
* @param array $object (optional) Pod array, including any 'fields' arrays
|
2541 |
*
|
2542 |
-
* @return array|boolean Field data or
|
2543 |
* @since 2.1.0
|
2544 |
*/
|
2545 |
function pods_register_field( $pod, $name, $field = null ) {
|
|
|
|
|
2546 |
if ( empty( $field ) ) {
|
2547 |
-
$field =
|
2548 |
}
|
2549 |
|
2550 |
if ( ! empty( $name ) ) {
|
2551 |
$field['name'] = $name;
|
2552 |
}
|
2553 |
|
2554 |
-
|
|
|
|
|
2555 |
}
|
2556 |
|
2557 |
/**
|
@@ -2594,11 +2727,18 @@ function pods_register_related_object( $name, $label, $options = null ) {
|
|
2594 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2595 |
*/
|
2596 |
function pods_register_object( array $object, $type ) {
|
2597 |
-
$object['object_type']
|
2598 |
-
$object['object_storage_type'] = 'collection';
|
2599 |
|
2600 |
-
|
2601 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2602 |
|
2603 |
return true;
|
2604 |
}
|
@@ -2614,13 +2754,21 @@ function pods_register_object( array $object, $type ) {
|
|
2614 |
*
|
2615 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2616 |
*/
|
2617 |
-
function pods_register_group( array $group, $pod, array $fields ) {
|
2618 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2619 |
|
2620 |
pods_register_object( $group, 'group' );
|
2621 |
|
2622 |
foreach ( $fields as $field ) {
|
2623 |
-
pods_register_group_field( $field, $group['name'], $
|
2624 |
}
|
2625 |
|
2626 |
return true;
|
@@ -2638,7 +2786,9 @@ function pods_register_group( array $group, $pod, array $fields ) {
|
|
2638 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2639 |
*/
|
2640 |
function pods_register_group_field( array $field, $group, $pod ) {
|
2641 |
-
$
|
|
|
|
|
2642 |
$field['group'] = $group;
|
2643 |
|
2644 |
pods_register_object( $field, 'field' );
|
@@ -2712,6 +2862,79 @@ function pods_register_block_collection( array $collection ) {
|
|
2712 |
return true;
|
2713 |
}
|
2714 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2715 |
/**
|
2716 |
* Require a component (always-on)
|
2717 |
*
|
5 |
|
6 |
use Pods\Admin\Settings;
|
7 |
use Pods\API\Whatsit\Value_Field;
|
8 |
+
use Pods\Config_Handler;
|
9 |
+
use Pods\Permissions;
|
10 |
use Pods\Whatsit;
|
11 |
use Pods\Whatsit\Field;
|
12 |
use Pods\Whatsit\Pod;
|
13 |
use Pods\Whatsit\Store;
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Standardize queries and error reporting. It replaces @wp_ with $wpdb->prefix.
|
343 |
$pods_debug ++;
|
344 |
|
345 |
if ( function_exists( 'codecept_debug' ) ) {
|
346 |
+
static $timer;
|
347 |
+
|
348 |
+
$now = microtime( true );
|
349 |
+
|
350 |
+
if ( ! $timer ) {
|
351 |
+
$timer = $now;
|
352 |
+
}
|
353 |
+
|
354 |
+
$timing = $now - $timer;
|
355 |
+
|
356 |
if ( ! is_string( $debug ) ) {
|
357 |
$debug = var_export( $debug, true );
|
358 |
}
|
359 |
|
360 |
+
codecept_debug( 'Pods Debug: ' . $debug . ' [debug timing: ' . number_format( $timing, 4 ) . 's]' );
|
361 |
+
|
362 |
+
$timer = $now;
|
363 |
|
364 |
return;
|
365 |
}
|
380 |
var_dump( $prefix );
|
381 |
}
|
382 |
|
383 |
+
$debug_line_number = 0;
|
384 |
+
|
385 |
if ( '_null' !== $debug ) {
|
386 |
var_dump( $debug );
|
387 |
+
|
388 |
+
$debug_line_number = __LINE__ - 2;
|
389 |
} else {
|
390 |
var_dump( 'Pods Debug #' . $pods_debug );
|
391 |
+
|
392 |
+
$debug_line_number = __LINE__ - 2;
|
393 |
}
|
394 |
|
395 |
+
$debug_line_check = sprintf(
|
396 |
+
'<small>%s:%s:</small>',
|
397 |
+
__FILE__,
|
398 |
+
$debug_line_number
|
399 |
+
);
|
400 |
+
|
401 |
$debug = ob_get_clean();
|
402 |
|
403 |
if ( false === strpos( $debug, "<pre class='xdebug-var-dump'" ) ) {
|
406 |
}
|
407 |
|
408 |
$debug = '<pre>' . $debug . '</pre>';
|
409 |
+
} elseif ( false !== strpos( $debug, $debug_line_check ) ) {
|
410 |
+
// Attempt to replace the backtrace file/line from our var_dump() above with where the pods_debug() itself was called.
|
411 |
+
$backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 2 );
|
412 |
+
|
413 |
+
if ( ! empty( $backtrace[0] ) ) {
|
414 |
+
$debug_line_replace = sprintf(
|
415 |
+
'<small>%s:%s:</small>',
|
416 |
+
$backtrace[0]['file'],
|
417 |
+
$backtrace[0]['line']
|
418 |
+
);
|
419 |
+
|
420 |
+
$debug = str_replace( $debug_line_check, $debug_line_replace, $debug );
|
421 |
+
}
|
422 |
}
|
423 |
|
424 |
$debug = '<e>' . $debug;
|
785 |
/**
|
786 |
* Inline help
|
787 |
*
|
788 |
+
* @param string $text Help text.
|
789 |
+
* @param null|string $url Documentation URL.
|
790 |
+
* @param null|string $container The HTML container path for where the inline help will live.
|
791 |
*
|
792 |
* @return void
|
793 |
*
|
794 |
* @since 2.0.0
|
795 |
*/
|
796 |
+
function pods_help( $text, $url = null, $container = null ) {
|
797 |
if ( ! wp_script_is( 'jquery-qtip2', 'registered' ) ) {
|
798 |
wp_register_script( 'jquery-qtip2', PODS_URL . 'ui/js/qtip/jquery.qtip.min.js', array( 'jquery' ), '3.0.3' );
|
799 |
+
wp_enqueue_script( 'jquery-qtip2' );
|
800 |
} elseif ( ! wp_script_is( 'jquery-qtip2', 'queue' ) && ! wp_script_is( 'jquery-qtip2', 'to_do' ) && ! wp_script_is( 'jquery-qtip2', 'done' ) ) {
|
801 |
wp_enqueue_script( 'jquery-qtip2' );
|
802 |
}
|
811 |
pods_form_enqueue_script( 'pods-qtip-init' );
|
812 |
}
|
813 |
|
814 |
+
pods_form_enqueue_script( 'pods' );
|
815 |
+
pods_form_enqueue_style( 'pods' );
|
816 |
+
|
817 |
+
static $pods_qtip_added = [];
|
818 |
+
|
819 |
+
if ( null !== $container && ! isset( $pods_qtip_added[ $container ] ) ) {
|
820 |
+
wp_add_inline_script(
|
821 |
+
'pods',
|
822 |
+
"
|
823 |
+
jQuery( function ( $ ) {
|
824 |
+
$( document ).Pods( 'qtip', '" . esc_js( $container ) . "' );
|
825 |
+
} );
|
826 |
+
"
|
827 |
+
);
|
828 |
+
|
829 |
+
$pods_qtip_added[ $container ] = true;
|
830 |
+
}
|
831 |
+
|
832 |
if ( is_array( $text ) ) {
|
833 |
if ( isset( $text[1] ) ) {
|
834 |
$url = $text[1];
|
2564 |
}
|
2565 |
|
2566 |
/**
|
2567 |
+
* Add a new Pod outside of the DB.
|
|
|
|
|
2568 |
*
|
2569 |
* @param string $type The pod type ('post_type', 'taxonomy', 'media', 'user', 'comment')
|
2570 |
* @param string $name The pod name
|
2571 |
+
* @return array|boolean|WP_Error Field data or WP_Error if unsuccessful.
|
2572 |
*
|
2573 |
* @return array|boolean Pod data or false if unsuccessful
|
2574 |
* @since 2.1.0
|
2575 |
*/
|
2576 |
function pods_register_type( $type, $name, $object = null ) {
|
2577 |
if ( empty( $object ) ) {
|
2578 |
+
$object = [];
|
2579 |
}
|
2580 |
|
2581 |
if ( ! empty( $name ) ) {
|
2582 |
$object['name'] = $name;
|
2583 |
}
|
2584 |
|
2585 |
+
if ( ! empty( $type ) ) {
|
2586 |
+
$object['type'] = $type;
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
if ( ! isset( PodsMeta::$queue[ $object['type'] ] ) ) {
|
2590 |
+
PodsMeta::$queue[ $object['type'] ] = [];
|
2591 |
+
}
|
2592 |
+
|
2593 |
+
$groups = [];
|
2594 |
+
$fields = [];
|
2595 |
+
|
2596 |
+
if ( isset( $object['groups'] ) ) {
|
2597 |
+
$groups = $object['groups'];
|
2598 |
+
|
2599 |
+
unset( $object['groups'] );
|
2600 |
+
}
|
2601 |
+
|
2602 |
+
if ( isset( $object['fields'] ) ) {
|
2603 |
+
$fields = $object['fields'];
|
2604 |
+
|
2605 |
+
unset( $object['fields'] );
|
2606 |
+
}
|
2607 |
+
|
2608 |
+
// Maybe set the code source for this type.
|
2609 |
+
if (
|
2610 |
+
! isset( $object['_pods_code_source'] )
|
2611 |
+
&& (
|
2612 |
+
! isset( $object['object_storage_type'] )
|
2613 |
+
|| 'file' !== $object['object_storage_type']
|
2614 |
+
)
|
2615 |
+
) {
|
2616 |
+
$debug_info = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 3 );
|
2617 |
+
|
2618 |
+
foreach ( $debug_info as $debug ) {
|
2619 |
+
// Skip Pods-related and WP-related hook registrations.
|
2620 |
+
if ( 0 === strpos( $debug['file'], PODS_DIR ) || 0 === strpos( $debug['file'], WPINC ) ) {
|
2621 |
+
continue;
|
2622 |
+
}
|
2623 |
+
|
2624 |
+
$object['_pods_code_source'] = sprintf(
|
2625 |
+
'%s : %s %d',
|
2626 |
+
$debug['file'],
|
2627 |
+
esc_html__( 'Line', 'pods' ),
|
2628 |
+
$debug['line']
|
2629 |
+
);
|
2630 |
+
|
2631 |
+
break;
|
2632 |
+
}
|
2633 |
+
}
|
2634 |
+
|
2635 |
+
$registered = pods_register_object( $object, 'pod' );
|
2636 |
+
|
2637 |
+
if ( true === $registered ) {
|
2638 |
+
try {
|
2639 |
+
$object_collection = Store::get_instance();
|
2640 |
+
|
2641 |
+
$registered_object = $object_collection->get_object( 'pod/' . $object['name'] );
|
2642 |
+
|
2643 |
+
if ( $registered_object ) {
|
2644 |
+
PodsMeta::$queue[ $object['type'] ][ $object['name'] ] = $registered_object;
|
2645 |
+
}
|
2646 |
+
} catch ( Exception $exception ) {
|
2647 |
+
return new WP_Error( 'pods-register-type-error', $exception->getMessage() );
|
2648 |
+
}
|
2649 |
+
}
|
2650 |
+
|
2651 |
+
foreach ( $groups as $group ) {
|
2652 |
+
pods_register_group( $group, $object['name'] );
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
foreach ( $fields as $field ) {
|
2656 |
+
pods_register_field( $object['name'], $field['name'], $field );
|
2657 |
+
}
|
2658 |
+
|
2659 |
+
return $registered;
|
2660 |
}
|
2661 |
|
2662 |
/**
|
2663 |
+
* Add a new Pod field outside of the DB.
|
2664 |
*
|
2665 |
* @see PodsMeta::register_field
|
2666 |
*
|
2668 |
* @param string $name The name of the Pod
|
2669 |
* @param array $object (optional) Pod array, including any 'fields' arrays
|
2670 |
*
|
2671 |
+
* @return array|boolean|WP_Error Field data or WP_Error if unsuccessful.
|
2672 |
* @since 2.1.0
|
2673 |
*/
|
2674 |
function pods_register_field( $pod, $name, $field = null ) {
|
2675 |
+
$pod_name = is_string( $pod ) ? $pod : $pod['name'];
|
2676 |
+
|
2677 |
if ( empty( $field ) ) {
|
2678 |
+
$field = [];
|
2679 |
}
|
2680 |
|
2681 |
if ( ! empty( $name ) ) {
|
2682 |
$field['name'] = $name;
|
2683 |
}
|
2684 |
|
2685 |
+
$field['parent'] = 'pod/' . $pod_name;
|
2686 |
+
|
2687 |
+
return pods_register_object( $field, 'field' );
|
2688 |
}
|
2689 |
|
2690 |
/**
|
2727 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2728 |
*/
|
2729 |
function pods_register_object( array $object, $type ) {
|
2730 |
+
$object['object_type'] = $type;
|
|
|
2731 |
|
2732 |
+
if ( ! isset( $object['object_storage_type'] ) || 'post_type' === $object['object_storage_type'] ) {
|
2733 |
+
$object['object_storage_type'] = 'collection';
|
2734 |
+
}
|
2735 |
+
|
2736 |
+
try {
|
2737 |
+
$object_collection = Store::get_instance();
|
2738 |
+
$object_collection->register_object( $object );
|
2739 |
+
} catch ( Exception $exception ) {
|
2740 |
+
return new WP_Error( 'pods-register-object-error', $exception->getMessage() );
|
2741 |
+
}
|
2742 |
|
2743 |
return true;
|
2744 |
}
|
2754 |
*
|
2755 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2756 |
*/
|
2757 |
+
function pods_register_group( array $group, $pod, array $fields = [] ) {
|
2758 |
+
$pod_name = is_string( $pod ) ? $pod : $pod['name'];
|
2759 |
+
|
2760 |
+
$group['parent'] = 'pod/' . $pod_name;
|
2761 |
+
|
2762 |
+
if ( isset( $group['fields'] ) ) {
|
2763 |
+
$fields = $group['fields'];
|
2764 |
+
|
2765 |
+
unset( $group['fields'] );
|
2766 |
+
}
|
2767 |
|
2768 |
pods_register_object( $group, 'group' );
|
2769 |
|
2770 |
foreach ( $fields as $field ) {
|
2771 |
+
pods_register_group_field( $field, $group['name'], $pod_name );
|
2772 |
}
|
2773 |
|
2774 |
return true;
|
2786 |
* @return true|WP_Error True if successful, or else an WP_Error with the problem.
|
2787 |
*/
|
2788 |
function pods_register_group_field( array $field, $group, $pod ) {
|
2789 |
+
$pod_name = is_string( $pod ) ? $pod : $pod['name'];
|
2790 |
+
|
2791 |
+
$field['parent'] = 'pod/' . $pod_name;
|
2792 |
$field['group'] = $group;
|
2793 |
|
2794 |
pods_register_object( $field, 'field' );
|
2862 |
return true;
|
2863 |
}
|
2864 |
|
2865 |
+
/**
|
2866 |
+
* Register a custom config file to use with Pods configs.
|
2867 |
+
*
|
2868 |
+
* @since TBD
|
2869 |
+
*
|
2870 |
+
* @param string $file The config file to use.
|
2871 |
+
* @param string $config_type The config file type to use (defaults to json).
|
2872 |
+
*/
|
2873 |
+
function pods_register_config_file( $file, $config_type = 'json' ) {
|
2874 |
+
try {
|
2875 |
+
$config_handler = pods_container( Config_Handler::class );
|
2876 |
+
|
2877 |
+
$config_handler->register_file( $file, $config_type );
|
2878 |
+
} catch ( Exception $exception ) {
|
2879 |
+
// Container does not exist yet, we cannot do anything at this point.
|
2880 |
+
}
|
2881 |
+
}
|
2882 |
+
|
2883 |
+
/**
|
2884 |
+
* Register a custom config path to use with Pods configs.
|
2885 |
+
*
|
2886 |
+
* @since TBD
|
2887 |
+
*
|
2888 |
+
* @param string $path The config path to use.
|
2889 |
+
*/
|
2890 |
+
function pods_register_config_path( $path ) {
|
2891 |
+
try {
|
2892 |
+
$config_handler = pods_container( Config_Handler::class );
|
2893 |
+
|
2894 |
+
$config_handler->register_path( $path );
|
2895 |
+
} catch ( Exception $exception ) {
|
2896 |
+
// Container does not exist yet, we cannot do anything at this point.
|
2897 |
+
}
|
2898 |
+
}
|
2899 |
+
|
2900 |
+
/**
|
2901 |
+
* Register a custom config type to use with Pods configs.
|
2902 |
+
*
|
2903 |
+
* For custom config types, use the pods_config_parse_$type filter along with this to support other format parsing.
|
2904 |
+
*
|
2905 |
+
* Default support for json and yml can be filtered with the pods_config_parse filter to override them.
|
2906 |
+
*
|
2907 |
+
* @since TBD
|
2908 |
+
*
|
2909 |
+
* @param string $type The config type to use.
|
2910 |
+
*/
|
2911 |
+
function pods_register_config_type( $type ) {
|
2912 |
+
try {
|
2913 |
+
$config_handler = pods_container( Config_Handler::class );
|
2914 |
+
|
2915 |
+
$config_handler->register_config_type( $type );
|
2916 |
+
} catch ( Exception $exception ) {
|
2917 |
+
// Container does not exist yet, we cannot do anything at this point.
|
2918 |
+
}
|
2919 |
+
}
|
2920 |
+
|
2921 |
+
/**
|
2922 |
+
* Register a custom config item type to use with Pods configs.
|
2923 |
+
*
|
2924 |
+
* @since TBD
|
2925 |
+
*
|
2926 |
+
* @param string $item_type The config path to use.
|
2927 |
+
*/
|
2928 |
+
function pods_register_config_item_type( $item_type ) {
|
2929 |
+
try {
|
2930 |
+
$config_handler = pods_container( Config_Handler::class );
|
2931 |
+
|
2932 |
+
$config_handler->register_config_item_type( $item_type );
|
2933 |
+
} catch ( Exception $exception ) {
|
2934 |
+
// Container does not exist yet, we cannot do anything at this point.
|
2935 |
+
}
|
2936 |
+
}
|
2937 |
+
|
2938 |
/**
|
2939 |
* Require a component (always-on)
|
2940 |
*
|
init.php
CHANGED
@@ -10,13 +10,13 @@
|
|
10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
11 |
* Plugin URI: https://pods.io/
|
12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
13 |
-
* Version: 2.
|
14 |
* Author: Pods Framework Team
|
15 |
* Author URI: https://pods.io/about/
|
16 |
* Text Domain: pods
|
17 |
* License: GPL v2 or later
|
18 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
19 |
-
* Requires at least: 5.
|
20 |
* Requires PHP: 5.6
|
21 |
* GitHub Plugin URI: https://github.com/pods-framework/pods
|
22 |
* Primary Branch: main
|
@@ -43,7 +43,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
44 |
} else {
|
45 |
// Current version.
|
46 |
-
define( 'PODS_VERSION', '2.
|
47 |
|
48 |
// Current database version, this is the last version the database changed.
|
49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
@@ -56,7 +56,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
56 |
* To be updated each Major x.x Pods release.
|
57 |
*/
|
58 |
if ( ! defined( 'PODS_WP_VERSION_MINIMUM' ) ) {
|
59 |
-
define( 'PODS_WP_VERSION_MINIMUM', '5.
|
60 |
}
|
61 |
|
62 |
/**
|
@@ -64,7 +64,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
64 |
*
|
65 |
* Found at: https://wordpress.org/about/stats/
|
66 |
*
|
67 |
-
* Next planned minimum PHP version: 7.
|
68 |
*/
|
69 |
if ( ! defined( 'PODS_PHP_VERSION_MINIMUM' ) ) {
|
70 |
define( 'PODS_PHP_VERSION_MINIMUM', '5.6' );
|
10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
11 |
* Plugin URI: https://pods.io/
|
12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
13 |
+
* Version: 2.9.0
|
14 |
* Author: Pods Framework Team
|
15 |
* Author URI: https://pods.io/about/
|
16 |
* Text Domain: pods
|
17 |
* License: GPL v2 or later
|
18 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
19 |
+
* Requires at least: 5.7
|
20 |
* Requires PHP: 5.6
|
21 |
* GitHub Plugin URI: https://github.com/pods-framework/pods
|
22 |
* Primary Branch: main
|
43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
44 |
} else {
|
45 |
// Current version.
|
46 |
+
define( 'PODS_VERSION', '2.9.0' );
|
47 |
|
48 |
// Current database version, this is the last version the database changed.
|
49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
56 |
* To be updated each Major x.x Pods release.
|
57 |
*/
|
58 |
if ( ! defined( 'PODS_WP_VERSION_MINIMUM' ) ) {
|
59 |
+
define( 'PODS_WP_VERSION_MINIMUM', '5.7' );
|
60 |
}
|
61 |
|
62 |
/**
|
64 |
*
|
65 |
* Found at: https://wordpress.org/about/stats/
|
66 |
*
|
67 |
+
* Next planned minimum PHP version: 7.2 (to match WooCommerce and others pushing WP forward).
|
68 |
*/
|
69 |
if ( ! defined( 'PODS_PHP_VERSION_MINIMUM' ) ) {
|
70 |
define( 'PODS_PHP_VERSION_MINIMUM', '5.6' );
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Contributors: sc0ttkclark, zrothauser, keraweb, jimtrue, quasel, nicdford, jamesgol, ramoonus, pglewis, dan.stefan, Desertsnowman, mgibbs189, Shelob9, clubduece, curtismchale, mikedamage, jchristopher, pcfreak30
|
3 |
Donate link: https://friends.pods.io/
|
4 |
Tags: pods, custom post types, custom taxonomies, content types, custom fields, block
|
5 |
-
Requires at least: 5.
|
6 |
-
Tested up to: 6.
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -47,6 +47,7 @@ We have an extensive collection of over [25 different input types to choose from
|
|
47 |
|
48 |
You can also control visibility by role/capability and [other advanced options](https://docs.pods.io/fields/settings-advanced/).
|
49 |
|
|
|
50 |
* **Text:** Plain Text, Website, Phone, Email, Password
|
51 |
* **Paragraph:** Plain Paragraph Text, WYSIWYG (Visual Editor), Code (Syntax Highlighting)
|
52 |
* **Date / Time:** Date and Time, Date, Time
|
@@ -94,17 +95,25 @@ You can enable some of our included components to extend your WordPress site eve
|
|
94 |
We also do our best to integrate and play nicely with other projects:
|
95 |
|
96 |
* **Plugins we've integrated with**
|
97 |
-
* [Beaver Builder](https://
|
|
|
98 |
* [Codepress Admin Columns](https://wordpress.org/plugins/codepress-admin-columns/) using the [Pods Add-On for Admin Columns Pro](https://www.admincolumns.com/pods/)
|
99 |
* [Conductor](https://conductorplugin.com/)
|
|
|
|
|
|
|
100 |
* [Gravity Forms](https://www.gravityforms.com/) using the free [Pods Gravity Forms Add-on](https://wordpress.org/plugins/pods-gravity-forms/)
|
|
|
101 |
* [Paid Memberships Pro](https://wordpress.org/plugins/paid-memberships-pro/) using the free [Paid Memberships Pro - Pods Add On](https://wordpress.org/plugins/pmpro-pods/)
|
102 |
-
* [Polylang](https://wordpress.org/plugins/polylang/)
|
|
|
103 |
* [Timber](https://wordpress.org/plugins/timber-library/)
|
104 |
-
* [
|
105 |
-
* [
|
|
|
106 |
* **Themes we've integrated with**
|
107 |
-
* [
|
|
|
108 |
|
109 |
== Installation ==
|
110 |
|
@@ -156,6 +165,33 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
156 |
|
157 |
== Changelog ==
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
= 2.8.23 - July 4th, 2022 =
|
160 |
|
161 |
* Tweak: Added support for exporting post types and taxonomies to PHP for debugging purposes. While logged in as an admin, add `?pods_debug_register_export=1` to expose textareas on the page to get the code. (@sc0ttkclark)
|
@@ -165,7 +201,7 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
165 |
* Fixed: Resolved potential PHP warnings on certain sites by preparing SQL queries separately from other string processing. #6556 #6555 #6554 (@JoryHogeveen, @sc0ttkclark)
|
166 |
* Fixed: Resolved potential PHP notices when getting table information in `PodsData::table()`. (@JoryHogeveen)
|
167 |
* Fixed: Resolved potential PHP type conversion warnings by passing `SORT_REGULAR` to `array_unique()`` in the File field saving process. (@JoryHogeveen)
|
168 |
-
* Fixed: Pods Auto Templates defaults for some fields were set to "true" and that is now treated as empty. The default for those fields are now empty as intended. This resolves notices on the Edit Pod screen about templates being used for Archives when Archives are disabled, but there was no template intentionally set for Archive. (@sc0ttkclark)
|
169 |
|
170 |
= 2.8.22.1 - July 3rd, 2022 =
|
171 |
|
2 |
Contributors: sc0ttkclark, zrothauser, keraweb, jimtrue, quasel, nicdford, jamesgol, ramoonus, pglewis, dan.stefan, Desertsnowman, mgibbs189, Shelob9, clubduece, curtismchale, mikedamage, jchristopher, pcfreak30
|
3 |
Donate link: https://friends.pods.io/
|
4 |
Tags: pods, custom post types, custom taxonomies, content types, custom fields, block
|
5 |
+
Requires at least: 5.7
|
6 |
+
Tested up to: 6.1
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.9.0
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
47 |
|
48 |
You can also control visibility by role/capability and [other advanced options](https://docs.pods.io/fields/settings-advanced/).
|
49 |
|
50 |
+
* **Repeatable Fields:** Turn almost any field into a repeatable field with multiple values
|
51 |
* **Text:** Plain Text, Website, Phone, Email, Password
|
52 |
* **Paragraph:** Plain Paragraph Text, WYSIWYG (Visual Editor), Code (Syntax Highlighting)
|
53 |
* **Date / Time:** Date and Time, Date, Time
|
95 |
We also do our best to integrate and play nicely with other projects:
|
96 |
|
97 |
* **Plugins we've integrated with**
|
98 |
+
* [Beaver Builder](https://wordpress.org/plugins/beaver-builder-lite-version/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
99 |
+
* [Beaver Themer](https://www.wpbeaverbuilder.com/beaver-themer/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
100 |
* [Codepress Admin Columns](https://wordpress.org/plugins/codepress-admin-columns/) using the [Pods Add-On for Admin Columns Pro](https://www.admincolumns.com/pods/)
|
101 |
* [Conductor](https://conductorplugin.com/)
|
102 |
+
* [Elementor](https://wordpress.org/plugins/elementor/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
103 |
+
* [Elementor Pro](https://elementor.com/pro/) directly integrates with Pods
|
104 |
+
* [GenerateBlocks](https://wordpress.org/plugins/generateblocks/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
105 |
* [Gravity Forms](https://www.gravityforms.com/) using the free [Pods Gravity Forms Add-on](https://wordpress.org/plugins/pods-gravity-forms/)
|
106 |
+
* [Oxygen Builder](https://oxygenbuilder.com/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
107 |
* [Paid Memberships Pro](https://wordpress.org/plugins/paid-memberships-pro/) using the free [Paid Memberships Pro - Pods Add On](https://wordpress.org/plugins/pmpro-pods/)
|
108 |
+
* [Polylang](https://wordpress.org/plugins/polylang/) has direct integration in Pods
|
109 |
+
* [TablePress](https://wordpress.org/plugins/tablepress/) using the premium [Pods Pro by SKCDEV Add-On: TablePress Integration](https://pods-pro.skc.dev/downloads/tablepress-integration/)
|
110 |
* [Timber](https://wordpress.org/plugins/timber-library/)
|
111 |
+
* [WPGraphQL](https://wordpress.org/plugins/wp-graphql/) has direct integration in Pods
|
112 |
+
* [WPML](http://wpml.org/) has direct integration in Pods
|
113 |
+
* [YARPP](http://wordpress.org/plugins/yet-another-related-posts-plugin/) has direct integration in Pods
|
114 |
* **Themes we've integrated with**
|
115 |
+
* [Divi Theme](https://www.elegantthemes.com/gallery/divi/) using the premium [Pods Pro by SKCDEV Add-On: Page Builder Toolkit](https://pods-pro.skc.dev/downloads/page-builder-toolkit/)
|
116 |
+
* [Genesis](https://www.studiopress.com/themes/genesis/) (StudioPress) directly integrates with Pods
|
117 |
|
118 |
== Installation ==
|
119 |
|
165 |
|
166 |
== Changelog ==
|
167 |
|
168 |
+
= 2.9 - August 9th, 2022 =
|
169 |
+
|
170 |
+
* Feature: Simple Repeatable Fields offers the ability to turn almost any field into a repeatable field. With repeatable fields, you can add multiple values for a field. You can use repeatable fields with the Pods template tag `[each your_repeatable_field]` to easily loop and display information with `{@_value}` Supported field types include: Plain Text, Website, Phone, Email, Password, Date / Time, Date, Time, oEmbed, Plain Paragraph text, WYSIWYG, Plain Number, Currency, and Color Picker. Supported Pod Types include: Post Types (meta-based), Taxonomies (meta-based), Users (meta-based), and Comments (meta-based). #1095 #6304 (@sc0ttkclark, @zrothauser)
|
171 |
+
* Feature: Register Pods configurations with JSON/YML files in your theme when stored in `pods.json`, `pods/pods.json`, `pods/templates.json`, etc. Custom paths can be registered to support third party plugins as well. Register new paths using `pods_register_config_path( $full_directory_path )` that contain a `/pods/` directory to automatically pull from or use `pods_register_config_file( $full_file_path, 'json' )` to register a specific file. #4856 (@sc0ttkclark)
|
172 |
+
* Feature: The initial integration for WPGraphQL has been merged from the WPGraphQL Integration Add-On for Pods Pro by SKCDEV. The Add-On itself will continue to be developed with new features that are focused on Advanced Content Types and other enhancements in the future that will still remain outside of Pods core. (@sc0ttkclark)
|
173 |
+
* Feature: Drag and drop fields from one group to another. #5937 #6114 #6123 #6456 (@sc0ttkclark)
|
174 |
+
* Feature: Support importing and exporting Pods Settings in Pods Packages. #6455 (@sc0ttkclark)
|
175 |
+
* Feature: Website fields can now be set to output links with `rel="nofollow"` on them. (@sc0ttkclark)
|
176 |
+
* Feature: Full support for DB (Post Types), Code (PHP), and File (JSON/YML) configurations on the Pods Admin > Edit Pods screen. If you have configurations for multiple sources, you will see a new Source column (with file path) and you can filter by source. Pods with non-DB sources currently do not have Edit/Duplicate/Reset Content/Delete links. (@sc0ttkclark)
|
177 |
+
* Feature: The file field can now support any image, video, or audio mime types that are supported by WordPress. #6577 #6578 (@sc0ttkclark, @JoryHogeveen)
|
178 |
+
* Enhancement: New `\Pods\Pod_Manager` class allows reusing Pods instances when working with the same Pod across many areas of the code. (@sc0ttkclark)
|
179 |
+
* Enhancement: Added PodsAdmin::check_requirements() helper method. (@sc0ttkclark)
|
180 |
+
* Enhancement: Migrate Packages component is now enabled by default on new Pods installs. (@sc0ttkclark)
|
181 |
+
* Tweak: Removed special logic intended for PHP 5.3 and earlier. (@sc0ttkclark)
|
182 |
+
* Tweak: Improved performance when getting Pods configs from post type storage. #6561 #6562 (@JoryHogeveen)
|
183 |
+
* Fixed: Set the default sort to Pod Label now that more sources are supported on Pods Admin > Edit Pods. (@sc0ttkclark)
|
184 |
+
* Fixed: Prevent potential issues with `$wpdb->prepare()` when a related object does not have an index field set. (@sc0ttkclark)
|
185 |
+
* Fixed: Resolve issue with not reading cache when no ID is passed into Pods objects for Settings pods. #3582 #3583 (@pcfreak30, @sc0ttkclark, @JoryHogeveen)
|
186 |
+
* Fixed: Don't show the edit link in PodsUI if access is restricted, previously going to edit would show the access message but now the link won't show at all in those restricted cases. (@sc0ttkclark)
|
187 |
+
* Fixed: Resolve issues with Media modal fields showing duplicate fields. #6564 (@JoryHogeveen)
|
188 |
+
* Fixed: Handle processing the Pods display tags in a more dynamic way for attributes and passing them down to the tag handlers. (@sc0ttkclark)
|
189 |
+
* Fixed: Enable media buttons for the post_content field like they should so that forms outside the admin screen continue to function as expected. #6525 (@sc0ttkclark)
|
190 |
+
* Fixed: Resolve issues with values that are objects and convert them to arrays for relationship value formatting in DFV field renders. #6566 (@sc0ttkclark)
|
191 |
+
* Fixed: Show the Add Media button in forms that use the post_content field. #6569 (@sc0ttkclark)
|
192 |
+
* New minimum WP version required: WordPress 5.7+ (previously: WP 5.5+)
|
193 |
+
* No minimum PHP version changes (currently: PHP 5.6+) but please be aware that PHP 7.2+ will be required for the Pods 3.0+ feature release. You should take the time to update to PHP 8.0+ because there’s major speed improvements to be had 🙂
|
194 |
+
|
195 |
= 2.8.23 - July 4th, 2022 =
|
196 |
|
197 |
* Tweak: Added support for exporting post types and taxonomies to PHP for debugging purposes. While logged in as an admin, add `?pods_debug_register_export=1` to expose textareas on the page to get the code. (@sc0ttkclark)
|
201 |
* Fixed: Resolved potential PHP warnings on certain sites by preparing SQL queries separately from other string processing. #6556 #6555 #6554 (@JoryHogeveen, @sc0ttkclark)
|
202 |
* Fixed: Resolved potential PHP notices when getting table information in `PodsData::table()`. (@JoryHogeveen)
|
203 |
* Fixed: Resolved potential PHP type conversion warnings by passing `SORT_REGULAR` to `array_unique()`` in the File field saving process. (@JoryHogeveen)
|
204 |
+
* Fixed: Pods Auto Templates defaults for some fields were set to "true" and that is now treated as empty. The default for those fields are now empty as intended. This resolves notices on the Edit Pod screen about templates being used for Archives when Archives are disabled, but there was no template intentionally set for Archive. (@sc0ttkclark)
|
205 |
|
206 |
= 2.8.22.1 - July 3rd, 2022 =
|
207 |
|
sql/upgrade/PodsUpgrade.php
CHANGED
@@ -97,6 +97,7 @@ class PodsUpgrade {
|
|
97 |
|
98 |
if ( PodsInit::$components ) {
|
99 |
PodsInit::$components->activate_component( 'templates' );
|
|
|
100 |
}
|
101 |
}//end if
|
102 |
|
97 |
|
98 |
if ( PodsInit::$components ) {
|
99 |
PodsInit::$components->activate_component( 'templates' );
|
100 |
+
PodsInit::$components->activate_component( 'migrate-packages' );
|
101 |
}
|
102 |
}//end if
|
103 |
|
src/Pods/Admin/Config/Field.php
CHANGED
@@ -105,7 +105,7 @@ class Field extends Base {
|
|
105 |
|
106 |
$options = [];
|
107 |
|
108 |
-
$options['basic']
|
109 |
'label' => [
|
110 |
'name' => 'label',
|
111 |
'label' => __( 'Label', 'pods' ),
|
@@ -143,18 +143,18 @@ class Field extends Base {
|
|
143 |
'help' => 'help',
|
144 |
],
|
145 |
'pick_object' => [
|
146 |
-
'name'
|
147 |
-
'label'
|
148 |
-
'type'
|
149 |
-
'default'
|
150 |
-
'required'
|
151 |
-
'data'
|
152 |
-
'pick_show_select_text'
|
153 |
-
'dependency'
|
154 |
-
'depends-on'
|
155 |
'type' => 'pick',
|
156 |
],
|
157 |
-
'help'
|
158 |
],
|
159 |
'pick_custom' => [
|
160 |
'name' => 'pick_custom',
|
@@ -169,17 +169,17 @@ class Field extends Base {
|
|
169 |
'help' => __( 'One option per line, use <em>value|Label</em> for separate values and labels', 'pods' ),
|
170 |
],
|
171 |
'pick_table' => [
|
172 |
-
'name'
|
173 |
-
'label'
|
174 |
-
'type'
|
175 |
-
'default'
|
176 |
-
'data'
|
177 |
-
'pick_show_select_text'
|
178 |
-
'depends-on'
|
179 |
'type' => 'pick',
|
180 |
'pick_object' => 'table',
|
181 |
],
|
182 |
-
'help'
|
183 |
],
|
184 |
'sister_id' => [
|
185 |
'name' => 'sister_id',
|
@@ -201,7 +201,39 @@ class Field extends Base {
|
|
201 |
'boolean_yes_label' => '',
|
202 |
'help' => __( 'This will require a non-empty value to be entered.', 'pods' ),
|
203 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
];
|
|
|
205 |
$options['advanced'] = [
|
206 |
'visual' => [
|
207 |
'name' => 'visual',
|
@@ -211,7 +243,7 @@ class Field extends Base {
|
|
211 |
'class' => [
|
212 |
'name' => 'class',
|
213 |
'label' => __( 'Additional CSS Classes', 'pods' ),
|
214 |
-
'help' => __( '
|
215 |
'type' => 'text',
|
216 |
'default' => '',
|
217 |
],
|
@@ -223,7 +255,7 @@ class Field extends Base {
|
|
223 |
'default_value' => [
|
224 |
'name' => 'default_value',
|
225 |
'label' => __( 'Default Value', 'pods' ),
|
226 |
-
'help' => __( '
|
227 |
'type' => 'text',
|
228 |
'default' => '',
|
229 |
'options' => [
|
@@ -233,7 +265,7 @@ class Field extends Base {
|
|
233 |
'default_value_parameter' => [
|
234 |
'name' => 'default_value_parameter',
|
235 |
'label' => __( 'Set Default Value via Parameter', 'pods' ),
|
236 |
-
'help' => __( '
|
237 |
'type' => 'text',
|
238 |
'default' => '',
|
239 |
],
|
@@ -498,6 +530,8 @@ class Field extends Base {
|
|
498 |
] );*/
|
499 |
|
500 |
if ( 'table' === $pod['storage'] || 'pod' === $pod['type'] ) {
|
|
|
|
|
501 |
$options['basic']['unique'] = [
|
502 |
'name' => 'unique',
|
503 |
'label' => __( 'Unique', 'pods' ),
|
105 |
|
106 |
$options = [];
|
107 |
|
108 |
+
$options['basic'] = [
|
109 |
'label' => [
|
110 |
'name' => 'label',
|
111 |
'label' => __( 'Label', 'pods' ),
|
143 |
'help' => 'help',
|
144 |
],
|
145 |
'pick_object' => [
|
146 |
+
'name' => 'pick_object',
|
147 |
+
'label' => __( 'Related Type', 'pods' ),
|
148 |
+
'type' => 'pick',
|
149 |
+
'default' => '',
|
150 |
+
'required' => true,
|
151 |
+
'data' => [],
|
152 |
+
'pick_show_select_text' => 0,
|
153 |
+
'dependency' => true,
|
154 |
+
'depends-on' => [
|
155 |
'type' => 'pick',
|
156 |
],
|
157 |
+
'help' => 'help',
|
158 |
],
|
159 |
'pick_custom' => [
|
160 |
'name' => 'pick_custom',
|
169 |
'help' => __( 'One option per line, use <em>value|Label</em> for separate values and labels', 'pods' ),
|
170 |
],
|
171 |
'pick_table' => [
|
172 |
+
'name' => 'pick_table',
|
173 |
+
'label' => __( 'Related Table', 'pods' ),
|
174 |
+
'type' => 'pick',
|
175 |
+
'default' => '',
|
176 |
+
'data' => [],
|
177 |
+
'pick_show_select_text' => 0,
|
178 |
+
'depends-on' => [
|
179 |
'type' => 'pick',
|
180 |
'pick_object' => 'table',
|
181 |
],
|
182 |
+
'help' => 'help',
|
183 |
],
|
184 |
'sister_id' => [
|
185 |
'name' => 'sister_id',
|
201 |
'boolean_yes_label' => '',
|
202 |
'help' => __( 'This will require a non-empty value to be entered.', 'pods' ),
|
203 |
],
|
204 |
+
'repeatable_separator' => [
|
205 |
+
'name' => 'repeatable_separator',
|
206 |
+
'type' => 'html',
|
207 |
+
'html_content' => '<hr />',
|
208 |
+
'depends-on' => [
|
209 |
+
'type' => PodsForm::repeatable_field_types(),
|
210 |
+
],
|
211 |
+
],
|
212 |
+
'repeatable' => [
|
213 |
+
'name' => 'repeatable',
|
214 |
+
'label' => __( 'Repeatable', 'pods' ),
|
215 |
+
'default' => 0,
|
216 |
+
'type' => 'boolean',
|
217 |
+
'help' => __( 'Making a field repeatable will add controls next to the field which allows users to Add / Remove / Reorder additional values.', 'pods' ),
|
218 |
+
'boolean_yes_label' => __( 'Allow multiple values', 'pods' ),
|
219 |
+
'dependency' => true,
|
220 |
+
'depends-on' => [
|
221 |
+
'type' => PodsForm::repeatable_field_types(),
|
222 |
+
],
|
223 |
+
],
|
224 |
+
'repeatable_add_new_label' => [
|
225 |
+
'name' => 'repeatable_add_new_label',
|
226 |
+
'label' => __( 'Repeatable - Add New Label', 'pods' ),
|
227 |
+
'placeholder' => __( 'Add New', 'pods' ),
|
228 |
+
'default' => '',
|
229 |
+
'type' => 'text',
|
230 |
+
'depends-on' => [
|
231 |
+
'type' => PodsForm::repeatable_field_types(),
|
232 |
+
'repeatable' => true,
|
233 |
+
],
|
234 |
+
],
|
235 |
];
|
236 |
+
|
237 |
$options['advanced'] = [
|
238 |
'visual' => [
|
239 |
'name' => 'visual',
|
243 |
'class' => [
|
244 |
'name' => 'class',
|
245 |
'label' => __( 'Additional CSS Classes', 'pods' ),
|
246 |
+
'help' => __( 'You can provide additional CSS classes separated by spaces to be output for the field markup.', 'pods' ),
|
247 |
'type' => 'text',
|
248 |
'default' => '',
|
249 |
],
|
255 |
'default_value' => [
|
256 |
'name' => 'default_value',
|
257 |
'label' => __( 'Default Value', 'pods' ),
|
258 |
+
'help' => __( 'This is the default value used when the Add New form is used.', 'pods' ),
|
259 |
'type' => 'text',
|
260 |
'default' => '',
|
261 |
'options' => [
|
265 |
'default_value_parameter' => [
|
266 |
'name' => 'default_value_parameter',
|
267 |
'label' => __( 'Set Default Value via Parameter', 'pods' ),
|
268 |
+
'help' => __( 'You can automatically populate the value of this field from the URL parameter "your_field" such as ?your_field=1234', 'pods' ),
|
269 |
'type' => 'text',
|
270 |
'default' => '',
|
271 |
],
|
530 |
] );*/
|
531 |
|
532 |
if ( 'table' === $pod['storage'] || 'pod' === $pod['type'] ) {
|
533 |
+
unset( $options['basic']['repeatable'] );
|
534 |
+
|
535 |
$options['basic']['unique'] = [
|
536 |
'name' => 'unique',
|
537 |
'label' => __( 'Unique', 'pods' ),
|
src/Pods/Blocks/API.php
CHANGED
@@ -29,7 +29,18 @@ class API {
|
|
29 |
// The Pods Blocks JS API.
|
30 |
$pods_blocks_options_file = file_get_contents( PODS_DIR . 'ui/js/blocks/pods-blocks-api.min.asset.json' );
|
31 |
|
32 |
-
$pods_blocks_options =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
wp_register_script( 'pods-blocks-api', PODS_URL . 'ui/js/blocks/pods-blocks-api.min.js', $pods_blocks_options['dependencies'], $pods_blocks_options['version'], true );
|
35 |
|
29 |
// The Pods Blocks JS API.
|
30 |
$pods_blocks_options_file = file_get_contents( PODS_DIR . 'ui/js/blocks/pods-blocks-api.min.asset.json' );
|
31 |
|
32 |
+
$pods_blocks_options = null;
|
33 |
+
|
34 |
+
if ( $pods_blocks_options_file ) {
|
35 |
+
$pods_blocks_options = json_decode( $pods_blocks_options_file, true );
|
36 |
+
}
|
37 |
+
|
38 |
+
if ( ! is_array( $pods_blocks_options ) ) {
|
39 |
+
$pods_blocks_options = [
|
40 |
+
'dependencies' => [],
|
41 |
+
'version' => false,
|
42 |
+
];
|
43 |
+
}
|
44 |
|
45 |
wp_register_script( 'pods-blocks-api', PODS_URL . 'ui/js/blocks/pods-blocks-api.min.js', $pods_blocks_options['dependencies'], $pods_blocks_options['version'], true );
|
46 |
|
src/Pods/CLI/Service_Provider.php
CHANGED
@@ -7,6 +7,7 @@ use Pods\CLI\Commands\Group;
|
|
7 |
use Pods\CLI\Commands\Playbook;
|
8 |
use Pods\CLI\Commands\Pod;
|
9 |
use WP_CLI;
|
|
|
10 |
|
11 |
/**
|
12 |
* Class Service_Provider
|
@@ -15,7 +16,7 @@ use WP_CLI;
|
|
15 |
*
|
16 |
* @since 2.8.0
|
17 |
*/
|
18 |
-
class Service_Provider extends
|
19 |
|
20 |
/**
|
21 |
* Binds and sets up implementations.
|
7 |
use Pods\CLI\Commands\Playbook;
|
8 |
use Pods\CLI\Commands\Pod;
|
9 |
use WP_CLI;
|
10 |
+
use tad_DI52_ServiceProvider;
|
11 |
|
12 |
/**
|
13 |
* Class Service_Provider
|
16 |
*
|
17 |
* @since 2.8.0
|
18 |
*/
|
19 |
+
class Service_Provider extends tad_DI52_ServiceProvider {
|
20 |
|
21 |
/**
|
22 |
* Binds and sets up implementations.
|
src/Pods/Config_Handler.php
ADDED
@@ -0,0 +1,798 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods;
|
4 |
+
|
5 |
+
use Spyc;
|
6 |
+
use WP_Filesystem_Base;
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class to handle registration of Pods configs and loading/saving of config files.
|
10 |
+
*
|
11 |
+
* @package Pods
|
12 |
+
*/
|
13 |
+
class Config_Handler {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* List of registered config types.
|
17 |
+
*
|
18 |
+
* @since 2.9.0
|
19 |
+
*
|
20 |
+
* @var array
|
21 |
+
*/
|
22 |
+
protected $registered_config_types = [
|
23 |
+
'json' => 'json',
|
24 |
+
'yml' => 'yml',
|
25 |
+
];
|
26 |
+
|
27 |
+
/**
|
28 |
+
* List of registered config item types.
|
29 |
+
*
|
30 |
+
* @since 2.9.0
|
31 |
+
*
|
32 |
+
* @var array
|
33 |
+
*/
|
34 |
+
protected $registered_config_item_types = [
|
35 |
+
'pods' => 'pods',
|
36 |
+
'fields' => 'fields',
|
37 |
+
'templates' => 'templates',
|
38 |
+
'pages' => 'pages',
|
39 |
+
'helpers' => 'helpers',
|
40 |
+
];
|
41 |
+
|
42 |
+
/**
|
43 |
+
* List of registered paths.
|
44 |
+
*
|
45 |
+
* @since 2.9.0
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
protected $registered_paths = [];
|
50 |
+
|
51 |
+
/**
|
52 |
+
* List of registered files.
|
53 |
+
*
|
54 |
+
* @since 2.9.0
|
55 |
+
*
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
+
protected $registered_files = [];
|
59 |
+
|
60 |
+
/**
|
61 |
+
* List of registered Pods configs.
|
62 |
+
*
|
63 |
+
* @since 2.9.0
|
64 |
+
*
|
65 |
+
* @var array
|
66 |
+
*/
|
67 |
+
protected $pods = [];
|
68 |
+
|
69 |
+
/**
|
70 |
+
* List of registered Pods Template configs.
|
71 |
+
*
|
72 |
+
* @since 2.9.0
|
73 |
+
*
|
74 |
+
* @var array
|
75 |
+
*/
|
76 |
+
protected $templates = [];
|
77 |
+
|
78 |
+
/**
|
79 |
+
* List of registered Pods Page configs.
|
80 |
+
*
|
81 |
+
* @since 2.9.0
|
82 |
+
*
|
83 |
+
* @var array
|
84 |
+
*/
|
85 |
+
protected $pages = [];
|
86 |
+
|
87 |
+
/**
|
88 |
+
* List of registered Pods Helper configs.
|
89 |
+
*
|
90 |
+
* @since 2.9.0
|
91 |
+
*
|
92 |
+
* @var array
|
93 |
+
*/
|
94 |
+
protected $helpers = [];
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Associative array list of other registered configs.
|
98 |
+
*
|
99 |
+
* @since 2.9.0
|
100 |
+
*
|
101 |
+
* @var array
|
102 |
+
*/
|
103 |
+
protected $custom_configs = [];
|
104 |
+
|
105 |
+
/**
|
106 |
+
* List of config names for each file path.
|
107 |
+
*
|
108 |
+
* @since 2.9.0
|
109 |
+
*
|
110 |
+
* @var array
|
111 |
+
*/
|
112 |
+
protected $file_path_configs = [];
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Config constructor.
|
116 |
+
*
|
117 |
+
* @since 2.9.0
|
118 |
+
*/
|
119 |
+
public function __construct() {
|
120 |
+
// Nothing to see here.
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Setup initial registered paths and load configs.
|
125 |
+
*
|
126 |
+
* @since 2.9.0
|
127 |
+
*/
|
128 |
+
public function setup() {
|
129 |
+
// Register theme.
|
130 |
+
$this->register_path( get_template_directory() );
|
131 |
+
|
132 |
+
if ( get_template_directory() !== get_stylesheet_directory() ) {
|
133 |
+
// Register child theme.
|
134 |
+
$this->register_path( get_stylesheet_directory() );
|
135 |
+
}
|
136 |
+
|
137 |
+
$this->load_configs();
|
138 |
+
$this->store_configs();
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Register a config type.
|
143 |
+
*
|
144 |
+
* @since 2.9.0
|
145 |
+
*
|
146 |
+
* @param string $config_type Config type.
|
147 |
+
*/
|
148 |
+
public function register_config_type( $config_type ) {
|
149 |
+
$config_type = sanitize_title( $config_type );
|
150 |
+
$config_type = str_replace( [ '/', DIRECTORY_SEPARATOR ], '-', $config_type );
|
151 |
+
|
152 |
+
$this->registered_config_types[ $config_type ] = $config_type;
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Unregister a config type.
|
157 |
+
*
|
158 |
+
* @since 2.9.0
|
159 |
+
*
|
160 |
+
* @param string $config_type Config type.
|
161 |
+
*/
|
162 |
+
public function unregister_config_type( $config_type ) {
|
163 |
+
$config_type = sanitize_title( $config_type );
|
164 |
+
$config_type = str_replace( [ '/', DIRECTORY_SEPARATOR ], '-', $config_type );
|
165 |
+
|
166 |
+
if ( isset( $this->registered_config_types[ $config_type ] ) ) {
|
167 |
+
unset( $this->registered_config_types[ $config_type ] );
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Register a config item type.
|
173 |
+
*
|
174 |
+
* @since 2.9.0
|
175 |
+
*
|
176 |
+
* @param string $item_type Config item type.
|
177 |
+
*/
|
178 |
+
public function register_config_item_type( $item_type ) {
|
179 |
+
$item_type = sanitize_title( $item_type );
|
180 |
+
$item_type = str_replace( [ '/', DIRECTORY_SEPARATOR ], '-', $item_type );
|
181 |
+
|
182 |
+
$this->registered_config_item_types[ $item_type ] = $item_type;
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Unregister a config item type.
|
187 |
+
*
|
188 |
+
* @since 2.9.0
|
189 |
+
*
|
190 |
+
* @param string $item_type Config item type.
|
191 |
+
*/
|
192 |
+
public function unregister_config_item_type( $item_type ) {
|
193 |
+
$item_type = sanitize_title( $item_type );
|
194 |
+
$item_type = str_replace( [ '/', DIRECTORY_SEPARATOR ], '-', $item_type );
|
195 |
+
|
196 |
+
if ( isset( $this->registered_config_item_types[ $item_type ] ) ) {
|
197 |
+
unset( $this->registered_config_item_types[ $item_type ] );
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Register a config file path.
|
203 |
+
*
|
204 |
+
* @since 2.9.0
|
205 |
+
*
|
206 |
+
* @param string $path The config file path to use.
|
207 |
+
*/
|
208 |
+
public function register_path( $path ) {
|
209 |
+
$path = trailingslashit( $path );
|
210 |
+
|
211 |
+
if ( 0 !== strpos( $path, ABSPATH ) ) {
|
212 |
+
$path = ABSPATH . $path;
|
213 |
+
}
|
214 |
+
|
215 |
+
$this->registered_paths[ $path ] = $path;
|
216 |
+
}
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Unregister a config file path.
|
220 |
+
*
|
221 |
+
* @since 2.9.0
|
222 |
+
*
|
223 |
+
* @param string $path The config file path to use.
|
224 |
+
*/
|
225 |
+
public function unregister_path( $path ) {
|
226 |
+
$path = trailingslashit( $path );
|
227 |
+
|
228 |
+
if ( 0 !== strpos( $path, ABSPATH ) ) {
|
229 |
+
$path = ABSPATH . $path;
|
230 |
+
}
|
231 |
+
|
232 |
+
if ( isset( $this->registered_paths[ $path ] ) ) {
|
233 |
+
unset( $this->registered_paths[ $path ] );
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Register a config file.
|
239 |
+
*
|
240 |
+
* @since 2.9.0
|
241 |
+
*
|
242 |
+
* @param string $file Config file to use.
|
243 |
+
* @param string $config_type Config type to use.
|
244 |
+
*/
|
245 |
+
public function register_file( $file, $config_type ) {
|
246 |
+
if ( ! isset( $this->registered_files[ $config_type ] ) ) {
|
247 |
+
$this->registered_files[ $config_type ] = [];
|
248 |
+
}
|
249 |
+
|
250 |
+
$this->registered_files[ $config_type ][ $file ] = $file;
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* Unregister a config file file.
|
255 |
+
*
|
256 |
+
* @since 2.9.0
|
257 |
+
*
|
258 |
+
* @param string $file Config file to use.
|
259 |
+
* @param string $config_type Config type to use.
|
260 |
+
*/
|
261 |
+
public function unregister_file( $file, $config_type ) {
|
262 |
+
if ( isset( $this->registered_files[ $config_type ][ $file ] ) ) {
|
263 |
+
unset( $this->registered_files[ $config_type ][ $file ] );
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Get file configs based on registered config types and config item types.
|
269 |
+
*
|
270 |
+
* @since 2.9.0
|
271 |
+
*
|
272 |
+
* @return array File configs.
|
273 |
+
*/
|
274 |
+
protected function get_file_configs() {
|
275 |
+
$file_configs = [];
|
276 |
+
|
277 |
+
// Flesh out the config types.
|
278 |
+
foreach ( $this->registered_config_types as $config_type ) {
|
279 |
+
foreach ( $this->registered_config_item_types as $config_item_type ) {
|
280 |
+
$theme_support = false;
|
281 |
+
|
282 |
+
// Themes get pods.json / pods.yml support at root.
|
283 |
+
if ( 'pods' === $config_item_type ) {
|
284 |
+
$theme_support = true;
|
285 |
+
}
|
286 |
+
|
287 |
+
$path = sprintf( '%s.%s', $config_item_type, $config_type );
|
288 |
+
|
289 |
+
$file_configs[] = [
|
290 |
+
'type' => $config_type,
|
291 |
+
'file' => $path,
|
292 |
+
'item_type' => $config_item_type,
|
293 |
+
'theme_support' => $theme_support,
|
294 |
+
];
|
295 |
+
|
296 |
+
// Prepend pods/ to path for theme paths.
|
297 |
+
$path = sprintf( 'pods%s%s', DIRECTORY_SEPARATOR, $path );
|
298 |
+
|
299 |
+
$file_configs[] = [
|
300 |
+
'type' => $config_type,
|
301 |
+
'file' => $path,
|
302 |
+
'item_type' => $config_item_type,
|
303 |
+
'theme_support' => true,
|
304 |
+
];
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
return $file_configs;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Load configs from registered file paths.
|
313 |
+
*
|
314 |
+
* @since 2.9.0
|
315 |
+
*/
|
316 |
+
protected function load_configs() {
|
317 |
+
/**
|
318 |
+
* Allow plugins/themes to hook into config loading.
|
319 |
+
*
|
320 |
+
* @since 2.9.0
|
321 |
+
*
|
322 |
+
* @param Config $pods_config Pods config object.
|
323 |
+
*
|
324 |
+
*/
|
325 |
+
do_action( 'pods_config_pre_load_configs', $this );
|
326 |
+
|
327 |
+
$file_configs = $this->get_file_configs();
|
328 |
+
|
329 |
+
$theme_dirs = [
|
330 |
+
trailingslashit( get_template_directory() ) => true,
|
331 |
+
trailingslashit( get_stylesheet_directory() ) => true,
|
332 |
+
];
|
333 |
+
|
334 |
+
$cached_found_configs = pods_transient_get( 'pods_config_handler_found_configs' );
|
335 |
+
|
336 |
+
if ( empty( $cached_found_configs ) ) {
|
337 |
+
$cached_found_configs = false;
|
338 |
+
}
|
339 |
+
|
340 |
+
$found_configs = [];
|
341 |
+
|
342 |
+
foreach ( $this->registered_paths as $config_path ) {
|
343 |
+
foreach ( $file_configs as $file_config ) {
|
344 |
+
if ( empty( $file_config['theme_support'] ) && isset( $theme_dirs[ $config_path ] ) ) {
|
345 |
+
continue;
|
346 |
+
}
|
347 |
+
|
348 |
+
$file_path = $config_path . $file_config['file'];
|
349 |
+
|
350 |
+
if ( $cached_found_configs && ! isset( $cached_found_configs[ $file_path ] ) ) {
|
351 |
+
continue;
|
352 |
+
}
|
353 |
+
|
354 |
+
$found_config = $this->load_config_file( $file_path, $file_config['type'], $file_config );
|
355 |
+
|
356 |
+
if ( $found_config ) {
|
357 |
+
$found_configs[ $file_path ] = true;
|
358 |
+
}
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
pods_transient_set( 'pods_config_handler_found_configs', $found_configs, DAY_IN_SECONDS );
|
363 |
+
|
364 |
+
foreach ( $this->registered_files as $config_type => $files ) {
|
365 |
+
foreach ( $files as $file ) {
|
366 |
+
$this->load_config_file( $file, $config_type );
|
367 |
+
}
|
368 |
+
}
|
369 |
+
}
|
370 |
+
|
371 |
+
/**
|
372 |
+
* Load the config file for a config type from a specific file path.
|
373 |
+
*
|
374 |
+
* @param string $file_path The config file path to use.
|
375 |
+
* @param string $config_type The config type to use.
|
376 |
+
* @param array $file_config File config.
|
377 |
+
*
|
378 |
+
* @return bool Whether the config file was found and loaded.
|
379 |
+
*/
|
380 |
+
protected function load_config_file( $file_path, $config_type, array $file_config = [] ) {
|
381 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
382 |
+
|
383 |
+
/**
|
384 |
+
* @var $wp_filesystem WP_Filesystem_Base
|
385 |
+
*/
|
386 |
+
global $wp_filesystem;
|
387 |
+
|
388 |
+
WP_Filesystem();
|
389 |
+
|
390 |
+
if ( ! $wp_filesystem ) {
|
391 |
+
return false;
|
392 |
+
}
|
393 |
+
|
394 |
+
if ( ! $wp_filesystem->exists( $file_path ) || ! $wp_filesystem->is_readable( $file_path ) ) {
|
395 |
+
return false;
|
396 |
+
}
|
397 |
+
|
398 |
+
$raw_config = $wp_filesystem->get_contents( $file_path );
|
399 |
+
|
400 |
+
if ( empty( $raw_config ) ) {
|
401 |
+
return false;
|
402 |
+
}
|
403 |
+
|
404 |
+
$file_config['type'] = $config_type;
|
405 |
+
|
406 |
+
return $this->load_config( $config_type, $raw_config, $file_path, $file_config );
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Load config from registered file path.
|
411 |
+
*
|
412 |
+
* @since 2.9.0
|
413 |
+
*
|
414 |
+
* @param string $config_type Config type.
|
415 |
+
* @param string $raw_config Raw config content.
|
416 |
+
* @param string $file_path The config file path to use.
|
417 |
+
* @param array $file_config File config.
|
418 |
+
*
|
419 |
+
* @return bool Whether the config was loaded.
|
420 |
+
*/
|
421 |
+
protected function load_config( $config_type, $raw_config, $file_path, array $file_config ) {
|
422 |
+
$config = null;
|
423 |
+
|
424 |
+
if ( 'yml' === $config_type ) {
|
425 |
+
require_once PODS_DIR . 'vendor/mustangostang/spyc/Spyc.php';
|
426 |
+
|
427 |
+
$config = Spyc::YAMLLoadString( $raw_config );
|
428 |
+
} elseif ( 'json' === $config_type ) {
|
429 |
+
$config = json_decode( $raw_config, true );
|
430 |
+
} else {
|
431 |
+
/**
|
432 |
+
* Parse Pods config from a custom config type.
|
433 |
+
*
|
434 |
+
* @since 2.9.0
|
435 |
+
*
|
436 |
+
* @param array $config Config data.
|
437 |
+
* @param string $raw_config Raw config content.
|
438 |
+
*/
|
439 |
+
$config = apply_filters( "pods_config_parse_{$config_type}", [], $raw_config );
|
440 |
+
}
|
441 |
+
|
442 |
+
/**
|
443 |
+
* Allow filtering the config for additional parsing customization.
|
444 |
+
*
|
445 |
+
* @since 2.9.0
|
446 |
+
*
|
447 |
+
* @param array $config Config data.
|
448 |
+
* @param string $config_type Config type.
|
449 |
+
* @param string $raw_config Raw config content.
|
450 |
+
*/
|
451 |
+
$config = apply_filters( 'pods_config_parse', $config, $config_type, $raw_config );
|
452 |
+
|
453 |
+
if ( $config && is_array( $config ) ) {
|
454 |
+
$this->register_config( $config, $file_path, $file_config );
|
455 |
+
|
456 |
+
return true;
|
457 |
+
}
|
458 |
+
|
459 |
+
return false;
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Register config for different item types.
|
464 |
+
*
|
465 |
+
* @since 2.9.0
|
466 |
+
*
|
467 |
+
* @param array $config Config data.
|
468 |
+
* @param string $file_path The config file path to use.
|
469 |
+
* @param array $file_config File config.
|
470 |
+
*/
|
471 |
+
protected function register_config( array $config, $file_path, array $file_config = [] ) {
|
472 |
+
if ( ! isset( $this->file_path_configs[ $file_path ] ) ) {
|
473 |
+
$this->file_path_configs[ $file_path ] = [];
|
474 |
+
}
|
475 |
+
|
476 |
+
foreach ( $config as $item_type => $items ) {
|
477 |
+
if ( empty( $items ) || ! is_array( $items ) ) {
|
478 |
+
continue;
|
479 |
+
}
|
480 |
+
|
481 |
+
$supported_item_types = [
|
482 |
+
$item_type,
|
483 |
+
// We support all item types for pods configs.
|
484 |
+
'pods',
|
485 |
+
];
|
486 |
+
|
487 |
+
// Skip if the item type is not supported for this config file.
|
488 |
+
if ( ! empty( $file_config['item_type'] ) && ! in_array( $file_config['item_type'], $supported_item_types, true ) ) {
|
489 |
+
continue;
|
490 |
+
}
|
491 |
+
|
492 |
+
if ( ! isset( $this->file_path_configs[ $file_path ][ $item_type ] ) ) {
|
493 |
+
$this->file_path_configs[ $file_path ][ $item_type ] = [];
|
494 |
+
}
|
495 |
+
|
496 |
+
if ( 'pods' === $item_type ) {
|
497 |
+
$this->register_config_pods( $items, $file_path );
|
498 |
+
} elseif ( 'fields' === $item_type ) {
|
499 |
+
$this->register_config_fields( $items, $file_path );
|
500 |
+
} elseif ( 'templates' === $item_type ) {
|
501 |
+
$this->register_config_templates( $items, $file_path );
|
502 |
+
} elseif ( 'pages' === $item_type ) {
|
503 |
+
$this->register_config_pages( $items, $file_path );
|
504 |
+
} elseif ( 'helpers' === $item_type ) {
|
505 |
+
$this->register_config_helpers( $items, $file_path );
|
506 |
+
} else {
|
507 |
+
$this->register_config_custom_item_type( $item_type, $items, $file_path );
|
508 |
+
}
|
509 |
+
}
|
510 |
+
|
511 |
+
}
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Register pod configs.
|
515 |
+
*
|
516 |
+
* @since 2.9.0
|
517 |
+
*
|
518 |
+
* @param array $items Config items.
|
519 |
+
* @param string $file_path The config file path to use.
|
520 |
+
*/
|
521 |
+
protected function register_config_pods( array $items, $file_path = '' ) {
|
522 |
+
foreach ( $items as $item ) {
|
523 |
+
// Check if the item type and name exists.
|
524 |
+
if ( empty( $item['type'] ) || empty( $item['name'] ) ) {
|
525 |
+
continue;
|
526 |
+
}
|
527 |
+
|
528 |
+
if ( ! isset( $this->pods[ $item['type'] ] ) ) {
|
529 |
+
$this->pods[ $item['type'] ] = [];
|
530 |
+
}
|
531 |
+
|
532 |
+
if ( isset( $item['id'] ) ) {
|
533 |
+
unset( $item['id'] );
|
534 |
+
}
|
535 |
+
|
536 |
+
if ( empty( $item['fields'] ) ) {
|
537 |
+
$item['fields'] = [];
|
538 |
+
}
|
539 |
+
|
540 |
+
$item['_pods_file_source'] = $file_path;
|
541 |
+
|
542 |
+
$this->pods[ $item['type'] ][ $item['name'] ] = $item;
|
543 |
+
|
544 |
+
$this->file_path_configs[ $file_path ]['pods'] = $item['type'] . ':' . $item['name'];
|
545 |
+
}
|
546 |
+
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Register pod field configs.
|
551 |
+
*
|
552 |
+
* @since 2.9.0
|
553 |
+
*
|
554 |
+
* @param array $items Config items.
|
555 |
+
* @param string $file_path The config file path to use.
|
556 |
+
*/
|
557 |
+
protected function register_config_fields( array $items, $file_path = '' ) {
|
558 |
+
foreach ( $items as $item ) {
|
559 |
+
// Check if the pod name, pod type, item type, and item name exists.
|
560 |
+
if ( empty( $item['type'] ) || empty( $item['name'] ) || empty( $item['pod']['name'] ) || empty( $item['pod']['type'] ) ) {
|
561 |
+
continue;
|
562 |
+
}
|
563 |
+
|
564 |
+
if ( ! isset( $this->pods[ $item['pod']['type'] ] ) ) {
|
565 |
+
$this->pods[ $item['pod']['type'] ] = [];
|
566 |
+
}
|
567 |
+
|
568 |
+
if ( isset( $item['pod']['id'] ) ) {
|
569 |
+
unset( $item['pod']['id'] );
|
570 |
+
}
|
571 |
+
|
572 |
+
// Check if pod has been registered yet.
|
573 |
+
if ( ! isset( $this->pods[ $item['pod']['type'][ $item['pod']['name'] ] ] ) ) {
|
574 |
+
$this->pods[ $item['pod']['type'] ][ $item['pod']['name'] ] = $item['pod'];
|
575 |
+
}
|
576 |
+
|
577 |
+
// Check if pod has fields that have been registered yet.
|
578 |
+
if ( ! isset( $this->pods[ $item['pod']['type'][ $item['pod']['name'] ] ]['fields'] ) ) {
|
579 |
+
$this->pods[ $item['pod']['type'] ][ $item['pod']['name'] ]['fields'] = [];
|
580 |
+
}
|
581 |
+
|
582 |
+
if ( isset( $item['id'] ) ) {
|
583 |
+
unset( $item['id'] );
|
584 |
+
}
|
585 |
+
|
586 |
+
$item['_pods_file_source'] = $file_path;
|
587 |
+
|
588 |
+
$this->pods[ $item['pod']['type'] ][ $item['pod']['name'] ]['fields'][ $item['name'] ] = $item;
|
589 |
+
|
590 |
+
$this->file_path_configs[ $file_path ]['pods'] = $item['pod']['type'] . ':' . $item['pod']['name'] . ':' . $item['name'];
|
591 |
+
}
|
592 |
+
|
593 |
+
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* Register template configs.
|
597 |
+
*
|
598 |
+
* @since 2.9.0
|
599 |
+
*
|
600 |
+
* @param array $items Config items.
|
601 |
+
* @param string $file_path The config file path to use.
|
602 |
+
*/
|
603 |
+
protected function register_config_templates( array $items, $file_path = '' ) {
|
604 |
+
foreach ( $items as $item ) {
|
605 |
+
// Check if the item name exists.
|
606 |
+
if ( empty( $item['name'] ) ) {
|
607 |
+
continue;
|
608 |
+
}
|
609 |
+
|
610 |
+
if ( isset( $item['id'] ) ) {
|
611 |
+
unset( $item['id'] );
|
612 |
+
}
|
613 |
+
|
614 |
+
// Legacy support for old Template/Page/Helper objects.
|
615 |
+
$item['label'] = $item['name'];
|
616 |
+
$item['description'] = $item['code'];
|
617 |
+
$item['name'] = sanitize_title( $item['label'] );
|
618 |
+
|
619 |
+
unset( $item['code'] );
|
620 |
+
|
621 |
+
$item['_pods_file_source'] = $file_path;
|
622 |
+
|
623 |
+
$this->templates[ $item['label'] ] = $item;
|
624 |
+
|
625 |
+
$this->file_path_configs[ $file_path ]['templates'] = $item['label'];
|
626 |
+
}
|
627 |
+
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Register page configs.
|
632 |
+
*
|
633 |
+
* @since 2.9.0
|
634 |
+
*
|
635 |
+
* @param array $items Config items.
|
636 |
+
* @param string $file_path The config file path to use.
|
637 |
+
*/
|
638 |
+
protected function register_config_pages( array $items, $file_path = '' ) {
|
639 |
+
foreach ( $items as $item ) {
|
640 |
+
// Check if the item name exists.
|
641 |
+
if ( empty( $item['name'] ) ) {
|
642 |
+
continue;
|
643 |
+
}
|
644 |
+
|
645 |
+
if ( isset( $item['id'] ) ) {
|
646 |
+
unset( $item['id'] );
|
647 |
+
}
|
648 |
+
|
649 |
+
// Legacy support for old Template/Page/Helper objects.
|
650 |
+
$item['label'] = $item['name'];
|
651 |
+
$item['description'] = $item['code'];
|
652 |
+
$item['name'] = sanitize_title( $item['label'] );
|
653 |
+
|
654 |
+
unset( $item['code'] );
|
655 |
+
|
656 |
+
$item['_pods_file_source'] = $file_path;
|
657 |
+
|
658 |
+
$this->pages[ $item['name'] ] = $item;
|
659 |
+
|
660 |
+
$this->file_path_configs[ $file_path ]['pages'] = $item['name'];
|
661 |
+
}
|
662 |
+
|
663 |
+
}
|
664 |
+
|
665 |
+
/**
|
666 |
+
* Register helper configs.
|
667 |
+
*
|
668 |
+
* @since 2.9.0
|
669 |
+
*
|
670 |
+
* @param array $items Config items.
|
671 |
+
* @param string $file_path The config file path to use.
|
672 |
+
*/
|
673 |
+
protected function register_config_helpers( array $items, $file_path = '' ) {
|
674 |
+
foreach ( $items as $item ) {
|
675 |
+
// Check if the item name exists.
|
676 |
+
if ( empty( $item['name'] ) ) {
|
677 |
+
continue;
|
678 |
+
}
|
679 |
+
|
680 |
+
if ( isset( $item['id'] ) ) {
|
681 |
+
unset( $item['id'] );
|
682 |
+
}
|
683 |
+
|
684 |
+
// Legacy support for old Template/Page/Helper objects.
|
685 |
+
$item['label'] = $item['name'];
|
686 |
+
$item['description'] = $item['code'];
|
687 |
+
$item['name'] = sanitize_title( $item['label'] );
|
688 |
+
|
689 |
+
unset( $item['code'] );
|
690 |
+
|
691 |
+
$item['_pods_file_source'] = $file_path;
|
692 |
+
|
693 |
+
$this->helpers[ $item['name'] ] = $item;
|
694 |
+
|
695 |
+
$this->file_path_configs[ $file_path ]['helpers'] = $item['name'];
|
696 |
+
}
|
697 |
+
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Register config items for custom config item type.
|
702 |
+
*
|
703 |
+
* @since 2.9.0
|
704 |
+
*
|
705 |
+
* @param string $item_type Config Item type.
|
706 |
+
* @param array $items Config items.
|
707 |
+
* @param string $file_path The config file path to use.
|
708 |
+
*/
|
709 |
+
protected function register_config_custom_item_type( $item_type, array $items, $file_path = '' ) {
|
710 |
+
if ( ! isset( $this->custom_configs[ $item_type ] ) ) {
|
711 |
+
$this->custom_configs[ $item_type ] = [];
|
712 |
+
}
|
713 |
+
|
714 |
+
foreach ( $items as $item ) {
|
715 |
+
/**
|
716 |
+
* Pre-process the item to be saved for a custom item type.
|
717 |
+
*
|
718 |
+
* @since 2.9.0
|
719 |
+
*
|
720 |
+
* @param string $item_type Item type.
|
721 |
+
* @param string $file_path The config file path to use.
|
722 |
+
*
|
723 |
+
* @param array $item Item to pre-process.
|
724 |
+
*/
|
725 |
+
$item = apply_filters( 'pods_config_register_custom_item', $item, $item_type, $file_path );
|
726 |
+
|
727 |
+
// Check if the item name exists.
|
728 |
+
if ( empty( $item['name'] ) ) {
|
729 |
+
continue;
|
730 |
+
}
|
731 |
+
|
732 |
+
if ( isset( $item['id'] ) ) {
|
733 |
+
unset( $item['id'] );
|
734 |
+
}
|
735 |
+
|
736 |
+
$item['_pods_file_source'] = $file_path;
|
737 |
+
|
738 |
+
$this->custom_configs[ $item_type ][ $item['name'] ] = $item;
|
739 |
+
|
740 |
+
$this->file_path_configs[ $file_path ][ $item_type ] = $item['name'];
|
741 |
+
}
|
742 |
+
|
743 |
+
}
|
744 |
+
|
745 |
+
/**
|
746 |
+
* Store the registered configurations.
|
747 |
+
*/
|
748 |
+
protected function store_configs() {
|
749 |
+
$mapped_object_types = [
|
750 |
+
'pods' => 'pod',
|
751 |
+
'templates' => 'template',
|
752 |
+
'pages' => 'page',
|
753 |
+
'helpers' => 'helper',
|
754 |
+
];
|
755 |
+
|
756 |
+
foreach ( $this->registered_config_item_types as $config_item_type ) {
|
757 |
+
if ( 'pods' === $config_item_type ) {
|
758 |
+
$configs = $this->pods;
|
759 |
+
} elseif ( 'templates' === $config_item_type ) {
|
760 |
+
$configs = $this->templates;
|
761 |
+
} elseif ( 'pages' === $config_item_type ) {
|
762 |
+
$configs = $this->pages;
|
763 |
+
} elseif ( 'helpers' === $config_item_type ) {
|
764 |
+
$configs = $this->helpers;
|
765 |
+
} elseif ( isset( $this->custom_configs[ $config_item_type ] ) ) {
|
766 |
+
$configs = $this->custom_configs[ $config_item_type ];
|
767 |
+
} else {
|
768 |
+
continue;
|
769 |
+
}
|
770 |
+
|
771 |
+
$real_type = isset( $mapped_object_types[ $config_item_type ] )
|
772 |
+
? $mapped_object_types[ $config_item_type ]
|
773 |
+
: $config_item_type;
|
774 |
+
|
775 |
+
foreach ( $configs as $key => $config ) {
|
776 |
+
if ( 'pod' === $real_type ) {
|
777 |
+
foreach ( $config as $pod ) {
|
778 |
+
$pod['object_type'] = $real_type;
|
779 |
+
$pod['object_storage_type'] = 'file';
|
780 |
+
|
781 |
+
pods_register_type( $key, $pod['name'], $pod );
|
782 |
+
}
|
783 |
+
} else {
|
784 |
+
$config['object_storage_type'] = 'file';
|
785 |
+
|
786 |
+
pods_register_object( $config, $real_type );
|
787 |
+
}
|
788 |
+
}
|
789 |
+
}
|
790 |
+
}
|
791 |
+
|
792 |
+
/**
|
793 |
+
* @todo Get list of configs that do not match DB.
|
794 |
+
* @todo Handle syncing changed configs to DB.
|
795 |
+
* @todo Handle syncing configs from DB to file.
|
796 |
+
*/
|
797 |
+
|
798 |
+
}
|
src/Pods/Integrations/WPGraphQL/Connection.php
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use GraphQL\Deferred;
|
7 |
+
use GraphQL\Type\Definition\ResolveInfo;
|
8 |
+
use Pods\Integrations\WPGraphQL\Connection_Resolver\Custom_Simple;
|
9 |
+
use Pods\Integrations\WPGraphQL\Connection_Resolver\Pod;
|
10 |
+
use Pods\Integrations\WPGraphQL\Connection_Resolver\Pod_Type;
|
11 |
+
use WPGraphQL\AppContext;
|
12 |
+
use WPGraphQL\Data\Connection\AbstractConnectionResolver;
|
13 |
+
use WPGraphQL\Data\Connection\CommentConnectionResolver;
|
14 |
+
use WPGraphQL\Data\Connection\ContentTypeConnectionResolver;
|
15 |
+
use WPGraphQL\Data\Connection\MenuConnectionResolver;
|
16 |
+
use WPGraphQL\Data\Connection\MenuItemConnectionResolver;
|
17 |
+
use WPGraphQL\Data\Connection\PluginConnectionResolver;
|
18 |
+
use WPGraphQL\Data\Connection\PostObjectConnectionResolver;
|
19 |
+
use WPGraphQL\Data\Connection\TaxonomyConnectionResolver;
|
20 |
+
use WPGraphQL\Data\Connection\TermObjectConnectionResolver;
|
21 |
+
use WPGraphQL\Data\Connection\ThemeConnectionResolver;
|
22 |
+
use WPGraphQL\Data\Connection\UserConnectionResolver;
|
23 |
+
use WPGraphQL\Data\Connection\UserRoleConnectionResolver;
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Connection interfacing functionality for GraphQL.
|
27 |
+
*
|
28 |
+
* @since 2.9.0
|
29 |
+
*/
|
30 |
+
class Connection {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* List of arguments.
|
34 |
+
*
|
35 |
+
* @since 2.9.0
|
36 |
+
*
|
37 |
+
* @var array
|
38 |
+
*/
|
39 |
+
private $args;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @since 2.9.0
|
43 |
+
*
|
44 |
+
* @param The WPGraphQL field object to reference.
|
45 |
+
*
|
46 |
+
* @var Field
|
47 |
+
*/
|
48 |
+
private $field;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Connection constructor.
|
52 |
+
*
|
53 |
+
* @since 2.9.0
|
54 |
+
*
|
55 |
+
* @param array $args List of arguments to setup.
|
56 |
+
*/
|
57 |
+
public function __construct( $args ) {
|
58 |
+
$this->field = $args['field'];
|
59 |
+
|
60 |
+
unset( $args['field'] );
|
61 |
+
|
62 |
+
$this->args = $args;
|
63 |
+
|
64 |
+
$required = [
|
65 |
+
'from',
|
66 |
+
'to',
|
67 |
+
'from_field',
|
68 |
+
'name',
|
69 |
+
'object_type',
|
70 |
+
];
|
71 |
+
|
72 |
+
// If we are missing required arguments, don't register the connection.
|
73 |
+
foreach ( $required as $arg ) {
|
74 |
+
if ( empty( $this->args[ $arg ] ) ) {
|
75 |
+
return;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
// Register the connection.
|
80 |
+
$this->register_connection();
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Register the connection.
|
85 |
+
*
|
86 |
+
* @since 2.9.0
|
87 |
+
*/
|
88 |
+
public function register_connection() {
|
89 |
+
$config = [
|
90 |
+
'fromType' => $this->args['from'],
|
91 |
+
'toType' => $this->args['to'],
|
92 |
+
'fromFieldName' => $this->args['from_field'],
|
93 |
+
'connectionTypeName' => $this->args['name'],
|
94 |
+
'resolve' => [ $this, 'get_connection_from_resolver' ],
|
95 |
+
];
|
96 |
+
|
97 |
+
if ( empty( $this->args['is_multi'] ) ) {
|
98 |
+
$config['oneToOne'] = true;
|
99 |
+
}
|
100 |
+
|
101 |
+
try {
|
102 |
+
register_graphql_connection( $config );
|
103 |
+
} catch ( Exception $exception ) {
|
104 |
+
// Connection was not registered.
|
105 |
+
return;
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Get the connection from the resolver.
|
111 |
+
*
|
112 |
+
* @param mixed $source The source passed down from the resolve tree.
|
113 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
114 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
115 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
116 |
+
*
|
117 |
+
* @return array|Deferred|mixed|null
|
118 |
+
* @throws Exception
|
119 |
+
*/
|
120 |
+
public function get_connection_from_resolver( $source, $args, $context, $info ) {
|
121 |
+
$resolver = $this->get_connection_resolver( $source, $args, $context, $info );
|
122 |
+
|
123 |
+
if ( ! $resolver ) {
|
124 |
+
return null;
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( ! $this->args['is_multi'] ) {
|
128 |
+
$resolver->one_to_one();
|
129 |
+
}
|
130 |
+
|
131 |
+
return $resolver->get_connection();
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Get the connection resolver.
|
136 |
+
*
|
137 |
+
* @since 2.9.0
|
138 |
+
*
|
139 |
+
* @param mixed $source The source passed down from the resolve tree.
|
140 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
141 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
142 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
143 |
+
*
|
144 |
+
* @return AbstractConnectionResolver|null The resolver object or null if not supported.
|
145 |
+
*
|
146 |
+
* @throws Exception
|
147 |
+
*/
|
148 |
+
public function get_connection_resolver( $source, $args, $context, $info ) {
|
149 |
+
$object_type = $this->args['object_type'];
|
150 |
+
$object_name = pods_v( 'object_name', $this->args, 'any' );
|
151 |
+
|
152 |
+
$field_value = (array) $this->field->get_field_value( $source, $args, $context, $info );
|
153 |
+
|
154 |
+
if ( empty( $field_value ) ) {
|
155 |
+
$field_value = [
|
156 |
+
0,
|
157 |
+
];
|
158 |
+
}
|
159 |
+
|
160 |
+
switch ( $object_type ) {
|
161 |
+
case 'post_type':
|
162 |
+
$connection = new PostObjectConnectionResolver( $source, $args, $context, $info, $object_name );
|
163 |
+
$connection->set_query_arg( 'post__in', $field_value );
|
164 |
+
|
165 |
+
return $connection;
|
166 |
+
case 'post_type_object':
|
167 |
+
$connection = new ContentTypeConnectionResolver( $source, $args, $context, $info );
|
168 |
+
$connection->set_query_arg( 'contentTypeNames', $field_value );
|
169 |
+
|
170 |
+
return $connection;
|
171 |
+
case 'taxonomy':
|
172 |
+
$connection = new TermObjectConnectionResolver( $source, $args, $context, $info, $object_name );
|
173 |
+
$connection->set_query_arg( 'include', $field_value );
|
174 |
+
|
175 |
+
return $connection;
|
176 |
+
case 'taxonomy_object':
|
177 |
+
$connection = new TaxonomyConnectionResolver( $source, $args, $context, $info );
|
178 |
+
$connection->set_query_arg( 'in', $field_value );
|
179 |
+
|
180 |
+
return $connection;
|
181 |
+
case 'user':
|
182 |
+
$connection = new UserConnectionResolver( $source, $args, $context, $info );
|
183 |
+
$connection->set_query_arg( 'include', $field_value );
|
184 |
+
|
185 |
+
return $connection;
|
186 |
+
case 'user_role':
|
187 |
+
$connection = new UserRoleConnectionResolver( $source, $args, $context, $info );
|
188 |
+
$connection->set_query_arg( 'slugIn', $field_value );
|
189 |
+
|
190 |
+
return $connection;
|
191 |
+
case 'attachment':
|
192 |
+
case 'media':
|
193 |
+
$connection = new PostObjectConnectionResolver( $source, $args, $context, $info, 'attachment' );
|
194 |
+
$connection->set_query_arg( 'post__in', $field_value );
|
195 |
+
|
196 |
+
return $connection;
|
197 |
+
case 'comment':
|
198 |
+
$connection = new CommentConnectionResolver( $source, $args, $context, $info );
|
199 |
+
$connection->set_query_arg( 'comment__in', $field_value );
|
200 |
+
|
201 |
+
return $connection;
|
202 |
+
case 'menu':
|
203 |
+
$connection = new MenuConnectionResolver( $source, $args, $context, $info );
|
204 |
+
$connection->set_query_arg( 'include', $field_value );
|
205 |
+
|
206 |
+
return $connection;
|
207 |
+
case 'menu_item':
|
208 |
+
$connection = new MenuItemConnectionResolver( $source, $args, $context, $info );
|
209 |
+
$connection->set_query_arg( 'post__in', $field_value );
|
210 |
+
|
211 |
+
return $connection;
|
212 |
+
case 'plugin':
|
213 |
+
$connection = new PluginConnectionResolver( $source, $args, $context, $info );
|
214 |
+
|
215 |
+
// @todo Plugin connection does not support filtering, we probably need to add that.
|
216 |
+
$connection->set_query_arg( 'include', $field_value );
|
217 |
+
|
218 |
+
return $connection;
|
219 |
+
case 'theme':
|
220 |
+
$connection = new ThemeConnectionResolver( $source, $args, $context, $info );
|
221 |
+
|
222 |
+
// @todo Theme connection does not support filtering, we probably need to add that.
|
223 |
+
$connection->set_query_arg( 'include', $field_value );
|
224 |
+
|
225 |
+
return $connection;
|
226 |
+
case 'pod':
|
227 |
+
$connection = new Pod( $source, $args, $context, $info, $object_name );
|
228 |
+
|
229 |
+
$where = [
|
230 |
+
[
|
231 |
+
'field' => 'id',
|
232 |
+
'value' => $field_value,
|
233 |
+
'compare' => 'IN',
|
234 |
+
],
|
235 |
+
];
|
236 |
+
|
237 |
+
$connection->set_query_arg( 'where', $where );
|
238 |
+
|
239 |
+
return $connection;
|
240 |
+
case 'pod_type':
|
241 |
+
$connection = new Pod_Type( $source, $args, $context, $info );
|
242 |
+
|
243 |
+
$connection->set_query_arg( 'id', $field_value );
|
244 |
+
|
245 |
+
return $connection;
|
246 |
+
case 'custom-simple':
|
247 |
+
$simple_data = pods_v( 'data', pods_v( 'field', $this->args, [] ), [] );
|
248 |
+
|
249 |
+
$connection = new Custom_Simple( $source, $args, $context, $info, $simple_data );
|
250 |
+
|
251 |
+
$connection->set_query_arg( 'values', $field_value );
|
252 |
+
|
253 |
+
return $connection;
|
254 |
+
}
|
255 |
+
|
256 |
+
return null;
|
257 |
+
}
|
258 |
+
|
259 |
+
}
|
src/Pods/Integrations/WPGraphQL/Connection_Resolver/Custom_Simple.php
ADDED
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL\Connection_Resolver;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use GraphQL\Type\Definition\ResolveInfo;
|
7 |
+
use WPGraphQL\AppContext;
|
8 |
+
use WPGraphQL\Data\Connection\AbstractConnectionResolver;
|
9 |
+
|
10 |
+
/**
|
11 |
+
* GraphQL Connection resolver for Custom Simple Relationships.
|
12 |
+
*
|
13 |
+
* @since 2.9.0
|
14 |
+
*/
|
15 |
+
class Custom_Simple extends AbstractConnectionResolver {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* The custom data provided from the relationship field.
|
19 |
+
*
|
20 |
+
* @since 2.9.0
|
21 |
+
*
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
protected $custom_data;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Pod constructor.
|
28 |
+
*
|
29 |
+
* @since 2.9.0
|
30 |
+
*
|
31 |
+
* @param mixed $source The source passed down from the resolve tree.
|
32 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
33 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
34 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
35 |
+
* @param array $custom_data The custom data provided from the relationship field.
|
36 |
+
*
|
37 |
+
* @throws Exception
|
38 |
+
*/
|
39 |
+
public function __construct( $source, array $args, AppContext $context, ResolveInfo $info, array $custom_data ) {
|
40 |
+
$this->custom_data = $custom_data;
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Call the parent construct to setup class data
|
44 |
+
*/
|
45 |
+
parent::__construct( $source, $args, $context, $info );
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Determines whether the query should execute at all. It's possible that in some
|
50 |
+
* situations we may want to prevent the underlying query from executing at all.
|
51 |
+
*
|
52 |
+
* In those cases, this would be set to false.
|
53 |
+
*
|
54 |
+
* @since 2.9.0
|
55 |
+
*
|
56 |
+
* @return bool Whether the query should execute.
|
57 |
+
*/
|
58 |
+
public function should_execute() {
|
59 |
+
return true;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Provide the loader name.
|
64 |
+
*
|
65 |
+
* @since 2.9.0
|
66 |
+
*
|
67 |
+
* @return string The loader name.
|
68 |
+
*/
|
69 |
+
public function get_loader_name() {
|
70 |
+
return 'pods_custom_simple';
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Converts the args that were provided to the connection into args that can be used with the data.
|
75 |
+
*
|
76 |
+
* @since 2.9.0
|
77 |
+
*
|
78 |
+
* @return array The query arguments to use.
|
79 |
+
*
|
80 |
+
* @throws Exception
|
81 |
+
*/
|
82 |
+
public function get_query_args() {
|
83 |
+
$query_args = [];
|
84 |
+
|
85 |
+
// Handle preparing the values to filter by.
|
86 |
+
if ( ! empty( $this->args['values'] ) ) {
|
87 |
+
$values = $this->prepare_input_fields( (array) $this->args['values'] );
|
88 |
+
|
89 |
+
if ( $values ) {
|
90 |
+
$query_args['values'] = $values;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
// Handle preparing the labels to filter by.
|
95 |
+
if ( ! empty( $this->args['labels'] ) ) {
|
96 |
+
$labels = $this->prepare_input_fields( (array) $this->args['labels'] );
|
97 |
+
|
98 |
+
if ( $labels ) {
|
99 |
+
$query_args['labels'] = $labels;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
return $query_args;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get the list of custom data filtered as requested.
|
108 |
+
*
|
109 |
+
* @since 2.9.0
|
110 |
+
*
|
111 |
+
* @return array List of custom data.
|
112 |
+
*/
|
113 |
+
public function get_query() {
|
114 |
+
// The data is not set.
|
115 |
+
if ( empty( $this->custom_data ) ) {
|
116 |
+
return [];
|
117 |
+
}
|
118 |
+
|
119 |
+
$matching_data = $this->custom_data;
|
120 |
+
|
121 |
+
// Remove data items from matches if they aren't in the provided values to filter by.
|
122 |
+
if ( isset( $this->query_args['values'] ) ) {
|
123 |
+
foreach ( $matching_data as $value => $label ) {
|
124 |
+
if ( in_array( (string) $value, $this->query_args['values'], true ) ) {
|
125 |
+
continue;
|
126 |
+
}
|
127 |
+
|
128 |
+
unset( $matching_data[ $value ] );
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
// Remove data items from matches if they aren't in the provided labels to filter by.
|
133 |
+
if ( isset( $this->query_args['labels'] ) ) {
|
134 |
+
foreach ( $matching_data as $value => $label ) {
|
135 |
+
if ( in_array( (string) $label, $this->query_args['labels'], true ) ) {
|
136 |
+
continue;
|
137 |
+
}
|
138 |
+
|
139 |
+
unset( $matching_data[ $value ] );
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
return $matching_data;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Returns an array of ids from the query being executed.
|
148 |
+
*
|
149 |
+
* @since 2.9.0
|
150 |
+
*
|
151 |
+
* @return array List of IDs from the query.
|
152 |
+
*/
|
153 |
+
public function get_ids() {
|
154 |
+
if ( ! $this->query ) {
|
155 |
+
return [];
|
156 |
+
}
|
157 |
+
|
158 |
+
// Get the IDs from the list of keys.
|
159 |
+
return array_keys( $this->query );
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* Determine whether or not the the offset is valid, i.e the user corresponding to the offset
|
164 |
+
* exists. Offset is equivalent to user_id. So this function is equivalent to checking if the
|
165 |
+
* user with the given ID exists.
|
166 |
+
*
|
167 |
+
* @since 2.9.0
|
168 |
+
*
|
169 |
+
* @param int $offset The ID of the node used as the offset in the cursor.
|
170 |
+
*
|
171 |
+
* @return bool Whether the offset is valid.
|
172 |
+
*/
|
173 |
+
public function is_valid_offset( $offset ) {
|
174 |
+
// The data is not set.
|
175 |
+
if ( empty( $this->custom_data ) ) {
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
return isset( $this->custom_data[ $offset ] );
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* Prepare a list of input fields.
|
184 |
+
*
|
185 |
+
* @since 2.9.0
|
186 |
+
*
|
187 |
+
* @param array $input_fields The list of input fields to prepare.
|
188 |
+
*
|
189 |
+
* @return array The list of prepared input fields.
|
190 |
+
*/
|
191 |
+
private function prepare_input_fields( array $input_fields ) {
|
192 |
+
$prepared_input_fields = [];
|
193 |
+
|
194 |
+
// Set the disallowed pattern to prevent against.
|
195 |
+
$disallowed_pattern = '/[^a-zA-Z0-9_\-]/';
|
196 |
+
|
197 |
+
foreach ( $input_fields as $input_field ) {
|
198 |
+
// If the input field is already an array, make it a string and sanitize it.
|
199 |
+
if ( is_array( $input_field ) ) {
|
200 |
+
$input_field = implode( ',', $input_field );
|
201 |
+
}
|
202 |
+
|
203 |
+
$input_field = (string) $input_field;
|
204 |
+
|
205 |
+
// Do not use any input fields that provide disallowed characters.
|
206 |
+
if ( false !== preg_match( $disallowed_pattern, $input_field ) ) {
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
|
210 |
+
$prepared_input_fields = explode( ',', $input_field );
|
211 |
+
}
|
212 |
+
|
213 |
+
$prepared_input_fields = array_merge( ...$prepared_input_fields );
|
214 |
+
$prepared_input_fields = array_values( array_unique( array_filter( $prepared_input_fields ) ) );
|
215 |
+
|
216 |
+
return $prepared_input_fields;
|
217 |
+
}
|
218 |
+
}
|
src/Pods/Integrations/WPGraphQL/Connection_Resolver/Pod.php
ADDED
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL\Connection_Resolver;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use GraphQL\Error\UserError;
|
7 |
+
use GraphQL\Type\Definition\ResolveInfo;
|
8 |
+
use Pods;
|
9 |
+
use WPGraphQL\AppContext;
|
10 |
+
use WPGraphQL\Data\Connection\AbstractConnectionResolver;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* GraphQL Connection resolver for Pods.
|
14 |
+
*
|
15 |
+
* @since 2.9.0
|
16 |
+
*/
|
17 |
+
class Pod extends AbstractConnectionResolver {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The name of the pod the connection resolver is resolving for.
|
21 |
+
*
|
22 |
+
* @since 2.9.0
|
23 |
+
*
|
24 |
+
* @var string
|
25 |
+
*/
|
26 |
+
protected $pod_name;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* The Pods object or false if not valid.
|
30 |
+
*
|
31 |
+
* @since 2.9.0
|
32 |
+
*
|
33 |
+
* @var Pods|false
|
34 |
+
*/
|
35 |
+
protected $pods;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Pod constructor.
|
39 |
+
*
|
40 |
+
* @since 2.9.0
|
41 |
+
*
|
42 |
+
* @param mixed $source The source passed down from the resolve tree.
|
43 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
44 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
45 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
46 |
+
* @param string $pod_name The pod name to resolve for.
|
47 |
+
*
|
48 |
+
* @throws Exception
|
49 |
+
*/
|
50 |
+
public function __construct( $source, array $args, AppContext $context, ResolveInfo $info, $pod_name = '' ) {
|
51 |
+
$this->pod_name = $pod_name;
|
52 |
+
|
53 |
+
// The pod name is not set.
|
54 |
+
if ( ! empty( $this->pod_name ) ) {
|
55 |
+
$this->pod = pods( $this->pod_name, null, true );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Call the parent construct to setup class data
|
60 |
+
*/
|
61 |
+
parent::__construct( $source, $args, $context, $info );
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Determines whether the query should execute at all. It's possible that in some
|
66 |
+
* situations we may want to prevent the underlying query from executing at all.
|
67 |
+
*
|
68 |
+
* In those cases, this would be set to false.
|
69 |
+
*
|
70 |
+
* @since 2.9.0
|
71 |
+
*
|
72 |
+
* @return bool Whether the query should execute.
|
73 |
+
*/
|
74 |
+
public function should_execute() {
|
75 |
+
return true;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Provide the loader name.
|
80 |
+
*
|
81 |
+
* @since 2.9.0
|
82 |
+
*
|
83 |
+
* @return string The loader name.
|
84 |
+
*/
|
85 |
+
public function get_loader_name() {
|
86 |
+
return 'pods_pod';
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Converts the args that were provided to the connection into args that can be used with Pods::find().
|
91 |
+
*
|
92 |
+
* @since 2.9.0
|
93 |
+
*
|
94 |
+
* @return array The query arguments to use.
|
95 |
+
*
|
96 |
+
* @throws Exception
|
97 |
+
* @see Pods::find
|
98 |
+
*/
|
99 |
+
public function get_query_args() {
|
100 |
+
$query_args = [];
|
101 |
+
|
102 |
+
$query_args['offset'] = $this->get_offset();
|
103 |
+
|
104 |
+
// Determine whether we are pulling records by last first.
|
105 |
+
$last = ! empty( $this->args['last'] ) ? (bool) $this->args['last'] : false;
|
106 |
+
|
107 |
+
// @todo Eventually support this kind of functionality in Pods::find().
|
108 |
+
// $query_args['offset_compare'] = $last ? '>' : '<';
|
109 |
+
|
110 |
+
// Get the limit based on maximum provided in $max_query_amount.
|
111 |
+
$query_args['limit'] = $this->get_query_amount();
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Take any of the input $args (under the "where" input) that were part of the GraphQL query and map and
|
115 |
+
* sanitize their GraphQL input to apply to the Pods::find().
|
116 |
+
*/
|
117 |
+
$input_fields = $this->sanitize_input_fields( $this->args );
|
118 |
+
|
119 |
+
// Merge the default $query_args with the $args that were entered in the query.
|
120 |
+
if ( ! empty( $input_fields ) ) {
|
121 |
+
$query_args = array_merge( $query_args, $input_fields );
|
122 |
+
}
|
123 |
+
|
124 |
+
// Only query the IDs and let deferred resolution query the nodes.
|
125 |
+
$query_args['select'] = $this->pod ? '`t`.`' . $this->pod->pod_data['field_id'] . '`' : '`t`.`id`';
|
126 |
+
|
127 |
+
// If there's no orderby params in the inputArgs, set order based on the first/last argument.
|
128 |
+
if ( empty( $query_args['orderby'] ) ) {
|
129 |
+
$query_args['orderby'] = $query_args['select'] . ' ' . ( $last ? 'ASC' : 'DESC' );
|
130 |
+
}
|
131 |
+
|
132 |
+
return $query_args;
|
133 |
+
}
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Get the Pods object with the data queried or false if not valid.
|
137 |
+
*
|
138 |
+
* @since 2.9.0
|
139 |
+
*
|
140 |
+
* @return Pods|bool The Pods object with the data queried or false if not valid.
|
141 |
+
*/
|
142 |
+
public function get_query() {
|
143 |
+
// The pod is not set.
|
144 |
+
if ( empty( $this->pod ) ) {
|
145 |
+
return false;
|
146 |
+
}
|
147 |
+
|
148 |
+
return $this->pod->find( $this->query_args );
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Returns an array of ids from the query being executed.
|
153 |
+
*
|
154 |
+
* @since 2.9.0
|
155 |
+
*
|
156 |
+
* @return array List of IDs from the query.
|
157 |
+
*/
|
158 |
+
public function get_ids() {
|
159 |
+
$ids = [];
|
160 |
+
|
161 |
+
if ( ! $this->query ) {
|
162 |
+
return $ids;
|
163 |
+
}
|
164 |
+
|
165 |
+
while ( $this->query->fetch() ) {
|
166 |
+
$id = $this->query->id();
|
167 |
+
|
168 |
+
$ids[ $id ] = $id;
|
169 |
+
}
|
170 |
+
|
171 |
+
return $ids;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* This sets up the "allowed" args, and translates the GraphQL-friendly keys to Pods-friendly keys.
|
176 |
+
*
|
177 |
+
* @since 2.9.0
|
178 |
+
*
|
179 |
+
* @param array $args The query args.
|
180 |
+
*
|
181 |
+
* @return array The properly prepared input field arguments.
|
182 |
+
*/
|
183 |
+
protected function sanitize_input_fields( array $args ) {
|
184 |
+
/**
|
185 |
+
* Allow filtering which capabilities are required for specific input fields.
|
186 |
+
*
|
187 |
+
* @since 2.9.0
|
188 |
+
*
|
189 |
+
* @param array $capabilities List of capabilities to require.
|
190 |
+
* @param array $args The input field arguments.
|
191 |
+
* @param string $pod_name The pod name.
|
192 |
+
*/
|
193 |
+
$capabilities = (array) apply_filters( 'pods_wpgraphql_integration_connection_resolver_pod_input_fields_capabilities', [], $args, $this->pod_name );
|
194 |
+
|
195 |
+
$has_access = empty( $capabilities );
|
196 |
+
|
197 |
+
foreach ( $capabilities as $capability ) {
|
198 |
+
if ( current_user_can( $capability ) ) {
|
199 |
+
$has_access = true;
|
200 |
+
|
201 |
+
break;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
// Maybe throw an error if necessary.
|
206 |
+
if ( ! $has_access ) {
|
207 |
+
throw new UserError( __( 'Sorry, you are not allowed to use this combination of filters.', 'pods' ) );
|
208 |
+
}
|
209 |
+
|
210 |
+
$supported_query_args = [
|
211 |
+
'where',
|
212 |
+
'having',
|
213 |
+
'orderby',
|
214 |
+
'groupby',
|
215 |
+
];
|
216 |
+
|
217 |
+
$query_args = [];
|
218 |
+
|
219 |
+
// Set up supported query arguments.
|
220 |
+
foreach ( $supported_query_args as $arg_type ) {
|
221 |
+
if ( empty( $args[ $arg_type ] ) ) {
|
222 |
+
continue;
|
223 |
+
}
|
224 |
+
|
225 |
+
$query_args[] = $this->prepare_input_fields_by_type( $arg_type, (array) $args[ $arg_type ] );
|
226 |
+
}
|
227 |
+
|
228 |
+
$query_args = array_merge( ...$query_args );
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Allow filtering the query arguments mapped from the input fields which must be compatible with Pods::find().
|
232 |
+
*
|
233 |
+
* @since 2.9.0
|
234 |
+
*
|
235 |
+
* @param array $query_args The query arguments to pass to Pods::find().
|
236 |
+
* @param array $args The input arguments provided which contain 'where', 'having', and others.
|
237 |
+
* @param mixed $source The source passed down from the resolve tree.
|
238 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
239 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
240 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
241 |
+
* @param string $pod_name The pod name to resolve for.
|
242 |
+
*/
|
243 |
+
$query_args = (array) apply_filters( 'pods_wpgraphql_integration_connection_resolver_pod_input_fields_query_args', $query_args, $args, $this->source, $this->args, $this->context, $this->info, $this->pod_name );
|
244 |
+
|
245 |
+
return $query_args;
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Determine whether or not the the offset is valid, i.e the user corresponding to the offset
|
250 |
+
* exists. Offset is equivalent to user_id. So this function is equivalent to checking if the
|
251 |
+
* user with the given ID exists.
|
252 |
+
*
|
253 |
+
* @since 2.9.0
|
254 |
+
*
|
255 |
+
* @param int $offset The ID of the node used as the offset in the cursor.
|
256 |
+
*
|
257 |
+
* @return bool Whether the offset is valid.
|
258 |
+
*/
|
259 |
+
public function is_valid_offset( $offset ) {
|
260 |
+
// The pod name is not set.
|
261 |
+
if ( empty( $this->pod_name ) ) {
|
262 |
+
return false;
|
263 |
+
}
|
264 |
+
|
265 |
+
// Set up a new Pods instance instead of reusing $this->pod to prevent conflicts.
|
266 |
+
$pod = pods( $this->pod_name, $offset, false );
|
267 |
+
|
268 |
+
// The pod does not exist.
|
269 |
+
if ( ! $pod->valid() ) {
|
270 |
+
return false;
|
271 |
+
}
|
272 |
+
|
273 |
+
return $pod->exists();
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Prepare a list of input fields by type.
|
278 |
+
*
|
279 |
+
* @since 2.9.0
|
280 |
+
*
|
281 |
+
* @param string $type The input type: 'where', 'having', 'orderby', and 'groupby'.
|
282 |
+
* @param array $input_fields The list of input fields to prepare.
|
283 |
+
*
|
284 |
+
* @return array The list of prepared input fields.
|
285 |
+
*/
|
286 |
+
private function prepare_input_fields_by_type( $type, array $input_fields ) {
|
287 |
+
// @todo Add something into Pods core that does this automatically for strict handling.
|
288 |
+
$prepared_input_fields = [];
|
289 |
+
|
290 |
+
// Set the disallowed pattern to prevent against.
|
291 |
+
$disallowed_pattern = '/[^a-zA-Z0-9,\._\-\s]/';
|
292 |
+
|
293 |
+
if ( in_array( $type, [ 'where', 'having' ], true ) ) {
|
294 |
+
// Prepare these arguments in WP_Query meta_query style, do not allow SQL.
|
295 |
+
$prepared_input_fields = $this->prepare_input_fields_for_meta_query( $input_fields, $disallowed_pattern );
|
296 |
+
} elseif ( in_array( $type, [ 'orderby', 'groupby' ], true ) ) {
|
297 |
+
// Prepare these arguments in basic SQL formatting, do not allow functions or special characters.
|
298 |
+
$prepared_input_fields = $this->prepare_input_fields_for_simple_syntax( $input_fields, $disallowed_pattern );
|
299 |
+
}
|
300 |
+
|
301 |
+
return $prepared_input_fields;
|
302 |
+
}
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Prepare a list of input fields for meta query.
|
306 |
+
*
|
307 |
+
* @since 2.9.0
|
308 |
+
*
|
309 |
+
* @param array $input_fields The list of input fields to prepare.
|
310 |
+
* @param string $disallowed_pattern The disallowed pattern to prevent against.
|
311 |
+
*
|
312 |
+
* @return array The list of prepared input fields.
|
313 |
+
*/
|
314 |
+
private function prepare_input_fields_for_meta_query( array $input_fields, $disallowed_pattern = '' ) {
|
315 |
+
$prepared_input_fields = [];
|
316 |
+
|
317 |
+
foreach ( $input_fields as $key => $value ) {
|
318 |
+
$is_array = is_array( $value );
|
319 |
+
|
320 |
+
// Skip these input fields as they must be provided in some_field => value format.
|
321 |
+
if ( ! $is_array && ! is_string( $key ) ) {
|
322 |
+
continue;
|
323 |
+
}
|
324 |
+
|
325 |
+
// Check for meta_query formatting.
|
326 |
+
if ( $is_array ) {
|
327 |
+
// Check if we have a field provided, if so use that as $key.
|
328 |
+
if ( isset( $value['field'] ) ) {
|
329 |
+
$key = $value['field'];
|
330 |
+
}
|
331 |
+
|
332 |
+
// If we do not have a value provided, set up the meta query syntax to pass the whole array into value.
|
333 |
+
if ( ! isset( $value['value'] ) ) {
|
334 |
+
$value = [
|
335 |
+
'value' => array_values( $value ),
|
336 |
+
];
|
337 |
+
}
|
338 |
+
|
339 |
+
// Set the defaults of the meta query field.
|
340 |
+
$field_query = [
|
341 |
+
'field' => $key,
|
342 |
+
// Always enforce sanitizing.
|
343 |
+
'sanitize' => true,
|
344 |
+
];
|
345 |
+
|
346 |
+
// Enforce the defaults.
|
347 |
+
$value = array_merge( $value, $field_query );
|
348 |
+
}
|
349 |
+
|
350 |
+
// Do not use any input fields that provide disallowed characters.
|
351 |
+
if ( $disallowed_pattern && false !== preg_match( $disallowed_pattern, $key ) ) {
|
352 |
+
continue;
|
353 |
+
}
|
354 |
+
|
355 |
+
$prepared_input_fields[ $key ] = $value;
|
356 |
+
}
|
357 |
+
|
358 |
+
return $prepared_input_fields;
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Prepare a list of input fields for simple syntax.
|
363 |
+
*
|
364 |
+
* @since 2.9.0
|
365 |
+
*
|
366 |
+
* @param array $input_fields The list of input fields to prepare.
|
367 |
+
* @param string $disallowed_pattern The disallowed pattern to prevent against.
|
368 |
+
*
|
369 |
+
* @return array The list of prepared input fields.
|
370 |
+
*/
|
371 |
+
private function prepare_input_fields_for_simple_syntax( array $input_fields, $disallowed_pattern = '' ) {
|
372 |
+
$prepared_input_fields = [];
|
373 |
+
|
374 |
+
foreach ( $input_fields as $input_field => $maybe_direction ) {
|
375 |
+
// Detect if we are using some_field => ASC or not.
|
376 |
+
if ( is_numeric( $input_field ) ) {
|
377 |
+
$input_field = $maybe_direction;
|
378 |
+
} else {
|
379 |
+
$input_field .= ' ' . $maybe_direction;
|
380 |
+
}
|
381 |
+
|
382 |
+
// Do not use any input fields that provide disallowed characters.
|
383 |
+
if ( $disallowed_pattern && false !== preg_match( $disallowed_pattern, $input_field ) ) {
|
384 |
+
continue;
|
385 |
+
}
|
386 |
+
|
387 |
+
$prepared_input_fields[] = $input_field;
|
388 |
+
}
|
389 |
+
|
390 |
+
return $prepared_input_fields;
|
391 |
+
}
|
392 |
+
}
|
src/Pods/Integrations/WPGraphQL/Connection_Resolver/Pod_Type.php
ADDED
@@ -0,0 +1,289 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL\Connection_Resolver;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use GraphQL\Error\UserError;
|
7 |
+
use GraphQL\Type\Definition\ResolveInfo;
|
8 |
+
use PodsAPI;
|
9 |
+
use WPGraphQL\AppContext;
|
10 |
+
use WPGraphQL\Data\Connection\AbstractConnectionResolver;
|
11 |
+
|
12 |
+
/**
|
13 |
+
* GraphQL Connection resolver for Pod Types.
|
14 |
+
*
|
15 |
+
* @since 2.9.0
|
16 |
+
*/
|
17 |
+
class Pod_Type extends AbstractConnectionResolver {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The PodsAPI object.
|
21 |
+
*
|
22 |
+
* @since 2.9.0
|
23 |
+
*
|
24 |
+
* @var PodsAPI
|
25 |
+
*/
|
26 |
+
protected $pods_api;
|
27 |
+
|
28 |
+
/**
|
29 |
+
* Pod constructor.
|
30 |
+
*
|
31 |
+
* @since 2.9.0
|
32 |
+
*
|
33 |
+
* @param mixed $source The source passed down from the resolve tree.
|
34 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
35 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
36 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
37 |
+
*
|
38 |
+
* @throws Exception
|
39 |
+
*/
|
40 |
+
public function __construct( $source, array $args, AppContext $context, ResolveInfo $info ) {
|
41 |
+
$this->pods_api = pods_api();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Call the parent construct to setup class data
|
45 |
+
*/
|
46 |
+
parent::__construct( $source, $args, $context, $info );
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Determines whether the query should execute at all. It's possible that in some
|
51 |
+
* situations we may want to prevent the underlying query from executing at all.
|
52 |
+
*
|
53 |
+
* In those cases, this would be set to false.
|
54 |
+
*
|
55 |
+
* @since 2.9.0
|
56 |
+
*
|
57 |
+
* @return bool Whether the query should execute.
|
58 |
+
*/
|
59 |
+
public function should_execute() {
|
60 |
+
return true;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Provide the loader name.
|
65 |
+
*
|
66 |
+
* @since 2.9.0
|
67 |
+
*
|
68 |
+
* @return string The loader name.
|
69 |
+
*/
|
70 |
+
public function get_loader_name() {
|
71 |
+
return 'pods_pod_type';
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Converts the args that were provided to the connection into args that can be used with PodsAPI::load_pods().
|
76 |
+
*
|
77 |
+
* @since 2.9.0
|
78 |
+
*
|
79 |
+
* @return array The query arguments to use.
|
80 |
+
*
|
81 |
+
* @throws Exception
|
82 |
+
* @see PodsAPI::load_pods
|
83 |
+
*/
|
84 |
+
public function get_query_args() {
|
85 |
+
$query_args = [
|
86 |
+
'fields' => false,
|
87 |
+
];
|
88 |
+
|
89 |
+
// @todo Eventually support this kind of functionality in PodsAPI::load_pods().
|
90 |
+
// $query_args['offset'] = $this->get_offset();
|
91 |
+
|
92 |
+
// Determine whether we are pulling records by last first.
|
93 |
+
$last = ! empty( $this->args['last'] ) ? (bool) $this->args['last'] : false;
|
94 |
+
|
95 |
+
// @todo Eventually support this kind of functionality in PodsAPI::load_pods().
|
96 |
+
// $query_args['offset_compare'] = $last ? '>' : '<';
|
97 |
+
|
98 |
+
// Get the limit based on maximum provided in $max_query_amount.
|
99 |
+
$query_args['limit'] = $this->get_query_amount();
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Take any of the input $args (under the "where" input) that were part of the GraphQL query and map and
|
103 |
+
* sanitize their GraphQL input to apply to the PodsAPI::load_pods().
|
104 |
+
*/
|
105 |
+
$input_fields = $this->sanitize_input_fields( $this->args );
|
106 |
+
|
107 |
+
// Merge the default $query_args with the $args that were entered in the query.
|
108 |
+
if ( ! empty( $input_fields ) ) {
|
109 |
+
$query_args = array_merge( $query_args, $input_fields );
|
110 |
+
}
|
111 |
+
|
112 |
+
return $query_args;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Get the list of Pods filtered by the provided query arguments.
|
117 |
+
*
|
118 |
+
* @since 2.9.0
|
119 |
+
*
|
120 |
+
* @return array List of Pods filtered by the provided query arguments.
|
121 |
+
*/
|
122 |
+
public function get_query() {
|
123 |
+
// The API is not set.
|
124 |
+
if ( empty( $this->pods_api ) ) {
|
125 |
+
return false;
|
126 |
+
}
|
127 |
+
|
128 |
+
try {
|
129 |
+
return $this->pods_api->load_pods( $this->query_args );
|
130 |
+
} catch ( Exception $exception ) {
|
131 |
+
// Something went wrong.
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Returns an array of ids from the query being executed.
|
138 |
+
*
|
139 |
+
* @since 2.9.0
|
140 |
+
*
|
141 |
+
* @return array List of IDs from the query.
|
142 |
+
*/
|
143 |
+
public function get_ids() {
|
144 |
+
if ( ! $this->query ) {
|
145 |
+
return [];
|
146 |
+
}
|
147 |
+
|
148 |
+
// Get the IDs from the list of keys.
|
149 |
+
return array_keys( $this->query );
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* This sets up the "allowed" args, and translates the GraphQL-friendly keys to Pods-friendly keys.
|
154 |
+
*
|
155 |
+
* @since 2.9.0
|
156 |
+
*
|
157 |
+
* @param array $args The query args.
|
158 |
+
*
|
159 |
+
* @return array The properly prepared input field arguments.
|
160 |
+
*/
|
161 |
+
protected function sanitize_input_fields( array $args ) {
|
162 |
+
/**
|
163 |
+
* Allow filtering which capabilities are required for specific input fields.
|
164 |
+
*
|
165 |
+
* @since 2.9.0
|
166 |
+
*
|
167 |
+
* @param array $capabilities List of capabilities to require.
|
168 |
+
* @param array $args The input field arguments.
|
169 |
+
*/
|
170 |
+
$capabilities = (array) apply_filters( 'pods_wpgraphql_integration_connection_resolver_pod_type_input_fields_capabilities', [], $args );
|
171 |
+
|
172 |
+
$has_access = empty( $capabilities );
|
173 |
+
|
174 |
+
foreach ( $capabilities as $capability ) {
|
175 |
+
if ( current_user_can( $capability ) ) {
|
176 |
+
$has_access = true;
|
177 |
+
|
178 |
+
break;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
// Maybe throw an error if necessary.
|
183 |
+
if ( ! $has_access ) {
|
184 |
+
throw new UserError( __( 'Sorry, you are not allowed to use this combination of filters.', 'pods' ) );
|
185 |
+
}
|
186 |
+
|
187 |
+
$supported_query_args = [
|
188 |
+
'where',
|
189 |
+
'having',
|
190 |
+
'orderby',
|
191 |
+
'groupby',
|
192 |
+
];
|
193 |
+
|
194 |
+
$query_args = [];
|
195 |
+
|
196 |
+
// Set up supported query arguments.
|
197 |
+
foreach ( $supported_query_args as $arg_type ) {
|
198 |
+
if ( empty( $args[ $arg_type ] ) ) {
|
199 |
+
continue;
|
200 |
+
}
|
201 |
+
|
202 |
+
$query_args[] = $this->prepare_input_fields_by_type( $arg_type, (array) $args[ $arg_type ] );
|
203 |
+
}
|
204 |
+
|
205 |
+
$query_args = array_merge( ...$query_args );
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Allow filtering the query arguments mapped from the input fields which must be compatible with PodsAPI::load_pods().
|
209 |
+
*
|
210 |
+
* @since 2.9.0
|
211 |
+
*
|
212 |
+
* @param array $query_args The query arguments to pass to PodsAPI::load_pods().
|
213 |
+
* @param array $args The input arguments provided which contain 'where', 'having', and others.
|
214 |
+
* @param mixed $source The source passed down from the resolve tree.
|
215 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
216 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
217 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
218 |
+
*/
|
219 |
+
$query_args = (array) apply_filters( 'pods_wpgraphql_integration_connection_resolver_pod_input_fields_query_args', $query_args, $args, $this->source, $this->args, $this->context, $this->info );
|
220 |
+
|
221 |
+
return $query_args;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Determine whether or not the the offset is valid, i.e the user corresponding to the offset
|
226 |
+
* exists. Offset is equivalent to user_id. So this function is equivalent to checking if the
|
227 |
+
* user with the given ID exists.
|
228 |
+
*
|
229 |
+
* @since 2.9.0
|
230 |
+
*
|
231 |
+
* @param int $offset The ID of the node used as the offset in the cursor.
|
232 |
+
*
|
233 |
+
* @return bool Whether the offset is valid.
|
234 |
+
*/
|
235 |
+
public function is_valid_offset( $offset ) {
|
236 |
+
// The API is not set.
|
237 |
+
if ( empty( $this->pods_api ) ) {
|
238 |
+
return false;
|
239 |
+
}
|
240 |
+
|
241 |
+
try {
|
242 |
+
$pod = $this->pods_api->load_pod( $offset );
|
243 |
+
} catch ( Exception $exception ) {
|
244 |
+
// Something went wrong.
|
245 |
+
return false;
|
246 |
+
}
|
247 |
+
|
248 |
+
return ! empty( $pod );
|
249 |
+
}
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Prepare a list of input fields by type.
|
253 |
+
*
|
254 |
+
* @since 2.9.0
|
255 |
+
*
|
256 |
+
* @param string $type The input type: 'where', 'having', 'orderby', and 'groupby'.
|
257 |
+
* @param array $input_fields The list of input fields to prepare.
|
258 |
+
*
|
259 |
+
* @return array The list of prepared input fields.
|
260 |
+
*/
|
261 |
+
private function prepare_input_fields_by_type( $type, array $input_fields ) {
|
262 |
+
// @todo Add something into Pods core that does this automatically for strict handling.
|
263 |
+
$prepared_input_fields = [];
|
264 |
+
|
265 |
+
// Set the disallowed pattern to prevent against.
|
266 |
+
$disallowed_pattern = '/[^a-zA-Z0-9_\-]/';
|
267 |
+
|
268 |
+
if ( in_array( $type, [ 'type', 'ids', 'object' ], true ) ) {
|
269 |
+
foreach ( $input_fields as $input_field ) {
|
270 |
+
// If the input field is already an array, make it a string and sanitize it.
|
271 |
+
if ( is_array( $input_field ) ) {
|
272 |
+
$input_field = implode( ',', $input_field );
|
273 |
+
}
|
274 |
+
|
275 |
+
// Do not use any input fields that provide disallowed characters.
|
276 |
+
if ( false !== preg_match( $disallowed_pattern, $input_field ) ) {
|
277 |
+
continue;
|
278 |
+
}
|
279 |
+
|
280 |
+
$prepared_input_fields = explode( ',', $input_field );
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
$prepared_input_fields = array_merge( ...$prepared_input_fields );
|
285 |
+
$prepared_input_fields = array_values( array_unique( array_filter( $prepared_input_fields ) ) );
|
286 |
+
|
287 |
+
return $prepared_input_fields;
|
288 |
+
}
|
289 |
+
}
|
src/Pods/Integrations/WPGraphQL/Field.php
ADDED
@@ -0,0 +1,311 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL;
|
4 |
+
|
5 |
+
use GraphQL\Type\Definition\ResolveInfo;
|
6 |
+
use Pods\Pod_Manager;
|
7 |
+
use Pods\Whatsit\Field as Pod_Field;
|
8 |
+
use Pods\Whatsit\Pod;
|
9 |
+
use WPGraphQL\AppContext;
|
10 |
+
use WPGraphQL\Data\Loader\PostObjectLoader;
|
11 |
+
use WPGraphQL\Model\Comment;
|
12 |
+
use WPGraphQL\Model\Menu;
|
13 |
+
use WPGraphQL\Model\MenuItem;
|
14 |
+
use WPGraphQL\Model\Model;
|
15 |
+
use WPGraphQL\Model\Post;
|
16 |
+
use WPGraphQL\Model\Term;
|
17 |
+
use WPGraphQL\Model\User;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Field interfacing functionality for GraphQL.
|
21 |
+
*
|
22 |
+
* @since 2.9.0
|
23 |
+
*/
|
24 |
+
class Field {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The field data.
|
28 |
+
*
|
29 |
+
* @since 2.9.0
|
30 |
+
*
|
31 |
+
* @var Pod_Field
|
32 |
+
*/
|
33 |
+
private $field;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* The pod data.
|
37 |
+
*
|
38 |
+
* @since 2.9.0
|
39 |
+
*
|
40 |
+
* @var Pod
|
41 |
+
*/
|
42 |
+
private $pod;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* List of arguments.
|
46 |
+
*
|
47 |
+
* @since 2.9.0
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
private $args;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* List of connections that need to be registered later.
|
55 |
+
*
|
56 |
+
* @since 2.9.0
|
57 |
+
*
|
58 |
+
* @var array
|
59 |
+
*/
|
60 |
+
private static $connections = [];
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Field constructor.
|
64 |
+
*
|
65 |
+
* @since 2.9.0
|
66 |
+
*
|
67 |
+
* @param Pod_Field $field The field data.
|
68 |
+
* @param Pod $pod The pod data.
|
69 |
+
* @param array $args List of arguments to setup.
|
70 |
+
*/
|
71 |
+
public function __construct( $field, $pod, $args ) {
|
72 |
+
$this->field = $field;
|
73 |
+
$this->pod = $pod;
|
74 |
+
$this->args = $args;
|
75 |
+
|
76 |
+
$required = [
|
77 |
+
'type_name',
|
78 |
+
'field_name',
|
79 |
+
'graphql_type',
|
80 |
+
];
|
81 |
+
|
82 |
+
// If we are missing required arguments, don't register the field.
|
83 |
+
foreach ( $required as $arg ) {
|
84 |
+
if ( empty( $this->args[ $arg ] ) ) {
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
// Register the field.
|
90 |
+
$this->register_field();
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Register the field.
|
95 |
+
*
|
96 |
+
* @since 2.9.0
|
97 |
+
*/
|
98 |
+
public function register_field() {
|
99 |
+
$is_connection = 'connection' === $this->args['graphql_format'] && ! empty( $this->args['related_type_name'] );
|
100 |
+
$is_multi = is_array( $this->args['graphql_type'] ) && isset( $this->args['graphql_type']['list_of'] );
|
101 |
+
$connection_name = null;
|
102 |
+
|
103 |
+
if ( $is_connection ) {
|
104 |
+
$connection_name = $this->args['type_name'] . '_' . $this->args['field_name'] . '_connection';
|
105 |
+
|
106 |
+
$this->args['graphql_type'] = $connection_name;
|
107 |
+
|
108 |
+
if ( $is_multi ) {
|
109 |
+
$this->args['graphql_type'] = [
|
110 |
+
'list_of' => $this->args['graphql_type'],
|
111 |
+
];
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
$config = [
|
116 |
+
'type' => $this->args['graphql_type'],
|
117 |
+
'args' => [
|
118 |
+
'format' => [
|
119 |
+
'type' => 'PostObjectFieldFormatEnum',
|
120 |
+
'description' => __( 'Format of the field output', 'pods' ),
|
121 |
+
],
|
122 |
+
],
|
123 |
+
'resolve' => [ $this, 'get_field_value' ],
|
124 |
+
];
|
125 |
+
|
126 |
+
// Remove the format arg if the type is not a string.
|
127 |
+
if ( 'String' !== $this->args['graphql_type'] && ( ! $is_multi || 'String' !== $this->args['graphql_type']['list_of'] ) ) {
|
128 |
+
unset( $config['args'] );
|
129 |
+
}
|
130 |
+
|
131 |
+
try {
|
132 |
+
// Save the config for reference later.
|
133 |
+
$this->args['config'] = $config;
|
134 |
+
$this->args['is_multi'] = $is_multi;
|
135 |
+
|
136 |
+
if ( ! $is_connection ) {
|
137 |
+
register_graphql_field( $this->args['type_name'], $this->args['field_name'], $config );
|
138 |
+
}
|
139 |
+
|
140 |
+
// Maybe add a connection to set up later.
|
141 |
+
if ( $is_connection ) {
|
142 |
+
self::$connections[] = [
|
143 |
+
'from' => $this->args['type_name'],
|
144 |
+
'from_field' => $this->args['field_name'],
|
145 |
+
'name' => $connection_name,
|
146 |
+
'to' => $this->args['related_type_name'],
|
147 |
+
'object_type' => $this->args['related_object_type'],
|
148 |
+
'object_name' => $this->args['related_object_name'],
|
149 |
+
'is_multi' => $is_multi,
|
150 |
+
'field' => $this,
|
151 |
+
];
|
152 |
+
}
|
153 |
+
} catch ( Exception $exception ) {
|
154 |
+
// Connection was not registered.
|
155 |
+
throw $exception;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get the ID from the model object.
|
161 |
+
*
|
162 |
+
* @since 2.9.0
|
163 |
+
*
|
164 |
+
* @param Model $source The model object.
|
165 |
+
*
|
166 |
+
* @return int|null The ID or null if not supported.
|
167 |
+
*/
|
168 |
+
public function get_id_from_model( $source ) {
|
169 |
+
switch ( true ) {
|
170 |
+
case $source instanceof Term:
|
171 |
+
$id = $source->term_id;
|
172 |
+
break;
|
173 |
+
case $source instanceof Post:
|
174 |
+
$id = $source->ID;
|
175 |
+
break;
|
176 |
+
case $source instanceof MenuItem:
|
177 |
+
$id = $source->menuItemId;
|
178 |
+
break;
|
179 |
+
case $source instanceof Menu:
|
180 |
+
$id = $source->menuId;
|
181 |
+
break;
|
182 |
+
case $source instanceof User:
|
183 |
+
$id = $source->userId;
|
184 |
+
break;
|
185 |
+
case $source instanceof Comment:
|
186 |
+
$id = $source->comment_ID;
|
187 |
+
break;
|
188 |
+
default:
|
189 |
+
$id = null;
|
190 |
+
break;
|
191 |
+
}
|
192 |
+
|
193 |
+
return $id;
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Get the ID from the root object.
|
198 |
+
*
|
199 |
+
* @since 2.9.0
|
200 |
+
*
|
201 |
+
* @param Model $source The source passed down from the resolve tree.
|
202 |
+
* @param array $args List of arguments input in the field as part of the GraphQL query.
|
203 |
+
* @param AppContext $context Object containing app context that gets passed down the resolve tree.
|
204 |
+
* @param ResolveInfo $info Info about fields passed down the resolve tree.
|
205 |
+
*
|
206 |
+
* @return mixed The field value.
|
207 |
+
*/
|
208 |
+
public function get_field_value( $source, $args, $context, $info ) {
|
209 |
+
$id = $this->get_id_from_model( $source );
|
210 |
+
|
211 |
+
if ( null === $id ) {
|
212 |
+
return '';
|
213 |
+
}
|
214 |
+
|
215 |
+
$pod = tribe( Pod_Manager::class )->get_pod( $this->pod->get_name(), $id );
|
216 |
+
|
217 |
+
$field_name = $this->field->get_name();
|
218 |
+
|
219 |
+
$format = pods_v( 'format', $args, 'rendered', true );
|
220 |
+
|
221 |
+
if ( in_array( $this->field['type'], [ 'pick', 'file' ], true ) ) {
|
222 |
+
$return_type = $this->args[ $this->field['type'] . '_format' ];
|
223 |
+
|
224 |
+
// Force different formats based on return type.
|
225 |
+
if ( 'connection' === $return_type ) {
|
226 |
+
$format = 'raw';
|
227 |
+
} elseif ( 'id' === $return_type ) {
|
228 |
+
$format = 'raw';
|
229 |
+
} elseif ( 'title' === $return_type ) {
|
230 |
+
$format = 'rendered';
|
231 |
+
} elseif ( in_array( $return_type, [ 'view-url', 'asset-url' ], true ) ) {
|
232 |
+
$format = 'raw';
|
233 |
+
|
234 |
+
$field_name .= '.permalink';
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
+
// Maybe return the raw field value.
|
239 |
+
if (
|
240 |
+
$this->args['is_multi']
|
241 |
+
|| (
|
242 |
+
'String' !== $this->args['graphql_type']
|
243 |
+
&& (
|
244 |
+
! $this->args['is_multi']
|
245 |
+
|| 'String' !== $this->args['graphql_type']['list_of']
|
246 |
+
)
|
247 |
+
)
|
248 |
+
) {
|
249 |
+
$field_params = [
|
250 |
+
'name' => $field_name,
|
251 |
+
'output' => 'ids',
|
252 |
+
];
|
253 |
+
|
254 |
+
// If this is a multi field and we need to get the rendered format, turn display on.
|
255 |
+
if ( $this->args['is_multi'] && 'rendered' === $format ) {
|
256 |
+
// Handle formatting.
|
257 |
+
$field_params['display'] = true;
|
258 |
+
|
259 |
+
// Format the values individually.
|
260 |
+
$field_params['display_process_individually'] = true;
|
261 |
+
}
|
262 |
+
|
263 |
+
$value = $pod->field( $field_params );
|
264 |
+
|
265 |
+
if ( ! $this->args['is_multi'] && is_array( $value ) ) {
|
266 |
+
// Maybe force a string.
|
267 |
+
$value = implode( ',', $value );
|
268 |
+
} elseif ( $this->args['is_multi'] && ! is_array( $value ) ) {
|
269 |
+
// Maybe force an array.
|
270 |
+
if ( '' === $value || null === $value ) {
|
271 |
+
$value = [];
|
272 |
+
} else {
|
273 |
+
$value = (array) $value;
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
return $value;
|
278 |
+
}
|
279 |
+
|
280 |
+
// Check if we are need the raw format.
|
281 |
+
if ( 'raw' === $format ) {
|
282 |
+
$field_params = [
|
283 |
+
'name' => $field_name,
|
284 |
+
'output' => 'ids',
|
285 |
+
];
|
286 |
+
|
287 |
+
// Return the field in the raw context.
|
288 |
+
return $pod->field( $field_params );
|
289 |
+
}
|
290 |
+
|
291 |
+
// Return the field in the normal render context.
|
292 |
+
return $pod->display( $field_name );
|
293 |
+
}
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Register the connections.
|
297 |
+
*
|
298 |
+
* @since 2.9.0
|
299 |
+
*/
|
300 |
+
public static function register_connections() {
|
301 |
+
if ( empty( self::$connections ) ) {
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
|
305 |
+
// Register the connections.
|
306 |
+
foreach ( self::$connections as $connection ) {
|
307 |
+
new Connection( $connection );
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
}
|
src/Pods/Integrations/WPGraphQL/Integration.php
ADDED
@@ -0,0 +1,463 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL;
|
4 |
+
|
5 |
+
use Exception;
|
6 |
+
use Pods\Whatsit\Field as Pod_Field;
|
7 |
+
use Pods\Whatsit\Pod;
|
8 |
+
use Pods\Integrations\WPGraphQL\Field;
|
9 |
+
use PodsForm;
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Integration specific functionality.
|
13 |
+
*
|
14 |
+
* @since 2.9.0
|
15 |
+
*/
|
16 |
+
class Integration {
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Get the list of requirement checks and error messages.
|
20 |
+
*
|
21 |
+
* @since 2.9.0
|
22 |
+
*
|
23 |
+
* @return array List of requirement checks and error messages.
|
24 |
+
*/
|
25 |
+
public function get_requirements() {
|
26 |
+
return [
|
27 |
+
[
|
28 |
+
// WPGraphQL should be installed.
|
29 |
+
'check' => defined( 'WPGRAPHQL_VERSION' ),
|
30 |
+
],
|
31 |
+
[
|
32 |
+
// WPGraphQL should be the minimum required version.
|
33 |
+
'check' => defined( 'WPGRAPHQL_VERSION' ) && version_compare( '1.1.3', WPGRAPHQL_VERSION, '<=' ),
|
34 |
+
'message' => __( 'You need WPGraphQL 1.1.3+ installed and activated in order to use the Pods WPGraphQL integration.', 'pods' ),
|
35 |
+
],
|
36 |
+
[
|
37 |
+
// Pods Pro WPGraphQL should be deactivated.
|
38 |
+
'check' => ! class_exists( \Pods_Pro\WPGraphQL\Plugin::class ),
|
39 |
+
'message' => __( 'You can now deactivate the Pods Pro WPGraphQL Add-On because it is now officially available as part of Pods 2.9+.', 'pods' ),
|
40 |
+
],
|
41 |
+
];
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Add the class hooks.
|
46 |
+
*
|
47 |
+
* @since 2.9.0
|
48 |
+
*/
|
49 |
+
public function hook() {
|
50 |
+
add_filter( 'graphql_register_types', [ $this, 'register_types' ] );
|
51 |
+
add_filter( 'graphql_register_types', [ $this, 'register_connections' ], 99 );
|
52 |
+
add_filter( 'register_post_type_args', [ $this, 'add_graphql_support_for_post_type' ], 10, 2 );
|
53 |
+
add_filter( 'register_taxonomy_args', [ $this, 'add_graphql_support_for_taxonomy' ], 10, 2 );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Remove the class hooks.
|
58 |
+
*
|
59 |
+
* @since 2.9.0
|
60 |
+
*/
|
61 |
+
public function unhook() {
|
62 |
+
remove_filter( 'graphql_register_types', [ $this, 'register_types' ] );
|
63 |
+
remove_filter( 'graphql_register_types', [ $this, 'register_connections' ], 99 );
|
64 |
+
remove_filter( 'register_post_type_args', [ $this, 'add_graphql_support_for_post_type' ] );
|
65 |
+
remove_filter( 'register_taxonomy_args', [ $this, 'add_graphql_support_for_taxonomy' ] );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Register the types and their fields with GraphQL.
|
70 |
+
*
|
71 |
+
* @since 2.9.0
|
72 |
+
*/
|
73 |
+
public function register_types() {
|
74 |
+
// @todo Fetch list of Pods and set up custom types.
|
75 |
+
$api = pods_api();
|
76 |
+
|
77 |
+
$params = [
|
78 |
+
'options' => [
|
79 |
+
'wpgraphql_enabled' => 1,
|
80 |
+
],
|
81 |
+
];
|
82 |
+
|
83 |
+
$pods = $api->load_pods( $params );
|
84 |
+
|
85 |
+
foreach ( $pods as $pod ) {
|
86 |
+
$pod_graphql_info = $this->get_graphql_info_for_pod( $pod );
|
87 |
+
|
88 |
+
// Skip the Pod if GraphQL is not enabled.
|
89 |
+
if ( ! $pod_graphql_info ) {
|
90 |
+
continue;
|
91 |
+
}
|
92 |
+
|
93 |
+
$field_params = [];
|
94 |
+
|
95 |
+
// Only fetch the fields that are enabled if all are not enabled.
|
96 |
+
if ( ! $pod_graphql_info['all_fields_enabled'] ) {
|
97 |
+
$field_params = [
|
98 |
+
'options' => [
|
99 |
+
'wpgraphql_enabled' => 1,
|
100 |
+
],
|
101 |
+
];
|
102 |
+
}
|
103 |
+
|
104 |
+
$fields = $pod->get_fields( $field_params );
|
105 |
+
|
106 |
+
foreach ( $fields as $field ) {
|
107 |
+
$field_graphql_info = $this->get_graphql_info_for_field( $field, $pod_graphql_info );
|
108 |
+
|
109 |
+
// Skip the Field if GraphQL is not enabled.
|
110 |
+
if ( ! $pod_graphql_info['all_fields_enabled'] && ! $field_graphql_info ) {
|
111 |
+
continue;
|
112 |
+
}
|
113 |
+
|
114 |
+
$args = [
|
115 |
+
'type_name' => $pod_graphql_info['singular_name'],
|
116 |
+
'related_type_name' => $field_graphql_info['related_to_name'],
|
117 |
+
'field_name' => $field_graphql_info['singular_name'],
|
118 |
+
'graphql_type' => $field_graphql_info['type'],
|
119 |
+
'graphql_format' => '',
|
120 |
+
'related_limit' => $field_graphql_info['related_limit'],
|
121 |
+
];
|
122 |
+
|
123 |
+
if ( 'pick' === $field['type'] ) {
|
124 |
+
$args['graphql_format'] = $field_graphql_info['pick_format'];
|
125 |
+
} elseif ( 'file' === $field['type'] ) {
|
126 |
+
$args['graphql_format'] = $field_graphql_info['file_format'];
|
127 |
+
}
|
128 |
+
|
129 |
+
$args = array_merge( $field_graphql_info, $args );
|
130 |
+
|
131 |
+
new Field( $field, $pod, $args );
|
132 |
+
}
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Get the GraphQL information for the Pod.
|
138 |
+
*
|
139 |
+
* @since 2.9.0
|
140 |
+
*
|
141 |
+
* @param Pod $pod The pod object.
|
142 |
+
* @param null|array $labels The list of labels or null if not referenced.
|
143 |
+
*
|
144 |
+
* @return array|null The GraphQL information for the Pod or null if not setup correctly.
|
145 |
+
*/
|
146 |
+
public function get_graphql_info_for_pod( $pod, $labels = null ) {
|
147 |
+
static $graphql_cached = [];
|
148 |
+
|
149 |
+
$pod_name = $pod->get_name();
|
150 |
+
|
151 |
+
if ( isset( $graphql_cached[ $pod_name ] ) ) {
|
152 |
+
return $graphql_cached[ $pod_name ];
|
153 |
+
}
|
154 |
+
|
155 |
+
$graphql_info = [
|
156 |
+
'enabled' => filter_var( $pod->get_arg( 'wpgraphql_enabled', $pod->get_arg( 'pods_pro_wpgraphql_enabled', false ) ), FILTER_VALIDATE_BOOLEAN ),
|
157 |
+
'all_fields_enabled' => filter_var( $pod->get_arg( 'wpgraphql_all_fields_enabled', $pod->get_arg( 'pods_pro_wpgraphql_all_fields_enabled', false ) ), FILTER_VALIDATE_BOOLEAN ),
|
158 |
+
'pick_format' => $pod->get_arg( 'wpgraphql_pick_format', $pod->get_arg( 'pods_pro_wpgraphql_pick_format', 'connection', true ), true ),
|
159 |
+
'file_format' => $pod->get_arg( 'wpgraphql_file_format', $pod->get_arg( 'pods_pro_wpgraphql_file_format', 'connection', true ), true ),
|
160 |
+
'singular_name' => $pod_name,
|
161 |
+
'plural_name' => $pod_name,
|
162 |
+
];
|
163 |
+
|
164 |
+
$pod_wpgraphql_singular_name = $pod->get_arg( 'wpgraphql_singular_name', $pod->get_arg( 'pods_pro_wpgraphql_singular_name' ) );
|
165 |
+
$pod_wpgraphql_plural_name = $pod->get_arg( 'wpgraphql_plural_name', $pod->get_arg( 'pods_pro_wpgraphql_plural_name' ) );
|
166 |
+
|
167 |
+
// Get the singular name from the pod and fall back to the singular label of the object.
|
168 |
+
if ( ! empty( $pod_wpgraphql_singular_name ) ) {
|
169 |
+
$graphql_info['singular_name'] = $pod_wpgraphql_singular_name;
|
170 |
+
} elseif ( $labels && ! empty( $labels['singular_name'] ) ) {
|
171 |
+
$graphql_info['singular_name'] = $labels['singular_name'];
|
172 |
+
} elseif ( ! empty( $pod['label_singular'] ) ) {
|
173 |
+
$graphql_info['singular_name'] = $pod['label_singular'];
|
174 |
+
}
|
175 |
+
|
176 |
+
// Get the plural name from the pod and fall back to the plural label of the object.
|
177 |
+
if ( ! empty( $pod_wpgraphql_plural_name ) ) {
|
178 |
+
$graphql_info['plural_name'] = $pod_wpgraphql_plural_name;
|
179 |
+
} elseif ( $labels && ! empty( $labels['name'] ) ) {
|
180 |
+
$graphql_info['plural_name'] = $labels['name'];
|
181 |
+
} elseif ( ! empty( $pod['label'] ) ) {
|
182 |
+
$graphql_info['plural_name'] = $pod['label'];
|
183 |
+
}
|
184 |
+
|
185 |
+
// Enforce slugs for singular and plural names.
|
186 |
+
$graphql_info['singular_name'] = pods_js_name( pods_create_slug( $graphql_info['singular_name'] ) );
|
187 |
+
$graphql_info['plural_name'] = pods_js_name( pods_create_slug( $graphql_info['plural_name'] ) );
|
188 |
+
|
189 |
+
// If plural is the same as singular, add an "s" to plural.
|
190 |
+
if ( $graphql_info['singular_name'] === $graphql_info['plural_name'] ) {
|
191 |
+
$graphql_info['plural_name'] .= 's';
|
192 |
+
}
|
193 |
+
|
194 |
+
// If the names don't fit the requirements, we need to bail because WPGraphQL does not support that.
|
195 |
+
if ( false === preg_match( '/^[_a-zA-Z][_a-zA-Z0-9]*$/', $graphql_info['singular_name'] ) || false === preg_match( '/^[_a-zA-Z][_a-zA-Z0-9]*$/', $graphql_info['plural_name'] ) ) {
|
196 |
+
return null;
|
197 |
+
}
|
198 |
+
|
199 |
+
$graphql_cached[ $pod_name ] = $graphql_info;
|
200 |
+
|
201 |
+
return $graphql_cached[ $pod_name ];
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Get the GraphQL information for the Field.
|
206 |
+
*
|
207 |
+
* @since 2.9.0
|
208 |
+
*
|
209 |
+
* @param Pod_Field $field The field object.
|
210 |
+
* @param array $pod_graphql_info The Pod GraphQL options.
|
211 |
+
*
|
212 |
+
* @return array|null The GraphQL information for the Field or null if not setup correctly.
|
213 |
+
*/
|
214 |
+
public function get_graphql_info_for_field( $field, array $pod_graphql_info ) {
|
215 |
+
$graphql_info = [
|
216 |
+
'enabled' => filter_var( $field->get_arg( 'wpgraphql_enabled', $field->get_arg( 'pods_pro_wpgraphql_enabled', false ) ), FILTER_VALIDATE_BOOLEAN ),
|
217 |
+
'pick_format' => $field->get_arg( 'wpgraphql_pick_format', $field->get_arg( 'pods_pro_wpgraphql_pick_format', 'connection', true ), true ),
|
218 |
+
'file_format' => $field->get_arg( 'wpgraphql_file_format', $field->get_arg( 'pods_pro_wpgraphql_file_format', 'connection', true ), true ),
|
219 |
+
'singular_name' => $field->get_name(),
|
220 |
+
'plural_name' => $field->get_name(),
|
221 |
+
'type' => 'String',
|
222 |
+
'related_to_name' => '',
|
223 |
+
'related_object_type' => $field->get_related_object_type(),
|
224 |
+
'related_object_name' => $field->get_related_object_name(),
|
225 |
+
'related_limit' => $field->get_limit(),
|
226 |
+
];
|
227 |
+
|
228 |
+
if ( ! empty( $pod_graphql_info['pick_format'] ) && 'inherit' !== $pod_graphql_info['pick_format'] ) {
|
229 |
+
$graphql_info['pick_format'] = $pod_graphql_info['pick_format'];
|
230 |
+
}
|
231 |
+
|
232 |
+
if ( ! empty( $pod_graphql_info['file_format'] ) && 'inherit' !== $pod_graphql_info['file_format'] ) {
|
233 |
+
$graphql_info['file_format'] = $pod_graphql_info['file_format'];
|
234 |
+
}
|
235 |
+
|
236 |
+
$field_wpgraphql_singular_name = $field->get_arg( 'wpgraphql_singular_name', $field->get_arg( 'pods_pro_wpgraphql_singular_name' ) );
|
237 |
+
$field_wpgraphql_plural_name = $field->get_arg( 'wpgraphql_plural_name', $field->get_arg( 'pods_pro_wpgraphql_plural_name' ) );
|
238 |
+
|
239 |
+
// Get the singular name from the pod and fall back to the singular label of the object.
|
240 |
+
if ( ! empty( $field_wpgraphql_singular_name ) ) {
|
241 |
+
$graphql_info['singular_name'] = $field_wpgraphql_singular_name;
|
242 |
+
}
|
243 |
+
|
244 |
+
// Get the plural name from the pod and fall back to the plural label of the object.
|
245 |
+
if ( ! empty( $field_wpgraphql_plural_name ) ) {
|
246 |
+
$graphql_info['plural_name'] = $field_wpgraphql_plural_name;
|
247 |
+
}
|
248 |
+
|
249 |
+
// Enforce slugs for singular and plural names.
|
250 |
+
$graphql_info['singular_name'] = pods_js_name( pods_create_slug( $graphql_info['singular_name'] ) );
|
251 |
+
$graphql_info['plural_name'] = pods_js_name( pods_create_slug( $graphql_info['plural_name'] ) );
|
252 |
+
|
253 |
+
// If plural is the same as singular, add an "s" to plural.
|
254 |
+
if ( $graphql_info['singular_name'] === $graphql_info['plural_name'] ) {
|
255 |
+
$graphql_info['plural_name'] .= 's';
|
256 |
+
}
|
257 |
+
|
258 |
+
// If the names don't fit the requirements, we need to bail because WPGraphQL does not support that.
|
259 |
+
if ( false === preg_match( '/^[_a-zA-Z][_a-zA-Z0-9]*$/', $graphql_info['singular_name'] ) || false === preg_match( '/^[_a-zA-Z][_a-zA-Z0-9]*$/', $graphql_info['plural_name'] ) ) {
|
260 |
+
return null;
|
261 |
+
}
|
262 |
+
|
263 |
+
$number_field_types = PodsForm::number_field_types();
|
264 |
+
|
265 |
+
$field_type = $field->get_type();
|
266 |
+
|
267 |
+
if ( in_array( $field_type, $number_field_types, true ) ) {
|
268 |
+
$graphql_info['type'] = 'Float';
|
269 |
+
} elseif ( 'boolean' === $field_type ) {
|
270 |
+
$graphql_info['type'] = 'Boolean';
|
271 |
+
} elseif ( 'pick' === $field_type ) {
|
272 |
+
// Set the related GraphQL name.
|
273 |
+
$graphql_info['related_to_name'] = $this->get_related_type_from_field( $field, $graphql_info );
|
274 |
+
|
275 |
+
// Handle single/multiple.
|
276 |
+
if ( null !== $graphql_info['related_limit'] && 1 !== $graphql_info['related_limit'] ) {
|
277 |
+
$graphql_info['type'] = [
|
278 |
+
'list_of' => $graphql_info['type'],
|
279 |
+
];
|
280 |
+
}
|
281 |
+
} elseif ( 'file' === $field_type ) {
|
282 |
+
// Set the related GraphQL name.
|
283 |
+
$graphql_info['related_to_name'] = $this->get_related_type_from_field( $field, $graphql_info );
|
284 |
+
|
285 |
+
// Handle single/multiple.
|
286 |
+
if ( null !== $graphql_info['related_limit'] && 1 !== $graphql_info['related_limit'] ) {
|
287 |
+
$graphql_info['type'] = [
|
288 |
+
'list_of' => $graphql_info['type'],
|
289 |
+
];
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
return $graphql_info;
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
* Get the related GraphQL type from the field.
|
298 |
+
*
|
299 |
+
* @since 2.9.0
|
300 |
+
*
|
301 |
+
* @param Pod_Field $field The field object.
|
302 |
+
* @param array $graphql_info The GraphQL information for the field.
|
303 |
+
*
|
304 |
+
* @return string|null The GraphQL type or null if not found.
|
305 |
+
*/
|
306 |
+
public function get_related_type_from_field( $field, array $graphql_info ) {
|
307 |
+
if ( empty( $graphql_info['related_object_type'] ) ) {
|
308 |
+
return null;
|
309 |
+
}
|
310 |
+
|
311 |
+
$object_type = $graphql_info['related_object_type'];
|
312 |
+
$object_name = $graphql_info['related_object_name'];
|
313 |
+
|
314 |
+
switch ( $object_type ) {
|
315 |
+
case 'post_type':
|
316 |
+
if ( empty( $object_name ) ) {
|
317 |
+
return null;
|
318 |
+
}
|
319 |
+
|
320 |
+
$post_type_object = get_post_type_object( $object_name );
|
321 |
+
|
322 |
+
if ( ! $post_type_object || ! $post_type_object->show_in_graphql || empty( $post_type_object->graphql_single_name ) ) {
|
323 |
+
return null;
|
324 |
+
}
|
325 |
+
|
326 |
+
return $post_type_object->graphql_single_name;
|
327 |
+
case 'post_type_object':
|
328 |
+
return 'contentType';
|
329 |
+
case 'taxonomy':
|
330 |
+
if ( empty( $object_name ) ) {
|
331 |
+
return null;
|
332 |
+
}
|
333 |
+
|
334 |
+
$taxonomy_object = get_taxonomy( $object_name );
|
335 |
+
|
336 |
+
if ( ! $taxonomy_object || ! $taxonomy_object->show_in_graphql || empty( $taxonomy_object->graphql_single_name ) ) {
|
337 |
+
return null;
|
338 |
+
}
|
339 |
+
|
340 |
+
return $taxonomy_object->graphql_single_name;
|
341 |
+
case 'taxonomy_object':
|
342 |
+
return 'taxonomy';
|
343 |
+
case 'user':
|
344 |
+
case 'comment':
|
345 |
+
case 'plugin':
|
346 |
+
case 'theme':
|
347 |
+
case 'menu':
|
348 |
+
return $object_type;
|
349 |
+
case 'user_role':
|
350 |
+
return 'userRole';
|
351 |
+
case 'attachment':
|
352 |
+
case 'media':
|
353 |
+
return 'mediaItem';
|
354 |
+
case 'menu_item':
|
355 |
+
return 'menuItem';
|
356 |
+
case 'pod':
|
357 |
+
// @todo Support ACTs.
|
358 |
+
return null;
|
359 |
+
case 'pod_type':
|
360 |
+
// @todo Support Pod types.
|
361 |
+
return null;
|
362 |
+
default:
|
363 |
+
return null;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* Register the connections with GraphQL.
|
369 |
+
*
|
370 |
+
* @since 2.9.0
|
371 |
+
*/
|
372 |
+
public function register_connections() {
|
373 |
+
// Register the connections that were found when registering the fields with GraphQL.
|
374 |
+
Field::register_connections();
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* Add GraphQL support to post types.
|
379 |
+
*
|
380 |
+
* @since 2.9.0
|
381 |
+
*
|
382 |
+
* @param array $args List of arguments for registering a post type.
|
383 |
+
* @param string $name The post type name.
|
384 |
+
*
|
385 |
+
* @return array List of arguments for registering a post type.
|
386 |
+
*/
|
387 |
+
public function add_graphql_support_for_post_type( $args, $name ) {
|
388 |
+
return $this->add_graphql_support( $args, $name, 'post_type' );
|
389 |
+
}
|
390 |
+
|
391 |
+
/**
|
392 |
+
* Add GraphQL support to taxonomies.
|
393 |
+
*
|
394 |
+
* @since 2.9.0
|
395 |
+
*
|
396 |
+
* @param array $args List of arguments for registering a taxonomy.
|
397 |
+
* @param string $name The taxonomy name.
|
398 |
+
*
|
399 |
+
* @return array List of arguments for registering a taxonomy.
|
400 |
+
*/
|
401 |
+
public function add_graphql_support_for_taxonomy( $args, $name ) {
|
402 |
+
return $this->add_graphql_support( $args, $name, 'taxonomy' );
|
403 |
+
}
|
404 |
+
|
405 |
+
/**
|
406 |
+
* Add GraphQL support to post types and taxonomies.
|
407 |
+
*
|
408 |
+
* @since 2.9.0
|
409 |
+
*
|
410 |
+
* @param array $args List of arguments for registering a post type or taxonomy.
|
411 |
+
* @param string $name The post type or taxonomy name.
|
412 |
+
* @param string $post_type_or_taxonomy Whether the type is a 'post_type' or 'taxonomy'.
|
413 |
+
*
|
414 |
+
* @return array List of arguments for registering a post type or taxonomy.
|
415 |
+
*/
|
416 |
+
public function add_graphql_support( $args, $name, $post_type_or_taxonomy ) {
|
417 |
+
// Do not override other graphql integrations that may already be set up.
|
418 |
+
if ( isset( $args['show_in_graphql'] ) ) {
|
419 |
+
return $args;
|
420 |
+
}
|
421 |
+
|
422 |
+
try {
|
423 |
+
$api = pods_api();
|
424 |
+
|
425 |
+
$params = [
|
426 |
+
'name' => $name,
|
427 |
+
];
|
428 |
+
|
429 |
+
$pod = $api->load_pod( $params );
|
430 |
+
} catch ( Exception $exception ) {
|
431 |
+
// Something else happened and we should bail.
|
432 |
+
return $args;
|
433 |
+
}
|
434 |
+
|
435 |
+
// The pod does not exist.
|
436 |
+
if ( ! $pod ) {
|
437 |
+
return $args;
|
438 |
+
}
|
439 |
+
|
440 |
+
// The pod is not the right type.
|
441 |
+
if ( $post_type_or_taxonomy !== $pod['type'] ) {
|
442 |
+
return $args;
|
443 |
+
}
|
444 |
+
|
445 |
+
$pod_graphql_args = $this->get_graphql_info_for_pod( $pod, $args['labels'] );
|
446 |
+
|
447 |
+
// If the GraphQL is not enabled or not set up properly.
|
448 |
+
if ( ! $pod_graphql_args || ! $pod_graphql_args['enabled'] ) {
|
449 |
+
return $args;
|
450 |
+
}
|
451 |
+
|
452 |
+
// Set up WPGraphQL arguments.
|
453 |
+
$graphql_args = [
|
454 |
+
'show_in_graphql' => $pod_graphql_args['enabled'],
|
455 |
+
'graphql_single_name' => $pod_graphql_args['singular_name'],
|
456 |
+
'graphql_plural_name' => $pod_graphql_args['plural_name'],
|
457 |
+
];
|
458 |
+
|
459 |
+
// Set the WPGraphQL arguments but do not override if they have already been manually set.
|
460 |
+
return array_merge( $graphql_args, $args );
|
461 |
+
}
|
462 |
+
|
463 |
+
}
|
src/Pods/Integrations/WPGraphQL/Service_Provider.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL;
|
4 |
+
|
5 |
+
use tad_DI52_ServiceProvider;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class Service_Provider
|
9 |
+
*
|
10 |
+
* @since 2.9.0
|
11 |
+
*/
|
12 |
+
class Service_Provider extends tad_DI52_ServiceProvider {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Registers the classes and functionality needed.
|
16 |
+
*
|
17 |
+
* @since 2.9.0
|
18 |
+
*/
|
19 |
+
public function register() {
|
20 |
+
$this->container->singleton( Integration::class, Integration::class );
|
21 |
+
$this->container->singleton( Settings::class, Settings::class );
|
22 |
+
|
23 |
+
$this->hooks();
|
24 |
+
}
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Hooks all the methods and actions the class needs.
|
28 |
+
*
|
29 |
+
* @since 2.9.0
|
30 |
+
*/
|
31 |
+
protected function hooks() {
|
32 |
+
add_action( 'init', [ $this, 'hook_init' ] );
|
33 |
+
}
|
34 |
+
|
35 |
+
public function hook_init() {
|
36 |
+
$integration = tribe( Integration::class );
|
37 |
+
|
38 |
+
$requirements = $integration->get_requirements();
|
39 |
+
|
40 |
+
$pods_admin = pods_admin();
|
41 |
+
|
42 |
+
// Only hook into the integration if the requirements are met.
|
43 |
+
if ( ! $pods_admin->check_requirements( $requirements ) ) {
|
44 |
+
return;
|
45 |
+
}
|
46 |
+
|
47 |
+
$integration->hook();
|
48 |
+
|
49 |
+
// Get the Settings instance and register the settings.
|
50 |
+
$settings = tribe( Settings::class );
|
51 |
+
|
52 |
+
$settings->hook();
|
53 |
+
}
|
54 |
+
}
|
src/Pods/Integrations/WPGraphQL/Settings.php
ADDED
@@ -0,0 +1,255 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Integrations\WPGraphQL;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Settings specific functionality.
|
7 |
+
*
|
8 |
+
* @since 2.9.0
|
9 |
+
*/
|
10 |
+
class Settings {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Add the class hooks.
|
14 |
+
*
|
15 |
+
* @since 2.9.0
|
16 |
+
*/
|
17 |
+
public function hook() {
|
18 |
+
$supported_types = [
|
19 |
+
'post_type',
|
20 |
+
'taxonomy',
|
21 |
+
'user',
|
22 |
+
'media',
|
23 |
+
'comment',
|
24 |
+
/*'settings',
|
25 |
+
'pod',*/
|
26 |
+
];
|
27 |
+
|
28 |
+
foreach ( $supported_types as $supported_type ) {
|
29 |
+
add_filter( "pods_admin_setup_edit_tabs_{$supported_type}", [ $this, 'add_pod_tabs' ], 10, 2 );
|
30 |
+
add_filter( "pods_admin_setup_edit_options_{$supported_type}", [ $this, 'add_pod_options' ], 10, 2 );
|
31 |
+
add_filter( "pods_admin_setup_edit_field_tabs_{$supported_type}", [ $this, 'add_pod_tabs' ], 10, 2 );
|
32 |
+
add_filter( "pods_admin_setup_edit_field_options_{$supported_type}", [
|
33 |
+
$this,
|
34 |
+
'add_field_options',
|
35 |
+
], 10, 2 );
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Remove the class hooks.
|
41 |
+
*
|
42 |
+
* @since 2.9.0
|
43 |
+
*/
|
44 |
+
public function unhook() {
|
45 |
+
$supported_types = [
|
46 |
+
'post_type',
|
47 |
+
'taxonomy',
|
48 |
+
'user',
|
49 |
+
'media',
|
50 |
+
'comment',
|
51 |
+
'setting',
|
52 |
+
'pod',
|
53 |
+
];
|
54 |
+
|
55 |
+
foreach ( $supported_types as $supported_type ) {
|
56 |
+
remove_filter( "pods_admin_setup_edit_tabs_{$supported_type}", [ $this, 'add_pod_tabs' ] );
|
57 |
+
remove_filter( "pods_admin_setup_edit_options_{$supported_type}", [ $this, 'add_pod_options' ] );
|
58 |
+
remove_filter( "pods_admin_setup_edit_field_tabs_{$supported_type}", [ $this, 'add_pod_tabs' ] );
|
59 |
+
remove_filter( "pods_admin_setup_edit_field_options_{$supported_type}", [ $this, 'add_field_options' ] );
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Add the custom pod tab.
|
65 |
+
*
|
66 |
+
* @param array $tabs List of tabs.
|
67 |
+
* @param array $pod The pod object.
|
68 |
+
*
|
69 |
+
* @return array List of tabs.
|
70 |
+
*/
|
71 |
+
public function add_pod_tabs( $tabs, $pod ) {
|
72 |
+
$tabs['wpgraphql'] = __( 'WPGraphQL', 'pods' );
|
73 |
+
|
74 |
+
return $tabs;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Add custom pod options.
|
79 |
+
*
|
80 |
+
* @since 2.9.0
|
81 |
+
*
|
82 |
+
* @param array $options List of options.
|
83 |
+
* @param array $pod The pod object.
|
84 |
+
*
|
85 |
+
* @return array List of options.
|
86 |
+
*/
|
87 |
+
public function add_pod_options( $options, $pod ) {
|
88 |
+
$options['wpgraphql'] = [
|
89 |
+
'wpgraphql_enabled' => [
|
90 |
+
'label' => __( 'Enable support in WPGraphQL', 'pods' ),
|
91 |
+
'help' => __( 'This will enable WPGraphQL requests for this content type.', 'pods' ),
|
92 |
+
'default' => filter_var( pods_v( 'pods_pro_wpgraphql_enabled', $pod, false ), FILTER_VALIDATE_BOOLEAN ),
|
93 |
+
'type' => 'boolean',
|
94 |
+
'boolean_yes_label' => '',
|
95 |
+
],
|
96 |
+
'wpgraphql_singular_name' => [
|
97 |
+
'label' => __( 'Custom WPGraphQL singular name', 'pods' ),
|
98 |
+
'help' => __( 'This will default to the singular label if you leave it blank. You can customize it if you wish to query against it completely differently through WPGraphQL. Whatever you enter here will be normalized to a lowercase, alphanumeric string. It must not start with a number, otherwise it will not show up.', 'pods' ),
|
99 |
+
'default' => pods_v( 'pods_pro_wpgraphql_singular_name', $pod, '' ),
|
100 |
+
'type' => 'slug',
|
101 |
+
'slug_placeholder' => __( '(Default: Singular label)', 'pods' ),
|
102 |
+
'depends-on' => [
|
103 |
+
'wpgraphql_enabled' => true,
|
104 |
+
],
|
105 |
+
],
|
106 |
+
'wpgraphql_plural_name' => [
|
107 |
+
'label' => __( 'Custom WPGraphQL plural name', 'pods' ),
|
108 |
+
'help' => __( 'This will default to the plural label with an "s" added to it at the end if you leave it blank. You can customize it if you wish to query against it completely differently through WPGraphQL. Whatever you enter here will be normalized to a lowercase, alphanumeric string. It must not start with a number, otherwise it will not show up.', 'pods' ),
|
109 |
+
'default' => pods_v( 'pods_pro_wpgraphql_plural_name', $pod, '' ),
|
110 |
+
'type' => 'slug',
|
111 |
+
'slug_placeholder' => __( '(Default: Plural label)', 'pods' ),
|
112 |
+
'depends-on' => [
|
113 |
+
'wpgraphql_enabled' => true,
|
114 |
+
],
|
115 |
+
],
|
116 |
+
'wpgraphql_all_fields_enabled' => [
|
117 |
+
'label' => __( 'Show All fields (read-only)', 'pods' ),
|
118 |
+
'help' => __( 'This will override any off/on settings per field and allow all fields to be shown.', 'pods' ),
|
119 |
+
'default' => filter_var( pods_v( 'pods_pro_wpgraphql_all_fields_enabled', $pod, false ), FILTER_VALIDATE_BOOLEAN ),
|
120 |
+
'type' => 'boolean',
|
121 |
+
'boolean_yes_label' => '',
|
122 |
+
'depends-on' => [
|
123 |
+
'wpgraphql_enabled' => true,
|
124 |
+
],
|
125 |
+
],
|
126 |
+
'wpgraphql_pick_format' => [
|
127 |
+
'label' => __( 'Relationship format', 'pods' ),
|
128 |
+
'help' => __( 'This will override any relationship format settings per field. Connections will allow linking to resources on WPGraphQL.', 'pods' ),
|
129 |
+
'default' => pods_v( 'pods_pro_wpgraphql_pick_format', $pod, 'connection' ),
|
130 |
+
'data' => [
|
131 |
+
'inherit' => __( 'Use per-field setting', 'pods' ),
|
132 |
+
'connection' => __( 'Connection', 'pods' ),
|
133 |
+
'id' => __( 'ID only', 'pods' ),
|
134 |
+
'title' => __( 'Title only', 'pods' ),
|
135 |
+
'view-url' => __( 'View URL only', 'pods' ),
|
136 |
+
],
|
137 |
+
'type' => 'pick',
|
138 |
+
'boolean_yes_label' => '',
|
139 |
+
'depends-on' => [
|
140 |
+
'wpgraphql_enabled' => true,
|
141 |
+
],
|
142 |
+
],
|
143 |
+
'wpgraphql_file_format' => [
|
144 |
+
'label' => __( 'File format', 'pods' ),
|
145 |
+
'help' => __( 'This will override any file format settings per field. Connections will allow linking to resources on WPGraphQL.', 'pods' ),
|
146 |
+
'default' => pods_v( 'pods_pro_wpgraphql_file_format', $pod, 'connection' ),
|
147 |
+
'data' => [
|
148 |
+
'inherit' => __( 'Use per-field setting', 'pods' ),
|
149 |
+
'connection' => __( 'Connection', 'pods' ),
|
150 |
+
'id' => __( 'ID only', 'pods' ),
|
151 |
+
'asset-url' => __( 'Asset URL only', 'pods' ),
|
152 |
+
],
|
153 |
+
'type' => 'pick',
|
154 |
+
'boolean_yes_label' => '',
|
155 |
+
'depends-on' => [
|
156 |
+
'wpgraphql_enabled' => true,
|
157 |
+
],
|
158 |
+
],
|
159 |
+
];
|
160 |
+
|
161 |
+
return $options;
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Add custom pod field options.
|
166 |
+
*
|
167 |
+
* @since 2.9.0
|
168 |
+
*
|
169 |
+
* @param array $options List of options.
|
170 |
+
* @param array $pod The pod object.
|
171 |
+
*
|
172 |
+
* @return array List of options.
|
173 |
+
*/
|
174 |
+
public function add_field_options( $options, $pod ) {
|
175 |
+
$options['wpgraphql'] = [
|
176 |
+
'wpgraphql_enabled' => [
|
177 |
+
'label' => __( 'Show this field in WPGraphQL (read-only)', 'pods' ),
|
178 |
+
'help' => __( 'This will enable WPGraphQL requests for this field.', 'pods' ),
|
179 |
+
'default' => false,
|
180 |
+
'type' => 'boolean',
|
181 |
+
'boolean_yes_label' => '',
|
182 |
+
],
|
183 |
+
'wpgraphql_singular_name' => [
|
184 |
+
'label' => __( 'Custom WPGraphQL singular name', 'pods' ),
|
185 |
+
'help' => __( 'This will default to the field name if you leave it blank. You can customize it if you wish to query against it completely differently through WPGraphQL. Whatever you enter here will be normalized to a lowercase, alphanumeric string. It must not start with a number, otherwise it will not show up.', 'pods' ),
|
186 |
+
'type' => 'slug',
|
187 |
+
'slug_placeholder' => __( '(Default: Field name)', 'pods' ),
|
188 |
+
'depends-on' => [
|
189 |
+
'wpgraphql_enabled' => true,
|
190 |
+
],
|
191 |
+
],
|
192 |
+
'wpgraphql_plural_name' => [
|
193 |
+
'label' => __( 'Custom WPGraphQL plural name', 'pods' ),
|
194 |
+
'help' => __( 'This will default to the field name with an "s" added to it at the end if you leave it blank. You can customize it if you wish to query against it completely differently through WPGraphQL. Whatever you enter here will be normalized to a lowercase, alphanumeric string. It must not start with a number, otherwise it will not show up.', 'pods' ),
|
195 |
+
'type' => 'slug',
|
196 |
+
'slug_placeholder' => __( '(Default: Field name with an "s" added)', 'pods' ),
|
197 |
+
'depends-on' => [
|
198 |
+
'wpgraphql_enabled' => true,
|
199 |
+
],
|
200 |
+
],
|
201 |
+
'wpgraphql_pick_format' => [
|
202 |
+
'label' => __( 'Relationship format', 'pods' ),
|
203 |
+
'help' => __( 'Connections will allow linking to resources on WPGraphQL.', 'pods' ),
|
204 |
+
'default' => 'connection',
|
205 |
+
'data' => [
|
206 |
+
'connection' => __( 'Connection', 'pods' ),
|
207 |
+
'id' => __( 'ID only', 'pods' ),
|
208 |
+
'title' => __( 'Title only', 'pods' ),
|
209 |
+
'view-url' => __( 'View URL only', 'pods' ),
|
210 |
+
],
|
211 |
+
'type' => 'pick',
|
212 |
+
'boolean_yes_label' => '',
|
213 |
+
'depends-on' => [
|
214 |
+
'type' => 'pick',
|
215 |
+
'wpgraphql_enabled' => true,
|
216 |
+
],
|
217 |
+
'wildcard-on' => [
|
218 |
+
'pick_object' => [
|
219 |
+
'^post_type-.*$',
|
220 |
+
'^taxonomy-.*$',
|
221 |
+
'^pod-.*$',
|
222 |
+
'^user$',
|
223 |
+
'^role$',
|
224 |
+
'^media$',
|
225 |
+
'^comment$',
|
226 |
+
'^nav_menu$',
|
227 |
+
'^theme$',
|
228 |
+
'^plugin$',
|
229 |
+
'^post-types$',
|
230 |
+
'^taxonomies$',
|
231 |
+
],
|
232 |
+
],
|
233 |
+
],
|
234 |
+
'wpgraphql_file_format' => [
|
235 |
+
'label' => __( 'File format', 'pods' ),
|
236 |
+
'help' => __( 'Connections will allow linking to resources on WPGraphQL.', 'pods' ),
|
237 |
+
'default' => 'connection',
|
238 |
+
'data' => [
|
239 |
+
'connection' => __( 'Connection', 'pods' ),
|
240 |
+
'id' => __( 'ID only', 'pods' ),
|
241 |
+
'asset-url' => __( 'Asset URL only', 'pods' ),
|
242 |
+
],
|
243 |
+
'type' => 'pick',
|
244 |
+
'boolean_yes_label' => '',
|
245 |
+
'depends-on' => [
|
246 |
+
'type' => 'file',
|
247 |
+
'wpgraphql_enabled' => true,
|
248 |
+
],
|
249 |
+
],
|
250 |
+
];
|
251 |
+
|
252 |
+
return $options;
|
253 |
+
}
|
254 |
+
|
255 |
+
}
|
src/Pods/Pod_Manager.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods;
|
4 |
+
|
5 |
+
use Pods;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Manage Pods instances for reuse.
|
9 |
+
*
|
10 |
+
* @since 2.9.0
|
11 |
+
*/
|
12 |
+
class Pod_Manager {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The list of Pods instances.
|
16 |
+
*
|
17 |
+
* @since 2.9.0
|
18 |
+
*
|
19 |
+
* @var Pods[]
|
20 |
+
*/
|
21 |
+
private $instances;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Empty constructor.
|
25 |
+
*
|
26 |
+
* @since 2.9.0
|
27 |
+
*/
|
28 |
+
private function __construct() {
|
29 |
+
/*
|
30 |
+
──────█▀▄─▄▀▄─▀█▀─█─█─▀─█▀▄─▄▀▀▀─────
|
31 |
+
──────█─█─█─█──█──█▀█─█─█─█─█─▀█─────
|
32 |
+
──────▀─▀──▀───▀──▀─▀─▀─▀─▀──▀▀──────
|
33 |
+
─────────────────────────────────────
|
34 |
+
───────────────▀█▀─▄▀▄───────────────
|
35 |
+
────────────────█──█─█───────────────
|
36 |
+
────────────────▀───▀────────────────
|
37 |
+
─────────────────────────────────────
|
38 |
+
─────█▀▀▄─█▀▀█───█──█─█▀▀─█▀▀█─█▀▀───
|
39 |
+
─────█──█─█──█───█▀▀█─█▀▀─█▄▄▀─█▀▀───
|
40 |
+
─────▀▀▀──▀▀▀▀───▀──▀─▀▀▀─▀─▀▀─▀▀▀───
|
41 |
+
─────────────────────────────────────
|
42 |
+
─────────▄███████████▄▄──────────────
|
43 |
+
──────▄██▀──────────▀▀██▄────────────
|
44 |
+
────▄█▀────────────────▀██───────────
|
45 |
+
──▄█▀────────────────────▀█▄─────────
|
46 |
+
─█▀──██──────────────██───▀██────────
|
47 |
+
█▀──────────────────────────██───────
|
48 |
+
█──███████████████████───────█───────
|
49 |
+
█────────────────────────────█───────
|
50 |
+
█────────────────────────────█───────
|
51 |
+
█────────────────────────────█───────
|
52 |
+
█────────────────────────────█───────
|
53 |
+
█────────────────────────────█───────
|
54 |
+
█▄───────────────────────────█───────
|
55 |
+
▀█▄─────────────────────────██───────
|
56 |
+
─▀█▄───────────────────────██────────
|
57 |
+
──▀█▄────────────────────▄█▀─────────
|
58 |
+
───▀█▄──────────────────██───────────
|
59 |
+
─────▀█▄──────────────▄█▀────────────
|
60 |
+
───────▀█▄▄▄──────▄▄▄███████▄▄───────
|
61 |
+
────────███████████████───▀██████▄───
|
62 |
+
─────▄███▀▀────────▀███▄──────█─███──
|
63 |
+
───▄███▄─────▄▄▄▄────███────▄▄████▀──
|
64 |
+
─▄███▓▓█─────█▓▓█───████████████▀────
|
65 |
+
─▀▀██▀▀▀▀▀▀▀▀▀▀███████████────█──────
|
66 |
+
────█─▄▄▄▄▄▄▄▄█▀█▓▓─────██────█──────
|
67 |
+
────█─█───────█─█─▓▓────██────█──────
|
68 |
+
────█▄█───────█▄█──▓▓▓▓▓███▄▄▄█──────
|
69 |
+
────────────────────────██──────────
|
70 |
+
────────────────────────██───▄███▄───
|
71 |
+
────────────────────────██─▄██▓▓▓██──
|
72 |
+
───────────────▄██████████─█▓▓▓█▓▓██▄
|
73 |
+
─────────────▄██▀───▀▀███──█▓▓▓██▓▓▓█
|
74 |
+
─▄███████▄──███───▄▄████───██▓▓████▓█
|
75 |
+
▄██▀──▀▀█████████████▀▀─────██▓▓▓▓███
|
76 |
+
██▀─────────██──────────────██▓██▓███
|
77 |
+
██──────────███──────────────█████─██
|
78 |
+
██───────────███──────────────█─██──█
|
79 |
+
██────────────██─────────────────█───
|
80 |
+
██─────────────██────────────────────
|
81 |
+
██─────────────███───────────────────
|
82 |
+
██──────────────███▄▄────────────────
|
83 |
+
███──────────────▀▀███───────────────
|
84 |
+
─███─────────────────────────────────
|
85 |
+
──███────────────────────────────────
|
86 |
+
*/
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get the Pods object for a specific pod name and item ID. Possibly use already built-object if available.
|
91 |
+
*
|
92 |
+
* @since 2.9.0
|
93 |
+
*
|
94 |
+
* @param array|string $args The list of arguments to use or the Pod name to use.
|
95 |
+
*
|
96 |
+
* @return bool|Pods|WP_Error The Pods object, the WP_Error message, or false if the Pods object is not found.
|
97 |
+
*/
|
98 |
+
public function get_pod( $args = [] ) {
|
99 |
+
if ( is_string( $args ) ) {
|
100 |
+
$args = [
|
101 |
+
'name' => $args,
|
102 |
+
];
|
103 |
+
|
104 |
+
$func_args = func_get_args();
|
105 |
+
|
106 |
+
if ( isset( $func_args[1] ) ) {
|
107 |
+
if ( is_array( $func_args[1] ) ) {
|
108 |
+
$args['find'] = $func_args[1];
|
109 |
+
} else {
|
110 |
+
$args['id'] = $func_args[1];
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( ! isset( $args['name'] ) ) {
|
116 |
+
return new WP_Error( __( 'Pod name is required.', 'pods' ) );
|
117 |
+
}
|
118 |
+
|
119 |
+
$key = $args['name'];
|
120 |
+
$id = isset( $args['id'] ) ? $args['id'] : null;
|
121 |
+
$find = isset( $args['find'] ) ? $args['find'] : null;
|
122 |
+
$store_by_id = isset( $args['store_by_id'] ) && ! $args['store_by_id'];
|
123 |
+
$validation = isset( $args['validation'] ) && $args['validation'];
|
124 |
+
|
125 |
+
if ( $id && $store_by_id ) {
|
126 |
+
$key .= '/' . $id;
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( isset( self::$pods[ $key ] ) ) {
|
130 |
+
if ( $id && ! $store_by_id && (int) self::$pods[ $key ]->id() !== (int) $id ) {
|
131 |
+
self::$pods[ $key ]->fetch( $id );
|
132 |
+
} elseif ( $find ) {
|
133 |
+
self::$pods[ $key ]->find( $find );
|
134 |
+
}
|
135 |
+
|
136 |
+
return self::$pods[ $key ];
|
137 |
+
}
|
138 |
+
|
139 |
+
$pod = pods( $args['name'], $id );
|
140 |
+
|
141 |
+
if ( $validation ) {
|
142 |
+
if ( ! $pod || ! $pod->valid() ) {
|
143 |
+
return new WP_Error( __( 'Pod not found.', 'pods' ) );
|
144 |
+
}
|
145 |
+
|
146 |
+
if ( $id && ! $pod->exists() ) {
|
147 |
+
return new WP_Error( __( 'Pod item not found.', 'pods' ) );
|
148 |
+
}
|
149 |
+
}
|
150 |
+
|
151 |
+
if ( $pod && $find ) {
|
152 |
+
$pod->find( $find );
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( $pod ) {
|
156 |
+
self::$pods[ $key ] = $pod;
|
157 |
+
}
|
158 |
+
|
159 |
+
return $pod;
|
160 |
+
}
|
161 |
+
|
162 |
+
}
|
src/Pods/REST/V1/Service_Provider.php
CHANGED
@@ -16,6 +16,7 @@ use Pods\REST\V1\Endpoints\Swagger_Documentation;
|
|
16 |
use Pods\REST\V1\Validator\Base as Base_Validator;
|
17 |
use Tribe__Documentation__Swagger__Builder_Interface as Swagger_Builder_Interface;
|
18 |
use WP_REST_Server;
|
|
|
19 |
|
20 |
/**
|
21 |
* Class Service_Provider
|
@@ -24,7 +25,7 @@ use WP_REST_Server;
|
|
24 |
*
|
25 |
* @since 2.8.0
|
26 |
*/
|
27 |
-
class Service_Provider extends
|
28 |
|
29 |
/**
|
30 |
* Binds and sets up implementations.
|
16 |
use Pods\REST\V1\Validator\Base as Base_Validator;
|
17 |
use Tribe__Documentation__Swagger__Builder_Interface as Swagger_Builder_Interface;
|
18 |
use WP_REST_Server;
|
19 |
+
use tad_DI52_ServiceProvider;
|
20 |
|
21 |
/**
|
22 |
* Class Service_Provider
|
25 |
*
|
26 |
* @since 2.8.0
|
27 |
*/
|
28 |
+
class Service_Provider extends tad_DI52_ServiceProvider {
|
29 |
|
30 |
/**
|
31 |
* Binds and sets up implementations.
|
src/Pods/Service_Provider.php
CHANGED
@@ -20,10 +20,12 @@ class Service_Provider extends tad_DI52_ServiceProvider {
|
|
20 |
* @since 2.8.0
|
21 |
*/
|
22 |
public function register() {
|
23 |
-
$this->container->singleton(
|
24 |
$this->container->singleton( Map_Field_Values::class, Map_Field_Values::class );
|
25 |
-
$this->container->singleton(
|
|
|
26 |
$this->container->singleton( Static_Cache::class, Static_Cache::class );
|
|
|
27 |
|
28 |
$this->hooks();
|
29 |
}
|
20 |
* @since 2.8.0
|
21 |
*/
|
22 |
public function register() {
|
23 |
+
$this->container->singleton( Config_Handler::class, Config_Handler::class );
|
24 |
$this->container->singleton( Map_Field_Values::class, Map_Field_Values::class );
|
25 |
+
$this->container->singleton( Permissions::class, Permissions::class );
|
26 |
+
$this->container->singleton( Pod_Manager::class, Pod_Manager::class );
|
27 |
$this->container->singleton( Static_Cache::class, Static_Cache::class );
|
28 |
+
$this->container->singleton( WP_Query_Integration::class, WP_Query_Integration::class );
|
29 |
|
30 |
$this->hooks();
|
31 |
}
|
src/Pods/Whatsit.php
CHANGED
@@ -1336,6 +1336,31 @@ abstract class Whatsit implements \ArrayAccess, \JsonSerializable, \Iterator {
|
|
1336 |
return null;
|
1337 |
}
|
1338 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1339 |
/**
|
1340 |
* Get the full data from the object.
|
1341 |
*
|
1336 |
return null;
|
1337 |
}
|
1338 |
|
1339 |
+
/**
|
1340 |
+
* Get the object storage type label.
|
1341 |
+
*
|
1342 |
+
* @since 2.8.24
|
1343 |
+
*
|
1344 |
+
* @return string|null
|
1345 |
+
*/
|
1346 |
+
public function get_object_storage_type_label() {
|
1347 |
+
$object_storage_type = $this->get_arg( 'object_storage_type', 'collection' );
|
1348 |
+
|
1349 |
+
if ( ! $object_storage_type ) {
|
1350 |
+
return null;
|
1351 |
+
}
|
1352 |
+
|
1353 |
+
$object_collection = Store::get_instance();
|
1354 |
+
|
1355 |
+
$storage_type_obj = $object_collection->get_storage_object( $object_storage_type );
|
1356 |
+
|
1357 |
+
if ( ! $storage_type_obj ) {
|
1358 |
+
return null;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
return $storage_type_obj->get_label();
|
1362 |
+
}
|
1363 |
+
|
1364 |
/**
|
1365 |
* Get the full data from the object.
|
1366 |
*
|
src/Pods/Whatsit/Field.php
CHANGED
@@ -135,6 +135,78 @@ class Field extends Whatsit {
|
|
135 |
return parent::get_arg( $arg, $default );
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
/**
|
139 |
* Get related object type from field.
|
140 |
*
|
@@ -303,6 +375,11 @@ class Field extends Whatsit {
|
|
303 |
* @return Whatsit|null The bi-directional field if it is set.
|
304 |
*/
|
305 |
public function get_bidirectional_field() {
|
|
|
|
|
|
|
|
|
|
|
306 |
$sister_id = $this->get_arg( 'sister_id' );
|
307 |
|
308 |
if ( ! $sister_id ) {
|
@@ -327,7 +404,10 @@ class Field extends Whatsit {
|
|
327 |
* @return int The field value limit.
|
328 |
*/
|
329 |
public function get_limit() {
|
330 |
-
|
|
|
|
|
|
|
331 |
|
332 |
if ( 'multi' === $this->get_single_multi() ) {
|
333 |
return (int) $this->get_type_arg( 'limit', 0 );
|
@@ -357,6 +437,18 @@ class Field extends Whatsit {
|
|
357 |
return $format_type;
|
358 |
}
|
359 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
/**
|
361 |
* {@inheritdoc}
|
362 |
*/
|
135 |
return parent::get_arg( $arg, $default );
|
136 |
}
|
137 |
|
138 |
+
/**
|
139 |
+
* Determine whether this is a required field.
|
140 |
+
*
|
141 |
+
* @since 2.9.0
|
142 |
+
*
|
143 |
+
* @return bool Whether this is a required field.
|
144 |
+
*/
|
145 |
+
public function is_required() {
|
146 |
+
return filter_var( $this->get_arg( 'required', false ), FILTER_VALIDATE_BOOLEAN );
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Determine whether this is a unique field.
|
151 |
+
*
|
152 |
+
* @since 2.9.0
|
153 |
+
*
|
154 |
+
* @return bool Whether this is a unique field.
|
155 |
+
*/
|
156 |
+
public function is_unique() {
|
157 |
+
$parent_object = $this->get_parent_object();
|
158 |
+
|
159 |
+
if ( ! $parent_object instanceof Pod ) {
|
160 |
+
return false;
|
161 |
+
}
|
162 |
+
|
163 |
+
// Only table-based Pods can have unique fields.
|
164 |
+
if ( ! $parent_object->is_table_based() ) {
|
165 |
+
return false;
|
166 |
+
}
|
167 |
+
|
168 |
+
return filter_var( $this->get_arg( 'unique', false ), FILTER_VALIDATE_BOOLEAN );
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Determine whether this is a repeatable field.
|
173 |
+
*
|
174 |
+
* @since 2.9.0
|
175 |
+
*
|
176 |
+
* @return bool Whether this is a repeatable field.
|
177 |
+
*/
|
178 |
+
public function is_repeatable() {
|
179 |
+
$parent_object = $this->get_parent_object();
|
180 |
+
|
181 |
+
if ( ! $parent_object instanceof Pod ) {
|
182 |
+
return false;
|
183 |
+
}
|
184 |
+
|
185 |
+
// Only non table-based Pods can have repeatable fields.
|
186 |
+
if ( $parent_object->is_table_based() ) {
|
187 |
+
return false;
|
188 |
+
}
|
189 |
+
|
190 |
+
$repeatable_field_types = PodsForm::repeatable_field_types();
|
191 |
+
|
192 |
+
$type = $this->get_type();
|
193 |
+
|
194 |
+
// It must be a repeatable field type.
|
195 |
+
if ( ! in_array( $type, $repeatable_field_types, true ) ) {
|
196 |
+
return false;
|
197 |
+
}
|
198 |
+
|
199 |
+
// Disable repeatable for WYSIWYG TinyMCE fields.
|
200 |
+
if ( 'wysiwyg' === $type && 'tinymce' === $this->get_arg( 'wysiwyg_editor', 'tinymce' ) ) {
|
201 |
+
return false;
|
202 |
+
}
|
203 |
+
|
204 |
+
return (
|
205 |
+
filter_var( $this->get_arg( 'repeatable', false ), FILTER_VALIDATE_BOOLEAN )
|
206 |
+
&& 1 !== (int) $this->get_arg( 'repeatable_limit', 0 )
|
207 |
+
);
|
208 |
+
}
|
209 |
+
|
210 |
/**
|
211 |
* Get related object type from field.
|
212 |
*
|
375 |
* @return Whatsit|null The bi-directional field if it is set.
|
376 |
*/
|
377 |
public function get_bidirectional_field() {
|
378 |
+
// Only continue if this is a relationship field.
|
379 |
+
if ( ! $this->is_relationship() ) {
|
380 |
+
return null;
|
381 |
+
}
|
382 |
+
|
383 |
$sister_id = $this->get_arg( 'sister_id' );
|
384 |
|
385 |
if ( ! $sister_id ) {
|
404 |
* @return int The field value limit.
|
405 |
*/
|
406 |
public function get_limit() {
|
407 |
+
// If this is a repeatable field then use the repeatable limit (if any).
|
408 |
+
if ( $this->is_repeatable() ) {
|
409 |
+
return $this->get_arg( 'repeatable_limit', 0 );
|
410 |
+
}
|
411 |
|
412 |
if ( 'multi' === $this->get_single_multi() ) {
|
413 |
return (int) $this->get_type_arg( 'limit', 0 );
|
437 |
return $format_type;
|
438 |
}
|
439 |
|
440 |
+
/**
|
441 |
+
* Determine whether this is a multiple value field.
|
442 |
+
*
|
443 |
+
* @since 2.9.0
|
444 |
+
*
|
445 |
+
* @return bool Whether this is a multiple value field.
|
446 |
+
*/
|
447 |
+
public function is_multi_value() {
|
448 |
+
// This is a multiple value field if the limit is not 1 (0 for no limit or 2+).
|
449 |
+
return 1 !== $this->get_limit();
|
450 |
+
}
|
451 |
+
|
452 |
/**
|
453 |
* {@inheritdoc}
|
454 |
*/
|
src/Pods/Whatsit/Pod.php
CHANGED
@@ -25,7 +25,22 @@ class Pod extends Whatsit {
|
|
25 |
* @return string The storage used for the Pod data (meta, table, etc).
|
26 |
*/
|
27 |
public function get_storage() {
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
|
31 |
/**
|
@@ -40,6 +55,18 @@ class Pod extends Whatsit {
|
|
40 |
return $args;
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/**
|
44 |
* {@inheritdoc}
|
45 |
*/
|
@@ -127,6 +154,28 @@ class Pod extends Whatsit {
|
|
127 |
return $table_info;
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
/**
|
131 |
* Determine whether the Pod is an extending an existing content type.
|
132 |
*
|
25 |
* @return string The storage used for the Pod data (meta, table, etc).
|
26 |
*/
|
27 |
public function get_storage() {
|
28 |
+
$storage = $this->get_arg( 'storage' );
|
29 |
+
|
30 |
+
if ( empty( $storage ) ) {
|
31 |
+
$type = $this->get_type();
|
32 |
+
$storage = 'none';
|
33 |
+
|
34 |
+
if ( in_array( $type, [ 'post_type', 'taxonomy', 'user', 'comment', 'media' ], true ) ) {
|
35 |
+
$storage = 'meta';
|
36 |
+
} elseif ( in_array( $type, [ 'pod', 'table' ], true ) ) {
|
37 |
+
$storage = 'meta';
|
38 |
+
} elseif ( 'settings' === $type ) {
|
39 |
+
$storage = 'option';
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
return $storage;
|
44 |
}
|
45 |
|
46 |
/**
|
55 |
return $args;
|
56 |
}
|
57 |
|
58 |
+
/**
|
59 |
+
* {@inheritdoc}
|
60 |
+
*/
|
61 |
+
public function export( array $args = [] ) {
|
62 |
+
$exported = parent::export( $args );
|
63 |
+
|
64 |
+
// Always make sure we have a storage arg set.
|
65 |
+
$exported['storage'] = $this->get_storage();
|
66 |
+
|
67 |
+
return $exported;
|
68 |
+
}
|
69 |
+
|
70 |
/**
|
71 |
* {@inheritdoc}
|
72 |
*/
|
154 |
return $table_info;
|
155 |
}
|
156 |
|
157 |
+
/**
|
158 |
+
* Determine whether this is a table-based Pod.
|
159 |
+
*
|
160 |
+
* @since 2.9.0
|
161 |
+
*
|
162 |
+
* @return bool Whether this is a table-based Pod.
|
163 |
+
*/
|
164 |
+
public function is_table_based() {
|
165 |
+
return 'table' === $this->get_storage() || 'pod' === $this->get_type();
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Determine whether this is a meta-based Pod.
|
170 |
+
*
|
171 |
+
* @since 2.9.0
|
172 |
+
*
|
173 |
+
* @return bool Whether this is a meta-based Pod.
|
174 |
+
*/
|
175 |
+
public function is_meta_based() {
|
176 |
+
return 'meta' === $this->get_storage();
|
177 |
+
}
|
178 |
+
|
179 |
/**
|
180 |
* Determine whether the Pod is an extending an existing content type.
|
181 |
*
|
src/Pods/Whatsit/Storage.php
CHANGED
@@ -38,6 +38,13 @@ abstract class Storage {
|
|
38 |
// @todo Bueller?
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* Get the object storage type.
|
43 |
*
|
38 |
// @todo Bueller?
|
39 |
}
|
40 |
|
41 |
+
/**
|
42 |
+
* {@inheritdoc}
|
43 |
+
*/
|
44 |
+
public function get_label() {
|
45 |
+
return __( 'Object Storage', 'pods' );
|
46 |
+
}
|
47 |
+
|
48 |
/**
|
49 |
* Get the object storage type.
|
50 |
*
|
src/Pods/Whatsit/Storage/Collection.php
CHANGED
@@ -18,11 +18,26 @@ class Collection extends Storage {
|
|
18 |
*/
|
19 |
protected static $type = 'collection';
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* @var array
|
23 |
*/
|
24 |
protected $secondary_args = [];
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* {@inheritdoc}
|
28 |
*/
|
@@ -77,7 +92,9 @@ class Collection extends Storage {
|
|
77 |
$objects = $object_collection->get_objects();
|
78 |
|
79 |
foreach ( $objects as $k => $object ) {
|
80 |
-
|
|
|
|
|
81 |
continue;
|
82 |
}
|
83 |
|
@@ -110,7 +127,6 @@ class Collection extends Storage {
|
|
110 |
|
111 |
$args['args'] = (array) $args['args'];
|
112 |
|
113 |
-
|
114 |
$secondary_object_args = [
|
115 |
'parent',
|
116 |
'group',
|
18 |
*/
|
19 |
protected static $type = 'collection';
|
20 |
|
21 |
+
/**
|
22 |
+
* @var array
|
23 |
+
*/
|
24 |
+
protected static $compatible_types = [
|
25 |
+
'collection' => 'collection',
|
26 |
+
'file' => 'file',
|
27 |
+
];
|
28 |
+
|
29 |
/**
|
30 |
* @var array
|
31 |
*/
|
32 |
protected $secondary_args = [];
|
33 |
|
34 |
+
/**
|
35 |
+
* {@inheritdoc}
|
36 |
+
*/
|
37 |
+
public function get_label() {
|
38 |
+
return __( 'Code', 'pods' );
|
39 |
+
}
|
40 |
+
|
41 |
/**
|
42 |
* {@inheritdoc}
|
43 |
*/
|
92 |
$objects = $object_collection->get_objects();
|
93 |
|
94 |
foreach ( $objects as $k => $object ) {
|
95 |
+
$current_object_storage_type = $object->get_object_storage_type();
|
96 |
+
|
97 |
+
if ( $current_object_storage_type && isset( static::$compatible_types[ $current_object_storage_type ] ) ) {
|
98 |
continue;
|
99 |
}
|
100 |
|
127 |
|
128 |
$args['args'] = (array) $args['args'];
|
129 |
|
|
|
130 |
$secondary_object_args = [
|
131 |
'parent',
|
132 |
'group',
|
src/Pods/Whatsit/Storage/File.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace Pods\Whatsit\Storage;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* File class.
|
7 |
+
*
|
8 |
+
* @since 2.9.0
|
9 |
+
*/
|
10 |
+
class File extends Collection {
|
11 |
+
|
12 |
+
/**
|
13 |
+
* {@inheritdoc}
|
14 |
+
*/
|
15 |
+
protected static $type = 'file';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* {@inheritdoc}
|
19 |
+
*/
|
20 |
+
public function get_label() {
|
21 |
+
return __( 'File', 'pods' );
|
22 |
+
}
|
23 |
+
|
24 |
+
}
|
src/Pods/Whatsit/Storage/Post_Type.php
CHANGED
@@ -38,6 +38,13 @@ class Post_Type extends Collection {
|
|
38 |
'object',
|
39 |
];
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* {@inheritdoc}
|
43 |
*/
|
@@ -299,7 +306,7 @@ class Post_Type extends Collection {
|
|
299 |
*/
|
300 |
$post_args = apply_filters( 'pods_whatsit_storage_post_type_find_args', $post_args, $args );
|
301 |
|
302 |
-
$post_args['fields'] = 'ids';
|
303 |
|
304 |
if ( empty( $post_args['meta_query'] ) ) {
|
305 |
unset( $post_args['meta_query'] );
|
@@ -309,6 +316,7 @@ class Post_Type extends Collection {
|
|
309 |
|
310 |
$current_language = pods_i18n()->get_current_language();
|
311 |
|
|
|
312 |
$cache_key = null;
|
313 |
$posts = false;
|
314 |
$post_objects = false;
|
@@ -390,6 +398,9 @@ class Post_Type extends Collection {
|
|
390 |
// We only receive the first post, so let's just override the posts with the count.
|
391 |
if ( ! empty( $args['count'] ) ) {
|
392 |
$posts = array_fill( 0, $query->found_posts, 'temp_count_holder' );
|
|
|
|
|
|
|
393 |
}
|
394 |
|
395 |
if ( empty( $args['bypass_cache'] ) ) {
|
@@ -421,7 +432,12 @@ class Post_Type extends Collection {
|
|
421 |
}, $posts );
|
422 |
} else {
|
423 |
// Get the post objects.
|
424 |
-
|
|
|
|
|
|
|
|
|
|
|
425 |
}
|
426 |
}
|
427 |
|
@@ -446,6 +462,7 @@ class Post_Type extends Collection {
|
|
446 |
}, $post_objects );
|
447 |
} else {
|
448 |
// Handle normal Whatsit object setup.
|
|
|
449 |
$posts = array_map( [ $this, 'to_object' ], $post_objects );
|
450 |
$posts = array_filter( $posts );
|
451 |
}
|
38 |
'object',
|
39 |
];
|
40 |
|
41 |
+
/**
|
42 |
+
* {@inheritdoc}
|
43 |
+
*/
|
44 |
+
public function get_label() {
|
45 |
+
return __( 'DB', 'pods' );
|
46 |
+
}
|
47 |
+
|
48 |
/**
|
49 |
* {@inheritdoc}
|
50 |
*/
|
306 |
*/
|
307 |
$post_args = apply_filters( 'pods_whatsit_storage_post_type_find_args', $post_args, $args );
|
308 |
|
309 |
+
$post_args['fields'] = ( ! empty( $args['ids'] ) ) ? 'ids' : 'all';
|
310 |
|
311 |
if ( empty( $post_args['meta_query'] ) ) {
|
312 |
unset( $post_args['meta_query'] );
|
316 |
|
317 |
$current_language = pods_i18n()->get_current_language();
|
318 |
|
319 |
+
$query = null;
|
320 |
$cache_key = null;
|
321 |
$posts = false;
|
322 |
$post_objects = false;
|
398 |
// We only receive the first post, so let's just override the posts with the count.
|
399 |
if ( ! empty( $args['count'] ) ) {
|
400 |
$posts = array_fill( 0, $query->found_posts, 'temp_count_holder' );
|
401 |
+
} elseif ( 'ids' !== $post_args['fields'] ) {
|
402 |
+
// This variable should always containt the post ID's.
|
403 |
+
$posts = wp_list_pluck( $posts, 'ID' );
|
404 |
}
|
405 |
|
406 |
if ( empty( $args['bypass_cache'] ) ) {
|
432 |
}, $posts );
|
433 |
} else {
|
434 |
// Get the post objects.
|
435 |
+
if ( $query instanceof WP_Query ) {
|
436 |
+
$post_objects = $query->posts;
|
437 |
+
} else {
|
438 |
+
_prime_post_caches( $posts, false, false ); // Prevent separate queries for each iteration.
|
439 |
+
$post_objects = array_map( 'get_post', $posts );
|
440 |
+
}
|
441 |
}
|
442 |
}
|
443 |
|
462 |
}, $post_objects );
|
463 |
} else {
|
464 |
// Handle normal Whatsit object setup.
|
465 |
+
update_postmeta_cache( $posts ); // Prevent separate queries for each iteration.
|
466 |
$posts = array_map( [ $this, 'to_object' ], $post_objects );
|
467 |
$posts = array_filter( $posts );
|
468 |
}
|
src/Pods/Whatsit/Store.php
CHANGED
@@ -4,6 +4,7 @@ namespace Pods\Whatsit;
|
|
4 |
|
5 |
use Pods\Whatsit;
|
6 |
use Pods\Whatsit\Storage\Collection;
|
|
|
7 |
use Pods\Whatsit\Storage\Post_Type;
|
8 |
|
9 |
/**
|
@@ -84,6 +85,7 @@ class Store {
|
|
84 |
public function get_default_storage_types() {
|
85 |
return [
|
86 |
'collection' => Collection::class,
|
|
|
87 |
'post_type' => Post_Type::class,
|
88 |
];
|
89 |
}
|
4 |
|
5 |
use Pods\Whatsit;
|
6 |
use Pods\Whatsit\Storage\Collection;
|
7 |
+
use Pods\Whatsit\Storage\File;
|
8 |
use Pods\Whatsit\Storage\Post_Type;
|
9 |
|
10 |
/**
|
85 |
public function get_default_storage_types() {
|
86 |
return [
|
87 |
'collection' => Collection::class,
|
88 |
+
'file' => File::class,
|
89 |
'post_type' => Post_Type::class,
|
90 |
];
|
91 |
}
|
ui/js/blocks/pods-blocks-api.min.asset.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"dependencies":["lodash","react","react-dom","wp-api-fetch","wp-autop","wp-block-editor","wp-blocks","wp-components","wp-compose","wp-date","wp-element","wp-i18n","wp-keycodes","wp-server-side-render","wp-url"],"version":"
|
1 |
+
{"dependencies":["lodash","react","react-dom","wp-api-fetch","wp-autop","wp-block-editor","wp-blocks","wp-components","wp-compose","wp-date","wp-element","wp-i18n","wp-keycodes","wp-server-side-render","wp-url"],"version":"be7d53cdf5e23a4fa0f0"}
|
ui/js/blocks/pods-blocks-api.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{var e={4184:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)){if(r.length){var s=i.apply(null,r);s&&e.push(s)}}else if("object"===o)if(r.toString===Object.prototype.toString)for(var a in r)n.call(r,a)&&r[a]&&e.push(a);else e.push(r.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},9996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function i(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var i={};return r.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=n(e[t],r)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&r.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var r=t.customMerge(e);return"function"==typeof r?r:l}(o,r)(e[o],t[o],r):i[o]=n(t[o],r))})),i}function l(e,r,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(r);return s===Array.isArray(e)?s?o.arrayMerge(e,r,o):a(e,r,o):n(r,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return l(e,r,t)}),{})};var c=l;e.exports=c},7837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},7220:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&i(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=s(r(9960)),l=r(5863),c=r(7837),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function f(e,t){void 0===t&&(t={});for(var r=("length"in e?e:[e]),n="",i=0;i<r.length;i++)n+=d(r[i],t);return n}function d(e,t){switch(e.type){case a.Root:return f(e.children,t);case a.Directive:case a.Doctype:return"<"+e.data+">";case a.Comment:return function(e){return"\x3c!--"+e.data+"--\x3e"}(e);case a.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&h.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1})));!t.xmlMode&&m.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<"+e.name,o=function(e,t){if(e)return Object.keys(e).map((function(r){var n,i,o=null!==(n=e[r])&&void 0!==n?n:"";return"foreign"===t.xmlMode&&(r=null!==(i=c.attributeNames.get(r))&&void 0!==i?i:r),t.emptyAttrs||t.xmlMode||""!==o?r+'="'+(!1!==t.decodeEntities?l.encodeXML(o):o.replace(/"/g,"""))+'"':r})).join(" ")}(e.attribs,t);o&&(i+=" "+o);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&p.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=f(e.children,t)),!t.xmlMode&&p.has(e.name)||(i+="</"+e.name+">"));return i}(e,t);case a.Text:return function(e,t){var r=e.data||"";!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(r=l.encodeXML(r));return r}(e,t)}}t.default=f;var h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},9960:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},7915:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=r(9960),s=r(7790);i(r(7790),t);var a=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,r){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?o.ElementType.Tag:void 0,n=new s.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,r=this.lastNode;if(r&&r.type===o.ElementType.Text)t?r.data=(r.data+e).replace(a," "):r.data+=e,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{t&&(e=e.replace(a," "));var n=new s.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.NodeWithChildren(o.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new s.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},7790:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=r(9960),a=new Map([[s.ElementType.Tag,1],[s.ElementType.Script,1],[s.ElementType.Style,1],[s.ElementType.Directive,1],[s.ElementType.Text,3],[s.ElementType.CDATA,4],[s.ElementType.Comment,8],[s.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=a.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var c=function(e){function t(t,r){var n=e.call(this,t)||this;return n.data=r,n}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,s.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var p=function(e){function t(t){return e.call(this,s.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=p;var f=function(e){function t(t,r){var n=e.call(this,s.ElementType.Directive,r)||this;return n.name=t,n}return i(t,e),t}(c);t.ProcessingInstruction=f;var d=function(e){function t(t,r){var n=e.call(this,t)||this;return n.children=r,n}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=d;var h=function(e){function t(t){return e.call(this,s.ElementType.Root,t)||this}return i(t,e),t}(d);t.Document=h;var m=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var o=e.call(this,i,n)||this;return o.name=t,o.attribs=r,o}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function b(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function y(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function x(e){return e.type===s.ElementType.Root}function S(e,t){var r;if(void 0===t&&(t=!1),v(e))r=new u(e.data);else if(y(e))r=new p(e.data);else if(g(e)){var n=t?O(e.children):[],i=new m(e.name,o({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),r=i}else if(b(e)){n=t?O(e.children):[];var a=new d(s.ElementType.CDATA,n);n.forEach((function(e){return e.parent=a})),r=a}else if(x(e)){n=t?O(e.children):[];var l=new h(n);n.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),r=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new f(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),r=c}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function O(e){for(var t=e.map((function(e){return S(e,!0)})),r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}t.Element=m,t.isTag=g,t.isCDATA=b,t.isText=v,t.isComment=y,t.isDirective=w,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},6996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(3346),i=r(3905);t.getFeed=function(e){var t=l(p,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:a(r)};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var o=c("summary",r)||c("content",r);o&&(n.description=o);var s=c("updated",r);return s&&(n.pubDate=new Date(s)),n}))};u(n,"id","id",r),u(n,"title","title",r);var o=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;o&&(n.link=o);u(n,"description","subtitle",r);var s=c("updated",r);s&&(n.updated=new Date(s));return u(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],o={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:a(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t);return n&&(r.pubDate=new Date(n)),r}))};u(o,"title","title",n),u(o,"link","link",n),u(o,"description","description",n);var s=c("lastBuildDate",n);s&&(o.updated=new Date(s));return u(o,"author","managingEditor",n,!0),o}(t):null};var o=["url","type","lang"],s=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function a(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=o;n<i.length;n++){t[c=i[n]]&&(r[c]=t[c])}for(var a=0,l=s;a<l.length;a++){var c;t[c=l[a]]&&(r[c]=parseInt(t[c],10))}return t.expression&&(r.expression=t.expression),r}))}function l(e,t){return(0,i.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,r){return void 0===r&&(r=!1),(0,n.textContent)((0,i.getElementsByTagName)(e,t,r,1)).trim()}function u(e,t,r,n,i){void 0===i&&(i=!1);var o=c(r,n,i);o&&(e[t]=o)}function p(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},4975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var n=r(7915);function i(e,t){var r=[],i=[];if(e===t)return 0;for(var o=(0,n.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,n.hasChildren)(t)?t:t.parent;o;)i.unshift(o),o=o.parent;for(var s=Math.min(r.length,i.length),a=0;a<s&&r[a]===i[a];)a++;if(0===a)return 1;var l=r[a-1],c=l.children,u=r[a],p=i[a];return c.indexOf(u)>c.indexOf(p)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=i(e,t);return 2&r?-1:4&r?1:0})),e}},9432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(3346),t),i(r(5010),t),i(r(6765),t),i(r(8043),t),i(r(3905),t),i(r(4975),t),i(r(6996),t);var o=r(7915);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return o.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return o.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return o.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return o.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return o.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return o.hasChildren}})},3905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(7915),i=r(8043),o={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function s(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function a(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(o,t)?o[t](r):s(t,r)}));return 0===t.length?null:t.reduce(a)}t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var o=l(e);return o?(0,i.filter)(o,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(s("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(o.tag_type(e),t,r,n)}},6765:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var o=n.children;o.splice(o.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},8043:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(7915);function i(e,t,r,o){for(var s=[],a=0,l=t;a<l.length;a++){var c=l[a];if(e(c)&&(s.push(c),--o<=0))break;if(r&&(0,n.hasChildren)(c)&&c.children.length>0){var u=i(e,c.children,r,o);if(s.push.apply(s,u),(o-=u.length)<=0)break}}return s}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),Array.isArray(t)||(t=[t]),i(e,t,r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var o=null,s=0;s<r.length&&!o;s++){var a=r[s];(0,n.isTag)(a)&&(t(a)?o=a:i&&a.children.length>0&&(o=e(t,a.children)))}return o},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||r.children.length>0&&e(t,r.children))}))},t.findAll=function(e,t){for(var r,i,o=[],s=t.filter(n.isTag);i=s.shift();){var a=null===(r=i.children)||void 0===r?void 0:r.filter(n.isTag);a&&a.length>0&&s.unshift.apply(s,a),e(i)&&o.push(i)}return o}},3346:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(7915),o=n(r(7220)),s=r(9960);function a(e,t){return(0,o.default)(e,t)}t.getOuterHTML=a,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===s.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},5010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(7915),i=[];function o(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function s(e){return e.parent||null}t.getChildren=o,t.getParent=s,t.getSiblings=function(e){var t=s(e);if(null!=t)return o(t);for(var r=[e],n=e.prev,i=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=i;)r.push(i),i=i.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},4076:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var i=n(r(9323)),o=n(r(9591)),s=n(r(2586)),a=n(r(26)),l=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function c(e){var t=p(e);return function(e){return String(e).replace(l,t)}}t.decodeXML=c(s.default),t.decodeHTMLStrict=c(i.default);var u=function(e,t){return e<t?1:-1};function p(e){return function(t){if("#"===t.charAt(1)){var r=t.charAt(2);return"X"===r||"x"===r?a.default(parseInt(t.substr(3),16)):a.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}t.decodeHTML=function(){for(var e=Object.keys(o.default).sort(u),t=Object.keys(i.default).sort(u),r=0,n=0;r<t.length;r++)e[n]===t[r]?(t[r]+=";?",n++):t[r]+=";";var s=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=p(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),a(e)}return function(e){return String(e).replace(s,l)}}()},26:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(3600)),o=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in i.default&&(e=i.default[e]),o(e))}},7322:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var i=u(n(r(2586)).default),o=p(i);t.encodeXML=g(i);var s,a,l=u(n(r(9323)).default),c=p(l);function u(e){return Object.keys(e).sort().reduce((function(t,r){return t[e[r]]="&"+r+";",t}),{})}function p(e){for(var t=[],r=[],n=0,i=Object.keys(e);n<i.length;n++){var o=i[n];1===o.length?t.push("\\"+o):r.push(o)}t.sort();for(var s=0;s<t.length-1;s++){for(var a=s;a<t.length-1&&t[a].charCodeAt(1)+1===t[a+1].charCodeAt(1);)a+=1;var l=1+a-s;l<3||t.splice(s,l,t[s]+"-"+t[a])}return r.unshift("["+t.join("")+"]"),new RegExp(r.join("|"),"g")}t.encodeHTML=(s=l,a=c,function(e){return e.replace(a,(function(e){return s[e]})).replace(f,h)}),t.encodeNonAsciiHTML=g(l);var f=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,d=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function h(e){return"&#x"+(e.length>1?d(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(o.source+"|"+f.source,"g");function g(e){return function(t){return t.replace(m,(function(t){return e[t]||h(t)}))}}t.escape=function(e){return e.replace(m,h)},t.escapeUTF8=function(e){return e.replace(o,h)}},5863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var n=r(4076),i=r(7322);t.decode=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?n.decodeXML:n.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?i.encodeXML:i.encodeHTML)(e)};var o=r(7322);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=r(4076);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})},8679:(e,t,r)=>{"use strict";var n=r(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return n.isMemo(e)?s:a[e.$$typeof]||i}a[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[n.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(h){var i=d(r);i&&i!==h&&e(t,i,n)}var s=u(r);p&&(s=s.concat(p(r)));for(var a=l(t),m=l(r),g=0;g<s.length;++g){var b=s[g];if(!(o[b]||n&&n[b]||m&&m[b]||a&&a[b])){var v=f(r,b);try{c(t,b,v)}catch(e){}}}}return t}},885:e=>{e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},8276:(e,t,r)=>{var n="html",i="head",o="body",s=/<([a-zA-Z]+[0-9]?)/,a=/<head.*>/i,l=/<body.*>/i,c=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser;c=u=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),p.parseFromString(e,"text/html")}}if(document.implementation){var f=r(1507).isIE,d=document.implementation.createHTMLDocument(f()?"html-dom-parser":void 0);c=function(e,t){return t?(d.documentElement.getElementsByTagName(t)[0].innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,r,p,f,d=e.match(s);switch(d&&d[1]&&(t=d[1].toLowerCase()),t){case n:return r=u(e),a.test(e)||(p=r.getElementsByTagName(i)[0])&&p.parentNode.removeChild(p),l.test(e)||(p=r.getElementsByTagName(o)[0])&&p.parentNode.removeChild(p),r.getElementsByTagName(n);case i:case o:return f=c(e).getElementsByTagName(t),l.test(e)&&a.test(e)?f[0].parentNode.childNodes:f;default:return h?h(e):c(e,o).getElementsByTagName(o)[0].childNodes}}},4152:(e,t,r)=>{var n=r(8276),i=r(1507).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,r=e.match(o);return r&&r[1]&&(t=r[1]),i(n(e),null,t)}},1507:(e,t,r)=>{for(var n,i=r(885),o=r(7790),s=i.CASE_SENSITIVE_TAG_NAMES,a=o.Comment,l=o.Element,c=o.ProcessingInstruction,u=o.Text,p={},f=0,d=s.length;f<d;f++)n=s[f],p[n.toLowerCase()]=n;function h(e){for(var t,r={},n=0,i=e.length;n<i;n++)r[(t=e[n]).name]=t.value;return r}function m(e){var t=function(e){return p[e]}(e=e.toLowerCase());return t||e}e.exports={formatAttributes:h,formatDOM:function e(t,r,n){r=r||null;for(var i=[],o=0,s=t.length;o<s;o++){var p,f=t[o];switch(f.nodeType){case 1:(p=new l(m(f.nodeName),h(f.attributes))).children=e(f.childNodes,p);break;case 3:p=new u(f.nodeValue);break;case 8:p=new a(f.nodeValue);break;default:continue}var d=i[o-1]||null;d&&(d.next=p),p.parent=r,p.prev=d,p.next=null,i.push(p)}return n&&((p=new c(n.substring(0,n.indexOf(" ")).toLowerCase(),n)).next=i[0]||null,p.parent=r,i.unshift(p),i[1]&&(i[1].prev=i[0])),i},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},488:(e,t,r)=>{var n=r(3670),i=r(484),o=r(4152),s={lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:n(o(e,(t=t||{}).htmlparser2||s),t)}a.domToReact=n,a.htmlToDOM=o,a.attributesToProps=i,a.Element=r(7790).Element,e.exports=a,e.exports.default=a},484:(e,t,r)=>{var n=r(83),i=r(4606);function o(e){return n.possibleStandardNames[e]}e.exports=function(e){var t,r,s,a,l,c={},u=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(s=e[t],n.isCustomAttribute(t))c[t]=s;else if(a=o(r=t.toLowerCase()))switch(l=n.getPropertyInfo(a),"checked"!==a&&"value"!==a||u||(a=o("default"+r)),c[a]=s,l&&l.type){case n.BOOLEAN:c[a]=!0;break;case n.OVERLOADED_BOOLEAN:""===s&&(c[a]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(c[t]=s);return i.setStyleProp(e.style,c),c}},3670:(e,t,r)=>{var n=r(9196),i=r(484),o=r(4606),s=o.setStyleProp,a=o.canTextBeChildOfNode;function l(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var o,c,u,p,f,d=(r=r||{}).library||n,h=d.cloneElement,m=d.createElement,g=d.isValidElement,b=[],v="function"==typeof r.replace,y=r.trim,w=0,x=t.length;w<x;w++)if(o=t[w],v&&g(u=r.replace(o)))x>1&&(u=h(u,{key:u.key||w})),b.push(u);else if("text"!==o.type){switch(p=o.attribs,l(o)?s(p.style,p):p&&(p=i(p)),f=null,o.type){case"script":case"style":o.children[0]&&(p.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?p.defaultValue=o.children[0].data:o.children&&o.children.length&&(f=e(o.children,r));break;default:continue}x>1&&(p.key=w),b.push(m(o.name,p,f))}else{if((c=!o.data.trim().length)&&o.parent&&!a(o.parent))continue;if(y&&c)continue;b.push(o.data)}return 1===b.length?b[0]:b}},4606:(e,t,r)=>{var n=r(9196),i=r(1476).default;var o={reactCompat:!0};var s=n.version.split(".")[0]>=16,a=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:s,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,i="function"==typeof t,o={},s={};for(r in e)n=e[r],i&&(o=t(r,n))&&2===o.length?s[o[0]]=o[1]:"string"==typeof n&&(s[n]=r);return s},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=i(e,o)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!a.has(e.name)},elementsWithNoTextChildren:a}},3870:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return s(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,p=l(r(7915)),f=a(r(9432)),d=r(763);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var h=function(e){function t(t,r){return"object"==typeof t&&(r=t=void 0),e.call(this,t,r)||this}return i(t,e),t.prototype.onend=function(){var e,t,r=b(x,this.dom);if(r){var n={};if("feed"===r.name){var i=r.children;n.type="atom",w(n,"id","id",i),w(n,"title","title",i);var o=y("href",b("link",i));o&&(n.link=o),w(n,"description","subtitle",i),(s=v("updated",i))&&(n.updated=new Date(s)),w(n,"author","email",i,!0),n.items=g("entry",i).map((function(e){var t={},r=e.children;w(t,"id","id",r),w(t,"title","title",r);var n=y("href",b("link",r));n&&(t.link=n);var i=v("summary",r)||v("content",r);i&&(t.description=i);var o=v("updated",r);return o&&(t.pubDate=new Date(o)),t.media=m(r),t}))}else{var s;i=null!==(t=null===(e=b("channel",r.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];n.type=r.name.substr(0,3),n.id="",w(n,"title","title",i),w(n,"link","link",i),w(n,"description","description",i),(s=v("lastBuildDate",i))&&(n.updated=new Date(s)),w(n,"author","managingEditor",i,!0),n.items=g("item",r.children).map((function(e){var t={},r=e.children;w(t,"id","guid",r),w(t,"title","title",r),w(t,"link","link",r),w(t,"description","description",r);var n=v("pubDate",r);return n&&(t.pubDate=new Date(n)),t.media=m(r),t}))}this.feed=n,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(p.default);function m(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function g(e,t){return f.getElementsByTagName(e,t,!0)}function b(e,t){return f.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,r){return void 0===r&&(r=!1),f.getText(f.getElementsByTagName(e,t,r,1)).trim()}function y(e,t){return t?t.attribs[e]:null}function w(e,t,r,n,i){void 0===i&&(i=!1);var o=v(r,n,i);o&&(e[t]=o)}function x(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=h,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var r=new h(t);return new d.Parser(r,t).end(e),r.feed}},763:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=n(r(9889)),o=new Set(["input","option","optgroup","select","button","datalist","textarea"]),s=new Set(["p"]),a={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:s,article:s,aside:s,blockquote:s,details:s,div:s,dl:s,fieldset:s,figcaption:s,figure:s,footer:s,form:s,header:s,hr:s,main:s,nav:s,ol:s,pre:s,section:s,table:s,ul:s,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),p=/\s|\//,f=function(){function e(e,t){var r,n,o,s,a;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(o=t.Tokenizer)&&void 0!==o?o:i.default)(this.options,this),null===(a=(s=this.cbs).onparserinit)||void 0===a||a.call(s,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,r;this.updatePosition(1),this.endIndex--,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,e)},e.prototype.onopentagname=function(e){var t,r;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(a,e))for(var n=void 0;this.stack.length>0&&a[e].has(n=this.stack[this.stack.length-1]);)this.onclosetag(n);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(r=(t=this.cbs).onopentagname)||void 0===r||r.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,r=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===r&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,r),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,r;null===(r=(t=this.cbs).onattribute)||void 0===r||r.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(p),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,r,n,i;this.updatePosition(4),null===(r=(t=this.cbs).oncomment)||void 0===r||r.call(t,e),null===(i=(n=this.cbs).oncommentend)||void 0===i||i.call(n)},e.prototype.oncdata=function(e){var t,r,n,i,o,s;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(r=(t=this.cbs).oncdatastart)||void 0===r||r.call(t),null===(i=(n=this.cbs).ontext)||void 0===i||i.call(n,e),null===(s=(o=this.cbs).oncdataend)||void 0===s||s.call(o)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,r;null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=f},9889:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(26)),o=n(r(9323)),s=n(r(9591)),a=n(r(2586));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,r){var n=e.toLowerCase();return e===n?function(e,i){i===n?e._state=t:(e._state=r,e._index--)}:function(i,o){o===n||o===e?i._state=t:(i._state=r,i._index--)}}function p(e,t){var r=e.toLowerCase();return function(n,i){i===r||i===e?n._state=t:(n._state=3,n._index--)}}var f=u("C",24,16),d=u("D",25,16),h=u("A",26,16),m=u("T",27,16),g=u("A",28,16),b=p("R",35),v=p("I",36),y=p("P",37),w=p("T",38),x=u("R",40,1),S=u("I",41,1),O=u("P",42,1),k=u("T",43,1),C=p("Y",45),_=p("L",46),E=p("E",47),T=u("Y",49,1),N=u("L",50,1),P=u("E",51,1),M=p("I",54),A=p("T",55),R=p("L",56),D=p("E",57),I=u("I",58,1),L=u("T",59,1),j=u("L",60,1),V=u("E",61,1),F=u("#",63,64),q=u("X",66,65),B=function(){function e(e,t){var r;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(r=null==e?void 0:e.decodeEntities)||void 0===r||r}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?a.default:o.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var r=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(s.default,r))return this.emitPartial(s.default[r]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(s.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,r){var n=this.sectionStart+e;if(n!==this._index){var o=this.buffer.substring(n,this._index),s=parseInt(o,t);this.emitPartial(i.default(s)),this.sectionStart=r?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?I(this,e):39===this._state?x(this,e):40===this._state?S(this,e):41===this._state?O(this,e):34===this._state?b(this,e):35===this._state?v(this,e):36===this._state?y(this,e):37===this._state?w(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?k(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?C(this,e):29===this._state?this.stateInCdata(e):45===this._state?_(this,e):46===this._state?E(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?T(this,e):49===this._state?N(this,e):50===this._state?P(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?M(this,e):54===this._state?A(this,e):55===this._state?R(this,e):56===this._state?D(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?L(this,e):59===this._state?j(this,e):60===this._state?V(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?f(this,e):62===this._state?F(this,e):24===this._state?d(this,e):25===this._state?h(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?m(this,e):27===this._state?g(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?q(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=B},3719:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=r(763);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=r(7915);function u(e,t){var r=new c.DomHandler(void 0,t);return new l.Parser(r,t).end(e),r.root}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}}),t.parseDocument=u,t.parseDOM=function(e,t){return u(e,t).children},t.createDomStream=function(e,t,r){var n=new c.DomHandler(e,t,r);return new l.Parser(n,t)};var p=r(9889);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(p).default}});var f=o(r(9960));t.ElementType=f,s(r(3870),t),t.DomUtils=o(r(9432));var d=r(3870);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return d.FeedHandler}})},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,f=1;function d(e){var t=e.match(r);t&&(p+=t.length);var n=e.lastIndexOf("\n");f=~n?e.length-n:f+e.length}function h(){var e={line:p,column:f};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:p,column:f},this.source=l.source}m.prototype.content=e;var g=[];function b(t){var r=new Error(l.source+":"+p+":"+f+": "+t);if(r.reason=t,r.filename=l.source,r.line=p,r.column=f,r.source=e,!l.silent)throw r;g.push(r)}function v(t){var r=t.exec(e);if(r){var n=r[0];return d(n),e=e.slice(n.length),r}}function y(){v(n)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var r=2;c!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1));)++r;if(r+=2,c===e.charAt(r-1))return b("End of comment missing");var n=e.slice(2,r-2);return f+=2,d(n),e=e.slice(r),f+=2,t({type:"comment",comment:n})}}function S(){var e=h(),r=v(i);if(r){if(x(),!v(o))return b("property missing ':'");var n=v(s),l=e({type:"declaration",property:u(r[0].replace(t,c)),value:n?u(n[0].replace(t,c)):c});return v(a),l}}return y(),function(){var e,t=[];for(w(t);e=S();)!1!==e&&(t.push(e),w(t));return t}()}},3059:(e,t)=>{t.klona=function e(t){if("object"!=typeof t)return t;var r,n,i=Object.prototype.toString.call(t);if("[object Object]"===i){if(t.constructor!==Object&&"function"==typeof t.constructor)for(r in n=new t.constructor,t)t.hasOwnProperty(r)&&n[r]!==t[r]&&(n[r]=e(t[r]));else for(r in n={},t)"__proto__"===r?Object.defineProperty(n,r,{value:e(t[r]),configurable:!0,enumerable:!0,writable:!0}):n[r]=e(t[r]);return n}if("[object Array]"===i){for(r=t.length,n=Array(r);r--;)n[r]=e(t[r]);return n}return"[object Set]"===i?(n=new Set,t.forEach((function(t){n.add(e(t))})),n):"[object Map]"===i?(n=new Map,t.forEach((function(t,r){n.set(e(r),e(t))})),n):"[object Date]"===i?new Date(+t):"[object RegExp]"===i?((n=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,n):"[object DataView]"===i?new t.constructor(e(t.buffer)):"[object ArrayBuffer]"===i?t.slice(0):"Array]"===i.slice(-6)?new t.constructor(t):t}},9430:function(e,t){var r,n,i;n=[],void 0===(i="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function r(t){var r,n=t.exec(e.substring(m));if(n)return r=n[0],m+=r.length,r}for(var n,i,o,s,a,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,p=/^[^ \t\n\r\u000c]+/,f=/[,]+$/,d=/^\d+$/,h=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,m=0,g=[];;){if(r(u),m>=l)return g;n=r(p),i=[],","===n.slice(-1)?(n=n.replace(f,""),v()):b()}function b(){for(r(c),o="",s="in descriptor";;){if(a=e.charAt(m),"in descriptor"===s)if(t(a))o&&(i.push(o),o="",s="after descriptor");else{if(","===a)return m+=1,o&&i.push(o),void v();if("("===a)o+=a,s="in parens";else{if(""===a)return o&&i.push(o),void v();o+=a}}else if("in parens"===s)if(")"===a)o+=a,s="in descriptor";else{if(""===a)return i.push(o),void v();o+=a}else if("after descriptor"===s)if(t(a));else{if(""===a)return void v();s="in descriptor",m-=1}m+=1}}function v(){var t,r,o,s,a,l,c,u,p,f=!1,m={};for(s=0;s<i.length;s++)l=(a=i[s])[a.length-1],c=a.substring(0,a.length-1),u=parseInt(c,10),p=parseFloat(c),d.test(c)&&"w"===l?((t||r)&&(f=!0),0===u?f=!0:t=u):h.test(c)&&"x"===l?((t||r||o)&&(f=!0),p<0?f=!0:r=p):d.test(c)&&"h"===l?((o||r)&&(f=!0),0===u?f=!0:o=u):f=!0;f?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+a+"'."):(m.url=n,t&&(m.w=t),r&&(m.d=r),o&&(m.h=o),g.push(m))}}})?r.apply(t,n):r)||(e.exports=i)},4241:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=r(),e.exports.createColors=r},1353:(e,t,r)=>{"use strict";let n=r(1019);class i extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,n.registerAtRule(i)},9932:(e,t,r)=>{"use strict";let n=r(5631);class i extends n{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},1019:(e,t,r)=>{"use strict";let n,i,o,{isClean:s,my:a}=r(5513),l=r(4258),c=r(9932),u=r(5631);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function f(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}class d extends u{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let r,n=0===(e=this.index(e))&&"prepend",i=this.normalize(t,this.proxyOf.nodes[e],n).reverse();for(let t of i)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)r=this.indexes[t],e<=r&&(this.indexes[t]=r+i.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let r,n=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of n)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)r=this.indexes[t],e<r&&(this.indexes[t]=r+n.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=p(n(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new c(e)]}return e.map((e=>(e[a]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&f(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}d.registerParse=e=>{n=e},d.registerRule=e=>{i=e},d.registerAtRule=e=>{o=e},e.exports=d,d.default=d,d.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,l.prototype):"comment"===e.type&&Object.setPrototypeOf(e,c.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{d.rebuild(e)}))}},2671:(e,t,r)=>{"use strict";let n=r(4241),i=r(2868);class o extends Error{constructor(e,t,r,n,i,s){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),s&&(this.plugin=s),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),i&&e&&(t=i(t));let r,o,s=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),c=String(l).length;if(e){let{bold:e,red:t,gray:i}=n.createColors(!0);r=r=>e(t(r)),o=e=>i(e)}else r=o=e=>e;return s.slice(a,l).map(((e,t)=>{let n=a+1+t,i=" "+(" "+n).slice(-c)+" | ";if(n===this.line){let t=o(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+o(i)+e+"\n "+t+r("^")}return" "+o(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},4258:(e,t,r)=>{"use strict";let n=r(5631);class i extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},6461:(e,t,r)=>{"use strict";let n,i,o=r(1019);class s extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new i,this,e).stringify()}}s.registerLazyResult=e=>{n=e},s.registerProcessor=e=>{i=e},e.exports=s,s.default=s},250:(e,t,r)=>{"use strict";let n=r(4258),i=r(7981),o=r(9932),s=r(1353),a=r(5995),l=r(1025),c=r(1675);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...p}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:a.prototype};r.map&&(r.map={...r.map,__proto__:i.prototype}),t.push(r)}}if(p.nodes&&(p.nodes=e.nodes.map((e=>u(e,t)))),p.source){let{inputId:e,...r}=p.source;p.source=r,null!=e&&(p.source.input=t[e])}if("root"===p.type)return new l(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new c(p);if("comment"===p.type)return new o(p);if("atrule"===p.type)return new s(p);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5995:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:i}=r(209),{fileURLToPath:o,pathToFileURL:s}=r(7414),{resolve:a,isAbsolute:l}=r(9830),{nanoid:c}=r(2618),u=r(2868),p=r(2671),f=r(7981),d=Symbol("fromOffsetCache"),h=Boolean(n&&i),m=Boolean(a&&l);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=a(t.from)),m&&h){let e=new f(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,r;if(this[d])r=this[d];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[d]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(t=n+(i-n>>1),e<r[t])i=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{line:n+1,col:e-r[n]+1}}error(e,t,r,n={}){let i,o,a;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof t.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);o=e.line,a=e.col}else o=n.line,a=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let l=this.origin(t,r,o,a);return i=l?new p(e,void 0===l.endLine?l.line:{line:l.line,column:l.column},void 0===l.endLine?l.column:{line:l.endLine,column:l.endColumn},l.source,l.file,n.plugin):new p(e,void 0===o?t:{line:t,column:r},void 0===o?r:{line:o,column:a},this.css,this.file,n.plugin),i.input={line:t,column:r,endLine:o,endColumn:a,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}origin(e,t,r,n){if(!this.map)return!1;let i,a,c=this.map.consumer(),u=c.originalPositionFor({line:e,column:t});if(!u.source)return!1;"number"==typeof r&&(i=c.originalPositionFor({line:r,column:n})),a=l(u.source)?s(u.source):new URL(u.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let p={url:a.toString(),line:u.line,column:u.column,endLine:i&&i.line,endColumn:i&&i.column};if("file:"===a.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");p.file=o(a)}let f=c.sourceContentFor(u.source);return f&&(p.source=f),p}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=g,g.default=g,u&&u.registerInput&&u.registerInput(g)},1939:(e,t,r)=>{"use strict";let{isClean:n,my:i}=r(5513),o=r(8505),s=r(7088),a=r(1019),l=r(6461),c=(r(2448),r(3632)),u=r(6939),p=r(1025);const f={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},d={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},h={postcssPlugin:!0,prepare:!0,Once:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,r=f[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let y={};class w{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof c)n=v(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[i]&&a.rebuild(n)}else n=v(t);this.result=new c(e,n,r),this.helpers={...y,result:this.result,postcss:y},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new o(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}walkSync(e){e[n]=!0;let t=g(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[n]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(m(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];){e[n]=!0;let t=[b(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!d[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,n]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let i,o=t.iterator;for(;i=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!i[n])return i[n]=!0,void e.push(b(i));t.iterator=0,delete r.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[n]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}w.registerPostcss=e=>{y=e},e.exports=w,w.default=w,p.registerLazyResult(w),l.registerLazyResult(w)},4715:e=>{"use strict";let t={split(e,t,r){let n=[],i="",o=!1,s=0,a=!1,l=!1;for(let r of e)l?l=!1:"\\"===r?l=!0:a?r===a&&(a=!1):'"'===r||"'"===r?a=r:"("===r?s+=1:")"===r?s>0&&(s-=1):0===s&&t.includes(r)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n},space:e=>t.split(e,[" ","\n","\t"]),comma:e=>t.split(e,[","],!0)};e.exports=t,t.default=t},8505:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:i}=r(209),{dirname:o,resolve:s,relative:a,sep:l}=r(9830),{pathToFileURL:c}=r(7414),u=r(5995),p=Boolean(n&&i),f=Boolean(o&&s&&a&&l);e.exports=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;r&&!e[r]&&(e[r]=!0,this.map.setSourceContent(this.toUrl(this.path(r)),t.source.input.css))}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),i=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?o(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=o(s(t,this.mapOpts.annotation))),e=a(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(c)return c(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,r=1,n=1,o="<no source>",s={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(s.generated.line=r,s.generated.column=n-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,this.map.addMapping(s))),e=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),n=i.length-t):n+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"!==a.type||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}}))}generate(){if(this.clearAnnotation(),f&&p&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}}},7647:(e,t,r)=>{"use strict";let n=r(8505),i=r(7088),o=(r(2448),r(6939));const s=r(3632);class a{constructor(e,t,r){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let a=i;this.result=new s(this._processor,o,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new n(a,o,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,t=o;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}}e.exports=a,a.default=a},5631:(e,t,r)=>{"use strict";let{isClean:n,my:i}=r(5513),o=r(2671),s=r(1062),a=r(7088);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let i=e[n],o=typeof i;"parent"===n&&"object"===o?t&&(r[n]=t):"source"===n?r[n]=i:Array.isArray(i)?r[n]=i.map((e=>l(e,r))):("object"===o&&null!==i&&(i=l(i)),r[n]=i)}return r}class c{constructor(e={}){this.raws={},this[n]=!1,this[i]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}error(e,t={}){if(this.source){let{start:r,end:n}=this.rangeBy(t);return this.source.input.error(e,{line:r.line,column:r.column},{line:n.line,column:n.column},t)}return new o(e)}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=l(this);for(let r in e)t[r]=e[r];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new s).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=i,t.set(n.input,i),i++),r[e]={inputId:o,start:n.start,end:n.end}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}positionInside(e){let t=this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===t[i]?(r=1,n+=1):r+=1;return{line:n,column:r}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let r=this.toString().indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}rangeBy(e){let t={line:this.source.start.line,column:this.source.start.column},r=this.source.end?{line:this.source.end.line,column:this.source.end.column+1}:{line:t.line,column:t.column+1};if(e.word){let n=this.toString().indexOf(e.word);-1!==n&&(t=this.positionInside(n),r=this.positionInside(n+e.word.length))}else e.start?t={line:e.start.line,column:e.start.column}:e.index&&(t=this.positionInside(e.index)),e.end?r={line:e.end.line,column:e.end.column}:e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={line:t.line,column:t.column+1}),{start:t,end:r}}getProxyProcessor(){return{set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},6939:(e,t,r)=>{"use strict";let n=r(1019),i=r(8867),o=r(5995);function s(e,t){let r=new o(e,t),n=new i(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=s,s.default=s,n.registerParse(s)},8867:(e,t,r)=>{"use strict";let n=r(4258),i=r(3852),o=r(9932),s=r(1353),a=r(1025),l=r(1675);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=i(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,r=null,n=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),o.push("("===r?")":"]");else if(s&&n&&"{"===r)i||(i=l),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,s);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&n){if(!s)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let r=new n;this.init(r,e[0][2]);let i,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e));"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(i=e.shift(),":"===i[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let s,a=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],"!important"===i[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===i[1].toLowerCase()){let n=e.slice(0),i="";for(let e=t;e>0;e--){let t=n[e][0];if(0===i.trim().indexOf("!")&&"space"!==t)break;i=n.pop()[1]+i}0===i.trim().indexOf("!")&&(r.important=!0,r.raws.important=i,e=n)}if("space"!==i[0]&&"comment"!==i[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,r,n,i=new s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),o&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,r,n){let i,o,s,a,l=r.length,u="",p=!0;for(let e=0;e<l;e+=1)i=r[e],o=i[0],"space"!==o||e!==l-1||n?"comment"===o?(a=r[e-1]?r[e-1][0]:"empty",s=r[e+1]?r[e+1][0]:"empty",c[a]||c[s]||","===u.slice(-1)?p=!1:u+=i[1]):u+=i[1]:p=!1;if(!p){let n=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={value:u,raw:n}}e[t]=u}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}colon(e){let t,r,n,i=0;for(let[o,s]of e.entries()){if(t=s,r=t[0],"("===r&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let i=t-1;i>=0&&(r=e[i],"space"===r[0]||(n+=1,2!==n));i--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}},20:(e,t,r)=>{"use strict";let n=r(2671),i=r(4258),o=r(1939),s=r(1019),a=r(1723),l=r(7088),c=r(250),u=r(6461),p=r(1728),f=r(9932),d=r(1353),h=r(3632),m=r(5995),g=r(6939),b=r(4715),v=r(1675),y=r(1025),w=r(5631);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new a(e)}x.plugin=function(e,t){let r,n=!1;function i(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new a).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return x([i(r)]).process(e,t)},i},x.stringify=l,x.parse=g,x.fromJSON=c,x.list=b,x.comment=e=>new f(e),x.atRule=e=>new d(e),x.decl=e=>new i(e),x.rule=e=>new v(e),x.root=e=>new y(e),x.document=e=>new u(e),x.CssSyntaxError=n,x.Declaration=i,x.Container=s,x.Processor=a,x.Document=u,x.Comment=f,x.Warning=p,x.AtRule=d,x.Result=h,x.Input=m,x.Rule=v,x.Root=y,x.Node=w,o.registerPostcss(x),e.exports=x,x.default=x},7981:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:i}=r(209),{existsSync:o,readFileSync:s}=r(4777),{dirname:a,join:l}=r(9830);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=a(e),o(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c},1723:(e,t,r)=>{"use strict";let n=r(7647),i=r(1939),o=r(6461),s=r(1025);class a{constructor(e=[]){this.version="8.4.14",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new n(this,e,t):new i(this,e,t)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin")}return t}}e.exports=a,a.default=a,s.registerProcessor(a),o.registerProcessor(a)},3632:(e,t,r)=>{"use strict";let n=r(1728);class i{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=i,i.default=i},1025:(e,t,r)=>{"use strict";let n,i,o=r(1019);class s extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}toResult(e={}){return new n(new i,this,e).stringify()}}s.registerLazyResult=e=>{n=e},s.registerProcessor=e=>{i=e},e.exports=s,s.default=s},1675:(e,t,r)=>{"use strict";let n=r(1019),i=r(4715);class o extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=o,o.default=o,n.registerRule(o)},1062:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class r{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==n||r)}}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}raw(e,r,n){let i;if(n||(n=r),r&&(i=e.raws[r],void 0!==i))return i;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return t[n];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[n])return s.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let t="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[t]?i=this[t](s,e):s.walk((e=>{if(i=e.raws[r],void 0!==i)return!1}))}var a;return void 0===i&&(i=t[n]),s.rawCache[n]=i,i}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}}e.exports=r,r.default=r},7088:(e,t,r)=>{"use strict";let n=r(1062);function i(e,t){new n(t).stringify(e)}e.exports=i,i.default=i},5513:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},3852:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),n="\\".charCodeAt(0),i="/".charCodeAt(0),o="\n".charCodeAt(0),s=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),p="]".charCodeAt(0),f="(".charCodeAt(0),d=")".charCodeAt(0),h="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\n"'(/\\]/,O=/[\da-f]/i;e.exports=function(e,k={}){let C,_,E,T,N,P,M,A,R,D,I=e.css.valueOf(),L=k.ignoreErrors,j=I.length,V=0,F=[],q=[];function B(t){throw e.error("Unclosed "+t,V)}return{back:function(e){q.push(e)},nextToken:function(e){if(q.length)return q.pop();if(V>=j)return;let k=!!e&&e.ignoreUnclosed;switch(C=I.charCodeAt(V),C){case o:case s:case l:case c:case a:_=V;do{_+=1,C=I.charCodeAt(_)}while(C===s||C===o||C===l||C===c||C===a);D=["space",I.slice(V,_)],V=_-1;break;case u:case p:case h:case m:case v:case g:case d:{let e=String.fromCharCode(C);D=[e,e,V];break}case f:if(A=F.length?F.pop()[1]:"",R=I.charCodeAt(V+1),"url"===A&&R!==t&&R!==r&&R!==s&&R!==o&&R!==l&&R!==a&&R!==c){_=V;do{if(P=!1,_=I.indexOf(")",_+1),-1===_){if(L||k){_=V;break}B("bracket")}for(M=_;I.charCodeAt(M-1)===n;)M-=1,P=!P}while(P);D=["brackets",I.slice(V,_+1),V,_],V=_}else _=I.indexOf(")",V+1),T=I.slice(V,_+1),-1===_||S.test(T)?D=["(","(",V]:(D=["brackets",T,V,_],V=_);break;case t:case r:E=C===t?"'":'"',_=V;do{if(P=!1,_=I.indexOf(E,_+1),-1===_){if(L||k){_=V+1;break}B("string")}for(M=_;I.charCodeAt(M-1)===n;)M-=1,P=!P}while(P);D=["string",I.slice(V,_+1),V,_],V=_;break;case y:w.lastIndex=V+1,w.test(I),_=0===w.lastIndex?I.length-1:w.lastIndex-2,D=["at-word",I.slice(V,_+1),V,_],V=_;break;case n:for(_=V,N=!0;I.charCodeAt(_+1)===n;)_+=1,N=!N;if(C=I.charCodeAt(_+1),N&&C!==i&&C!==s&&C!==o&&C!==l&&C!==c&&C!==a&&(_+=1,O.test(I.charAt(_)))){for(;O.test(I.charAt(_+1));)_+=1;I.charCodeAt(_+1)===s&&(_+=1)}D=["word",I.slice(V,_+1),V,_],V=_;break;default:C===i&&I.charCodeAt(V+1)===b?(_=I.indexOf("*/",V+2)+1,0===_&&(L||k?_=I.length:B("comment")),D=["comment",I.slice(V,_+1),V,_],V=_):(x.lastIndex=V+1,x.test(I),_=0===x.lastIndex?I.length-1:x.lastIndex-2,D=["word",I.slice(V,_+1),V,_],F.push(D),V=_)}return V++,D},endOfFile:function(){return 0===q.length&&V>=j},position:function(){return V}}}},2448:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},1728:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},2703:(e,t,r)=>{"use strict";var n=r(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return r.PropTypes=r,r}},5697:(e,t,r)=>{e.exports=r(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5639:(e,t,r)=>{"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(9196),s=l(o),a=l(r(5697));function l(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},f=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return f?"_"+Math.random().toString(36).substr(2,12):void 0},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.inputRef=function(e){r.input=e,"function"==typeof r.props.inputRef&&r.props.inputRef(e)},r.placeHolderSizerRef=function(e){r.placeHolderSizer=e},r.sizerRef=function(e){r.sizer=e},r.state={inputWidth:e.minWidth,inputId:e.id||d(),prevId:e.id},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var r=e.id;return r!==t.prevId?{inputId:r||d(),prevId:r}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return f&&e?s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=n({},this.props.style);t.display||(t.display="inline-block");var r=n({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=r,s.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),s.default.createElement("input",n({},i,{ref:this.inputRef})),s.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?s.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.Z=h},9921:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,b=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,y=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case p:case o:case a:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return x(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=n,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=d,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===a||e===s||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=x},9864:(e,t,r)=>{"use strict";e.exports=r(9921)},83:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0});function o(e,t,r,n,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var s={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){s[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=n(e,2),r=t[0],i=t[1];s[r]=new o(r,1,!1,i,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){s[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){s[e]=new o(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"].forEach((function(e){s[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){s[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){s[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){s[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){s[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));var a=/[\-\:]([a-z])/g,l=function(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"].forEach((function(e){var t=e.replace(a,l);s[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(a,l);s[t]=new o(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(a,l);s[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){s[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}));s.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){s[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=r(8229),u=c.CAMELCASE,p=c.SAME,f=c.possibleStandardNames,d=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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]*$")),h=Object.keys(f).reduce((function(e,t){var r=f[t];return r===p?e[t]=t:r===u?e[t.toLowerCase()]=t:e[t]=r,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return s.hasOwnProperty(e)?s[e]:null},t.isCustomAttribute=d,t.possibleStandardNames=h},8229:(e,t)=>{t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1036:(e,t,r)=>{const n=r(3719),i=r(2997),{klona:o}=r(3059),{isPlainObject:s}=r(977),a=r(9996),l=r(9430),{parse:c}=r(20),u=["img","audio","video","picture","svg","object","map","iframe","embed"],p=["script","style"];function f(e,t){e&&Object.keys(e).forEach((function(r){t(e[r],r)}))}function d(e,t){return{}.hasOwnProperty.call(e,t)}function h(e,t){const r=[];return f(e,(function(e){t(e)&&r.push(e)})),r}e.exports=g;const m=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,r){let v="",y="";function w(e,t){const r=this;this.tag=e,this.attribs=t||{},this.tagPosition=v.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(T.length){T[T.length-1].text+=r.text}},this.updateParentNodeMediaChildren=function(){if(T.length&&u.includes(this.tag)){T[T.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},b,t.parser),p.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const x=t.nonTextTags||["script","style","textarea","option"];let S,O;t.allowedAttributes&&(S={},O={},f(t.allowedAttributes,(function(e,t){S[t]=[];const r=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(i(e).replace(/\\\*/g,".*")):S[t].push(e)})),O[t]=new RegExp("^("+r.join("|")+")$")})));const k={};f(t.allowedClasses,(function(e,t){S&&(d(S,t)||(S[t]=[]),S[t].push("class")),k[t]=e}));const C={};let _,E,T,N,P,M,A;f(t.transformTags,(function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=g.simpleTransform(e)),"*"===t?_=r:C[t]=r}));let R=!1;I();const D=new n.Parser({onopentag:function(e,r){if(t.enforceHtmlBoundary&&"html"===e&&I(),M)return void A++;const n=new w(e,r);T.push(n);let i=!1;const u=!!n.text;let p;if(d(C,e)&&(p=C[e](e,r),n.attribs=r=p.attribs,void 0!==p.text&&(n.innerText=p.text),e!==p.tagName&&(n.name=e=p.tagName,P[E]=p.tagName)),_&&(p=_(e,r),n.attribs=r=p.attribs,e!==p.tagName&&(n.name=e=p.tagName,P[E]=p.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(d(e,t))return!1;return!0}(N)||null!=t.nestingLimit&&E>=t.nestingLimit)&&(i=!0,N[E]=!0,"discard"===t.disallowedTagsMode&&-1!==x.indexOf(e)&&(M=!0,A=1),N[E]=!0),E++,i){if("discard"===t.disallowedTagsMode)return;y=v,v=""}v+="<"+e,(!S||d(S,e)||S["*"])&&f(r,(function(r,i){if(!m.test(i))return void delete n.attribs[i];let u,p=!1;if(!S||d(S,e)&&-1!==S[e].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||d(O,e)&&O[e].test(i)||O["*"]&&O["*"].test(i))p=!0;else if(S&&S[e])for(const t of S[e])if(s(t)&&t.name&&t.name===i){p=!0;let e="";if(!0===t.multiple){const n=r.split(" ");for(const r of n)-1!==t.values.indexOf(r)&&(""===e?e=r:e+=" "+r)}else t.values.indexOf(r)>=0&&(e=r);r=e}if(p){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&j(e,r))return void delete n.attribs[i];if("iframe"===e&&"src"===i){let e=!0;try{if((r=r.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let n="relative://relative-site";for(let e=0;e<100;e++)n+=`/${e}`;const i=new URL(r,n);if(i&&"relative-site"===i.hostname&&"relative:"===i.protocol)e=d(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const r=(t.allowedIframeHostnames||[]).find((function(e){return e===i.hostname})),n=(t.allowedIframeDomains||[]).find((function(e){return i.hostname===e||i.hostname.endsWith(`.${e}`)}));e=r||n}}catch(t){e=!1}if(!e)return void delete n.attribs[i]}if("srcset"===i)try{if(u=l(r),u.forEach((function(e){j("srcset",e.url)&&(e.evil=!0)})),u=h(u,(function(e){return!e.evil})),!u.length)return void delete n.attribs[i];r=h(u,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[i]=r}catch(e){return void delete n.attribs[i]}if("class"===i){const t=k[e],o=k["*"];if(!(r=V(r,t&&o?a(t,o):t||o)).length)return void delete n.attribs[i]}if("style"===i)try{const s=function(e,t){if(!t)return e;const r=o(e),n=e.nodes[0];let i;i=t[n.selector]&&t["*"]?a(t[n.selector],t["*"]):t[n.selector]||t["*"];i&&(r.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,r){if(d(e,r.prop)){e[r.prop].some((function(e){return e.test(r.value)}))&&t.push(r)}return t}}(i),[]));return r}(c(e+" {"+r+"}"),t.allowedStyles);if(0===(r=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(t.prop+":"+t.value),e}),[]).join(";")}(s)).length)return void delete n.attribs[i]}catch(e){return void delete n.attribs[i]}v+=" "+i,r&&r.length&&(v+='="'+L(r,!0)+'"')}else delete n.attribs[i]})),-1!==t.selfClosing.indexOf(e)?v+=" />":(v+=">",!n.innerText||u||t.textFilter||(v+=L(n.innerText),R=!0)),i&&(v=y+L(v),y="")},ontext:function(e){if(M)return;const r=T[T.length-1];let n;if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){const r=L(e,!1);t.textFilter&&!R?v+=t.textFilter(r,n):R||(v+=r)}else v+=e;if(T.length){T[T.length-1].text+=e}},onclosetag:function(e){if(M){if(A--,A)return;M=!1}const r=T.pop();if(!r)return;M=!!t.enforceHtmlBoundary&&"html"===e,E--;const n=N[E];if(n){if(delete N[E],"discard"===t.disallowedTagsMode)return void r.updateParentNodeText();y=v,v=""}P[E]&&(e=P[E],delete P[E]),t.exclusiveFilter&&t.exclusiveFilter(r)?v=v.substr(0,r.tagPosition):(r.updateParentNodeMediaChildren(),r.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(v+="</"+e+">",n&&(v=y+L(v),y="")):n&&(v=y,y=""))}},t.parser);return D.write(e),D.end(),v;function I(){v="",E=0,T=[],N={},P={},M=!1,A=0}function L(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),r&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),r&&(e=e.replace(/"/g,""")),e}function j(e,r){const n=(r=(r=r.replace(/[\x00-\x20]+/g,"")).replace(/<!--.*?-->/g,"")).match(/^([a-zA-Z]+):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=n[1].toLowerCase();return d(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function V(e,t){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)})).join(" "):e}}const b={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},g.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,i){let o;if(r)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},2997:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},977:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},1476:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=n(r(7848)),o=r(6678);t.default=function(e,t){var r={};return e&&"string"==typeof e?(i.default(e,(function(e,n){e&&n&&(r[o.camelCase(e,t)]=n)})),r):r}},6678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var r=/^--[a-zA-Z0-9-]+$/,n=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=function(e,t){return t.toUpperCase()},a=function(e,t){return t+"-"};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||r.test(e)}(e)?e:(e=e.toLowerCase(),t.reactCompat||(e=e.replace(o,a)),e.replace(n,s))}},7848:(e,t,r)=>{var n=r(8139);e.exports=function(e,t){var r,i=null;if(!e||"string"!=typeof e)return i;for(var o,s,a=n(e),l="function"==typeof t,c=0,u=a.length;c<u;c++)o=(r=a[c]).property,s=r.value,l?t(o,s,r):s&&(i||(i={}),i[o]=s);return i}},9196:e=>{"use strict";e.exports=window.React},2868:()=>{},4777:()=>{},9830:()=>{},209:()=>{},7414:()=>{},2618:e=>{e.exports={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}},3600:e=>{"use strict";e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},9323:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},9591:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},2586:e=>{"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks;const t=function(t){var r=t.namespace,n=t.title,i=t.icon;(0,e.registerBlockCollection)(r,{title:n,icon:i})};function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(488);o.domToReact,o.htmlToDOM,o.attributesToProps,o.Element;const s=o,a=window.wp.blockEditor,l=window.wp.components;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}var u=r(9196),p=r.n(u);var f=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),d=Math.abs,h=String.fromCharCode,m=Object.assign;function g(e){return e.trim()}function b(e,t,r){return e.replace(t,r)}function v(e,t){return e.indexOf(t)}function y(e,t){return 0|e.charCodeAt(t)}function w(e,t,r){return e.slice(t,r)}function x(e){return e.length}function S(e){return e.length}function O(e,t){return t.push(e),e}var k=1,C=1,_=0,E=0,T=0,N="";function P(e,t,r,n,i,o,s){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:k,column:C,length:s,return:""}}function M(e,t){return m(P("",null,null,"",null,null,0),e,{length:-e.length},t)}function A(){return T=E>0?y(N,--E):0,C--,10===T&&(C=1,k--),T}function R(){return T=E<_?y(N,E++):0,C++,10===T&&(C=1,k++),T}function D(){return y(N,E)}function I(){return E}function L(e,t){return w(N,e,t)}function j(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V(e){return k=C=1,_=x(N=e),E=0,[]}function F(e){return N="",e}function q(e){return g(L(E-1,U(91===e?e+2:40===e?e+1:e)))}function B(e){for(;(T=D())&&T<33;)R();return j(e)>2||j(T)>3?"":" "}function H(e,t){for(;--t&&R()&&!(T<48||T>102||T>57&&T<65||T>70&&T<97););return L(e,I()+(t<6&&32==D()&&32==R()))}function U(e){for(;R();)switch(T){case e:return E;case 34:case 39:34!==e&&39!==e&&U(T);break;case 40:41===e&&U(e);break;case 92:R()}return E}function z(e,t){for(;R()&&e+T!==57&&(e+T!==84||47!==D()););return"/*"+L(t,E-1)+"*"+h(47===e?e:R())}function $(e){for(;!j(D());)R();return L(e,E)}var G="-ms-",W="-moz-",X="-webkit-",Z="comm",Y="rule",J="decl",K="@keyframes";function Q(e,t){for(var r="",n=S(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function ee(e,t,r,n){switch(e.type){case"@import":case J:return e.return=e.return||e.value;case Z:return"";case K:return e.return=e.value+"{"+Q(e.children,n)+"}";case Y:e.value=e.props.join(",")}return x(r=Q(e.children,n))?e.return=e.value+"{"+r+"}":""}function te(e,t){switch(function(e,t){return(((t<<2^y(e,0))<<2^y(e,1))<<2^y(e,2))<<2^y(e,3)}(e,t)){case 5103:return X+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return X+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return X+e+W+e+G+e+e;case 6828:case 4268:return X+e+G+e+e;case 6165:return X+e+G+"flex-"+e+e;case 5187:return X+e+b(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return X+e+G+"flex-item-"+b(e,/flex-|-self/,"")+e;case 4675:return X+e+G+"flex-line-pack"+b(e,/align-content|flex-|-self/,"")+e;case 5548:return X+e+G+b(e,"shrink","negative")+e;case 5292:return X+e+G+b(e,"basis","preferred-size")+e;case 6060:return X+"box-"+b(e,"-grow","")+X+e+G+b(e,"grow","positive")+e;case 4554:return X+b(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return b(b(b(e,/(zoom-|grab)/,X+"$1"),/(image-set)/,X+"$1"),e,"")+e;case 5495:case 3959:return b(e,/(image-set\([^]*)/,X+"$1$`$1");case 4968:return b(b(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+X+e+e;case 4095:case 3583:case 4068:case 2532:return b(e,/(.+)-inline(.+)/,X+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(x(e)-1-t>6)switch(y(e,t+1)){case 109:if(45!==y(e,t+4))break;case 102:return b(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+W+(108==y(e,t+3)?"$3":"$2-$3"))+e;case 115:return~v(e,"stretch")?te(b(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==y(e,t+1))break;case 6444:switch(y(e,x(e)-3-(~v(e,"!important")&&10))){case 107:return b(e,":",":"+X)+e;case 101:return b(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+X+(45===y(e,14)?"inline-":"")+"box$3$1"+X+"$2$3$1"+G+"$2box$3")+e}break;case 5936:switch(y(e,t+11)){case 114:return X+e+G+b(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return X+e+G+b(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return X+e+G+b(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return X+e+G+e+e}return e}function re(e){return F(ne("",null,null,null,[""],e=V(e),0,[0],e))}function ne(e,t,r,n,i,o,s,a,l){for(var c=0,u=0,p=s,f=0,d=0,m=0,g=1,y=1,w=1,S=0,k="",C=i,_=o,E=n,T=k;y;)switch(m=S,S=R()){case 40:if(108!=m&&58==T.charCodeAt(p-1)){-1!=v(T+=b(q(S),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:T+=q(S);break;case 9:case 10:case 13:case 32:T+=B(m);break;case 92:T+=H(I()-1,7);continue;case 47:switch(D()){case 42:case 47:O(oe(z(R(),I()),t,r),l);break;default:T+="/"}break;case 123*g:a[c++]=x(T)*w;case 125*g:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+u:d>0&&x(T)-p&&O(d>32?se(T+";",n,r,p-1):se(b(T," ","")+";",n,r,p-2),l);break;case 59:T+=";";default:if(O(E=ie(T,t,r,c,u,i,a,k,C=[],_=[],p),o),123===S)if(0===u)ne(T,t,E,E,C,o,p,a,_);else switch(f){case 100:case 109:case 115:ne(e,E,E,n&&O(ie(e,E,E,0,0,i,a,k,i,C=[],p),_),i,_,p,a,n?C:_);break;default:ne(T,E,E,E,[""],_,0,a,_)}}c=u=d=0,g=w=1,k=T="",p=s;break;case 58:p=1+x(T),d=m;default:if(g<1)if(123==S)--g;else if(125==S&&0==g++&&125==A())continue;switch(T+=h(S),S*g){case 38:w=u>0?1:(T+="\f",-1);break;case 44:a[c++]=(x(T)-1)*w,w=1;break;case 64:45===D()&&(T+=q(R())),f=D(),u=p=x(k=T+=$(I())),S++;break;case 45:45===m&&2==x(T)&&(g=0)}}return o}function ie(e,t,r,n,i,o,s,a,l,c,u){for(var p=i-1,f=0===i?o:[""],h=S(f),m=0,v=0,y=0;m<n;++m)for(var x=0,O=w(e,p+1,p=d(v=s[m])),k=e;x<h;++x)(k=g(v>0?f[x]+" "+O:b(O,/&\f/g,f[x])))&&(l[y++]=k);return P(e,t,r,0===i?Y:a,l,c,u)}function oe(e,t,r){return P(e,t,r,Z,h(T),w(e,2,-2),0)}function se(e,t,r,n){return P(e,t,r,J,w(e,0,n),w(e,n+1,-1),n)}var ae=function(e,t,r){for(var n=0,i=0;n=i,i=D(),38===n&&12===i&&(t[r]=1),!j(i);)R();return L(e,E)},le=function(e,t){return F(function(e,t){var r=-1,n=44;do{switch(j(n)){case 0:38===n&&12===D()&&(t[r]=1),e[r]+=ae(E-1,t,r);break;case 2:e[r]+=q(n);break;case 4:if(44===n){e[++r]=58===D()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=h(n)}}while(n=R());return e}(V(e),t))},ce=new WeakMap,ue=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ce.get(r))&&!n){ce.set(e,!0);for(var i=[],o=le(t,i),s=r.props,a=0,l=0;a<o.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[c]):s[c]+" "+o[a]}}},pe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},fe=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case J:e.return=te(e.value,e.length);break;case K:return Q([M(e,{value:b(e.value,"@","@"+X)})],n);case Y:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Q([M(e,{props:[b(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Q([M(e,{props:[b(t,/:(plac\w+)/,":-webkit-input-$1")]}),M(e,{props:[b(t,/:(plac\w+)/,":-moz-$1")]}),M(e,{props:[b(t,/:(plac\w+)/,G+"input-$1")]})],n)}return""}))}}];const de=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n=e.stylisPlugins||fe;var i,o,s={},a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)s[t[r]]=!0;a.push(e)}));var l,c,u,p,d=[ee,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],h=(c=[ue,pe].concat(n,d),u=S(c),function(e,t,r,n){for(var i="",o=0;o<u;o++)i+=c[o](e,t,r,n)||"";return i});o=function(e,t,r,n){l=r,Q(re(e?e+"{"+t.styles+"}":t.styles),h),n&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new f({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(a),m};function he(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}var me=function(e,t,r){var n=e.key+"-"+t.name;if(!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles),void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0);i=i.next}while(void 0!==i)}};const ge=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)};const be={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ve=/[A-Z]|^ms/g,ye=/_EMO_([^_]+?)_([^]*?)_EMO_/g,we=function(e){return 45===e.charCodeAt(1)},xe=function(e){return null!=e&&"boolean"!=typeof e},Se=function(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}((function(e){return we(e)?e:e.replace(ve,"-$&").toLowerCase()})),Oe=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ye,(function(e,t,r){return Ce={name:t,styles:r,next:Ce},t}))}return 1===be[e]||we(e)||"number"!=typeof t||0===t?t:t+"px"};function ke(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return Ce={name:r.name,styles:r.styles,next:Ce},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)Ce={name:n.name,styles:n.styles,next:Ce},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ke(e,t,r[i])+";";else for(var o in r){var s=r[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?n+=o+"{"+t[s]+"}":xe(s)&&(n+=Se(o)+":"+Oe(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=ke(e,t,s);switch(o){case"animation":case"animationName":n+=Se(o)+":"+a+";";break;default:n+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)xe(s[l])&&(n+=Se(o)+":"+Oe(o,s[l])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=Ce,o=r(e);return Ce=i,ke(e,t,o)}}if(null==t)return r;var s=t[r];return void 0!==s?s:r}var Ce,_e=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Ee=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";Ce=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=ke(r,t,o)):i+=o[0];for(var s=1;s<e.length;s++)i+=ke(r,t,e[s]),n&&(i+=o[s]);_e.lastIndex=0;for(var a,l="";null!==(a=_e.exec(i));)l+="-"+a[1];return{name:ge(i)+l,styles:i,next:Ce}},Te={}.hasOwnProperty,Ne=(0,u.createContext)("undefined"!=typeof HTMLElement?de({key:"css"}):null);var Pe=Ne.Provider,Me=function(e){return(0,u.forwardRef)((function(t,r){var n=(0,u.useContext)(Ne);return e(t,n,r)}))},Ae=(0,u.createContext)({});var Re="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",De=function(e,t){var r={};for(var n in t)Te.call(t,n)&&(r[n]=t[n]);return r[Re]=e,r},Ie=function(){return null},Le=Me((function(e,t,r){var n=e.css;"string"==typeof n&&void 0!==t.registered[n]&&(n=t.registered[n]);var i=e[Re],o=[n],s="";"string"==typeof e.className?s=he(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Ee(o,void 0,(0,u.useContext)(Ae));me(t,a,"string"==typeof i);s+=t.key+"-"+a.name;var l={};for(var c in e)Te.call(e,c)&&"css"!==c&&c!==Re&&(l[c]=e[c]);l.ref=r,l.className=s;var p=(0,u.createElement)(i,l),f=(0,u.createElement)(Ie,null);return(0,u.createElement)(u.Fragment,null,f,p)}));r(8679);var je=function(e,t){var r=arguments;if(null==t||!Te.call(t,"css"))return u.createElement.apply(void 0,r);var n=r.length,i=new Array(n);i[0]=Le,i[1]=De(e,t);for(var o=2;o<n;o++)i[o]=r[o];return u.createElement.apply(null,i)};function Ve(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ee(t)}var Fe=function e(t){for(var r=t.length,n=0,i="";n<r;n++){var o=t[n];if(null!=o){var s=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var a in s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(i&&(i+=" "),i+=s)}}return i};function qe(e,t,r){var n=[],i=he(e,n,r);return n.length<2?r:i+t(n)}var Be=function(){return null},He=Me((function(e,t){var r=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=Ee(r,t.registered);return me(t,i,!1),t.key+"-"+i.name},n={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return qe(t.registered,r,Fe(n))},theme:(0,u.useContext)(Ae)},i=e.children(n);var o=(0,u.createElement)(Be,null);return(0,u.createElement)(u.Fragment,null,o,i)}));function Ue(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var ze=r(5639);function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function We(e,t,r){return t&&Ge(e.prototype,t),r&&Ge(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xe(e,t){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xe(e,t)}function Ze(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xe(e,t)}const Ye=window.ReactDOM;function Je(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(r),!0).forEach((function(t){Je(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function et(e){return et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},et(e)}function tt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=et(e);if(t){var i=et(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tt(this,r)}}var nt=function(){};function it(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function ot(e,t,r){var n=[r];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&n.push("".concat(it(e,i)));return n.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var st=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===n(e)&&null!==e?[e]:[]},at=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,Qe({},Ue(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function lt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ct(e){return lt(e)?window.pageYOffset:e.scrollTop}function ut(e,t){lt(e)?window.scrollTo(0,t):e.scrollTop=t}function pt(e,t,r,n){return r*((e=e/n-1)*e*e+1)+t}function ft(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nt,i=ct(e),o=t-i,s=10,a=0;function l(){var t=pt(a+=s,i,o,r);ut(e,t),a<r?window.requestAnimationFrame(l):n(e)}l()}function dt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var ht=!1,mt={get passive(){return ht=!0}},gt="undefined"!=typeof window?window:{};gt.addEventListener&>.removeEventListener&&(gt.addEventListener("p",nt,mt),gt.removeEventListener("p",nt,!1));var bt=ht;function vt(e){var t=e.maxHeight,r=e.menuEl,n=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.theme.spacing,l=function(e){var t=getComputedStyle(e),r="absolute"===t.position,n=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!r||"static"!==t.position)&&n.test(t.overflow+t.overflowY+t.overflowX))return o;return i}(r),c={placement:"bottom",maxHeight:t};if(!r||!r.offsetParent)return c;var u=l.getBoundingClientRect().height,p=r.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=r.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=ct(l),v=parseInt(getComputedStyle(r).marginBottom,10),y=parseInt(getComputedStyle(r).marginTop,10),w=m-y,x=g-h,S=w+b,O=u-b-h,k=f-g+b+v,C=b+h-y,_=160;switch(i){case"auto":case"bottom":if(x>=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!s)return o&&ft(l,k,_),{placement:"bottom",maxHeight:t};if(!s&&O>=n||s&&x>=n)return o&&ft(l,k,_),{placement:"bottom",maxHeight:s?x-v:O-v};if("auto"===i||s){var E=t,T=s?w:S;return T>=n&&(E=Math.min(T-v-a.controlHeight,t)),{placement:"top",maxHeight:E}}if("bottom"===i)return o&&ut(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(S>=d&&!s)return o&&ft(l,C,_),{placement:"top",maxHeight:t};if(!s&&S>=n||s&&w>=n){var N=t;return(!s&&S>=n||s&&w>=n)&&(N=s?w-y:S-y),o&&ft(l,C,_),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var yt=function(e){return"auto"===e?"bottom":e},wt=(0,u.createContext)({getPortalPlacement:null}),xt=function(e){Ze(r,e);var t=rt(r);function r(){var e;$e(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var r=e.props,n=r.minMenuHeight,i=r.maxMenuHeight,o=r.menuPlacement,s=r.menuPosition,a=r.menuShouldScrollIntoView,l=r.theme;if(t){var c="fixed"===s,u=vt({maxHeight:i,menuEl:t,minHeight:n,placement:o,shouldScroll:a&&!c,isFixedPosition:c,theme:l}),p=e.context.getPortalPlacement;p&&p(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,r=e.state.placement||yt(t);return Qe(Qe({},e.props),{},{placement:r,maxHeight:e.state.maxHeight})},e}return We(r,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),r}(u.Component);xt.contextType=wt;var St=function(e){var t=e.theme,r=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px"),textAlign:"center"}},Ot=St,kt=St,Ct=function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps;return je("div",c({css:i("noOptionsMessage",e),className:n({"menu-notice":!0,"menu-notice--no-options":!0},r)},o),t)};Ct.defaultProps={children:"No options"};var _t=function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps;return je("div",c({css:i("loadingMessage",e),className:n({"menu-notice":!0,"menu-notice--loading":!0},r)},o),t)};_t.defaultProps={children:"Loading..."};var Et,Tt=function(e){Ze(r,e);var t=rt(r);function r(){var e;$e(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var r=t.placement;r!==yt(e.props.menuPlacement)&&e.setState({placement:r})},e}return We(r,[{key:"render",value:function(){var e=this.props,t=e.appendTo,r=e.children,n=e.className,i=e.controlElement,o=e.cx,s=e.innerProps,a=e.menuPlacement,l=e.menuPosition,u=e.getStyles,p="fixed"===l;if(!t&&!p||!i)return null;var f=this.state.placement||yt(a),d=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),h=p?0:window.pageYOffset,m=d[f]+h,g=je("div",c({css:u("menuPortal",{offset:m,position:l,rect:d}),className:o({"menu-portal":!0},n)},s),r);return je(wt.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,Ye.createPortal)(g,t):g)}}]),r}(u.Component);var Nt,Pt,Mt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},At=function(e){var t=e.size,r=Ue(e,["size"]);return je("svg",c({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Mt},r))},Rt=function(e){return je(At,c({size:20},e),je("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Dt=function(e){return je(At,c({size:20},e),je("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},It=function(e){var t=e.isFocused,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*n,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Lt=It,jt=It,Vt=function(){var e=Ve.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Et||(Nt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Pt||(Pt=Nt.slice(0)),Et=Object.freeze(Object.defineProperties(Nt,{raw:{value:Object.freeze(Pt)}})))),Ft=function(e){var t=e.delay,r=e.offset;return je("span",{css:Ve({animation:"".concat(Vt," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},qt=function(e){var t=e.className,r=e.cx,n=e.getStyles,i=e.innerProps,o=e.isRtl;return je("div",c({css:n("loadingIndicator",e),className:r({indicator:!0,"loading-indicator":!0},t)},i),je(Ft,{delay:0,offset:o}),je(Ft,{delay:160,offset:!0}),je(Ft,{delay:320,offset:!o}))};qt.defaultProps={size:4};var Bt=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Ht=function(e){var t=e.children,r=e.innerProps;return je("div",r,t)},Ut=Ht,zt=Ht;var $t=function(e){var t=e.children,r=e.className,n=e.components,i=e.cx,o=e.data,s=e.getStyles,a=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,p=n.Container,f=n.Label,d=n.Remove;return je(He,null,(function(n){var h=n.css,m=n.cx;return je(p,{data:o,innerProps:Qe({className:m(h(s("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},r))},a),selectProps:u},je(f,{data:o,innerProps:{className:m(h(s("multiValueLabel",e)),i({"multi-value__label":!0},r))},selectProps:u},t),je(d,{data:o,innerProps:Qe({className:m(h(s("multiValueRemove",e)),i({"multi-value__remove":!0},r))},c),selectProps:u}))}))};$t.defaultProps={cropWithEllipsis:!0};var Gt={ClearIndicator:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps;return je("div",c({css:i("clearIndicator",e),className:n({indicator:!0,"clear-indicator":!0},r)},o),t||je(Rt,null))},Control:function(e){var t=e.children,r=e.cx,n=e.getStyles,i=e.className,o=e.isDisabled,s=e.isFocused,a=e.innerRef,l=e.innerProps,u=e.menuIsOpen;return je("div",c({ref:a,css:n("control",e),className:r({control:!0,"control--is-disabled":o,"control--is-focused":s,"control--menu-is-open":u},i)},l),t)},DropdownIndicator:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps;return je("div",c({css:i("dropdownIndicator",e),className:n({indicator:!0,"dropdown-indicator":!0},r)},o),t||je(Dt,null))},DownChevron:Dt,CrossIcon:Rt,Group:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,u=e.theme,p=e.selectProps;return je("div",c({css:i("group",e),className:n({group:!0},r)},a),je(o,c({},s,{selectProps:p,theme:u,getStyles:i,cx:n}),l),je("div",null,t))},GroupHeading:function(e){var t=e.getStyles,r=e.cx,n=e.className,i=at(e);i.data;var o=Ue(i,["data"]);return je("div",c({css:t("groupHeading",e),className:r({"group-heading":!0},n)},o))},IndicatorsContainer:function(e){var t=e.children,r=e.className,n=e.cx,i=e.innerProps,o=e.getStyles;return je("div",c({css:o("indicatorsContainer",e),className:n({indicators:!0},r)},i),t)},IndicatorSeparator:function(e){var t=e.className,r=e.cx,n=e.getStyles,i=e.innerProps;return je("span",c({},i,{css:n("indicatorSeparator",e),className:r({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,r=e.cx,n=e.getStyles,i=at(e),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=Ue(i,["innerRef","isDisabled","isHidden"]);return je("div",{css:n("input",e)},je(ze.Z,c({className:r({input:!0},t),inputRef:o,inputStyle:Bt(a),disabled:s},l)))},LoadingIndicator:qt,Menu:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerRef,s=e.innerProps;return je("div",c({css:i("menu",e),className:n({menu:!0},r),ref:o},s),t)},MenuList:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps,s=e.innerRef,a=e.isMulti;return je("div",c({css:i("menuList",e),className:n({"menu-list":!0,"menu-list--is-multi":a},r),ref:s},o),t)},MenuPortal:Tt,LoadingMessage:_t,NoOptionsMessage:Ct,MultiValue:$t,MultiValueContainer:Ut,MultiValueLabel:zt,MultiValueRemove:function(e){var t=e.children,r=e.innerProps;return je("div",r,t||je(Rt,{size:14}))},Option:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.isDisabled,s=e.isFocused,a=e.isSelected,l=e.innerRef,u=e.innerProps;return je("div",c({css:i("option",e),className:n({option:!0,"option--is-disabled":o,"option--is-focused":s,"option--is-selected":a},r),ref:l},u),t)},Placeholder:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps;return je("div",c({css:i("placeholder",e),className:n({placeholder:!0},r)},o),t)},SelectContainer:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.innerProps,s=e.isDisabled,a=e.isRtl;return je("div",c({css:i("container",e),className:n({"--is-disabled":s,"--is-rtl":a},r)},o),t)},SingleValue:function(e){var t=e.children,r=e.className,n=e.cx,i=e.getStyles,o=e.isDisabled,s=e.innerProps;return je("div",c({css:i("singleValue",e),className:n({"single-value":!0,"single-value--is-disabled":o},r)},s),t)},ValueContainer:function(e){var t=e.children,r=e.className,n=e.cx,i=e.innerProps,o=e.isMulti,s=e.getStyles,a=e.hasValue;return je("div",c({css:s("valueContainer",e),className:n({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},r)},i),t)}};function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xt(e){return function(e){if(Array.isArray(e))return Wt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Wt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Zt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Yt(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(n=e[r],i=t[r],!(n===i||Zt(n)&&Zt(i)))return!1;var n,i;return!0}const Jt=function(e,t){var r;void 0===t&&(t=Yt);var n,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&r===this&&t(s,i)||(n=e.apply(this,s),o=!0,r=this,i=s),n}};for(var Kt={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Qt=function(e){return je("span",c({css:Kt},e))},er={guidance:function(e){var t=e.isSearchable,r=e.isMulti,n=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(n?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,r=e.label,n=void 0===r?"":r,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,r=e.focused,n=void 0===r?{}:r,i=e.options,o=e.label,s=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,c=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(s," focused, ").concat(u(a,n),".");if("menu"===t){var p=l?" disabled":"",f="".concat(c?"selected":"focused").concat(p);return"option ".concat(s," ").concat(f,", ").concat(u(i,n),".")}return""},onFilter:function(e){var t=e.inputValue,r=e.resultsMessage;return"".concat(r).concat(t?" for search term "+t:"",".")}},tr=function(e){var t=e.ariaSelection,r=e.focusedOption,n=e.focusedValue,i=e.focusableOptions,o=e.isFocused,s=e.selectValue,a=e.selectProps,l=a.ariaLiveMessages,c=a.getOptionLabel,f=a.inputValue,d=a.isMulti,h=a.isOptionDisabled,m=a.isSearchable,g=a.menuIsOpen,b=a.options,v=a.screenReaderStatus,y=a.tabSelectsValue,w=a["aria-label"],x=a["aria-live"],S=(0,u.useMemo)((function(){return Qe(Qe({},er),l||{})}),[l]),O=(0,u.useMemo)((function(){var e,r="";if(t&&S.onChange){var n=t.option,i=t.removedValue,o=t.value,s=i||n||(e=o,Array.isArray(e)?null:e),a=Qe({isDisabled:s&&h(s),label:s?c(s):""},t);r=S.onChange(a)}return r}),[t,h,c,S]),k=(0,u.useMemo)((function(){var e="",t=r||n,i=!!(r&&s&&s.includes(r));if(t&&S.onFocus){var o={focused:t,label:c(t),isDisabled:h(t),isSelected:i,options:b,context:t===r?"menu":"value",selectValue:s};e=S.onFocus(o)}return e}),[r,n,c,h,S,b,s]),C=(0,u.useMemo)((function(){var e="";if(g&&b.length&&S.onFilter){var t=v({count:i.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,g,S,b,v]),_=(0,u.useMemo)((function(){var e="";if(S.guidance){var t=n?"value":g?"menu":"input";e=S.guidance({"aria-label":w,context:t,isDisabled:r&&h(r),isMulti:d,isSearchable:m,tabSelectsValue:y})}return e}),[w,r,n,d,h,m,g,S,y]),E="".concat(k," ").concat(C," ").concat(_);return je(Qt,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text"},o&&je(p().Fragment,null,je("span",{id:"aria-selection"},O),je("span",{id:"aria-context"},E)))},rr=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],nr=new RegExp("["+rr.map((function(e){return e.letters})).join("")+"]","g"),ir={},or=0;or<rr.length;or++)for(var sr=rr[or],ar=0;ar<sr.letters.length;ar++)ir[sr.letters[ar]]=sr.base;var lr=function(e){return e.replace(nr,(function(e){return ir[e]}))},cr=Jt(lr),ur=function(e){return e.replace(/^\s+|\s+$/g,"")},pr=function(e){return"".concat(e.label," ").concat(e.value)};function fr(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var r=Ue(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return je("input",c({ref:t},r,{css:Ve({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var dr=["boxSizing","height","overflow","paddingRight","position"],hr={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function mr(e){e.preventDefault()}function gr(e){e.stopPropagation()}function br(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;0===e?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function vr(){return"ontouchstart"in window||navigator.maxTouchPoints}var yr=!("undefined"==typeof window||!window.document||!window.document.createElement),wr=0,xr={capture:!1,passive:!1};var Sr=function(){return document.activeElement&&document.activeElement.blur()},Or={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function kr(e){var t=e.children,r=e.lockEnabled,n=e.captureEnabled,i=function(e){var t=e.isEnabled,r=e.onBottomArrive,n=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=(0,u.useRef)(!1),a=(0,u.useRef)(!1),l=(0,u.useRef)(0),c=(0,u.useRef)(null),p=(0,u.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,p=l.scrollHeight,f=l.clientHeight,d=c.current,h=t>0,m=p-f-u,g=!1;m>t&&s.current&&(n&&n(e),s.current=!1),h&&a.current&&(o&&o(e),a.current=!1),h&&t>m?(r&&!s.current&&r(e),d.scrollTop=p,g=!0,s.current=!0):!h&&-t>u&&(i&&!a.current&&i(e),d.scrollTop=0,g=!0,a.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),f=(0,u.useCallback)((function(e){p(e,e.deltaY)}),[p]),d=(0,u.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),h=(0,u.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)}),[p]),m=(0,u.useCallback)((function(e){if(e){var t=!!bt&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",f,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",h,t)}}),[h,d,f]),g=(0,u.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",f,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",h,!1))}),[h,d,f]);return(0,u.useEffect)((function(){if(t){var e=c.current;return m(e),function(){g(e)}}}),[t,m,g]),function(e){c.current=e}}({isEnabled:void 0===n||n,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,r=e.accountForScrollbars,n=void 0===r||r,i=(0,u.useRef)({}),o=(0,u.useRef)(null),s=(0,u.useCallback)((function(e){if(yr){var t=document.body,r=t&&t.style;if(n&&dr.forEach((function(e){var t=r&&r[e];i.current[e]=t})),n&&wr<1){var o=parseInt(i.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+o||0;Object.keys(hr).forEach((function(e){var t=hr[e];r&&(r[e]=t)})),r&&(r.paddingRight="".concat(a,"px"))}t&&vr()&&(t.addEventListener("touchmove",mr,xr),e&&(e.addEventListener("touchstart",br,xr),e.addEventListener("touchmove",gr,xr))),wr+=1}}),[]),a=(0,u.useCallback)((function(e){if(yr){var t=document.body,r=t&&t.style;wr=Math.max(wr-1,0),n&&wr<1&&dr.forEach((function(e){var t=i.current[e];r&&(r[e]=t)})),t&&vr()&&(t.removeEventListener("touchmove",mr,xr),e&&(e.removeEventListener("touchstart",br,xr),e.removeEventListener("touchmove",gr,xr)))}}),[]);return(0,u.useEffect)((function(){if(t){var e=o.current;return s(e),function(){a(e)}}}),[t,s,a]),function(e){o.current=e}}({isEnabled:r});return je(p().Fragment,null,r&&je("div",{onClick:Sr,css:Or}),t((function(e){i(e),o(e)})))}var Cr={clearIndicator:jt,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,r=e.isFocused,n=e.theme,i=n.colors,o=n.borderRadius,s=n.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:r?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:r?i.primary:i.neutral30}}},dropdownIndicator:Lt,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,r=e.theme,n=r.spacing.baseUnit,i=r.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*n,marginTop:2*n,width:1}},input:function(e){var t=e.isDisabled,r=e.theme,n=r.spacing,i=r.colors;return{margin:n.baseUnit/2,paddingBottom:n.baseUnit/2,paddingTop:n.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,r=e.size,n=e.theme,i=n.colors,o=n.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"}},loadingMessage:kt,menu:function(e){var t,r=e.placement,n=e.theme,o=n.borderRadius,s=n.spacing,a=n.colors;return i(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),i(t,"backgroundColor",a.neutral0),i(t,"borderRadius",o),i(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),i(t,"marginBottom",s.menuGutter),i(t,"marginTop",s.menuGutter),i(t,"position","absolute"),i(t,"width","100%"),i(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,r=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:r,paddingTop:r,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,r=e.offset,n=e.position;return{left:t.left,position:n,top:r,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,r=t.spacing,n=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:n/2,display:"flex",margin:r.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,r=t.borderRadius,n=t.colors,i=e.cropWithEllipsis;return{borderRadius:r/2,color:n.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,r=t.spacing,n=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:n/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:Ot,option:function(e){var t=e.isDisabled,r=e.isFocused,n=e.isSelected,i=e.theme,o=i.spacing,s=i.colors;return{label:"option",backgroundColor:n?s.primary:r?s.primary25:"transparent",color:t?s.neutral20:n?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(n?s.primary:s.primary50)}}},placeholder:function(e){var t=e.theme,r=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,r=e.theme,n=r.spacing,i=r.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,maxWidth:"calc(100% - ".concat(2*n.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var _r,Er={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Tr={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:dt(),captureMenuScroll:!dt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var r=Qe({ignoreCase:!0,ignoreAccents:!0,stringify:pr,trim:!0,matchFrom:"any"},_r),n=r.ignoreCase,i=r.ignoreAccents,o=r.stringify,s=r.trim,a=r.matchFrom,l=s?ur(t):t,c=s?ur(o(e)):o(e);return n&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=cr(l),c=lr(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Nr(e,t,r,n){return{type:"option",data:t,isDisabled:Ir(e,t,r),isSelected:Lr(e,t,r),label:Rr(e,t),value:Dr(e,t),index:n}}function Pr(e,t){return e.options.map((function(r,n){if(r.options){var i=r.options.map((function(r,n){return Nr(e,r,t,n)})).filter((function(t){return Ar(e,t)}));return i.length>0?{type:"group",data:r,options:i,index:n}:void 0}var o=Nr(e,r,t,n);return Ar(e,o)?o:void 0})).filter((function(e){return!!e}))}function Mr(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Xt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Ar(e,t){var r=e.inputValue,n=void 0===r?"":r,i=t.data,o=t.isSelected,s=t.label,a=t.value;return(!Vr(e)||!o)&&jr(e,{label:s,value:a,data:i},n)}var Rr=function(e,t){return e.getOptionLabel(t)},Dr=function(e,t){return e.getOptionValue(t)};function Ir(e,t,r){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,r)}function Lr(e,t,r){if(r.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,r);var n=Dr(e,t);return r.some((function(t){return Dr(e,t)===n}))}function jr(e,t,r){return!e.filterOption||e.filterOption(t,r)}var Vr=function(e){var t=e.hideSelectedOptions,r=e.isMulti;return void 0===t?r:t},Fr=1,qr=function(e){Ze(r,e);var t=rt(r);function r(e){var n;return $e(this,r),(n=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},n.blockOptionHover=!1,n.isComposing=!1,n.commonProps=void 0,n.initialTouchX=0,n.initialTouchY=0,n.instancePrefix="",n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.controlRef=null,n.getControlRef=function(e){n.controlRef=e},n.focusedOptionRef=null,n.getFocusedOptionRef=function(e){n.focusedOptionRef=e},n.menuListRef=null,n.getMenuListRef=function(e){n.menuListRef=e},n.inputRef=null,n.getInputRef=function(e){n.inputRef=e},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(e,t){var r=n.props,i=r.onChange,o=r.name;t.name=o,n.ariaOnChange(e,t),i(e,t)},n.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",r=arguments.length>2?arguments[2]:void 0,i=n.props,o=i.closeMenuOnSelect,s=i.isMulti;n.onInputChange("",{action:"set-value"}),o&&(n.setState({inputIsHiddenAfterUpdate:!s}),n.onMenuClose()),n.setState({clearFocusValueOnUpdate:!0}),n.onChange(e,{action:t,option:r})},n.selectOption=function(e){var t=n.props,r=t.blurInputOnSelect,i=t.isMulti,o=t.name,s=n.state.selectValue,a=i&&n.isOptionSelected(e,s),l=n.isOptionDisabled(e,s);if(a){var c=n.getOptionValue(e);n.setValue(s.filter((function(e){return n.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void n.ariaOnChange(e,{action:"select-option",name:o});i?n.setValue([].concat(Xt(s),[e]),"select-option",e):n.setValue(e,"select-option")}r&&n.blurInput()},n.removeValue=function(e){var t=n.props.isMulti,r=n.state.selectValue,i=n.getOptionValue(e),o=r.filter((function(e){return n.getOptionValue(e)!==i})),s=t?o:o[0]||null;n.onChange(s,{action:"remove-value",removedValue:e}),n.focusInput()},n.clearValue=function(){var e=n.state.selectValue;n.onChange(n.props.isMulti?[]:null,{action:"clear",removedValues:e})},n.popValue=function(){var e=n.props.isMulti,t=n.state.selectValue,r=t[t.length-1],i=t.slice(0,t.length-1),o=e?i:i[0]||null;n.onChange(o,{action:"pop-value",removedValue:r})},n.getValue=function(){return n.state.selectValue},n.cx=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ot.apply(void 0,[n.props.classNamePrefix].concat(t))},n.getOptionLabel=function(e){return Rr(n.props,e)},n.getOptionValue=function(e){return Dr(n.props,e)},n.getStyles=function(e,t){var r=Cr[e](t);r.boxSizing="border-box";var i=n.props.styles[e];return i?i(r,t):r},n.getElementId=function(e){return"".concat(n.instancePrefix,"-").concat(e)},n.getComponents=function(){return e=n.props,Qe(Qe({},Gt),e.components);var e},n.buildCategorizedOptions=function(){return Pr(n.props,n.state.selectValue)},n.getCategorizedOptions=function(){return n.props.menuIsOpen?n.buildCategorizedOptions():[]},n.buildFocusableOptions=function(){return Mr(n.buildCategorizedOptions())},n.getFocusableOptions=function(){return n.props.menuIsOpen?n.buildFocusableOptions():[]},n.ariaOnChange=function(e,t){n.setState({ariaSelection:Qe({value:e},t)})},n.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(e){n.blockOptionHover=!1},n.onControlMouseDown=function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},n.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,r=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.setState({inputIsHiddenAfterUpdate:!r}),n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}},n.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,"touchend"===e.type?n.focusInput():setTimeout((function(){return n.focusInput()})))},n.onScroll=function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&<(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(e){var t=e.touches,r=t&&t.item(0);r&&(n.initialTouchX=r.clientX,n.initialTouchY=r.clientY,n.userIsDragging=!1)},n.onTouchMove=function(e){var t=e.touches,r=t&&t.item(0);if(r){var i=Math.abs(r.clientX-n.initialTouchX),o=Math.abs(r.clientY-n.initialTouchY);n.userIsDragging=i>5||o>5}},n.onTouchEnd=function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(e){n.userIsDragging||n.onControlMouseDown(e)},n.onClearIndicatorTouchEnd=function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)},n.onDropdownIndicatorTouchEnd=function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)},n.handleInputChange=function(e){var t=e.currentTarget.value;n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange(t,{action:"input-change"}),n.props.menuIsOpen||n.onMenuOpen()},n.onInputFocus=function(e){n.props.onFocus&&n.props.onFocus(e),n.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))},n.onOptionHover=function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})},n.shouldHideSelectedOptions=function(){return Vr(n.props)},n.onKeyDown=function(e){var t=n.props,r=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=n.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||s)return;n.focusValue("previous");break;case"ArrowRight":if(!r||s)return;n.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)n.removeValue(m);else{if(!i)return;r?n.popValue():a&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!c||!p||!h||f&&n.isOptionSelected(h,g))return;n.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(n.isComposing)return;n.selectOption(h);break}return;case"Escape":c?(n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):a&&o&&n.clearValue();break;case" ":if(s)return;if(!c){n.openMenu("first");break}if(!h)return;n.selectOption(h);break;case"ArrowUp":c?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":c?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!c)return;n.focusOption("pageup");break;case"PageDown":if(!c)return;n.focusOption("pagedown");break;case"Home":if(!c)return;n.focusOption("first");break;case"End":if(!c)return;n.focusOption("last");break;default:return}e.preventDefault()}},n.instancePrefix="react-select-"+(n.props.instanceId||++Fr),n.state.selectValue=st(e.value),n}return We(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,r,n,i,o,s=this.props,a=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&a&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,r=this.focusedOptionRef,n=t.getBoundingClientRect(),i=r.getBoundingClientRect(),o=r.offsetHeight/3,i.bottom+o>n.bottom?ut(t,Math.min(r.offsetTop+r.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o<n.top&&ut(t,Math.max(r.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,r=this.state,n=r.selectValue,i=r.isFocused,o=this.buildFocusableOptions(),s="first"===e?0:o.length-1;if(!this.props.isMulti){var a=o.indexOf(n[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[s]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,r=t.selectValue,n=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=r.indexOf(n);n||(i=-1);var o=r.length-1,s=-1;if(r.length){switch(e){case"previous":s=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(s=i+1)}this.setState({inputIsHidden:-1!==s,focusedValue:r[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,r=this.state.focusedOption,n=this.getFocusableOptions();if(n.length){var i=0,o=n.indexOf(r);r||(o=-1),"up"===e?i=o>0?o-1:n.length-1:"down"===e?i=(o+1)%n.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>n.length-1&&(i=n.length-1):"last"===e&&(i=n.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:n[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Er):Qe(Qe({},Er),this.props.theme):Er}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,r=this.getStyles,n=this.getValue,i=this.selectOption,o=this.setValue,s=this.props,a=s.isMulti,l=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:r,getValue:n,hasValue:this.hasValue(),isMulti:a,isRtl:l,options:c,selectOption:i,selectProps:s,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,r=e.isMulti;return void 0===t?r:t}},{key:"isOptionDisabled",value:function(e,t){return Ir(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Lr(this.props,e,t)}},{key:"filterOption",value:function(e,t){return jr(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var r=this.props.inputValue,n=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:r,selectValue:n})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,r=e.isSearchable,n=e.inputId,i=e.inputValue,o=e.tabIndex,s=e.form,a=this.getComponents().Input,l=this.state.inputIsHidden,u=this.commonProps,f=n||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return r?p().createElement(a,c({},u,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:s,type:"text",value:i},d)):p().createElement(fr,c({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:nt,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:s,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),r=t.MultiValue,n=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,s=t.SingleValue,a=t.Placeholder,l=this.commonProps,u=this.props,f=u.controlShouldRenderValue,d=u.isDisabled,h=u.isMulti,m=u.inputValue,g=u.placeholder,b=this.state,v=b.selectValue,y=b.focusedValue,w=b.isFocused;if(!this.hasValue()||!f)return m?null:p().createElement(a,c({},l,{key:"placeholder",isDisabled:d,isFocused:w}),g);if(h){var x=v.map((function(t,s){var a=t===y;return p().createElement(r,c({},l,{components:{Container:n,Label:i,Remove:o},isFocused:a,isDisabled:d,key:"".concat(e.getOptionValue(t)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return x}if(m)return null;var S=v[0];return p().createElement(s,c({},l,{data:S,isDisabled:d}),this.formatOptionLabel(S,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||n||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p().createElement(e,c({},t,{innerProps:s,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,r=this.props,n=r.isDisabled,i=r.isLoading,o=this.state.isFocused;if(!e||!i)return null;return p().createElement(e,c({},t,{innerProps:{"aria-hidden":"true"},isDisabled:n,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,r=e.IndicatorSeparator;if(!t||!r)return null;var n=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return p().createElement(r,c({},n,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,r=this.props.isDisabled,n=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p().createElement(e,c({},t,{innerProps:i,isDisabled:r,isFocused:n}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),r=t.Group,n=t.GroupHeading,i=t.Menu,o=t.MenuList,s=t.MenuPortal,a=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,f=this.commonProps,d=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,g=h.inputValue,b=h.isLoading,v=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,x=h.menuIsOpen,S=h.menuPlacement,O=h.menuPosition,k=h.menuPortalTarget,C=h.menuShouldBlockScroll,_=h.menuShouldScrollIntoView,E=h.noOptionsMessage,T=h.onMenuScrollToTop,N=h.onMenuScrollToBottom;if(!x)return null;var P,M=function(t,r){var n=t.type,i=t.data,o=t.isDisabled,s=t.isSelected,a=t.label,l=t.value,h=d===i,m=o?void 0:function(){return e.onOptionHover(i)},g=o?void 0:function(){return e.selectOption(i)},b="".concat(e.getElementId("option"),"-").concat(r),v={id:b,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return p().createElement(u,c({},f,{innerProps:v,data:i,isDisabled:o,isSelected:s,key:b,label:a,type:n,value:l,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,o=t.options,s=t.index,a="".concat(e.getElementId("group"),"-").concat(s),l="".concat(a,"-heading");return p().createElement(r,c({},f,{key:a,data:i,options:o,Heading:n,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return M(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return M(t,"".concat(t.index))}));else if(b){var A=v({inputValue:g});if(null===A)return null;P=p().createElement(a,f,A)}else{var R=E({inputValue:g});if(null===R)return null;P=p().createElement(l,f,R)}var D={minMenuHeight:y,maxMenuHeight:w,menuPlacement:S,menuPosition:O,menuShouldScrollIntoView:_},I=p().createElement(xt,c({},f,D),(function(t){var r=t.ref,n=t.placerProps,s=n.placement,a=n.maxHeight;return p().createElement(i,c({},f,D,{innerRef:r,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:s}),p().createElement(kr,{captureEnabled:m,onTopArrive:T,onBottomArrive:N,lockEnabled:C},(function(t){return p().createElement(o,c({},f,{innerRef:function(r){e.getMenuListRef(r),t(r)},isLoading:b,maxHeight:a,focusedOption:d}),P)})))}));return k||"fixed"===O?p().createElement(s,c({},f,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:O}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,r=t.delimiter,n=t.isDisabled,i=t.isMulti,o=t.name,s=this.state.selectValue;if(o&&!n){if(i){if(r){var a=s.map((function(t){return e.getOptionValue(t)})).join(r);return p().createElement("input",{name:o,type:"hidden",value:a})}var l=s.length>0?s.map((function(t,r){return p().createElement("input",{key:"i-".concat(r),name:o,type:"hidden",value:e.getOptionValue(t)})})):p().createElement("input",{name:o,type:"hidden"});return p().createElement("div",null,l)}var c=s[0]?this.getOptionValue(s[0]):"";return p().createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,r=t.ariaSelection,n=t.focusedOption,i=t.focusedValue,o=t.isFocused,s=t.selectValue,a=this.getFocusableOptions();return p().createElement(tr,c({},e,{ariaSelection:r,focusedOption:n,focusedValue:i,isFocused:o,selectValue:s,focusableOptions:a}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,r=e.IndicatorsContainer,n=e.SelectContainer,i=e.ValueContainer,o=this.props,s=o.className,a=o.id,l=o.isDisabled,u=o.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return p().createElement(n,c({},d,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),p().createElement(t,c({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:u}),p().createElement(i,c({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),p().createElement(r,c({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var r=t.prevProps,n=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,o=e.options,s=e.value,a=e.menuIsOpen,l=e.inputValue,c={};if(r&&(s!==r.value||o!==r.options||a!==r.menuIsOpen||l!==r.inputValue)){var u=st(s),p=a?function(e,t){return Mr(Pr(e,t))}(e,u):[],f=n?function(e,t){var r=e.focusedValue,n=e.selectValue.indexOf(r);if(n>-1){if(t.indexOf(r)>-1)return r;if(n<t.length)return t[n]}return null}(t,u):null,d=function(e,t){var r=e.focusedOption;return r&&t.indexOf(r)>-1?r:t[0]}(t,p);c={selectValue:u,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=i&&e!==r?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return Qe(Qe(Qe({},c),h),{},{prevProps:e})}}]),r}(u.Component);qr.defaultProps=Tr;var Br,Hr,Ur,zr={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},$r=(u.Component,Br=qr,Ur=Hr=function(e){Ze(r,e);var t=rt(r);function r(){var e;$e(this,r);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,r){e.callProp("onChange",t,r),e.setState({value:t})},e.onInputChange=function(t,r){var n=e.callProp("onInputChange",t,r);e.setState({inputValue:void 0!==n?n:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return We(r,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return(t=this.props)[e].apply(t,n)}}},{key:"render",value:function(){var e=this,t=this.props;t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue;var r=Ue(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return p().createElement(Br,c({},r,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),r}(u.Component),Hr.defaultProps=zr,Ur);const Gr=$r,Wr=window.wp.i18n,Xr=window.wp.compose;var Zr=r(5697),Yr=r.n(Zr),Jr=r(4184),Kr=r.n(Jr),Qr="/home/runner/work/pods/pods/ui/js/blocks/src/components/CheckboxGroup/index.js",en=void 0,tn=function(e){var t=e.id,r=e.className,n=e.heading,i=e.help,o=e.options,s=e.values,a=e.onChange,c=function(e,t){var r=Xt(s),n=r.findIndex((function(t){return t.value===e}));-1!==n?r[n].checked=t:r.push({value:e,checked:t}),a(r)};return React.createElement("fieldset",{className:Kr()("components-block-fields-checkbox-group",r),__self:en,__source:{fileName:Qr,lineNumber:43,columnNumber:3}},n&&React.createElement("legend",{__self:en,__source:{fileName:Qr,lineNumber:44,columnNumber:17}},n),o.map((function(e){var t=s.find((function(t){return t.value===e.value}))||!1;return React.createElement(l.CheckboxControl,{key:e.value,label:e.label,checked:t.checked||!1,onChange:function(t){return c(e.value,t)},__self:en,__source:{fileName:Qr,lineNumber:50,columnNumber:6}})})),!!i&&React.createElement("p",{id:t+"__help",className:"components-block-fields-checkbox-group__help",__self:en,__source:{fileName:Qr,lineNumber:60,columnNumber:5}},i))};tn.propTypes={id:Yr().string,className:Yr().string,heading:Yr().string,help:Yr().string,options:Yr().arrayOf(Yr().shape({label:Yr().string.isRequired,value:Yr().string.isRequired})),values:Yr().arrayOf(Yr().shape({value:Yr().string.isRequired,checked:Yr().bool})),onChange:Yr().func.isRequired},tn.defaultProps={id:"",className:null,heading:null,help:null,options:[],values:[]};const rn=tn;var nn="/home/runner/work/pods/pods/ui/js/blocks/src/components/CheckboxControlExtended/index.js",on=void 0,sn=function(e){var t=e.className,r=e.heading,n=e.label,i=e.help,o=e.checked,s=e.onChange;return React.createElement("fieldset",{className:Kr()("components-block-fields-checkbox-control",t),__self:on,__source:{fileName:nn,lineNumber:23,columnNumber:3}},r&&React.createElement("legend",{__self:on,__source:{fileName:nn,lineNumber:24,columnNumber:17}},r),React.createElement(l.CheckboxControl,{label:n,help:i,checked:o,onChange:s,__self:on,__source:{fileName:nn,lineNumber:25,columnNumber:4}}))};sn.propTypes={className:Yr().string,heading:Yr().string,label:Yr().string,help:Yr().string,checked:Yr().bool,onChange:Yr().func.isRequired},sn.defaultProps={className:null,heading:null,label:null,help:null,checked:!1};const an=sn,ln=window.lodash,cn=window.wp.keycodes;var un=["className","isShiftStepEnabled","max","min","onChange","onKeyDown","shiftStep","step"];function pn(e){var t=e.className,r=e.isShiftStepEnabled,n=void 0===r||r,i=e.max,o=void 0===i?1/0:i,s=e.min,a=void 0===s?-1/0:s,l=e.onChange,u=void 0===l?ln.noop:l,p=e.onKeyDown,f=void 0===p?ln.noop:p,d=e.shiftStep,h=void 0===d?10:d,m=e.step,g=void 0===m?1:m,b=Ue(e,un),v=(0,ln.clamp)(0,a,o),y=Kr()("component-number-control",t);return React.createElement("input",c({inputMode:"numeric"},b,{className:y,type:"number",onChange:function(e){u(e.target.value,{event:e})},onKeyDown:function(e){f(e);var t=e.target.value,r=""===t,i=e.shiftKey&&n?parseFloat(h):parseFloat(g),s=r?v:t;switch(s=parseFloat(s),e.keyCode){case cn.UP:e.preventDefault(),s+=i,s=(0,ln.clamp)(s,a,o),u(s.toString(),{event:e});break;case cn.DOWN:e.preventDefault(),s-=i,s=(0,ln.clamp)(s,a,o),u(s.toString(),{event:e})}},__self:this,__source:{fileName:"/home/runner/work/pods/pods/ui/js/blocks/src/components/NumberControl/index.js",lineNumber:70,columnNumber:3}}))}var fn="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/components/RenderedField.js",dn=void 0;function hn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const gn=function(e){var t=e.field,r=e.attributes,n=e.setAttributes,o=t.name,s=t.type,c=t.fieldOptions,u=void 0===c?{}:c,p=r[o],f=function(e,t,r){return function(n){t(i({},e,"NumberControl"===r?parseInt(n,10):n))}}(o,n,s);switch(s){case"TextControl":var d=u.fieldType,h=void 0===d?"text":d,m=u.help,g=u.label;return React.createElement(l.TextControl,{key:o,label:g,value:p,type:h,help:m,onChange:f,__self:dn,__source:{fileName:fn,lineNumber:83,columnNumber:5}});case"TextareaControl":var b=u.help,v=u.label;return React.createElement(l.TextareaControl,{key:o,label:v,value:p,help:b,rows:"4",onChange:f,__self:dn,__source:{fileName:fn,lineNumber:100,columnNumber:5}});case"RichText":var y=u.tagName,w=void 0===y?"p":y;return React.createElement(a.RichText,{key:o,tagName:w,value:p,onChange:f,__self:dn,__source:{fileName:fn,lineNumber:114,columnNumber:5}});case"CheckboxControl":var x=u.label,S=u.help,O=u.heading,k=void 0===O?"":O;return React.createElement(an,{key:o,heading:k,label:x,help:S,checked:p,onChange:f,__self:dn,__source:{fileName:fn,lineNumber:130,columnNumber:5}});case"CheckboxGroup":var C=u.help,_=u.options,E=u.heading,T=void 0===E?"":E;return React.createElement(rn,{key:o,heading:T,help:C,options:_,values:p,onChange:f,__self:dn,__source:{fileName:fn,lineNumber:148,columnNumber:5}});case"RadioControl":var N=u.help,P=u.options;return React.createElement(l.RadioControl,{key:o,help:N,options:P,selected:p,onChange:f,__self:dn,__source:{fileName:fn,lineNumber:165,columnNumber:5}});case"SelectControl":var M=u.options,A=u.multiple,R=u.label,D=(0,Xr.useInstanceId)(Gr),I="inspector-select-control-".concat(D);return React.createElement(l.BaseControl,{label:R,id:I,key:o,className:"full-width-base-control",__self:dn,__source:{fileName:fn,lineNumber:185,columnNumber:5}},React.createElement(Gr,{id:I,name:o,options:M,value:p,isMulti:A,onChange:f,styles:{container:function(e){return mn(mn({},e),{},{width:"100%"})}},__self:dn,__source:{fileName:fn,lineNumber:191,columnNumber:6}}));case"DateTimePicker":var L=u.is12Hour,j=u.label;return React.createElement(l.BaseControl,{label:j,key:o,__self:dn,__source:{fileName:fn,lineNumber:215,columnNumber:5}},React.createElement(l.DateTimePicker,{currentDate:p,onChange:f,is12Hour:L,__self:dn,__source:{fileName:fn,lineNumber:219,columnNumber:6}}));case"NumberControl":var V=u.isShiftStepEnabled,F=u.shiftStep,q=u.label,B=u.max,H=void 0===B?1/0:B,U=u.min,z=void 0===U?-1/0:U,$=u.step,G=void 0===$?1:$,W=(0,Xr.useInstanceId)(pn),X="inspector-number-control-".concat(W);return React.createElement(l.BaseControl,{label:q,id:X,key:o,__self:dn,__source:{fileName:fn,lineNumber:241,columnNumber:5}},React.createElement(pn,{id:X,onChange:f,isShiftStepEnabled:V,shiftStep:F,max:H,min:z,step:G,value:p||"",__self:dn,__source:{fileName:fn,lineNumber:246,columnNumber:6}}));case"MediaUpload":return React.createElement("div",{__self:dn,__source:{fileName:fn,lineNumber:263,columnNumber:5}},React.createElement(a.MediaUploadCheck,{__self:dn,__source:{fileName:fn,lineNumber:264,columnNumber:6}},React.createElement(a.MediaUpload,{onSelect:function(e){f({id:e.id,url:e.url,title:e.title})},allowedTypes:["image"],value:p,render:function(e){var t=e.open;return React.createElement(l.Button,{onClick:t,isPrimary:!0,__self:dn,__source:{fileName:fn,lineNumber:272,columnNumber:9}},(0,Wr.__)("Upload"))},__self:dn,__source:{fileName:fn,lineNumber:265,columnNumber:7}})),!!p&&React.createElement(l.Button,{onClick:function(){return f(null)},isSecondary:!0,__self:dn,__source:{fileName:fn,lineNumber:279,columnNumber:7}},(0,Wr.__)("Remove Upload")),p&&!!p.title&&React.createElement("div",{__self:dn,__source:{fileName:fn,lineNumber:287,columnNumber:7}},p.title));case"ColorPicker":return React.createElement(l.ColorPicker,{color:p,onChangeComplete:function(e){return f(e.hex)},disableAlpha:!0,__self:dn,__source:{fileName:fn,lineNumber:296,columnNumber:5}});default:return null}};var bn="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/components/FieldInspectorControls.js",vn=void 0;const yn=function(e){var t=e.fields,r=void 0===t?[]:t,n=e.attributes,i=e.setAttributes;return r.length?React.createElement("div",{className:"pods-inspector-rows",__self:vn,__source:{fileName:bn,lineNumber:29,columnNumber:3}},r.map((function(e){var t=e.name;return React.createElement(l.PanelRow,{key:t,className:"pods-inspector-row",__self:vn,__source:{fileName:bn,lineNumber:36,columnNumber:6}},React.createElement(gn,{field:e,attributes:n,setAttributes:i,__self:vn,__source:{fileName:bn,lineNumber:37,columnNumber:7}}))}))):null};var wn=r(1036),xn=r.n(wn);const Sn=window.wp.autop,On=window.wp.date,kn=window.wp.serverSideRender;var Cn=r.n(kn);function _n(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},En(e)}const Tn=window.wp.element,Nn=window.wp.apiFetch;var Pn=r.n(Nn);const Mn=window.wp.url;var An="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/components/PodsServerSideRender.js",Rn=void 0;function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=En(e);if(t){var i=En(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _n(this,r)}}function In(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ln(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?In(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):In(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var jn=function(e){Ze(r,e);var t=Dn(r);function r(e){var n;return $e(this,r),(n=t.call(this,e)).state={response:null},n}return We(r,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.fetch(this.props),this.fetch=(0,ln.debounce)(this.fetch,500)}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"componentDidUpdate",value:function(e){(0,ln.isEqual)(e,this.props)||this.fetch(this.props)}},{key:"fetch",value:function(e){var t=this;if(this.isStillMounted){null!==this.state.response&&this.setState({response:null});var r=e.block,n=e.attributes,i=void 0===n?null:n,o=e.httpMethod,s=void 0===o?"GET":o,a=e.urlQueryArgs,l="POST"===s,c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,Mn.addQueryArgs)("/wp/v2/block-renderer/".concat(e),Ln(Ln({context:"edit"},null!==t?{attributes:t}:{}),r))}(r,l?null:i,void 0===a?{}:a),u=l?{attributes:i}:null,p=this.currentFetchRequest=Pn()({path:c,data:u,method:l?"POST":"GET"}).then((function(e){t.isStillMounted&&p===t.currentFetchRequest&&e&&t.setState({response:e.rendered})})).catch((function(e){t.isStillMounted&&p===t.currentFetchRequest&&t.setState({response:{error:!0,errorMsg:e.message}})}));return p}}},{key:"render",value:function(){var e=this,t=this.state.response,r=this.props,n=r.className,i=r.EmptyResponsePlaceholder,o=r.ErrorResponsePlaceholder,l=r.LoadingResponsePlaceholder;return""===t?React.createElement(i,c({response:t},this.props,{__self:this,__source:{fileName:An,lineNumber:117,columnNumber:11}})):t?t.error?React.createElement(o,c({response:t},this.props,{__self:this,__source:{fileName:An,lineNumber:126,columnNumber:5}})):s(t,{replace:function(t){if("innerblocks"===t.name)return void 0!==t.attribs.template&&(t.attribs.template=JSON.parse(t.attribs.template)),void 0!==t.attribs.allowedBlocks&&(t.attribs.allowedBlocks=JSON.parse(t.attribs.allowedBlocks)),void 0!==t.attribs.templateLock&&"false"===t.attribs.templateLock&&(t.attribs.templateLock=!1),React.createElement(a.InnerBlocks,c({className:n},t.attribs,{__self:e,__source:{fileName:An,lineNumber:144,columnNumber:13}}))}}):React.createElement(l,c({response:t},this.props,{__self:this,__source:{fileName:An,lineNumber:121,columnNumber:5}}))}}]),r}(Tn.Component);jn.defaultProps={EmptyResponsePlaceholder:function(e){var t=e.className;return React.createElement(l.Placeholder,{className:t,__self:Rn,__source:{fileName:An,lineNumber:153,columnNumber:3}},(0,Wr.__)("Block rendered as empty."))},ErrorResponsePlaceholder:function(e){var t=e.response,r=e.className,n=(0,Wr.sprintf)((0,Wr.__)("Error loading block: %s"),t.errorMsg);return React.createElement(l.Placeholder,{className:r,__self:Rn,__source:{fileName:An,lineNumber:163,columnNumber:10}},n)},LoadingResponsePlaceholder:function(e){var t=e.className;return React.createElement(l.Placeholder,{className:t,__self:Rn,__source:{fileName:An,lineNumber:167,columnNumber:4}},React.createElement(l.Spinner,{__self:Rn,__source:{fileName:An,lineNumber:168,columnNumber:5}}))}};const Vn=jn;var Fn={allowedTags:["blockquote","caption","div","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","li","ol","p","pre","section","table","tbody","td","th","thead","tr","ul","a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],allowedAttributes:{"*":["class","id","data-*","style"],iframe:["*"],a:["href","name","target"],img:["src","srcset","sizes","alt","width","height"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},qn={allowedTags:[],allowedAttributes:{}};function Bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Un=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=xn()(e,Fn),a=[];return t.forEach((function(e){var t="function"==typeof i?n(e,r,i):n(e,r);t&&(a[e.name]=Hn({},t.props));var s=t?(0,Tn.renderToString)(t):"";o=o.replace(new RegExp("{@".concat(e.name,"}"),"g"),s)})),s(o)};var zn="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/components/BlockPreview.js",$n=void 0,Gn=function(e,t){var r=e.name,n=e.fieldOptions,i=e.type,o=t[r];if(void 0===o)return null;switch(i){case"TextControl":return React.createElement("div",{key:r,className:"field--textcontrol",__self:$n,__source:{fileName:zn,lineNumber:51,columnNumber:5}},xn()(o,qn));case"TextareaControl":var s=n.auto_p,l=xn()(o,qn);return React.createElement("div",{key:r,className:"field--textareacontrol",dangerouslySetInnerHTML:{__html:s?(0,Sn.autop)(l):l},__self:$n,__source:{fileName:zn,lineNumber:64,columnNumber:5}});case"RichText":return React.createElement(a.RichText.Content,{key:r,tagName:"p",value:o,className:"field--richtext",__self:$n,__source:{fileName:zn,lineNumber:75,columnNumber:5}});case"CheckboxControl":return React.createElement("div",{key:r,className:"field--checkbox",__self:$n,__source:{fileName:zn,lineNumber:85,columnNumber:5}},o?(0,Wr.__)("Yes"):(0,Wr.__)("No"));case"CheckboxGroup":var c=n.options,u=Array.isArray(o)?o.filter((function(e){return!!e.checked})):[];return React.createElement("div",{key:r,className:"field--checkbox-group",__self:$n,__source:{fileName:zn,lineNumber:100,columnNumber:5}},u.length?u.map((function(e,t){var r=c.find((function(t){return e.value===t.value}));return React.createElement("span",{className:"field--checkbox-group__item",key:e.value,__self:$n,__source:{fileName:zn,lineNumber:106,columnNumber:9}},r.label,t<u.length-1?", ":"")})):"N/A");case"RadioControl":var p=n.options.find((function(e){return o===e.value}));return React.createElement("div",{key:r,className:"field--radio-control",__self:$n,__source:{fileName:zn,lineNumber:125,columnNumber:5}},p?p.label:"N/A");case"SelectControl":if(!Array.isArray(o))return React.createElement("div",{key:r,className:"field--select-control",__self:$n,__source:{fileName:zn,lineNumber:134,columnNumber:6}},o.label||"N/A");var f=o;return React.createElement("div",{key:r,className:"field--select-control field--multiple-select-control",__self:$n,__source:{fileName:zn,lineNumber:142,columnNumber:5}},f.length?f.map((function(e,t){return React.createElement("span",{className:"field--select-group__item",key:e,__self:$n,__source:{fileName:zn,lineNumber:146,columnNumber:9}},e.label,t<f.length-1?", ":"")})):"N/A");case"DateTimePicker":var d=(0,On.__experimentalGetSettings)().formats.datetime;return React.createElement("div",{key:r,className:"field--date-time",__self:$n,__source:{fileName:zn,lineNumber:163,columnNumber:5}},React.createElement("time",{dateTime:(0,On.format)("c",o),__self:$n,__source:{fileName:zn,lineNumber:164,columnNumber:6}},(0,On.dateI18n)(d,o)));case"NumberControl":var h=(0,On.__experimentalGetSettings)().l10n.locale;return h=h.replace("_","-"),React.createElement("div",{key:r,className:"field--number",__self:$n,__source:{fileName:zn,lineNumber:178,columnNumber:5}},!!o&&o.toLocaleString(h));case"MediaUpload":return React.createElement("div",{key:r,className:"field--media-upload",__self:$n,__source:{fileName:zn,lineNumber:185,columnNumber:5}},o&&o.url||"N/A");case"ColorPicker":return React.createElement("div",{key:r,className:"field--color",style:{color:o},__self:$n,__source:{fileName:zn,lineNumber:192,columnNumber:5}},o);default:return null}};const Wn=function(e){var t=e.block,r=e.attributes,n=void 0===r?{}:r,i=e.context,o=void 0===i?{}:i,s=t.blockName,a=t.fields,l=void 0===a?[]:a,c=t.renderTemplate,u=t.renderType,p=t.supports,f=void 0===p?{jsx:!1}:p,d=t.usesContext;if("php"===u){var h={podsContext:{}};return(void 0===d?[]:d).forEach((function(e){var t;h.podsContext[e]=null!==(t=o[e])&&void 0!==t?t:null})),!0===f.jsx?React.createElement(Vn,{block:s,attributes:n,urlQueryArgs:h,__self:$n,__source:{fileName:zn,lineNumber:234,columnNumber:5}}):React.createElement(Cn(),{block:s,attributes:n,urlQueryArgs:h,__self:$n,__source:{fileName:zn,lineNumber:243,columnNumber:4}})}return React.createElement(React.Fragment,null,Un(c,l,n,Gn,o))};var Xn="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/createBlockEditComponent.js",Zn=void 0;const Yn=function(e){return function(t){var r=e.fields,n=void 0===r?[]:r,i=e.blockName,o=e.blockGroupLabel,s=t.className,c=t.attributes,u=void 0===c?{}:c,p=t.setAttributes,f=t.context,d=void 0===f?{}:f;return React.createElement("div",{className:s,__self:Zn,__source:{fileName:Xn,lineNumber:35,columnNumber:3}},React.createElement(a.InspectorControls,{__self:Zn,__source:{fileName:Xn,lineNumber:36,columnNumber:4}},React.createElement(l.PanelBody,{title:o,key:i,__self:Zn,__source:{fileName:Xn,lineNumber:37,columnNumber:5}},React.createElement(yn,{fields:n,attributes:u,setAttributes:p,__self:Zn,__source:{fileName:Xn,lineNumber:41,columnNumber:6}}))),React.createElement(Wn,{block:e,attributes:u,context:d,__self:Zn,__source:{fileName:Xn,lineNumber:48,columnNumber:4}}))}};function Jn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Qn=function(e){return e.reduce((function(e,t){if(!t.name)return e;var r=t.name,n=t.attributeOptions;return Kn(Kn({},e),{},i({},r,Kn(Kn({},n),{},{type:n.type||"string"})))}),{})};var ei="/home/runner/work/pods/pods/ui/js/blocks/src/blocks/index.js",ti=void 0;function ri(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ni(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ii=function(t){var r=t.blockName,i=t.fields,o=t.icon;o="pods"===o?React.createElement("svg",{width:"366",height:"364",viewBox:"0 0 366 364",fill:"none",xmlns:"http://www.w3.org/2000/svg",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:4}},React.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"20",y:"20",width:"323",height:"323",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:103}},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.9831 181.536C20.9831 270.512 93.6969 342.643 183.391 342.643V342.643C249.369 342.643 306.158 303.616 331.578 247.565V247.565C324.498 226.102 318.371 188.341 342.809 150.596V150.596C341.764 145.264 340.453 140.028 338.892 134.9V134.9C263.955 208.73 203.453 215.645 157.9 214.441V214.441C157.479 214.428 155.947 214.182 155.54 213.271V213.271C155.54 213.271 154.876 210.318 156.817 210.318V210.318C244.089 210.318 293.793 159.374 334.401 122.125V122.125C332.186 116.587 329.669 111.202 326.872 105.984V105.984C283.096 94.0368 266.274 58.4662 260.302 39.603V39.603C237.409 27.369 211.218 20.4269 183.391 20.4269V20.4269C93.6969 20.4269 20.9831 92.5574 20.9831 181.536V181.536ZM227.603 68.9767C227.603 68.9767 289.605 62.283 307.865 138.292V138.292C240.112 133.656 227.603 68.9767 227.603 68.9767V68.9767ZM202.795 100.959C202.795 100.959 257.765 99.1382 270.278 167.335V167.335C210.771 158.793 202.795 100.959 202.795 100.959V100.959ZM172.601 128.062C172.601 128.062 222.07 124.859 234.729 185.925V185.925C180.956 179.926 172.601 128.062 172.601 128.062V128.062ZM307.865 138.292C307.936 138.296 308 138.3 308.07 138.306V138.306L307.921 138.528C307.903 138.449 307.884 138.37 307.865 138.292V138.292ZM146.277 149.601C146.277 149.601 189.744 146.781 200.869 200.439V200.439C153.619 195.171 146.277 149.601 146.277 149.601V149.601ZM111.451 154.862C111.451 154.862 153.207 152.159 163.891 203.7V203.7C118.507 198.639 111.451 154.862 111.451 154.862V154.862ZM76.9799 157.234C76.9799 157.234 114.875 154.782 124.574 201.557V201.557C83.3817 196.962 76.9799 157.234 76.9799 157.234V157.234ZM39.5 164.081C39.5 164.081 71.2916 155.788 84.9886 193.798V193.798C83.4985 193.918 82.0535 193.976 80.6516 193.976V193.976C48.7552 193.975 39.5 164.081 39.5 164.081V164.081ZM310.084 167.245C310.06 167.175 310.035 167.102 310.013 167.033V167.033L310.233 167.093C310.184 167.143 310.134 167.194 310.084 167.245V167.245C333.75 238.013 291.599 276.531 291.599 276.531V276.531C291.599 276.531 261.982 216.144 310.084 167.245V167.245ZM270.278 167.335C270.337 167.343 270.396 167.351 270.455 167.36V167.36L270.317 167.544C270.305 167.473 270.293 167.406 270.278 167.335V167.335ZM234.729 185.925C234.782 185.931 234.838 185.937 234.89 185.943V185.943L234.769 186.111C234.756 186.046 234.744 185.988 234.729 185.925V185.925ZM275.24 192.061C275.232 191.992 275.224 191.919 275.218 191.849V191.849L275.405 191.966C275.35 191.999 275.296 192.03 275.24 192.061V192.061C282.645 263.228 236.486 286.583 236.486 286.583V286.583C236.486 286.583 221.57 223.215 275.24 192.061V192.061ZM85.0914 193.789L85.0296 193.912C85.0164 193.873 85.0009 193.834 84.9888 193.798V193.798C85.023 193.795 85.0572 193.792 85.0914 193.789V193.789ZM200.869 200.439C200.916 200.443 200.96 200.449 201.007 200.453V200.453L200.903 200.605C200.891 200.549 200.88 200.494 200.869 200.439V200.439ZM124.574 201.557C124.615 201.563 124.658 201.567 124.699 201.572V201.572L124.604 201.7C124.594 201.651 124.585 201.605 124.574 201.557V201.557ZM68.5101 213.185C68.5101 213.185 95.2467 187.93 129.068 216.089V216.089C118.738 224.846 108.962 227.859 100.399 227.859V227.859C81.5012 227.859 68.5101 213.185 68.5101 213.185V213.185ZM163.892 203.7C163.937 203.704 163.982 203.71 164.027 203.714V203.714L163.926 203.862C163.915 203.809 163.903 203.753 163.892 203.7V203.7ZM234.165 211.88C234.166 211.817 234.166 211.751 234.168 211.688V211.688L234.322 211.818C234.269 211.839 234.218 211.859 234.165 211.88V211.88C233.531 275.684 190.467 289.79 190.467 289.79V289.79C190.467 289.79 183.695 231.809 234.165 211.88V211.88ZM129.165 216.006V216.17C129.132 216.143 129.1 216.117 129.068 216.089V216.089C129.099 216.061 129.132 216.034 129.165 216.006V216.006ZM107.192 250.617C107.192 250.617 121.444 213.844 162.374 221.007V221.007C150.672 247.473 132.265 252.505 119.969 252.505V252.505C112.432 252.505 107.192 250.617 107.192 250.617V250.617ZM162.431 220.877L162.492 221.028C162.452 221.021 162.414 221.014 162.374 221.007V221.007C162.394 220.963 162.412 220.921 162.431 220.877V220.877ZM196.004 223.125C196.014 223.072 196.024 223.016 196.034 222.962V222.962L196.15 223.104C196.101 223.111 196.053 223.119 196.004 223.125V223.125C186.212 277.983 147.054 281.435 147.054 281.435V281.435C147.054 281.435 149.621 230.095 196.004 223.125V223.125Z",fill:"white",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:204}})),React.createElement("g",{mask:"url(#mask0)",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:4543}},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95319 9.48413H353.838V353.586H9.95319V9.48413Z",fill:"#95BF3B",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:4565}})),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M182.999 11.2219C88.3278 11.2219 11.3101 87.6245 11.3101 181.535C11.3101 275.448 88.3278 351.85 182.999 351.85C277.67 351.85 354.69 275.448 354.69 181.535C354.69 87.6245 277.67 11.2219 182.999 11.2219M182.999 363.071C82.0925 363.071 0 281.633 0 181.535C0 81.4362 82.0925 0 182.999 0C283.905 0 366 81.4362 366 181.535C366 281.633 283.905 363.071 182.999 363.071",fill:"#95BF3B",__self:ti,__source:{fileName:ei,lineNumber:29,columnNumber:4684}})):s(o);var a=ni({},t);delete a.blockName,delete a.fields,delete a.renderType;if(a.attributes=Qn(i),a.transforms&&a.transforms.from&&[]!==a.transforms.from){var l=[];a.transforms.from.forEach((function(e){if("shortcode"===e.type){var t=a.attributes;if(e.attributes=function(e,t){var r,i=null!==(r=e.attributes)&&void 0!==r?r:null;if(!i)return{};var o=Object.keys(i),s={};return o.forEach((function(e){var r,o=i[e];if("shortcode"===(null!==(r=o.source)&&void 0!==r?r:"")){var a,l,c,u;delete o.source;var p=null!==(a=null!==(l=o.selector)&&void 0!==l?l:o.attribute)&&void 0!==a?a:null,f=null!==(c=o.type)&&void 0!==c?c:"string",d=null!==(u=o.attribute)&&void 0!==u?u:e;if(!p)return;null!=o&&o.selector&&delete o.selector,o.shortcode=function(e,r){var i,s,a,l,c=e.named,u=r.shortcode,h=null!==(i=c[p])&&void 0!==i?i:null,m=null!==(s=t[d])&&void 0!==s?s:null,g=null!==(a=null==m?void 0:m.default)&&void 0!==a?a:null,b=null!==(l=u.content)&&void 0!==l?l:"";return null===h&&(h=g),"boolean"===f?null!==h&&("true"===h||!0===h||"1"===h||1===h||"yes"===h||"on"===h):"object"===f?null===h?{label:"",value:""}:"object"===n(h)?h:{label:h=h.toString(),value:h}:"array"===f?null===h?[]:Array.isArray(h)?h:h.split(","):"string"===f?null===h?"":h.toString():"integer"===f||"number"===f?null===h?0:parseInt(h):"string_integer"===f?(o.type="string",null===h?"0":parseInt(h).toString()):"content"===f?(o.type="string",""!==b?b.toString():null===h?"":h.toString()):h}}s[e]=o})),s}(e,t),(null==e||!e.isMatch)&&null!=e&&e.isMatchConfig){var r=e.isMatchConfig;delete e.isMatchConfig,e.isMatch=function(e){var t=e.named;return function(e,t){if(!e||!Array.isArray(e))return!0;var r=!0;return e.forEach((function(e){var n,i=null!==(n=t[e.name])&&void 0!==n?n:null;(null!=e&&e.required&&!i||null!=e&&e.excluded&&null!=i)&&(r=!1)})),r}(r,t)}}l.push(e)}else l.push(e)})),a.transforms.from=l}else delete a.transforms;(0,e.registerBlockType)(r,ni(ni({},a),{},{apiVersion:1,edit:Yn(t),icon:o,save:function(){return null}}))};window.podsBlocksConfig.collections.forEach(t),window.podsBlocksConfig.blocks.forEach(ii)})()})();
|
1 |
+
(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var s=i.apply(null,n);s&&e.push(s)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},9996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return r(e,n)}))}function o(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function s(e,t){try{return t in e}catch(e){return!1}}function a(e,t,n){var i={};return n.isMergeableObject(e)&&o(e).forEach((function(t){i[t]=r(e[t],n)})),o(t).forEach((function(o){(function(e,t){return s(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(s(e,o)&&n.isMergeableObject(t[o])?i[o]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(o,n)(e[o],t[o],n):i[o]=r(t[o],n))})),i}function l(e,n,o){(o=o||{}).arrayMerge=o.arrayMerge||i,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var s=Array.isArray(n);return s===Array.isArray(e)?s?o.arrayMerge(e,n,o):a(e,n,o):r(n,o)}l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return l(e,n,t)}),{})};var c=l;e.exports=c},9960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},3150:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},8679:(e,t,n)=>{"use strict";var r=n(1296),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=d(n);i&&i!==h&&e(t,i,r)}var s=u(n);p&&(s=s.concat(p(n)));for(var a=l(t),m=l(n),g=0;g<s.length;++g){var b=s[g];if(!(o[b]||r&&r[b]||m&&m[b]||a&&a[b])){var v=f(n,b);try{c(t,b,v)}catch(e){}}}}return t}},6103:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,d=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case o:case a:case s:case d:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case m:case l:return e;default:return t}}case i:return t}}}function S(e){return x(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=s,t.Suspense=d,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===o},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===m},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===a},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===a||e===s||e===d||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===v||e.$$typeof===y||e.$$typeof===w||e.$$typeof===b)},t.typeOf=x},1296:(e,t,n)=>{"use strict";e.exports=n(6103)},885:e=>{e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},8276:(e,t,n)=>{var r="html",i="head",o="body",s=/<([a-zA-Z]+[0-9]?)/,a=/<head.*>/i,l=/<body.*>/i,c=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},u=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser;c=u=function(e,t){return t&&(e="<"+t+">"+e+"</"+t+">"),p.parseFromString(e,"text/html")}}if(document.implementation){var f=n(1507).isIE,d=document.implementation.createHTMLDocument(f()?"html-dom-parser":void 0);c=function(e,t){return t?(d.documentElement.getElementsByTagName(t)[0].innerHTML=e,d):(d.documentElement.innerHTML=e,d)}}var h,m=document.createElement("template");m.content&&(h=function(e){return m.innerHTML=e,m.content.childNodes}),e.exports=function(e){var t,n,p,f,d=e.match(s);switch(d&&d[1]&&(t=d[1].toLowerCase()),t){case r:return n=u(e),a.test(e)||(p=n.getElementsByTagName(i)[0])&&p.parentNode.removeChild(p),l.test(e)||(p=n.getElementsByTagName(o)[0])&&p.parentNode.removeChild(p),n.getElementsByTagName(r);case i:case o:return f=c(e).getElementsByTagName(t),l.test(e)&&a.test(e)?f[0].parentNode.childNodes:f;default:return h?h(e):c(e,o).getElementsByTagName(o)[0].childNodes}}},4152:(e,t,n)=>{var r=n(8276),i=n(1507).formatDOM,o=/<(![a-zA-Z\s]+)>/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(""===e)return[];var t,n=e.match(o);return n&&n[1]&&(t=n[1]),i(r(e),null,t)}},1507:(e,t,n)=>{for(var r,i=n(885),o=n(1642),s=i.CASE_SENSITIVE_TAG_NAMES,a=o.Comment,l=o.Element,c=o.ProcessingInstruction,u=o.Text,p={},f=0,d=s.length;f<d;f++)r=s[f],p[r.toLowerCase()]=r;function h(e){for(var t,n={},r=0,i=e.length;r<i;r++)n[(t=e[r]).name]=t.value;return n}function m(e){var t=function(e){return p[e]}(e=e.toLowerCase());return t||e}e.exports={formatAttributes:h,formatDOM:function e(t,n,r){n=n||null;for(var i=[],o=0,s=t.length;o<s;o++){var p,f=t[o];switch(f.nodeType){case 1:(p=new l(m(f.nodeName),h(f.attributes))).children=e(f.childNodes,p);break;case 3:p=new u(f.nodeValue);break;case 8:p=new a(f.nodeValue);break;default:continue}var d=i[o-1]||null;d&&(d.next=p),p.parent=n,p.prev=d,p.next=null,i.push(p)}return r&&((p=new c(r.substring(0,r.indexOf(" ")).toLowerCase(),r)).next=i[0]||null,p.parent=n,i.unshift(p),i[1]&&(i[1].prev=i[0])),i},isIE:function(){return/(MSIE |Trident\/|Edge\/)/.test(navigator.userAgent)}}},1642:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(9960),a=new Map([[s.ElementType.Tag,1],[s.ElementType.Script,1],[s.ElementType.Style,1],[s.ElementType.Directive,1],[s.ElementType.Text,3],[s.ElementType.CDATA,4],[s.ElementType.Comment,8],[s.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=a.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,s.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var p=function(e){function t(t){return e.call(this,s.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=p;var f=function(e){function t(t,n){var r=e.call(this,s.ElementType.Directive,n)||this;return r.name=t,r}return i(t,e),t}(c);t.ProcessingInstruction=f;var d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=d;var h=function(e){function t(t){return e.call(this,s.ElementType.Root,t)||this}return i(t,e),t}(d);t.Document=h;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var o=e.call(this,i,r)||this;return o.name=t,o.attribs=n,o}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function b(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function y(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function x(e){return e.type===s.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new p(e.data);else if(g(e)){var r=t?O(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(b(e)){r=t?O(e.children):[];var a=new d(s.ElementType.CDATA,r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?O(e.children):[];var l=new h(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new f(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=b,t.isText=v,t.isComment=y,t.isDirective=w,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},488:(e,t,n)=>{var r=n(3670),i=n(484),o=n(4152);o="function"==typeof o.default?o.default:o;var s={lowerCaseAttributeNames:!1};function a(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return""===e?[]:r(o(e,(t=t||{}).htmlparser2||s),t)}a.domToReact=r,a.htmlToDOM=o,a.attributesToProps=i,a.Element=n(7384).Element,e.exports=a,e.exports.default=a},484:(e,t,n)=>{var r=n(83),i=n(4606);function o(e){return r.possibleStandardNames[e]}e.exports=function(e){var t,n,s,a,l,c={},u=(e=e||{}).type&&{reset:!0,submit:!0}[e.type];for(t in e)if(s=e[t],r.isCustomAttribute(t))c[t]=s;else if(a=o(n=t.toLowerCase()))switch(l=r.getPropertyInfo(a),"checked"!==a&&"value"!==a||u||(a=o("default"+n)),c[a]=s,l&&l.type){case r.BOOLEAN:c[a]=!0;break;case r.OVERLOADED_BOOLEAN:""===s&&(c[a]=!0)}else i.PRESERVE_CUSTOM_ATTRIBUTES&&(c[t]=s);return i.setStyleProp(e.style,c),c}},3670:(e,t,n)=>{var r=n(9196),i=n(484),o=n(4606),s=o.setStyleProp,a=o.canTextBeChildOfNode;function l(e){return o.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&o.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var o,c,u,p,f,d=(n=n||{}).library||r,h=d.cloneElement,m=d.createElement,g=d.isValidElement,b=[],v="function"==typeof n.replace,y=n.trim,w=0,x=t.length;w<x;w++)if(o=t[w],v&&g(u=n.replace(o)))x>1&&(u=h(u,{key:u.key||w})),b.push(u);else if("text"!==o.type){switch(p=o.attribs,l(o)?s(p.style,p):p&&(p=i(p)),f=null,o.type){case"script":case"style":o.children[0]&&(p.dangerouslySetInnerHTML={__html:o.children[0].data});break;case"tag":"textarea"===o.name&&o.children[0]?p.defaultValue=o.children[0].data:o.children&&o.children.length&&(f=e(o.children,n));break;default:continue}x>1&&(p.key=w),b.push(m(o.name,p,f))}else{if((c=!o.data.trim().length)&&o.parent&&!a(o.parent))continue;if(y&&c)continue;b.push(o.data)}return 1===b.length?b[0]:b}},4606:(e,t,n)=>{var r=n(9196),i=n(1476).default;var o={reactCompat:!0};var s=r.version.split(".")[0]>=16,a=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);e.exports={PRESERVE_CUSTOM_ATTRIBUTES:s,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,i="function"==typeof t,o={},s={};for(n in e)r=e[n],i&&(o=t(n,r))&&2===o.length?s[o[0]]=o[1]:"string"==typeof r&&(s[r]=n);return s},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){if(null!=e)try{t.style=i(e,o)}catch(e){t.style={}}},canTextBeChildOfNode:function(e){return!a.has(e.name)},elementsWithNoTextChildren:a}},7384:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(9960),s=n(5079);i(n(5079),t);var a=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===o.ElementType.Text)t?n.data=(n.data+e).replace(a," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(a," "));var r=new s.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.NodeWithChildren(o.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},5079:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(9960),a=new Map([[s.ElementType.Tag,1],[s.ElementType.Script,1],[s.ElementType.Style,1],[s.ElementType.Directive,1],[s.ElementType.Text,3],[s.ElementType.CDATA,4],[s.ElementType.Comment,8],[s.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=a.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,s.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var p=function(e){function t(t){return e.call(this,s.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=p;var f=function(e){function t(t,n){var r=e.call(this,s.ElementType.Directive,n)||this;return r.name=t,r}return i(t,e),t}(c);t.ProcessingInstruction=f;var d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=d;var h=function(e){function t(t){return e.call(this,s.ElementType.Root,t)||this}return i(t,e),t}(d);t.Document=h;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var o=e.call(this,i,r)||this;return o.name=t,o.attribs=n,o}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function b(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function y(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function x(e){return e.type===s.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new p(e.data);else if(g(e)){var r=t?O(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(b(e)){r=t?O(e.children):[];var a=new d(s.ElementType.CDATA,r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?O(e.children):[];var l=new h(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new f(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=b,t.isText=v,t.isComment=y,t.isDirective=w,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},8139:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,f=1;function d(e){var t=e.match(n);t&&(p+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:p,column:f};return function(t){return t.position=new m(e),y(),t}}function m(e){this.start=e,this.end={line:p,column:f},this.source=l.source}m.prototype.content=e;var g=[];function b(t){var n=new Error(l.source+":"+p+":"+f+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=f,n.source=e,!l.silent)throw n;g.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return d(r),e=e.slice(r.length),n}}function y(){v(r)}function w(e){var t;for(e=e||[];t=x();)!1!==t&&e.push(t);return e}function x(){var t=h();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return b("End of comment missing");var r=e.slice(2,n-2);return f+=2,d(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function S(){var e=h(),n=v(i);if(n){if(x(),!v(o))return b("property missing ':'");var r=v(s),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(a),l}}return y(),function(){var e,t=[];for(w(t);e=S();)!1!==e&&(t.push(e),w(t));return t}()}},9430:function(e,t){var n,r,i;r=[],void 0===(i="function"==typeof(n=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){var n,r=t.exec(e.substring(m));if(r)return n=r[0],m+=n.length,n}for(var r,i,o,s,a,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,p=/^[^ \t\n\r\u000c]+/,f=/[,]+$/,d=/^\d+$/,h=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,m=0,g=[];;){if(n(u),m>=l)return g;r=n(p),i=[],","===r.slice(-1)?(r=r.replace(f,""),v()):b()}function b(){for(n(c),o="",s="in descriptor";;){if(a=e.charAt(m),"in descriptor"===s)if(t(a))o&&(i.push(o),o="",s="after descriptor");else{if(","===a)return m+=1,o&&i.push(o),void v();if("("===a)o+=a,s="in parens";else{if(""===a)return o&&i.push(o),void v();o+=a}}else if("in parens"===s)if(")"===a)o+=a,s="in descriptor";else{if(""===a)return i.push(o),void v();o+=a}else if("after descriptor"===s)if(t(a));else{if(""===a)return void v();s="in descriptor",m-=1}m+=1}}function v(){var t,n,o,s,a,l,c,u,p,f=!1,m={};for(s=0;s<i.length;s++)l=(a=i[s])[a.length-1],c=a.substring(0,a.length-1),u=parseInt(c,10),p=parseFloat(c),d.test(c)&&"w"===l?((t||n)&&(f=!0),0===u?f=!0:t=u):h.test(c)&&"x"===l?((t||n||o)&&(f=!0),p<0?f=!0:n=p):d.test(c)&&"h"===l?((o||n)&&(f=!0),0===u?f=!0:o=u):f=!0;f?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+a+"'."):(m.url=r,t&&(m.w=t),n&&(m.d=n),o&&(m.h=o),g.push(m))}}})?n.apply(t,r):n)||(e.exports=i)},4241:e=>{var t=String,n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=n(),e.exports.createColors=n},1353:(e,t,n)=>{"use strict";let r=n(1019);class i extends r{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,r.registerAtRule(i)},9932:(e,t,n)=>{"use strict";let r=n(5631);class i extends r{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},1019:(e,t,n)=>{"use strict";let r,i,o,{isClean:s,my:a}=n(5513),l=n(4258),c=n(9932),u=n(5631);function p(e){return e.map((e=>(e.nodes&&(e.nodes=p(e.nodes)),delete e.source,e)))}function f(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)f(t)}class d extends u{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(e){throw t.addToError(e)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let n,r=0===(e=this.index(e))&&"prepend",i=this.normalize(t,this.proxyOf.nodes[e],r).reverse();for(let t of i)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)n=this.indexes[t],e<=n&&(this.indexes[t]=n+i.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let n,r=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of r)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)n=this.indexes[t],e<n&&(this.indexes[t]=n+r.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=p(r(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new l(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new o(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new c(e)]}return e.map((e=>(e[a]||d.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&f(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}d.registerParse=e=>{r=e},d.registerRule=e=>{i=e},d.registerAtRule=e=>{o=e},e.exports=d,d.default=d,d.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,o.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,l.prototype):"comment"===e.type&&Object.setPrototypeOf(e,c.prototype),e[a]=!0,e.nodes&&e.nodes.forEach((e=>{d.rebuild(e)}))}},2671:(e,t,n)=>{"use strict";let r=n(4241),i=n(2868);class o extends Error{constructor(e,t,n,r,i,s){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),r&&(this.source=r),s&&(this.plugin=s),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,o)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=r.isColorSupported),i&&e&&(t=i(t));let n,o,s=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,s.length),c=String(l).length;if(e){let{bold:e,red:t,gray:i}=r.createColors(!0);n=n=>e(t(n)),o=e=>i(e)}else n=o=e=>e;return s.slice(a,l).map(((e,t)=>{let r=a+1+t,i=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+o(i)+e+"\n "+t+n("^")}return" "+o(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=o,o.default=o},4258:(e,t,n)=>{"use strict";let r=n(5631);class i extends r{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},6461:(e,t,n)=>{"use strict";let r,i,o=n(1019);class s extends o{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new r(new i,this,e).stringify()}}s.registerLazyResult=e=>{r=e},s.registerProcessor=e=>{i=e},e.exports=s,s.default=s},250:(e,t,n)=>{"use strict";let r=n(4258),i=n(7981),o=n(9932),s=n(1353),a=n(5995),l=n(1025),c=n(1675);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...p}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:a.prototype};n.map&&(n.map={...n.map,__proto__:i.prototype}),t.push(n)}}if(p.nodes&&(p.nodes=e.nodes.map((e=>u(e,t)))),p.source){let{inputId:e,...n}=p.source;p.source=n,null!=e&&(p.source.input=t[e])}if("root"===p.type)return new l(p);if("decl"===p.type)return new r(p);if("rule"===p.type)return new c(p);if("comment"===p.type)return new o(p);if("atrule"===p.type)return new s(p);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},5995:(e,t,n)=>{"use strict";let{SourceMapConsumer:r,SourceMapGenerator:i}=n(209),{fileURLToPath:o,pathToFileURL:s}=n(7414),{resolve:a,isAbsolute:l}=n(9830),{nanoid:c}=n(2618),u=n(2868),p=n(2671),f=n(7981),d=Symbol("fromOffsetCache"),h=Boolean(r&&i),m=Boolean(a&&l);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!m||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=a(t.from)),m&&h){let e=new f(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,n;if(this[d])n=this[d];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,i=e.length;r<i;r++)n[r]=t,t+=e[r].length+1;this[d]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,i=n.length-2;for(;r<i;)if(t=r+(i-r>>1),e<n[t])i=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{line:r+1,col:e-n[r]+1}}error(e,t,n,r={}){let i,o,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof t.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);o=e.line,a=e.col}else o=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let l=this.origin(t,n,o,a);return i=l?new p(e,void 0===l.endLine?l.line:{line:l.line,column:l.column},void 0===l.endLine?l.column:{line:l.endLine,column:l.endColumn},l.source,l.file,r.plugin):new p(e,void 0===o?t:{line:t,column:n},void 0===o?n:{line:o,column:a},this.css,this.file,r.plugin),i.input={line:t,column:n,endLine:o,endColumn:a,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}origin(e,t,n,r){if(!this.map)return!1;let i,a,c=this.map.consumer(),u=c.originalPositionFor({line:e,column:t});if(!u.source)return!1;"number"==typeof n&&(i=c.originalPositionFor({line:n,column:r})),a=l(u.source)?s(u.source):new URL(u.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let p={url:a.toString(),line:u.line,column:u.column,endLine:i&&i.line,endColumn:i&&i.column};if("file:"===a.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");p.file=o(a)}let f=c.sourceContentFor(u.source);return f&&(p.source=f),p}mapResolve(e){return/^\w+:\/\//.test(e)?e:a(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=g,g.default=g,u&&u.registerInput&&u.registerInput(g)},1939:(e,t,n)=>{"use strict";let{isClean:r,my:i}=n(5513),o=n(8505),s=n(7088),a=n(1019),l=n(6461),c=(n(2448),n(3632)),u=n(6939),p=n(1025);const f={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},d={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},h={postcssPlugin:!0,prepare:!0,Once:!0};function m(e){return"object"==typeof e&&"function"==typeof e.then}function g(e){let t=!1,n=f[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function b(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:g(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[r]=!1,e.nodes&&e.nodes.forEach((e=>v(e))),e}let y={};class w{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof w||t instanceof c)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[i]&&a.rebuild(r)}else r=v(t);this.result=new c(e,r,n),this.helpers={...y,result:this.result,postcss:y},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(m(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];)e[r]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new o(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[r]=!0;let t=g(e);for(let n of t)if(0===n)e.nodes&&e.each((e=>{e[r]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return m(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(m(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];){e[r]=!0;let t=[b(e)];for(;t.length>0;){let e=this.visitTick(t);if(m(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!d[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,r]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let i,o=t.iterator;for(;i=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!i[r])return i[r]=!0,void e.push(b(i));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[r]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}w.registerPostcss=e=>{y=e},e.exports=w,w.default=w,p.registerLazyResult(w),l.registerLazyResult(w)},4715:e=>{"use strict";let t={split(e,t,n){let r=[],i="",o=!1,s=0,a=!1,l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:a?n===a&&(a=!1):'"'===n||"'"===n?a=n:"("===n?s+=1:")"===n?s>0&&(s-=1):0===s&&t.includes(n)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r},space:e=>t.split(e,[" ","\n","\t"]),comma:e=>t.split(e,[","],!0)};e.exports=t,t.default=t},8505:(e,t,n)=>{"use strict";let{SourceMapConsumer:r,SourceMapGenerator:i}=n(209),{dirname:o,resolve:s,relative:a,sep:l}=n(9830),{pathToFileURL:c}=n(7414),u=n(5995),p=Boolean(r&&i),f=Boolean(o&&s&&a&&l);e.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;n&&!e[n]&&(e[n]=!0,this.map.setSourceContent(this.toUrl(this.path(n)),t.source.input.css))}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||o(e.file);!1===this.mapOpts.sourcesContent?(t=new r(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?o(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=o(s(t,this.mapOpts.annotation))),e=a(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(c)return c(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,n=1,r=1,o="<no source>",s={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(s.generated.line=n,s.generated.column=r-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,this.map.addMapping(s))),e=i.match(/\n/g),e?(n+=e.length,t=i.lastIndexOf("\n"),r=i.length-t):r+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"!==a.type||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=n,s.generated.column=r-2,this.map.addMapping(s)):(s.source=o,s.original.line=1,s.original.column=0,s.generated.line=n,s.generated.column=r-1,this.map.addMapping(s)))}}))}generate(){if(this.clearAnnotation(),f&&p&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}}},7647:(e,t,n)=>{"use strict";let r=n(8505),i=n(7088),o=(n(2448),n(6939));const s=n(3632);class a{constructor(e,t,n){let o;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let a=i;this.result=new s(this._processor,o,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new r(a,o,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}get[Symbol.toStringTag](){return"NoWorkResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.result.css}get content(){return this.result.css}get map(){return this.result.map}get root(){if(this._root)return this._root;let e,t=o;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get messages(){return[]}warnings(){return[]}toString(){return this._css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}sync(){if(this.error)throw this.error;return this.result}}e.exports=a,a.default=a},5631:(e,t,n)=>{"use strict";let{isClean:r,my:i}=n(5513),o=n(2671),s=n(1062),a=n(7088);function l(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let i=e[r],o=typeof i;"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map((e=>l(e,n))):("object"===o&&null!==i&&(i=l(i)),n[r]=i)}return n}class c{constructor(e={}){this.raws={},this[r]=!1,this[i]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}error(e,t={}){if(this.source){let{start:n,end:r}=this.rangeBy(t);return this.source.input.error(e,{line:n.line,column:n.column},{line:r.line,column:r.column},t)}return new o(e)}warn(e,t,n){let r={node:this};for(let e in n)r[e]=n[e];return e.warn(t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=a){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=l(this);for(let n in e)t[n]=e[n];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new s).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let n={},r=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let r=this[e];if(Array.isArray(r))n[e]=r.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof r&&r.toJSON)n[e]=r.toJSON(null,t);else if("source"===e){let o=t.get(r.input);null==o&&(o=i,t.set(r.input,i),i++),n[e]={inputId:o,start:r.start,end:r.end}}else n[e]=r}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}positionInside(e){let t=this.toString(),n=this.source.start.column,r=this.source.start.line;for(let i=0;i<e;i++)"\n"===t[i]?(n=1,r+=1):n+=1;return{line:r,column:n}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.toString().indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}rangeBy(e){let t={line:this.source.start.line,column:this.source.start.column},n=this.source.end?{line:this.source.end.line,column:this.source.end.column+1}:{line:t.line,column:t.column+1};if(e.word){let r=this.toString().indexOf(e.word);-1!==r&&(t=this.positionInside(r),n=this.positionInside(r+e.word.length))}else e.start?t={line:e.start.line,column:e.start.column}:e.index&&(t=this.positionInside(e.index)),e.end?n={line:e.end.line,column:e.end.column}:e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={line:t.line,column:t.column+1}),{start:t,end:n}}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[r]){this[r]=!1;let e=this;for(;e=e.parent;)e[r]=!1}}get proxyOf(){return this}}e.exports=c,c.default=c},6939:(e,t,n)=>{"use strict";let r=n(1019),i=n(8867),o=n(5995);function s(e,t){let n=new o(e,t),r=new i(n);try{r.parse()}catch(e){throw e}return r.root}e.exports=s,s.default=s,r.registerParse(s)},8867:(e,t,n)=>{"use strict";let r=n(4258),i=n(3852),o=n(9932),s=n(1353),a=n(1025),l=n(1675);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new a,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=i(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,n=null,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(n=l[0],a.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(s&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let n=new r;this.init(n,e[0][2]);let i,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e));"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(i=e.shift(),":"===i[0]){n.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let s,a=[];for(;e.length&&(s=e[0][0],"space"===s||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],"!important"===i[1].toLowerCase()){n.important=!0;let r=this.stringFrom(e,t);r=this.spacesFromEnd(e)+r," !important"!==r&&(n.raws.important=r);break}if("important"===i[1].toLowerCase()){let r=e.slice(0),i="";for(let e=t;e>0;e--){let t=r[e][0];if(0===i.trim().indexOf("!")&&"space"!==t)break;i=r.pop()[1]+i}0===i.trim().indexOf("!")&&(n.important=!0,n.raws.important=i,e=r)}if("space"!==i[0]&&"comment"!==i[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,n,r,i=new s;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let o=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(r=l.length-1,n=l[r];n&&"space"===n[0];)n=l[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),o&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,n,r){let i,o,s,a,l=n.length,u="",p=!0;for(let e=0;e<l;e+=1)i=n[e],o=i[0],"space"!==o||e!==l-1||r?"comment"===o?(a=n[e-1]?n[e-1][0]:"empty",s=n[e+1]?n[e+1][0]:"empty",c[a]||c[s]||","===u.slice(-1)?p=!1:u+=i[1]):u+=i[1]:p=!1;if(!p){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={value:u,raw:r}}e[t]=u}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}colon(e){let t,n,r,i=0;for(let[o,s]of e.entries()){if(t=s,n=t[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(t)}r=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let i=t-1;i>=0&&(n=e[i],"space"===n[0]||(r+=1,2!==r));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},20:(e,t,n)=>{"use strict";let r=n(2671),i=n(4258),o=n(1939),s=n(1019),a=n(1723),l=n(7088),c=n(250),u=n(6461),p=n(1728),f=n(9932),d=n(1353),h=n(3632),m=n(5995),g=n(6939),b=n(4715),v=n(1675),y=n(1025),w=n(5631);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new a(e)}x.plugin=function(e,t){let n,r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...n);return i.postcssPlugin=e,i.postcssVersion=(new a).version,i}return Object.defineProperty(i,"postcss",{get:()=>(n||(n=i()),n)}),i.process=function(e,t,n){return x([i(n)]).process(e,t)},i},x.stringify=l,x.parse=g,x.fromJSON=c,x.list=b,x.comment=e=>new f(e),x.atRule=e=>new d(e),x.decl=e=>new i(e),x.rule=e=>new v(e),x.root=e=>new y(e),x.document=e=>new u(e),x.CssSyntaxError=r,x.Declaration=i,x.Container=s,x.Processor=a,x.Document=u,x.Comment=f,x.Warning=p,x.AtRule=d,x.Result=h,x.Input=m,x.Rule=v,x.Root=y,x.Node=w,o.registerPostcss(x),e.exports=x,x.default=x},7981:(e,t,n)=>{"use strict";let{SourceMapConsumer:r,SourceMapGenerator:i}=n(209),{existsSync:o,readFileSync:s}=n(4777),{dirname:a,join:l}=n(9830);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}loadFile(e){if(this.root=a(e),o(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(a(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c},1723:(e,t,n)=>{"use strict";let r=n(7647),i=n(1939),o=n(6461),s=n(1025);class a{constructor(e=[]){this.version="8.4.14",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new r(this,e,t):new i(this,e,t)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}}e.exports=a,a.default=a,s.registerProcessor(a),o.registerProcessor(a)},3632:(e,t,n)=>{"use strict";let r=n(1728);class i{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new r(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=i,i.default=i},1025:(e,t,n)=>{"use strict";let r,i,o=n(1019);class s extends o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of r)e.raws.before=t.raws.before;return r}toResult(e={}){return new r(new i,this,e).stringify()}}s.registerLazyResult=e=>{r=e},s.registerProcessor=e=>{i=e},e.exports=s,s.default=s},1675:(e,t,n)=>{"use strict";let r=n(1019),i=n(4715);class o extends r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=o,o.default=o,r.registerRule(o)},1062:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class n{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,n,r){let i;if(r||(r=n),n&&(i=e.raws[n],void 0!==i))return i;let o=e.parent;if("before"===r){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return t[r];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let t="raw"+((a=r)[0].toUpperCase()+a.slice(1));this[t]?i=this[t](s,e):s.walk((e=>{if(i=e.raws[n],void 0!==i)return!1}))}var a;return void 0===i&&(i=t[r]),s.rawCache[r]=i,i}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}e.exports=n,n.default=n},7088:(e,t,n)=>{"use strict";let r=n(1062);function i(e,t){new r(t).stringify(e)}e.exports=i,i.default=i},5513:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},3852:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),o="\n".charCodeAt(0),s=" ".charCodeAt(0),a="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),p="]".charCodeAt(0),f="(".charCodeAt(0),d=")".charCodeAt(0),h="{".charCodeAt(0),m="}".charCodeAt(0),g=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\n"'(/\\]/,O=/[\da-f]/i;e.exports=function(e,C={}){let k,_,E,T,N,P,A,M,D,I,R=e.css.valueOf(),L=C.ignoreErrors,j=R.length,V=0,F=[],q=[];function B(t){throw e.error("Unclosed "+t,V)}return{back:function(e){q.push(e)},nextToken:function(e){if(q.length)return q.pop();if(V>=j)return;let C=!!e&&e.ignoreUnclosed;switch(k=R.charCodeAt(V),k){case o:case s:case l:case c:case a:_=V;do{_+=1,k=R.charCodeAt(_)}while(k===s||k===o||k===l||k===c||k===a);I=["space",R.slice(V,_)],V=_-1;break;case u:case p:case h:case m:case v:case g:case d:{let e=String.fromCharCode(k);I=[e,e,V];break}case f:if(M=F.length?F.pop()[1]:"",D=R.charCodeAt(V+1),"url"===M&&D!==t&&D!==n&&D!==s&&D!==o&&D!==l&&D!==a&&D!==c){_=V;do{if(P=!1,_=R.indexOf(")",_+1),-1===_){if(L||C){_=V;break}B("bracket")}for(A=_;R.charCodeAt(A-1)===r;)A-=1,P=!P}while(P);I=["brackets",R.slice(V,_+1),V,_],V=_}else _=R.indexOf(")",V+1),T=R.slice(V,_+1),-1===_||S.test(T)?I=["(","(",V]:(I=["brackets",T,V,_],V=_);break;case t:case n:E=k===t?"'":'"',_=V;do{if(P=!1,_=R.indexOf(E,_+1),-1===_){if(L||C){_=V+1;break}B("string")}for(A=_;R.charCodeAt(A-1)===r;)A-=1,P=!P}while(P);I=["string",R.slice(V,_+1),V,_],V=_;break;case y:w.lastIndex=V+1,w.test(R),_=0===w.lastIndex?R.length-1:w.lastIndex-2,I=["at-word",R.slice(V,_+1),V,_],V=_;break;case r:for(_=V,N=!0;R.charCodeAt(_+1)===r;)_+=1,N=!N;if(k=R.charCodeAt(_+1),N&&k!==i&&k!==s&&k!==o&&k!==l&&k!==c&&k!==a&&(_+=1,O.test(R.charAt(_)))){for(;O.test(R.charAt(_+1));)_+=1;R.charCodeAt(_+1)===s&&(_+=1)}I=["word",R.slice(V,_+1),V,_],V=_;break;default:k===i&&R.charCodeAt(V+1)===b?(_=R.indexOf("*/",V+2)+1,0===_&&(L||C?_=R.length:B("comment")),I=["comment",R.slice(V,_+1),V,_],V=_):(x.lastIndex=V+1,x.test(R),_=0===x.lastIndex?R.length-1:x.lastIndex-2,I=["word",R.slice(V,_+1),V,_],F.push(I),V=_)}return V++,I},endOfFile:function(){return 0===q.length&&V>=j},position:function(){return V}}}},2448:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},1728:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5639:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(9196),s=l(o),a=l(n(5697));function l(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],p=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},f=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),d=function(){return f?"_"+Math.random().toString(36).substr(2,12):void 0},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||d(),prevId:e.id},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,null,[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.id;return n!==t.prevId?{inputId:n||d(),prevId:n}:null}}]),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(p(e,this.sizer),this.placeHolderSizer&&p(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return f&&e?s.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=r({},this.props.style);t.display||(t.display="inline-block");var n=r({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,s.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),s.default.createElement("input",r({},i,{ref:this.inputRef})),s.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?s.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(o.Component);h.propTypes={className:a.default.string,defaultValue:a.default.any,extraWidth:a.default.oneOfType([a.default.number,a.default.string]),id:a.default.string,injectStyles:a.default.bool,inputClassName:a.default.string,inputRef:a.default.func,inputStyle:a.default.object,minWidth:a.default.oneOfType([a.default.number,a.default.string]),onAutosize:a.default.func,onChange:a.default.func,placeholder:a.default.string,placeholderIsMinWidth:a.default.bool,style:a.default.object,value:a.default.any},h.defaultProps={minWidth:1,injectStyles:!0},t.Z=h},83:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);s=!0);}catch(e){a=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0});function o(e,t,n,r,i,o,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var s={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((function(e){s[e]=new o(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=r(e,2),n=t[0],i=t[1];s[n]=new o(n,1,!1,i,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){s[e]=new o(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){s[e]=new o(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"].forEach((function(e){s[e]=new o(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){s[e]=new o(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){s[e]=new o(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){s[e]=new o(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){s[e]=new o(e,5,!1,e.toLowerCase(),null,!1,!1)}));var a=/[\-\:]([a-z])/g,l=function(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"].forEach((function(e){var t=e.replace(a,l);s[t]=new o(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((function(e){var t=e.replace(a,l);s[t]=new o(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(a,l);s[t]=new o(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){s[e]=new o(e,1,!1,e.toLowerCase(),null,!1,!1)}));s.xlinkHref=new o("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){s[e]=new o(e,1,!1,e.toLowerCase(),null,!0,!0)}));var c=n(8229),u=c.CAMELCASE,p=c.SAME,f=c.possibleStandardNames,d=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[: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]*$")),h=Object.keys(f).reduce((function(e,t){var n=f[t];return n===p?e[t]=t:n===u?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return s.hasOwnProperty(e)?s[e]:null},t.isCustomAttribute=d,t.possibleStandardNames=h},8229:(e,t)=>{t.SAME=0;t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},1036:(e,t,n)=>{const r=n(5106),i=n(3150),{isPlainObject:o}=n(977),s=n(9996),a=n(9430),{parse:l}=n(20),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function p(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function f(e,t){return{}.hasOwnProperty.call(e,t)}function d(e,t){const n=[];return p(e,(function(e){t(e)&&n.push(e)})),n}e.exports=m;const h=/^[^\0\t\n\f\r /<=>]+$/;function m(e,t,n){if(null==e)return"";let b="",v="";function y(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=b.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(N.length){N[N.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(N.length&&c.includes(this.tag)){N[N.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},m.defaults,t)).parser=Object.assign({},g,t.parser),u.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const w=t.nonTextTags||["script","style","textarea","option"];let x,S;t.allowedAttributes&&(x={},S={},p(t.allowedAttributes,(function(e,t){x[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):x[t].push(e)})),n.length&&(S[t]=new RegExp("^("+n.join("|")+")$"))})));const O={},C={},k={};p(t.allowedClasses,(function(e,t){x&&(f(x,t)||(x[t]=[]),x[t].push("class")),O[t]=[],k[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?k[t].push(e):O[t].push(e)})),n.length&&(C[t]=new RegExp("^("+n.join("|")+")$"))}));const _={};let E,T,N,P,A,M,D;p(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=m.simpleTransform(e)),"*"===t?E=n:_[t]=n}));let I=!1;L();const R=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&L(),M)return void D++;const r=new y(e,n);N.push(r);let i=!1;const c=!!r.text;let u;if(f(_,e)&&(u=_[e](e,n),r.attribs=n=u.attribs,void 0!==u.text&&(r.innerText=u.text),e!==u.tagName&&(r.name=e=u.tagName,A[T]=u.tagName)),E&&(u=E(e,n),r.attribs=n=u.attribs,e!==u.tagName&&(r.name=e=u.tagName,A[T]=u.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(f(e,t))return!1;return!0}(P)||null!=t.nestingLimit&&T>=t.nestingLimit)&&(i=!0,P[T]=!0,"discard"===t.disallowedTagsMode&&-1!==w.indexOf(e)&&(M=!0,D=1),P[T]=!0),T++,i){if("discard"===t.disallowedTagsMode)return;v=b,b=""}b+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(r.innerText=""),(!x||f(x,e)||x["*"])&&p(n,(function(n,i){if(!h.test(i))return void delete r.attribs[i];let c=!1;if(!x||f(x,e)&&-1!==x[e].indexOf(i)||x["*"]&&-1!==x["*"].indexOf(i)||f(S,e)&&S[e].test(i)||S["*"]&&S["*"].test(i))c=!0;else if(x&&x[e])for(const t of x[e])if(o(t)&&t.name&&t.name===i){c=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&V(e,n))return void delete r.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const r=F(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{const r=F(n);if(r.isRelativeUrl)e=f(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===r.url.hostname})),i=(t.allowedIframeDomains||[]).find((function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("srcset"===i)try{let e=a(n);if(e.forEach((function(e){V("srcset",e.url)&&(e.evil=!0)})),e=d(e,(function(e){return!e.evil})),!e.length)return void delete r.attribs[i];n=d(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[i]=n}catch(e){return void delete r.attribs[i]}if("class"===i){const t=O[e],o=O["*"],a=C[e],l=k[e],c=[a,C["*"]].concat(l).filter((function(e){return e}));if(!(n=q(n,t&&o?s(t,o):t||o,c)).length)return void delete r.attribs[i]}if("style"===i)try{const o=function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?s(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(f(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(r),[]));return e}(l(e+" {"+n+"}"),t.allowedStyles);if(0===(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(o)).length)return void delete r.attribs[i]}catch(e){return void delete r.attribs[i]}b+=" "+i,n&&n.length&&(b+='="'+j(n,!0)+'"')}else delete r.attribs[i]})),-1!==t.selfClosing.indexOf(e)?b+=" />":(b+=">",!r.innerText||c||t.textFilter||(b+=j(r.innerText),I=!0)),i&&(b=v+j(b),v="")},ontext:function(e){if(M)return;const n=N[N.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=j(e,!1);t.textFilter&&!I?b+=t.textFilter(n,r):I||(b+=n)}else b+=e;if(N.length){N[N.length-1].text+=e}},onclosetag:function(e){if(M){if(D--,D)return;M=!1}const n=N.pop();if(!n)return;M=!!t.enforceHtmlBoundary&&"html"===e,T--;const r=P[T];if(r){if(delete P[T],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();v=b,b=""}A[T]&&(e=A[T],delete A[T]),t.exclusiveFilter&&t.exclusiveFilter(n)?b=b.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(b+="</"+e+">",r&&(b=v+j(b),v=""),I=!1):r&&(b=v,v=""))}},t.parser);return R.write(e),R.end(),b;function L(){b="",T=0,N=[],P={},A={},M=!1,D=0}function j(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function V(e,n){for(n=n.replace(/[\x00-\x20]+/g,"");;){const e=n.indexOf("\x3c!--");if(-1===e)break;const t=n.indexOf("--\x3e",e+4);if(-1===t)break;n=n.substring(0,e)+n.substring(t+3)}const r=n.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=r[1].toLowerCase();return f(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function F(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const n=new URL(e,t);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function q(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const g={decodeEntities:!0};m.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},m.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){let o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},2734:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},8427:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=s(n(9960)),l=n(7772),c=n(2734),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);var p=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function f(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),r="",i=0;i<n.length;i++)r+=d(n[i],t);return r}function d(e,t){switch(e.type){case a.Root:return f(e.children,t);case a.Directive:case a.Doctype:return"<"+e.data+">";case a.Comment:return function(e){return"\x3c!--"+e.data+"--\x3e"}(e);case a.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case a.Script:case a.Style:case a.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=c.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&h.has(e.parent.name)&&(t=r(r({},t),{xmlMode:!1})));!t.xmlMode&&m.has(e.name)&&(t=r(r({},t),{xmlMode:"foreign"}));var i="<"+e.name,o=function(e,t){if(e)return Object.keys(e).map((function(n){var r,i,o=null!==(r=e[n])&&void 0!==r?r:"";return"foreign"===t.xmlMode&&(n=null!==(i=c.attributeNames.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==o?n+'="'+(!1!==t.decodeEntities?l.encodeXML(o):o.replace(/"/g,"""))+'"':n})).join(" ")}(e.attribs,t);o&&(i+=" "+o);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&p.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=f(e.children,t)),!t.xmlMode&&p.has(e.name)||(i+="</"+e.name+">"));return i}(e,t);case a.Text:return function(e,t){var n=e.data||"";!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=l.encodeXML(n));return n}(e,t)}}t.default=f;var h=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},1142:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var o=n(9960),s=n(6218);i(n(6218),t);var a=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new s.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?o.ElementType.Tag:void 0,r=new s.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===o.ElementType.Text)t?n.data=(n.data+e).replace(a," "):n.data+=e,this.options.withEndIndices&&(n.endIndex=this.parser.endIndex);else{t&&(e=e.replace(a," "));var r=new s.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===o.ElementType.Comment)this.lastNode.data+=e;else{var t=new s.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new s.Text(""),t=new s.NodeWithChildren(o.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new s.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},6218:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var s=n(9960),a=new Map([[s.ElementType.Tag,1],[s.ElementType.Script,1],[s.ElementType.Style,1],[s.ElementType.Directive,1],[s.ElementType.Text,3],[s.ElementType.CDATA,4],[s.ElementType.Comment,8],[s.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=a.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,s.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var p=function(e){function t(t){return e.call(this,s.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=p;var f=function(e){function t(t,n){var r=e.call(this,s.ElementType.Directive,n)||this;return r.name=t,r}return i(t,e),t}(c);t.ProcessingInstruction=f;var d=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=d;var h=function(e){function t(t){return e.call(this,s.ElementType.Root,t)||this}return i(t,e),t}(d);t.Document=h;var m=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?s.ElementType.Script:"style"===t?s.ElementType.Style:s.ElementType.Tag);var o=e.call(this,i,r)||this;return o.name=t,o.attribs=n,o}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function g(e){return(0,s.isTag)(e)}function b(e){return e.type===s.ElementType.CDATA}function v(e){return e.type===s.ElementType.Text}function y(e){return e.type===s.ElementType.Comment}function w(e){return e.type===s.ElementType.Directive}function x(e){return e.type===s.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new p(e.data);else if(g(e)){var r=t?O(e.children):[],i=new m(e.name,o({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=o({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=o({},e["x-attribsPrefix"])),n=i}else if(b(e)){r=t?O(e.children):[];var a=new d(s.ElementType.CDATA,r);r.forEach((function(e){return e.parent=a})),n=a}else if(x(e)){r=t?O(e.children):[];var l=new h(r);r.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!w(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new f(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function O(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=m,t.isTag=g,t.isCDATA=b,t.isText=v,t.isComment=y,t.isDirective=w,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},2903:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var r=n(5283),i=n(9473);t.getFeed=function(e){var t=l(p,e);return t?"feed"===t.name?function(e){var t,n=e.children,r={type:"atom",items:(0,i.getElementsByTagName)("entry",n).map((function(e){var t,n=e.children,r={media:a(n)};u(r,"id","id",n),u(r,"title","title",n);var i=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);var o=c("summary",n)||c("content",n);o&&(r.description=o);var s=c("updated",n);return s&&(r.pubDate=new Date(s)),r}))};u(r,"id","id",n),u(r,"title","title",n);var o=null===(t=l("link",n))||void 0===t?void 0:t.attribs.href;o&&(r.link=o);u(r,"description","subtitle",n);var s=c("updated",n);s&&(r.updated=new Date(s));return u(r,"author","email",n,!0),r}(t):function(e){var t,n,r=null!==(n=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],o={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,n={media:a(t)};u(n,"id","guid",t),u(n,"title","title",t),u(n,"link","link",t),u(n,"description","description",t);var r=c("pubDate",t);return r&&(n.pubDate=new Date(r)),n}))};u(o,"title","title",r),u(o,"link","link",r),u(o,"description","description",r);var s=c("lastBuildDate",r);s&&(o.updated=new Date(s));return u(o,"author","managingEditor",r,!0),o}(t):null};var o=["url","type","lang"],s=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function a(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,i=o;r<i.length;r++){t[c=i[r]]&&(n[c]=t[c])}for(var a=0,l=s;a<l.length;a++){var c;t[c=l[a]]&&(n[c]=parseInt(t[c],10))}return t.expression&&(n.expression=t.expression),n}))}function l(e,t){return(0,i.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,n){return void 0===n&&(n=!1),(0,r.textContent)((0,i.getElementsByTagName)(e,t,n,1)).trim()}function u(e,t,n,r,i){void 0===i&&(i=!1);var o=c(n,r,i);o&&(e[t]=o)}function p(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},7701:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var r=n(1142);function i(e,t){var n=[],i=[];if(e===t)return 0;for(var o=(0,r.hasChildren)(e)?e:e.parent;o;)n.unshift(o),o=o.parent;for(o=(0,r.hasChildren)(t)?t:t.parent;o;)i.unshift(o),o=o.parent;for(var s=Math.min(n.length,i.length),a=0;a<s&&n[a]===i[a];)a++;if(0===a)return 1;var l=n[a-1],c=l.children,u=n[a],p=i[a];return c.indexOf(u)>c.indexOf(p)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=i(e,t);return 2&n?-1:4&n?1:0})),e}},7241:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(5283),t),i(n(7972),t),i(n(4541),t),i(n(2764),t),i(n(9473),t),i(n(7701),t),i(n(2903),t);var o=n(1142);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return o.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return o.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return o.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return o.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return o.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return o.hasChildren}})},9473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var r=n(1142),i=n(2764),o={tag_name:function(e){return"function"==typeof e?function(t){return(0,r.isTag)(t)&&e(t.name)}:"*"===e?r.isTag:function(t){return(0,r.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,r.isText)(t)&&e(t.data)}:function(t){return(0,r.isText)(t)&&t.data===e}}};function s(e,t){return"function"==typeof t?function(n){return(0,r.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,r.isTag)(n)&&n.attribs[e]===t}}function a(e,t){return function(n){return e(n)||t(n)}}function l(e){var t=Object.keys(e).map((function(t){var n=e[t];return Object.prototype.hasOwnProperty.call(o,t)?o[t](n):s(t,n)}));return 0===t.length?null:t.reduce(a)}t.testElement=function(e,t){var n=l(e);return!n||n(t)},t.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var o=l(e);return o?(0,i.filter)(o,t,n,r):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(s("id",e),t,n)},t.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(o.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,i.filter)(o.tag_type(e),t,n,r)}},4541:(e,t)=>{"use strict";function n(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=n,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(n(t),t.next=null,t.parent=e,e.children.push(t)>1){var r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null},t.append=function(e,t){n(t);var r=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=r,i){if(i.prev=t,r){var o=r.children;o.splice(o.lastIndexOf(i),0,t)}}else r&&r.children.push(t)},t.prependChild=function(e,t){if(n(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var r=e.children[1];r.prev=t,t.next=r}else t.next=null},t.prepend=function(e,t){n(t);var r=e.parent;if(r){var i=r.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}},2764:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(1142);function i(e,t,n,o){for(var s=[],a=0,l=t;a<l.length;a++){var c=l[a];if(e(c)&&(s.push(c),--o<=0))break;if(n&&(0,r.hasChildren)(c)&&c.children.length>0){var u=i(e,c.children,n,o);if(s.push.apply(s,u),(o-=u.length)<=0)break}}return s}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var o=null,s=0;s<n.length&&!o;s++){var a=n[s];(0,r.isTag)(a)&&(t(a)?o=a:i&&a.children.length>0&&(o=e(t,a.children)))}return o},t.existsOne=function e(t,n){return n.some((function(n){return(0,r.isTag)(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,o=[],s=t.filter(r.isTag);i=s.shift();){var a=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);a&&a.length>0&&s.unshift.apply(s,a),e(i)&&o.push(i)}return o}},5283:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(1142),o=r(n(8427)),s=n(9960);function a(e,t){return(0,o.default)(e,t)}t.getOuterHTML=a,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return a(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===s.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},7972:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var r=n(1142),i=[];function o(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function s(e){return e.parent||null}t.getChildren=o,t.getParent=s,t.getSiblings=function(e){var t=s(e);if(null!=t)return o(t);for(var n=[e],r=e.prev,i=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,r.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,r.isTag)(t);)t=t.prev;return t}},722:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var i=r(n(4168)),o=r(n(7272)),s=r(n(729)),a=r(n(2913)),l=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function c(e){var t=p(e);return function(e){return String(e).replace(l,t)}}t.decodeXML=c(s.default),t.decodeHTMLStrict=c(i.default);var u=function(e,t){return e<t?1:-1};function p(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?a.default(parseInt(t.substr(3),16)):a.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}t.decodeHTML=function(){for(var e=Object.keys(o.default).sort(u),t=Object.keys(i.default).sort(u),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var s=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=p(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),a(e)}return function(e){return String(e).replace(s,l)}}()},2913:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(7607)),o=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in i.default&&(e=i.default[e]),o(e))}},571:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var i=u(r(n(729)).default),o=p(i);t.encodeXML=g(i);var s,a,l=u(r(n(4168)).default),c=p(l);function u(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function p(e){for(var t=[],n=[],r=0,i=Object.keys(e);r<i.length;r++){var o=i[r];1===o.length?t.push("\\"+o):n.push(o)}t.sort();for(var s=0;s<t.length-1;s++){for(var a=s;a<t.length-1&&t[a].charCodeAt(1)+1===t[a+1].charCodeAt(1);)a+=1;var l=1+a-s;l<3||t.splice(s,l,t[s]+"-"+t[a])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=(s=l,a=c,function(e){return e.replace(a,(function(e){return s[e]})).replace(f,h)}),t.encodeNonAsciiHTML=g(l);var f=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,d=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function h(e){return"&#x"+(e.length>1?d(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var m=new RegExp(o.source+"|"+f.source,"g");function g(e){return function(t){return t.replace(m,(function(t){return e[t]||h(t)}))}}t.escape=function(e){return e.replace(m,h)},t.escapeUTF8=function(e){return e.replace(o,h)}},7772:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var r=n(722),i=n(571);t.decode=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?r.decodeXML:r.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?i.encodeXML:i.encodeHTML)(e)};var o=n(571);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=n(722);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})},7613:function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&o(t,e,n);return s(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,p=l(n(1142)),f=a(n(7241)),d=n(6666);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var h=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=b(x,this.dom);if(n){var r={};if("feed"===n.name){var i=n.children;r.type="atom",w(r,"id","id",i),w(r,"title","title",i);var o=y("href",b("link",i));o&&(r.link=o),w(r,"description","subtitle",i),(s=v("updated",i))&&(r.updated=new Date(s)),w(r,"author","email",i,!0),r.items=g("entry",i).map((function(e){var t={},n=e.children;w(t,"id","id",n),w(t,"title","title",n);var r=y("href",b("link",n));r&&(t.link=r);var i=v("summary",n)||v("content",n);i&&(t.description=i);var o=v("updated",n);return o&&(t.pubDate=new Date(o)),t.media=m(n),t}))}else{var s;i=null!==(t=null===(e=b("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=n.name.substr(0,3),r.id="",w(r,"title","title",i),w(r,"link","link",i),w(r,"description","description",i),(s=v("lastBuildDate",i))&&(r.updated=new Date(s)),w(r,"author","managingEditor",i,!0),r.items=g("item",n.children).map((function(e){var t={},n=e.children;w(t,"id","guid",n),w(t,"title","title",n),w(t,"link","link",n),w(t,"description","description",n);var r=v("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=m(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(p.default);function m(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function g(e,t){return f.getElementsByTagName(e,t,!0)}function b(e,t){return f.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,n){return void 0===n&&(n=!1),f.getText(f.getElementsByTagName(e,t,n,1)).trim()}function y(e,t){return t?t.attribs[e]:null}function w(e,t,n,r,i){void 0===i&&(i=!1);var o=v(n,r,i);o&&(e[t]=o)}function x(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=h,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new h(t);return new d.Parser(n,t).end(e),n.feed}},6666:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=r(n(34)),o=new Set(["input","option","optgroup","select","button","datalist","textarea"]),s=new Set(["p"]),a={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:s,article:s,aside:s,blockquote:s,details:s,div:s,dl:s,fieldset:s,figcaption:s,figure:s,footer:s,form:s,header:s,hr:s,main:s,nav:s,ol:s,pre:s,section:s,table:s,ul:s,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),p=/\s|\//,f=function(){function e(e,t){var n,r,o,s,a;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(o=t.Tokenizer)&&void 0!==o?o:i.default)(this.options,this),null===(a=(s=this.cbs).onparserinit)||void 0===a||a.call(s,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(a,e))for(var r=void 0;this.stack.length>0&&a[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(p),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(r=this.cbs).oncommentend)||void 0===i||i.call(r)},e.prototype.oncdata=function(e){var t,n,r,i,o,s;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(r=this.cbs).ontext)||void 0===i||i.call(r,e),null===(s=(o=this.cbs).oncdataend)||void 0===s||s.call(o)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=f},34:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(2913)),o=r(n(4168)),s=r(n(7272)),a=r(n(729));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,i){i===r?e._state=t:(e._state=n,e._index--)}:function(i,o){o===r||o===e?i._state=t:(i._state=n,i._index--)}}function p(e,t){var n=e.toLowerCase();return function(r,i){i===n||i===e?r._state=t:(r._state=3,r._index--)}}var f=u("C",24,16),d=u("D",25,16),h=u("A",26,16),m=u("T",27,16),g=u("A",28,16),b=p("R",35),v=p("I",36),y=p("P",37),w=p("T",38),x=u("R",40,1),S=u("I",41,1),O=u("P",42,1),C=u("T",43,1),k=p("Y",45),_=p("L",46),E=p("E",47),T=u("Y",49,1),N=u("L",50,1),P=u("E",51,1),A=p("I",54),M=p("T",55),D=p("L",56),I=p("E",57),R=u("I",58,1),L=u("T",59,1),j=u("L",60,1),V=u("E",61,1),F=u("#",63,64),q=u("X",66,65),B=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?a.default:o.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(s.default,n))return this.emitPartial(s.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(s.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var o=this.buffer.substring(r,this._index),s=parseInt(o,t);this.emitPartial(i.default(s)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?R(this,e):39===this._state?x(this,e):40===this._state?S(this,e):41===this._state?O(this,e):34===this._state?b(this,e):35===this._state?v(this,e):36===this._state?y(this,e):37===this._state?w(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?C(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?k(this,e):29===this._state?this.stateInCdata(e):45===this._state?_(this,e):46===this._state?E(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?T(this,e):49===this._state?N(this,e):50===this._state?P(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?A(this,e):54===this._state?M(this,e):55===this._state?D(this,e):56===this._state?I(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?L(this,e):59===this._state?j(this,e):60===this._state?V(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?f(this,e):62===this._state?F(this,e):24===this._state?d(this,e):25===this._state?h(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?m(this,e):27===this._state?g(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?q(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=B},5106:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=n(6666);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=n(1142);function u(e,t){var n=new c.DomHandler(void 0,t);return new l.Parser(n,t).end(e),n.root}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}}),t.parseDocument=u,t.parseDOM=function(e,t){return u(e,t).children},t.createDomStream=function(e,t,n){var r=new c.DomHandler(e,t,n);return new l.Parser(r,t)};var p=n(34);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(p).default}});var f=o(n(9960));t.ElementType=f,s(n(7613),t),t.DomUtils=o(n(7241));var d=n(7613);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return d.FeedHandler}})},977:(e,t)=>{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},1476:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var i=r(n(7848)),o=n(6678);t.default=function(e,t){var n={};return e&&"string"==typeof e?((0,i.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}},6678:(e,t)=>{"use strict";t.__esModule=!0,t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,o=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||i.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(s,l):e.replace(o,l)).replace(r,a))}},7848:(e,t,n)=>{var r=n(8139);e.exports=function(e,t){var n,i=null;if(!e||"string"!=typeof e)return i;for(var o,s,a=r(e),l="function"==typeof t,c=0,u=a.length;c<u;c++)o=(n=a[c]).property,s=n.value,l?t(o,s,n):s&&(i||(i={}),i[o]=s);return i}},9196:e=>{"use strict";e.exports=window.React},2868:()=>{},4777:()=>{},9830:()=>{},209:()=>{},7414:()=>{},2618:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",i=n;for(;i--;)r+=e[Math.random()*e.length|0];return r}}},7607:e=>{"use strict";e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},4168:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},7272:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},729:e=>{"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks;const t=function(t){var n=t.namespace,r=t.title,i=t.icon;(0,e.registerBlockCollection)(n,{title:r,icon:i})};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=n(488);o.domToReact,o.htmlToDOM,o.attributesToProps,o.Element;const s=o,a=window.wp.blockEditor,l=window.wp.components;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}var u=n(9196),p=n.n(u);var f=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){0}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),d=Math.abs,h=String.fromCharCode,m=Object.assign;function g(e){return e.trim()}function b(e,t,n){return e.replace(t,n)}function v(e,t){return e.indexOf(t)}function y(e,t){return 0|e.charCodeAt(t)}function w(e,t,n){return e.slice(t,n)}function x(e){return e.length}function S(e){return e.length}function O(e,t){return t.push(e),e}var C=1,k=1,_=0,E=0,T=0,N="";function P(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:C,column:k,length:s,return:""}}function A(e,t){return m(P("",null,null,"",null,null,0),e,{length:-e.length},t)}function M(){return T=E>0?y(N,--E):0,k--,10===T&&(k=1,C--),T}function D(){return T=E<_?y(N,E++):0,k++,10===T&&(k=1,C++),T}function I(){return y(N,E)}function R(){return E}function L(e,t){return w(N,e,t)}function j(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V(e){return C=k=1,_=x(N=e),E=0,[]}function F(e){return N="",e}function q(e){return g(L(E-1,U(91===e?e+2:40===e?e+1:e)))}function B(e){for(;(T=I())&&T<33;)D();return j(e)>2||j(T)>3?"":" "}function H(e,t){for(;--t&&D()&&!(T<48||T>102||T>57&&T<65||T>70&&T<97););return L(e,R()+(t<6&&32==I()&&32==D()))}function U(e){for(;D();)switch(T){case e:return E;case 34:case 39:34!==e&&39!==e&&U(T);break;case 40:41===e&&U(e);break;case 92:D()}return E}function z(e,t){for(;D()&&e+T!==57&&(e+T!==84||47!==I()););return"/*"+L(t,E-1)+"*"+h(47===e?e:D())}function $(e){for(;!j(I());)D();return L(e,E)}var W="-ms-",G="-moz-",Z="-webkit-",X="comm",Y="rule",J="decl",K="@keyframes";function Q(e,t){for(var n="",r=S(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function ee(e,t,n,r){switch(e.type){case"@import":case J:return e.return=e.return||e.value;case X:return"";case K:return e.return=e.value+"{"+Q(e.children,r)+"}";case Y:e.value=e.props.join(",")}return x(n=Q(e.children,r))?e.return=e.value+"{"+n+"}":""}function te(e,t){switch(function(e,t){return(((t<<2^y(e,0))<<2^y(e,1))<<2^y(e,2))<<2^y(e,3)}(e,t)){case 5103:return Z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Z+e+G+e+W+e+e;case 6828:case 4268:return Z+e+W+e+e;case 6165:return Z+e+W+"flex-"+e+e;case 5187:return Z+e+b(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Z+e+W+"flex-item-"+b(e,/flex-|-self/,"")+e;case 4675:return Z+e+W+"flex-line-pack"+b(e,/align-content|flex-|-self/,"")+e;case 5548:return Z+e+W+b(e,"shrink","negative")+e;case 5292:return Z+e+W+b(e,"basis","preferred-size")+e;case 6060:return Z+"box-"+b(e,"-grow","")+Z+e+W+b(e,"grow","positive")+e;case 4554:return Z+b(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return b(b(b(e,/(zoom-|grab)/,Z+"$1"),/(image-set)/,Z+"$1"),e,"")+e;case 5495:case 3959:return b(e,/(image-set\([^]*)/,Z+"$1$`$1");case 4968:return b(b(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Z+e+e;case 4095:case 3583:case 4068:case 2532:return b(e,/(.+)-inline(.+)/,Z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(x(e)-1-t>6)switch(y(e,t+1)){case 109:if(45!==y(e,t+4))break;case 102:return b(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1"+G+(108==y(e,t+3)?"$3":"$2-$3"))+e;case 115:return~v(e,"stretch")?te(b(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==y(e,t+1))break;case 6444:switch(y(e,x(e)-3-(~v(e,"!important")&&10))){case 107:return b(e,":",":"+Z)+e;case 101:return b(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Z+(45===y(e,14)?"inline-":"")+"box$3$1"+Z+"$2$3$1"+W+"$2box$3")+e}break;case 5936:switch(y(e,t+11)){case 114:return Z+e+W+b(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Z+e+W+b(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Z+e+W+b(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Z+e+W+e+e}return e}function ne(e){return F(re("",null,null,null,[""],e=V(e),0,[0],e))}function re(e,t,n,r,i,o,s,a,l){for(var c=0,u=0,p=s,f=0,d=0,m=0,g=1,y=1,w=1,S=0,C="",k=i,_=o,E=r,T=C;y;)switch(m=S,S=D()){case 40:if(108!=m&&58==T.charCodeAt(p-1)){-1!=v(T+=b(q(S),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:T+=q(S);break;case 9:case 10:case 13:case 32:T+=B(m);break;case 92:T+=H(R()-1,7);continue;case 47:switch(I()){case 42:case 47:O(oe(z(D(),R()),t,n),l);break;default:T+="/"}break;case 123*g:a[c++]=x(T)*w;case 125*g:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+u:d>0&&x(T)-p&&O(d>32?se(T+";",r,n,p-1):se(b(T," ","")+";",r,n,p-2),l);break;case 59:T+=";";default:if(O(E=ie(T,t,n,c,u,i,a,C,k=[],_=[],p),o),123===S)if(0===u)re(T,t,E,E,k,o,p,a,_);else switch(f){case 100:case 109:case 115:re(e,E,E,r&&O(ie(e,E,E,0,0,i,a,C,i,k=[],p),_),i,_,p,a,r?k:_);break;default:re(T,E,E,E,[""],_,0,a,_)}}c=u=d=0,g=w=1,C=T="",p=s;break;case 58:p=1+x(T),d=m;default:if(g<1)if(123==S)--g;else if(125==S&&0==g++&&125==M())continue;switch(T+=h(S),S*g){case 38:w=u>0?1:(T+="\f",-1);break;case 44:a[c++]=(x(T)-1)*w,w=1;break;case 64:45===I()&&(T+=q(D())),f=I(),u=p=x(C=T+=$(R())),S++;break;case 45:45===m&&2==x(T)&&(g=0)}}return o}function ie(e,t,n,r,i,o,s,a,l,c,u){for(var p=i-1,f=0===i?o:[""],h=S(f),m=0,v=0,y=0;m<r;++m)for(var x=0,O=w(e,p+1,p=d(v=s[m])),C=e;x<h;++x)(C=g(v>0?f[x]+" "+O:b(O,/&\f/g,f[x])))&&(l[y++]=C);return P(e,t,n,0===i?Y:a,l,c,u)}function oe(e,t,n){return P(e,t,n,X,h(T),w(e,2,-2),0)}function se(e,t,n,r){return P(e,t,n,J,w(e,0,r),w(e,r+1,-1),r)}var ae=function(e,t,n){for(var r=0,i=0;r=i,i=I(),38===r&&12===i&&(t[n]=1),!j(i);)D();return L(e,E)},le=function(e,t){return F(function(e,t){var n=-1,r=44;do{switch(j(r)){case 0:38===r&&12===I()&&(t[n]=1),e[n]+=ae(E-1,t,n);break;case 2:e[n]+=q(r);break;case 4:if(44===r){e[++n]=58===I()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=h(r)}}while(r=D());return e}(V(e),t))},ce=new WeakMap,ue=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ce.get(n))&&!r){ce.set(e,!0);for(var i=[],o=le(t,i),s=n.props,a=0,l=0;a<o.length;a++)for(var c=0;c<s.length;c++,l++)e.props[l]=i[a]?o[a].replace(/&\f/g,s[c]):s[c]+" "+o[a]}}},pe=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}},fe=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case J:e.return=te(e.value,e.length);break;case K:return Q([A(e,{value:b(e.value,"@","@"+Z)})],r);case Y:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Q([A(e,{props:[b(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Q([A(e,{props:[b(t,/:(plac\w+)/,":-webkit-input-$1")]}),A(e,{props:[b(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[b(t,/:(plac\w+)/,W+"input-$1")]})],r)}return""}))}}];const de=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r=e.stylisPlugins||fe;var i,o,s={},a=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;a.push(e)}));var l,c,u,p,d=[ee,(p=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&p(e)})],h=(c=[ue,pe].concat(r,d),u=S(c),function(e,t,n,r){for(var i="",o=0;o<u;o++)i+=c[o](e,t,n,r)||"";return i});o=function(e,t,n,r){l=n,Q(ne(e?e+"{"+t.styles+"}":t.styles),h),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new f({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return m.sheet.hydrate(a),m};function he(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var me=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},ge=function(e,t,n){me(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0);i=i.next}while(void 0!==i)}};const be=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)};const ve={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var ye=/[A-Z]|^ms/g,we=/_EMO_([^_]+?)_([^]*?)_EMO_/g,xe=function(e){return 45===e.charCodeAt(1)},Se=function(e){return null!=e&&"boolean"!=typeof e},Oe=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return xe(e)?e:e.replace(ye,"-$&").toLowerCase()})),Ce=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(we,(function(e,t,n){return _e={name:t,styles:n,next:_e},t}))}return 1===ve[e]||xe(e)||"number"!=typeof t||0===t?t:t+"px"};function ke(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return _e={name:n.name,styles:n.styles,next:_e},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_e={name:r.name,styles:r.styles,next:_e},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=ke(e,t,n[i])+";";else for(var o in n){var s=n[o];if("object"!=typeof s)null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":Se(s)&&(r+=Oe(o)+":"+Ce(o,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var a=ke(e,t,s);switch(o){case"animation":case"animationName":r+=Oe(o)+":"+a+";";break;default:r+=o+"{"+a+"}"}}else for(var l=0;l<s.length;l++)Se(s[l])&&(r+=Oe(o)+":"+Ce(o,s[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=_e,o=n(e);return _e=i,ke(e,t,o)}}if(null==t)return n;var s=t[n];return void 0!==s?s:n}var _e,Ee=/label:\s*([^\s;\n{]+)\s*(;|$)/g;var Te=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";_e=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=ke(n,t,o)):i+=o[0];for(var s=1;s<e.length;s++)i+=ke(n,t,e[s]),r&&(i+=o[s]);Ee.lastIndex=0;for(var a,l="";null!==(a=Ee.exec(i));)l+="-"+a[1];return{name:be(i)+l,styles:i,next:_e}},Ne={}.hasOwnProperty,Pe=(0,u.createContext)("undefined"!=typeof HTMLElement?de({key:"css"}):null);var Ae=Pe.Provider,Me=function(e){return(0,u.forwardRef)((function(t,n){var r=(0,u.useContext)(Pe);return e(t,r,n)}))},De=(0,u.createContext)({});var Ie=u.useInsertionEffect?u.useInsertionEffect:function(e){e()};function Re(e){Ie(e)}var Le="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",je=function(e,t){var n={};for(var r in t)Ne.call(t,r)&&(n[r]=t[r]);return n[Le]=e,n},Ve=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;me(t,n,r);Re((function(){return ge(t,n,r)}));return null},Fe=Me((function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[Le],o=[r],s="";"string"==typeof e.className?s=he(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var a=Te(o,void 0,(0,u.useContext)(De));s+=t.key+"-"+a.name;var l={};for(var c in e)Ne.call(e,c)&&"css"!==c&&c!==Le&&(l[c]=e[c]);return l.ref=n,l.className=s,(0,u.createElement)(u.Fragment,null,(0,u.createElement)(Ve,{cache:t,serialized:a,isStringTag:"string"==typeof i}),(0,u.createElement)(i,l))}));n(8679);var qe=function(e,t){var n=arguments;if(null==t||!Ne.call(t,"css"))return u.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=Fe,i[1]=je(e,t);for(var o=2;o<r;o++)i[o]=n[o];return u.createElement.apply(null,i)};u.useInsertionEffect?u.useInsertionEffect:u.useLayoutEffect;function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Te(t)}var He=function e(t){for(var n=t.length,r=0,i="";r<n;r++){var o=t[r];if(null!=o){var s=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))s=e(o);else for(var a in s="",o)o[a]&&a&&(s&&(s+=" "),s+=a);break;default:s=o}s&&(i&&(i+=" "),i+=s)}}return i};function Ue(e,t,n){var r=[],i=he(e,r,n);return r.length<2?n:i+t(r)}var ze=function(e){var t=e.cache,n=e.serializedArr;Re((function(){for(var e=0;e<n.length;e++)ge(t,n[e],!1)}));return null},$e=Me((function(e,t){var n=[],r=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o=Te(r,t.registered);return n.push(o),me(t,o,!1),t.key+"-"+o.name},i={css:r,cx:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Ue(t.registered,r,He(n))},theme:(0,u.useContext)(De)},o=e.children(i);return!0,(0,u.createElement)(u.Fragment,null,(0,u.createElement)(ze,{cache:t,serializedArr:n}),o)}));function We(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Ge=n(5639);function Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e,t,n){return t&&Xe(e.prototype,t),n&&Xe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}function Ke(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}const Qe=window.ReactDOM;function et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(n),!0).forEach((function(t){et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}function it(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ot(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rt(e);if(t){var i=rt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return it(this,n)}}var st=function(){};function at(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function lt(e,t,n){var r=[n];if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&r.push("".concat(at(e,i)));return r.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var ct=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[]},ut=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,nt({},We(e,["className","clearValue","cx","getStyles","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"]))};function pt(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function ft(e){return pt(e)?window.pageYOffset:e.scrollTop}function dt(e,t){pt(e)?window.scrollTo(0,t):e.scrollTop=t}function ht(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function mt(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:st,i=ft(e),o=t-i,s=10,a=0;function l(){var t=ht(a+=s,i,o,n);dt(e,t),a<n?window.requestAnimationFrame(l):r(e)}l()}function gt(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var bt=!1,vt={get passive(){return bt=!0}},yt="undefined"!=typeof window?window:{};yt.addEventListener&&yt.removeEventListener&&(yt.addEventListener("p",st,vt),yt.removeEventListener("p",st,!1));var wt=bt;function xt(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,d=p.height,h=p.top,m=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=ft(l),v=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),w=m-y,x=g-h,S=w+b,O=u-b-h,C=f-g+b+v,k=b+h-y,_=160;switch(i){case"auto":case"bottom":if(x>=d)return{placement:"bottom",maxHeight:t};if(O>=d&&!s)return o&&mt(l,C,_),{placement:"bottom",maxHeight:t};if(!s&&O>=r||s&&x>=r)return o&&mt(l,C,_),{placement:"bottom",maxHeight:s?x-v:O-v};if("auto"===i||s){var E=t,T=s?w:S;return T>=r&&(E=Math.min(T-v-a.controlHeight,t)),{placement:"top",maxHeight:E}}if("bottom"===i)return o&&dt(l,C),{placement:"bottom",maxHeight:t};break;case"top":if(w>=d)return{placement:"top",maxHeight:t};if(S>=d&&!s)return o&&mt(l,k,_),{placement:"top",maxHeight:t};if(!s&&S>=r||s&&w>=r){var N=t;return(!s&&S>=r||s&&w>=r)&&(N=s?w-y:S-y),o&&mt(l,k,_),{placement:"top",maxHeight:N}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var St=function(e){return"auto"===e?"bottom":e},Ot=(0,u.createContext)({getPortalPlacement:null}),Ct=function(e){Ke(n,e);var t=ot(n);function n(){var e;Ze(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={maxHeight:e.props.maxMenuHeight,placement:null},e.getPlacement=function(t){var n=e.props,r=n.minMenuHeight,i=n.maxMenuHeight,o=n.menuPlacement,s=n.menuPosition,a=n.menuShouldScrollIntoView,l=n.theme;if(t){var c="fixed"===s,u=xt({maxHeight:i,menuEl:t,minHeight:r,placement:o,shouldScroll:a&&!c,isFixedPosition:c,theme:l}),p=e.context.getPortalPlacement;p&&p(u),e.setState(u)}},e.getUpdatedProps=function(){var t=e.props.menuPlacement,n=e.state.placement||St(t);return nt(nt({},e.props),{},{placement:n,maxHeight:e.state.maxHeight})},e}return Ye(n,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),n}(u.Component);Ct.contextType=Ot;var kt=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},_t=kt,Et=kt,Tt=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return qe("div",c({css:i("noOptionsMessage",e),className:r({"menu-notice":!0,"menu-notice--no-options":!0},n)},o),t)};Tt.defaultProps={children:"No options"};var Nt=function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return qe("div",c({css:i("loadingMessage",e),className:r({"menu-notice":!0,"menu-notice--loading":!0},n)},o),t)};Nt.defaultProps={children:"Loading..."};var Pt,At=function(e){Ke(n,e);var t=ot(n);function n(){var e;Ze(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={placement:null},e.getPortalPlacement=function(t){var n=t.placement;n!==St(e.props.menuPlacement)&&e.setState({placement:n})},e}return Ye(n,[{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,r=e.className,i=e.controlElement,o=e.cx,s=e.innerProps,a=e.menuPlacement,l=e.menuPosition,u=e.getStyles,p="fixed"===l;if(!t&&!p||!i)return null;var f=this.state.placement||St(a),d=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),h=p?0:window.pageYOffset,m=d[f]+h,g=qe("div",c({css:u("menuPortal",{offset:m,position:l,rect:d}),className:o({"menu-portal":!0},r)},s),n);return qe(Ot.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},t?(0,Qe.createPortal)(g,t):g)}}]),n}(u.Component);var Mt,Dt,It={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Rt=function(e){var t=e.size,n=We(e,["size"]);return qe("svg",c({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:It},n))},Lt=function(e){return qe(Rt,c({size:20},e),qe("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},jt=function(e){return qe(Rt,c({size:20},e),qe("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Vt=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},Ft=Vt,qt=Vt,Bt=function(){var e=Be.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(Pt||(Mt=["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"],Dt||(Dt=Mt.slice(0)),Pt=Object.freeze(Object.defineProperties(Mt,{raw:{value:Object.freeze(Dt)}})))),Ht=function(e){var t=e.delay,n=e.offset;return qe("span",{css:Be({animation:"".concat(Bt," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Ut=function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps,o=e.isRtl;return qe("div",c({css:r("loadingIndicator",e),className:n({indicator:!0,"loading-indicator":!0},t)},i),qe(Ht,{delay:0,offset:o}),qe(Ht,{delay:160,offset:!0}),qe(Ht,{delay:320,offset:!o}))};Ut.defaultProps={size:4};var zt=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},$t=function(e){var t=e.children,n=e.innerProps;return qe("div",n,t)},Wt=$t,Gt=$t;var Zt=function(e){var t=e.children,n=e.className,r=e.components,i=e.cx,o=e.data,s=e.getStyles,a=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,p=r.Container,f=r.Label,d=r.Remove;return qe($e,null,(function(r){var h=r.css,m=r.cx;return qe(p,{data:o,innerProps:nt({className:m(h(s("multiValue",e)),i({"multi-value":!0,"multi-value--is-disabled":l},n))},a),selectProps:u},qe(f,{data:o,innerProps:{className:m(h(s("multiValueLabel",e)),i({"multi-value__label":!0},n))},selectProps:u},t),qe(d,{data:o,innerProps:nt({className:m(h(s("multiValueRemove",e)),i({"multi-value__remove":!0},n))},c),selectProps:u}))}))};Zt.defaultProps={cropWithEllipsis:!0};var Xt={ClearIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return qe("div",c({css:i("clearIndicator",e),className:r({indicator:!0,"clear-indicator":!0},n)},o),t||qe(Lt,null))},Control:function(e){var t=e.children,n=e.cx,r=e.getStyles,i=e.className,o=e.isDisabled,s=e.isFocused,a=e.innerRef,l=e.innerProps,u=e.menuIsOpen;return qe("div",c({ref:a,css:r("control",e),className:n({control:!0,"control--is-disabled":o,"control--is-focused":s,"control--menu-is-open":u},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return qe("div",c({css:i("dropdownIndicator",e),className:r({indicator:!0,"dropdown-indicator":!0},n)},o),t||qe(jt,null))},DownChevron:jt,CrossIcon:Lt,Group:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.Heading,s=e.headingProps,a=e.innerProps,l=e.label,u=e.theme,p=e.selectProps;return qe("div",c({css:i("group",e),className:r({group:!0},n)},a),qe(o,c({},s,{selectProps:p,theme:u,getStyles:i,cx:r}),l),qe("div",null,t))},GroupHeading:function(e){var t=e.getStyles,n=e.cx,r=e.className,i=ut(e);i.data;var o=We(i,["data"]);return qe("div",c({css:t("groupHeading",e),className:n({"group-heading":!0},r)},o))},IndicatorsContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,o=e.getStyles;return qe("div",c({css:o("indicatorsContainer",e),className:r({indicators:!0},n)},i),t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=e.innerProps;return qe("span",c({},i,{css:r("indicatorSeparator",e),className:n({"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,r=e.getStyles,i=ut(e),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=We(i,["innerRef","isDisabled","isHidden"]);return qe("div",{css:r("input",e)},qe(Ge.Z,c({className:n({input:!0},t),inputRef:o,inputStyle:zt(a),disabled:s},l)))},LoadingIndicator:Ut,Menu:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerRef,s=e.innerProps;return qe("div",c({css:i("menu",e),className:r({menu:!0},n),ref:o},s),t)},MenuList:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,s=e.innerRef,a=e.isMulti;return qe("div",c({css:i("menuList",e),className:r({"menu-list":!0,"menu-list--is-multi":a},n),ref:s},o),t)},MenuPortal:At,LoadingMessage:Nt,NoOptionsMessage:Tt,MultiValue:Zt,MultiValueContainer:Wt,MultiValueLabel:Gt,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return qe("div",n,t||qe(Lt,{size:14}))},Option:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.isFocused,a=e.isSelected,l=e.innerRef,u=e.innerProps;return qe("div",c({css:i("option",e),className:r({option:!0,"option--is-disabled":o,"option--is-focused":s,"option--is-selected":a},n),ref:l},u),t)},Placeholder:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps;return qe("div",c({css:i("placeholder",e),className:r({placeholder:!0},n)},o),t)},SelectContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.innerProps,s=e.isDisabled,a=e.isRtl;return qe("div",c({css:i("container",e),className:r({"--is-disabled":s,"--is-rtl":a},n)},o),t)},SingleValue:function(e){var t=e.children,n=e.className,r=e.cx,i=e.getStyles,o=e.isDisabled,s=e.innerProps;return qe("div",c({css:i("singleValue",e),className:r({"single-value":!0,"single-value--is-disabled":o},n)},s),t)},ValueContainer:function(e){var t=e.children,n=e.className,r=e.cx,i=e.innerProps,o=e.isMulti,s=e.getStyles,a=e.hasValue;return qe("div",c({css:s("valueContainer",e),className:r({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},n)},i),t)}};function Yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jt(e){return function(e){if(Array.isArray(e))return Yt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Yt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Kt=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Qt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Kt(r)&&Kt(i)))return!1;var r,i;return!0}const en=function(e,t){var n;void 0===t&&(t=Qt);var r,i=[],o=!1;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];return o&&n===this&&t(s,i)||(r=e.apply(this,s),o=!0,n=this,i=s),r}};for(var tn={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},nn=function(e){return qe("span",c({css:tn},e))},rn={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,i=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=void 0===n?{}:n,i=e.options,o=e.label,s=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,c=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(s," focused, ").concat(u(a,r),".");if("menu"===t){var p=l?" disabled":"",f="".concat(c?"selected":"focused").concat(p);return"option ".concat(s," ").concat(f,", ").concat(u(i,r),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},on=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,i=e.focusableOptions,o=e.isFocused,s=e.selectValue,a=e.selectProps,l=a.ariaLiveMessages,c=a.getOptionLabel,f=a.inputValue,d=a.isMulti,h=a.isOptionDisabled,m=a.isSearchable,g=a.menuIsOpen,b=a.options,v=a.screenReaderStatus,y=a.tabSelectsValue,w=a["aria-label"],x=a["aria-live"],S=(0,u.useMemo)((function(){return nt(nt({},rn),l||{})}),[l]),O=(0,u.useMemo)((function(){var e,n="";if(t&&S.onChange){var r=t.option,i=t.removedValue,o=t.value,s=i||r||(e=o,Array.isArray(e)?null:e),a=nt({isDisabled:s&&h(s),label:s?c(s):""},t);n=S.onChange(a)}return n}),[t,h,c,S]),C=(0,u.useMemo)((function(){var e="",t=n||r,i=!!(n&&s&&s.includes(n));if(t&&S.onFocus){var o={focused:t,label:c(t),isDisabled:h(t),isSelected:i,options:b,context:t===n?"menu":"value",selectValue:s};e=S.onFocus(o)}return e}),[n,r,c,h,S,b,s]),k=(0,u.useMemo)((function(){var e="";if(g&&b.length&&S.onFilter){var t=v({count:i.length});e=S.onFilter({inputValue:f,resultsMessage:t})}return e}),[i,f,g,S,b,v]),_=(0,u.useMemo)((function(){var e="";if(S.guidance){var t=r?"value":g?"menu":"input";e=S.guidance({"aria-label":w,context:t,isDisabled:n&&h(n),isMulti:d,isSearchable:m,tabSelectsValue:y})}return e}),[w,n,r,d,h,m,g,S,y]),E="".concat(C," ").concat(k," ").concat(_);return qe(nn,{"aria-live":x,"aria-atomic":"false","aria-relevant":"additions text"},o&&qe(p().Fragment,null,qe("span",{id:"aria-selection"},O),qe("span",{id:"aria-context"},E)))},sn=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],an=new RegExp("["+sn.map((function(e){return e.letters})).join("")+"]","g"),ln={},cn=0;cn<sn.length;cn++)for(var un=sn[cn],pn=0;pn<un.letters.length;pn++)ln[un.letters[pn]]=un.base;var fn=function(e){return e.replace(an,(function(e){return ln[e]}))},dn=en(fn),hn=function(e){return e.replace(/^\s+|\s+$/g,"")},mn=function(e){return"".concat(e.label," ").concat(e.value)};function gn(e){e.in,e.out,e.onExited,e.appear,e.enter,e.exit;var t=e.innerRef;e.emotion;var n=We(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return qe("input",c({ref:t},n,{css:Be({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"","")}))}var bn=["boxSizing","height","overflow","paddingRight","position"],vn={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function yn(e){e.preventDefault()}function wn(e){e.stopPropagation()}function xn(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Sn(){return"ontouchstart"in window||navigator.maxTouchPoints}var On=!("undefined"==typeof window||!window.document||!window.document.createElement),Cn=0,kn={capture:!1,passive:!1};var _n=function(){return document.activeElement&&document.activeElement.blur()},En={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Tn(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,s=(0,u.useRef)(!1),a=(0,u.useRef)(!1),l=(0,u.useRef)(0),c=(0,u.useRef)(null),p=(0,u.useCallback)((function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,p=l.scrollHeight,f=l.clientHeight,d=c.current,h=t>0,m=p-f-u,g=!1;m>t&&s.current&&(r&&r(e),s.current=!1),h&&a.current&&(o&&o(e),a.current=!1),h&&t>m?(n&&!s.current&&n(e),d.scrollTop=p,g=!0,s.current=!0):!h&&-t>u&&(i&&!a.current&&i(e),d.scrollTop=0,g=!0,a.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[]),f=(0,u.useCallback)((function(e){p(e,e.deltaY)}),[p]),d=(0,u.useCallback)((function(e){l.current=e.changedTouches[0].clientY}),[]),h=(0,u.useCallback)((function(e){var t=l.current-e.changedTouches[0].clientY;p(e,t)}),[p]),m=(0,u.useCallback)((function(e){if(e){var t=!!wt&&{passive:!1};"function"==typeof e.addEventListener&&e.addEventListener("wheel",f,t),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",d,t),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",h,t)}}),[h,d,f]),g=(0,u.useCallback)((function(e){e&&("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",f,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",d,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",h,!1))}),[h,d,f]);return(0,u.useEffect)((function(){if(t){var e=c.current;return m(e),function(){g(e)}}}),[t,m,g]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),o=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,i=(0,u.useRef)({}),o=(0,u.useRef)(null),s=(0,u.useCallback)((function(e){if(On){var t=document.body,n=t&&t.style;if(r&&bn.forEach((function(e){var t=n&&n[e];i.current[e]=t})),r&&Cn<1){var o=parseInt(i.current.paddingRight,10)||0,s=document.body?document.body.clientWidth:0,a=window.innerWidth-s+o||0;Object.keys(vn).forEach((function(e){var t=vn[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(a,"px"))}t&&Sn()&&(t.addEventListener("touchmove",yn,kn),e&&(e.addEventListener("touchstart",xn,kn),e.addEventListener("touchmove",wn,kn))),Cn+=1}}),[]),a=(0,u.useCallback)((function(e){if(On){var t=document.body,n=t&&t.style;Cn=Math.max(Cn-1,0),r&&Cn<1&&bn.forEach((function(e){var t=i.current[e];n&&(n[e]=t)})),t&&Sn()&&(t.removeEventListener("touchmove",yn,kn),e&&(e.removeEventListener("touchstart",xn,kn),e.removeEventListener("touchmove",wn,kn)))}}),[]);return(0,u.useEffect)((function(){if(t){var e=o.current;return s(e),function(){a(e)}}}),[t,s,a]),function(e){o.current=e}}({isEnabled:n});return qe(p().Fragment,null,n&&qe("div",{onClick:_n,css:En}),t((function(e){i(e),o(e)})))}var Nn={clearIndicator:qt,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,i=r.colors,o=r.borderRadius,s=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:Ft,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,r=e.theme,i=r.colors,o=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*o,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:Et,menu:function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,s=r.spacing,a=r.colors;return i(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),i(t,"backgroundColor",a.neutral0),i(t,"borderRadius",o),i(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),i(t,"marginBottom",s.menuGutter),i(t,"marginTop",s.menuGutter),i(t,"position","absolute"),i(t,"width","100%"),i(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,r=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:_t,option:function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,i=e.theme,o=i.spacing,s=i.colors;return{label:"option",backgroundColor:r?s.primary:n?s.primary25:"transparent",color:t?s.neutral20:r?s.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*o.baseUnit,"px ").concat(3*o.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?s.primary:s.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}};var Pn,An={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Mn={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:gt(),captureMenuScroll:!gt(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=nt({ignoreCase:!0,ignoreAccents:!0,stringify:mn,trim:!0,matchFrom:"any"},Pn),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,s=n.trim,a=n.matchFrom,l=s?hn(t):t,c=s?hn(o(e)):o(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=dn(l),c=fn(c)),"start"===a?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0};function Dn(e,t,n,r){return{type:"option",data:t,isDisabled:Fn(e,t,n),isSelected:qn(e,t,n),label:jn(e,t),value:Vn(e,t),index:r}}function In(e,t){return e.options.map((function(n,r){if(n.options){var i=n.options.map((function(n,r){return Dn(e,n,t,r)})).filter((function(t){return Ln(e,t)}));return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=Dn(e,n,t,r);return Ln(e,o)?o:void 0})).filter((function(e){return!!e}))}function Rn(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Jt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function Ln(e,t){var n=e.inputValue,r=void 0===n?"":n,i=t.data,o=t.isSelected,s=t.label,a=t.value;return(!Hn(e)||!o)&&Bn(e,{label:s,value:a,data:i},r)}var jn=function(e,t){return e.getOptionLabel(t)},Vn=function(e,t){return e.getOptionValue(t)};function Fn(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function qn(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Vn(e,t);return n.some((function(t){return Vn(e,t)===r}))}function Bn(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Hn=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Un=1,zn=function(e){Ke(n,e);var t=ot(n);function n(e){var r;return Ze(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,i=n.onChange,o=n.name;t.name=o,r.ariaOnChange(e,t),i(e,t)},r.setValue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,i=r.props,o=i.closeMenuOnSelect,s=i.isMulti;r.onInputChange("",{action:"set-value"}),o&&(r.setState({inputIsHiddenAfterUpdate:!s}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,i=t.isMulti,o=t.name,s=r.state.selectValue,a=i&&r.isOptionSelected(e,s),l=r.isOptionDisabled(e,s);if(a){var c=r.getOptionValue(e);r.setValue(s.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",name:o});i?r.setValue([].concat(Jt(s),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,i=r.getOptionValue(e),o=n.filter((function(e){return r.getOptionValue(e)!==i})),s=t?o:o[0]||null;r.onChange(s,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(r.props.isMulti?[]:null,{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],i=t.slice(0,t.length-1),o=e?i:i[0]||null;r.onChange(o,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return lt.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return jn(r.props,e)},r.getOptionValue=function(e){return Vn(r.props,e)},r.getStyles=function(e,t){var n=Nn[e](t);n.boxSizing="border-box";var i=r.props.styles[e];return i?i(n,t):n},r.getElementId=function(e){return"".concat(r.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,nt(nt({},Xt),e.components);var e},r.buildCategorizedOptions=function(){return In(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Rn(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:nt({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,i=t.menuIsOpen;r.focusInput(),i?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&pt(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var i=Math.abs(n.clientX-r.initialTouchX),o=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=i>5||o>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(t,{action:"input-change"}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return Hn(r.props)},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,i=t.backspaceRemovesValue,o=t.escapeClearsValue,s=t.inputValue,a=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,p=t.tabSelectsValue,f=t.openMenuOnFocus,d=r.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||s)return;r.focusValue("previous");break;case"ArrowRight":if(!n||s)return;r.focusValue("next");break;case"Delete":case"Backspace":if(s)return;if(m)r.removeValue(m);else{if(!i)return;n?r.popValue():a&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!p||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):a&&o&&r.clearValue();break;case" ":if(s)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++Un),r.state.selectValue=ct(e.value),r}return Ye(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentDidUpdate",value:function(e){var t,n,r,i,o,s=this.props,a=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!a&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),c&&a&&!e.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,r=t.getBoundingClientRect(),i=n.getBoundingClientRect(),o=n.offsetHeight/3,i.bottom+o>r.bottom?dt(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+o,t.scrollHeight)):i.top-o<r.top&&dt(t,Math.max(n.offsetTop-o,0)),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,i=n.isFocused,o=this.buildFocusableOptions(),s="first"===e?0:o.length-1;if(!this.props.isMulti){var a=o.indexOf(r[0]);a>-1&&(s=a)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:o[s]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var i=n.indexOf(r);r||(i=-1);var o=n.length-1,s=-1;if(n.length){switch(e){case"previous":s=0===i?0:-1===i?o:i-1;break;case"next":i>-1&&i<o&&(s=i+1)}this.setState({inputIsHidden:-1!==s,focusedValue:n[s]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var i=0,o=r.indexOf(n);n||(o=-1),"up"===e?i=o>0?o-1:r.length-1:"down"===e?i=(o+1)%r.length:"pageup"===e?(i=o-t)<0&&(i=0):"pagedown"===e?(i=o+t)>r.length-1&&(i=r.length-1):"last"===e&&(i=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[i],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(An):nt(nt({},An),this.props.theme):An}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getValue,i=this.selectOption,o=this.setValue,s=this.props,a=s.isMulti,l=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getValue:r,hasValue:this.hasValue(),isMulti:a,isRtl:l,options:c,selectOption:i,selectProps:s,setValue:o,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Fn(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return qn(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Bn(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,i=e.inputValue,o=e.tabIndex,s=e.form,a=this.getComponents().Input,l=this.state.inputIsHidden,u=this.commonProps,f=r||this.getElementId("input"),d={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};return n?p().createElement(a,c({},u,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:f,innerRef:this.getInputRef,isDisabled:t,isHidden:l,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:o,form:s,type:"text",value:i},d)):p().createElement(gn,c({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:st,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:o,form:s,value:""},d))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,i=t.MultiValueLabel,o=t.MultiValueRemove,s=t.SingleValue,a=t.Placeholder,l=this.commonProps,u=this.props,f=u.controlShouldRenderValue,d=u.isDisabled,h=u.isMulti,m=u.inputValue,g=u.placeholder,b=this.state,v=b.selectValue,y=b.focusedValue,w=b.isFocused;if(!this.hasValue()||!f)return m?null:p().createElement(a,c({},l,{key:"placeholder",isDisabled:d,isFocused:w}),g);if(h){var x=v.map((function(t,s){var a=t===y;return p().createElement(n,c({},l,{components:{Container:r,Label:i,Remove:o},isFocused:a,isDisabled:d,key:"".concat(e.getOptionValue(t)).concat(s),index:s,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return x}if(m)return null;var S=v[0];return p().createElement(s,c({},l,{data:S,isDisabled:d}),this.formatOptionLabel(S,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return p().createElement(e,c({},t,{innerProps:s,isFocused:o}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,i=n.isLoading,o=this.state.isFocused;if(!e||!i)return null;return p().createElement(e,c({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:o}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,i=this.props.isDisabled,o=this.state.isFocused;return p().createElement(n,c({},r,{isDisabled:i,isFocused:o}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return p().createElement(e,c({},t,{innerProps:i,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,i=t.Menu,o=t.MenuList,s=t.MenuPortal,a=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,f=this.commonProps,d=this.state.focusedOption,h=this.props,m=h.captureMenuScroll,g=h.inputValue,b=h.isLoading,v=h.loadingMessage,y=h.minMenuHeight,w=h.maxMenuHeight,x=h.menuIsOpen,S=h.menuPlacement,O=h.menuPosition,C=h.menuPortalTarget,k=h.menuShouldBlockScroll,_=h.menuShouldScrollIntoView,E=h.noOptionsMessage,T=h.onMenuScrollToTop,N=h.onMenuScrollToBottom;if(!x)return null;var P,A=function(t,n){var r=t.type,i=t.data,o=t.isDisabled,s=t.isSelected,a=t.label,l=t.value,h=d===i,m=o?void 0:function(){return e.onOptionHover(i)},g=o?void 0:function(){return e.selectOption(i)},b="".concat(e.getElementId("option"),"-").concat(n),v={id:b,onClick:g,onMouseMove:m,onMouseOver:m,tabIndex:-1};return p().createElement(u,c({},f,{innerProps:v,data:i,isDisabled:o,isSelected:s,key:b,label:a,type:r,value:l,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())P=this.getCategorizedOptions().map((function(t){if("group"===t.type){var i=t.data,o=t.options,s=t.index,a="".concat(e.getElementId("group"),"-").concat(s),l="".concat(a,"-heading");return p().createElement(n,c({},f,{key:a,data:i,options:o,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return A(e,"".concat(s,"-").concat(e.index))})))}if("option"===t.type)return A(t,"".concat(t.index))}));else if(b){var M=v({inputValue:g});if(null===M)return null;P=p().createElement(a,f,M)}else{var D=E({inputValue:g});if(null===D)return null;P=p().createElement(l,f,D)}var I={minMenuHeight:y,maxMenuHeight:w,menuPlacement:S,menuPosition:O,menuShouldScrollIntoView:_},R=p().createElement(Ct,c({},f,I),(function(t){var n=t.ref,r=t.placerProps,s=r.placement,a=r.maxHeight;return p().createElement(i,c({},f,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:s}),p().createElement(Tn,{captureEnabled:m,onTopArrive:T,onBottomArrive:N,lockEnabled:k},(function(t){return p().createElement(o,c({},f,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:b,maxHeight:a,focusedOption:d}),P)})))}));return C||"fixed"===O?p().createElement(s,c({},f,{appendTo:C,controlElement:this.controlRef,menuPlacement:S,menuPosition:O}),R):R}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,i=t.isMulti,o=t.name,s=this.state.selectValue;if(o&&!r){if(i){if(n){var a=s.map((function(t){return e.getOptionValue(t)})).join(n);return p().createElement("input",{name:o,type:"hidden",value:a})}var l=s.length>0?s.map((function(t,n){return p().createElement("input",{key:"i-".concat(n),name:o,type:"hidden",value:e.getOptionValue(t)})})):p().createElement("input",{name:o,type:"hidden"});return p().createElement("div",null,l)}var c=s[0]?this.getOptionValue(s[0]):"";return p().createElement("input",{name:o,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.isFocused,s=t.selectValue,a=this.getFocusableOptions();return p().createElement(on,c({},e,{ariaSelection:n,focusedOption:r,focusedValue:i,isFocused:o,selectValue:s,focusableOptions:a}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,i=e.ValueContainer,o=this.props,s=o.className,a=o.id,l=o.isDisabled,u=o.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return p().createElement(r,c({},d,{className:s,innerProps:{id:a,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),p().createElement(t,c({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:u}),p().createElement(i,c({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),p().createElement(n,c({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,i=t.inputIsHiddenAfterUpdate,o=e.options,s=e.value,a=e.menuIsOpen,l=e.inputValue,c={};if(n&&(s!==n.value||o!==n.options||a!==n.menuIsOpen||l!==n.inputValue)){var u=ct(s),p=a?function(e,t){return Rn(In(e,t))}(e,u):[],f=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,u):null,d=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,p);c={selectValue:u,focusedOption:d,focusedValue:f,clearFocusValueOnUpdate:!1}}var h=null!=i&&e!==n?{inputIsHidden:i,inputIsHiddenAfterUpdate:void 0}:{};return nt(nt(nt({},c),h),{},{prevProps:e})}}]),n}(u.Component);zn.defaultProps=Mn;var $n,Wn,Gn,Zn={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Xn=(u.Component,$n=zn,Gn=Wn=function(e){Ke(n,e);var t=ot(n);function n(){var e;Ze(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).select=void 0,e.state={inputValue:void 0!==e.props.inputValue?e.props.inputValue:e.props.defaultInputValue,menuIsOpen:void 0!==e.props.menuIsOpen?e.props.menuIsOpen:e.props.defaultMenuIsOpen,value:void 0!==e.props.value?e.props.value:e.props.defaultValue},e.onChange=function(t,n){e.callProp("onChange",t,n),e.setState({value:t})},e.onInputChange=function(t,n){var r=e.callProp("onInputChange",t,n);e.setState({inputValue:void 0!==r?r:t})},e.onMenuOpen=function(){e.callProp("onMenuOpen"),e.setState({menuIsOpen:!0})},e.onMenuClose=function(){e.callProp("onMenuClose"),e.setState({menuIsOpen:!1})},e}return Ye(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.props)[e].apply(t,r)}}},{key:"render",value:function(){var e=this,t=this.props;t.defaultInputValue,t.defaultMenuIsOpen,t.defaultValue;var n=We(t,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return p().createElement($n,c({},n,{ref:function(t){e.select=t},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(u.Component),Wn.defaultProps=Zn,Gn);const Yn=Xn,Jn=window.wp.i18n,Kn=window.wp.compose;var Qn=n(5697),er=n.n(Qn),tr=n(4184),nr=n.n(tr),rr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/components/CheckboxGroup/index.js",ir=void 0,or=function(e){var t=e.id,n=e.className,r=e.heading,i=e.help,o=e.options,s=e.values,a=e.onChange,c=function(e,t){var n=Jt(s),r=n.findIndex((function(t){return t.value===e}));-1!==r?n[r].checked=t:n.push({value:e,checked:t}),a(n)};return React.createElement("fieldset",{className:nr()("components-block-fields-checkbox-group",n),__self:ir,__source:{fileName:rr,lineNumber:43,columnNumber:3}},r&&React.createElement("legend",{__self:ir,__source:{fileName:rr,lineNumber:44,columnNumber:17}},r),o.map((function(e){var t=s.find((function(t){return t.value===e.value}))||!1;return React.createElement(l.CheckboxControl,{key:e.value,label:e.label,checked:t.checked||!1,onChange:function(t){return c(e.value,t)},__self:ir,__source:{fileName:rr,lineNumber:50,columnNumber:6}})})),!!i&&React.createElement("p",{id:t+"__help",className:"components-block-fields-checkbox-group__help",__self:ir,__source:{fileName:rr,lineNumber:60,columnNumber:5}},i))};or.propTypes={id:er().string,className:er().string,heading:er().string,help:er().string,options:er().arrayOf(er().shape({label:er().string.isRequired,value:er().string.isRequired})),values:er().arrayOf(er().shape({value:er().string.isRequired,checked:er().bool})),onChange:er().func.isRequired},or.defaultProps={id:"",className:null,heading:null,help:null,options:[],values:[]};const sr=or;var ar="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/components/CheckboxControlExtended/index.js",lr=void 0,cr=function(e){var t=e.className,n=e.heading,r=e.label,i=e.help,o=e.checked,s=e.onChange;return React.createElement("fieldset",{className:nr()("components-block-fields-checkbox-control",t),__self:lr,__source:{fileName:ar,lineNumber:23,columnNumber:3}},n&&React.createElement("legend",{__self:lr,__source:{fileName:ar,lineNumber:24,columnNumber:17}},n),React.createElement(l.CheckboxControl,{label:r,help:i,checked:o,onChange:s,__self:lr,__source:{fileName:ar,lineNumber:25,columnNumber:4}}))};cr.propTypes={className:er().string,heading:er().string,label:er().string,help:er().string,checked:er().bool,onChange:er().func.isRequired},cr.defaultProps={className:null,heading:null,label:null,help:null,checked:!1};const ur=cr,pr=window.lodash,fr=window.wp.keycodes;var dr=["className","isShiftStepEnabled","max","min","onChange","onKeyDown","shiftStep","step"];function hr(e){var t=e.className,n=e.isShiftStepEnabled,r=void 0===n||n,i=e.max,o=void 0===i?1/0:i,s=e.min,a=void 0===s?-1/0:s,l=e.onChange,u=void 0===l?pr.noop:l,p=e.onKeyDown,f=void 0===p?pr.noop:p,d=e.shiftStep,h=void 0===d?10:d,m=e.step,g=void 0===m?1:m,b=We(e,dr),v=(0,pr.clamp)(0,a,o),y=nr()("component-number-control",t);return React.createElement("input",c({inputMode:"numeric"},b,{className:y,type:"number",onChange:function(e){u(e.target.value,{event:e})},onKeyDown:function(e){f(e);var t=e.target.value,n=""===t,i=e.shiftKey&&r?parseFloat(h):parseFloat(g),s=n?v:t;switch(s=parseFloat(s),e.keyCode){case fr.UP:e.preventDefault(),s+=i,s=(0,pr.clamp)(s,a,o),u(s.toString(),{event:e});break;case fr.DOWN:e.preventDefault(),s-=i,s=(0,pr.clamp)(s,a,o),u(s.toString(),{event:e})}},__self:this,__source:{fileName:"/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/components/NumberControl/index.js",lineNumber:70,columnNumber:3}}))}var mr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/components/RenderedField.js",gr=void 0;function br(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?br(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):br(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const yr=function(e){var t=e.field,n=e.attributes,r=e.setAttributes,o=t.name,s=t.type,c=t.fieldOptions,u=void 0===c?{}:c,p=n[o],f=function(e,t,n){return function(r){t(i({},e,"NumberControl"===n?parseInt(r,10):r))}}(o,r,s);switch(s){case"TextControl":var d=u.fieldType,h=void 0===d?"text":d,m=u.help,g=u.label;return React.createElement(l.TextControl,{key:o,label:g,value:p,type:h,help:m,onChange:f,__self:gr,__source:{fileName:mr,lineNumber:83,columnNumber:5}});case"TextareaControl":var b=u.help,v=u.label;return React.createElement(l.TextareaControl,{key:o,label:v,value:p,help:b,rows:"4",onChange:f,__self:gr,__source:{fileName:mr,lineNumber:100,columnNumber:5}});case"RichText":var y=u.tagName,w=void 0===y?"p":y;return React.createElement(a.RichText,{key:o,tagName:w,value:p,onChange:f,__self:gr,__source:{fileName:mr,lineNumber:114,columnNumber:5}});case"CheckboxControl":var x=u.label,S=u.help,O=u.heading,C=void 0===O?"":O;return React.createElement(ur,{key:o,heading:C,label:x,help:S,checked:p,onChange:f,__self:gr,__source:{fileName:mr,lineNumber:130,columnNumber:5}});case"CheckboxGroup":var k=u.help,_=u.options,E=u.heading,T=void 0===E?"":E;return React.createElement(sr,{key:o,heading:T,help:k,options:_,values:p,onChange:f,__self:gr,__source:{fileName:mr,lineNumber:148,columnNumber:5}});case"RadioControl":var N=u.help,P=u.options;return React.createElement(l.RadioControl,{key:o,help:N,options:P,selected:p,onChange:f,__self:gr,__source:{fileName:mr,lineNumber:165,columnNumber:5}});case"SelectControl":var A=u.options,M=u.multiple,D=u.label,I=(0,Kn.useInstanceId)(Yn),R="inspector-select-control-".concat(I);return React.createElement(l.BaseControl,{label:D,id:R,key:o,className:"full-width-base-control",__self:gr,__source:{fileName:mr,lineNumber:185,columnNumber:5}},React.createElement(Yn,{id:R,name:o,options:A,value:p,isMulti:M,onChange:f,styles:{container:function(e){return vr(vr({},e),{},{width:"100%"})}},__self:gr,__source:{fileName:mr,lineNumber:191,columnNumber:6}}));case"DateTimePicker":var L=u.is12Hour,j=u.label;return React.createElement(l.BaseControl,{label:j,key:o,__self:gr,__source:{fileName:mr,lineNumber:215,columnNumber:5}},React.createElement(l.DateTimePicker,{currentDate:p,onChange:f,is12Hour:L,__self:gr,__source:{fileName:mr,lineNumber:219,columnNumber:6}}));case"NumberControl":var V=u.isShiftStepEnabled,F=u.shiftStep,q=u.label,B=u.max,H=void 0===B?1/0:B,U=u.min,z=void 0===U?-1/0:U,$=u.step,W=void 0===$?1:$,G=(0,Kn.useInstanceId)(hr),Z="inspector-number-control-".concat(G);return React.createElement(l.BaseControl,{label:q,id:Z,key:o,__self:gr,__source:{fileName:mr,lineNumber:241,columnNumber:5}},React.createElement(hr,{id:Z,onChange:f,isShiftStepEnabled:V,shiftStep:F,max:H,min:z,step:W,value:p||"",__self:gr,__source:{fileName:mr,lineNumber:246,columnNumber:6}}));case"MediaUpload":return React.createElement("div",{__self:gr,__source:{fileName:mr,lineNumber:263,columnNumber:5}},React.createElement(a.MediaUploadCheck,{__self:gr,__source:{fileName:mr,lineNumber:264,columnNumber:6}},React.createElement(a.MediaUpload,{onSelect:function(e){f({id:e.id,url:e.url,title:e.title})},allowedTypes:["image"],value:p,render:function(e){var t=e.open;return React.createElement(l.Button,{onClick:t,isPrimary:!0,__self:gr,__source:{fileName:mr,lineNumber:272,columnNumber:9}},(0,Jn.__)("Upload"))},__self:gr,__source:{fileName:mr,lineNumber:265,columnNumber:7}})),!!p&&React.createElement(l.Button,{onClick:function(){return f(null)},isSecondary:!0,__self:gr,__source:{fileName:mr,lineNumber:279,columnNumber:7}},(0,Jn.__)("Remove Upload")),p&&!!p.title&&React.createElement("div",{__self:gr,__source:{fileName:mr,lineNumber:287,columnNumber:7}},p.title));case"ColorPicker":return React.createElement(l.ColorPicker,{color:p,onChangeComplete:function(e){return f(e.hex)},disableAlpha:!0,__self:gr,__source:{fileName:mr,lineNumber:296,columnNumber:5}});default:return null}};var wr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/components/FieldInspectorControls.js",xr=void 0;const Sr=function(e){var t=e.fields,n=void 0===t?[]:t,r=e.attributes,i=e.setAttributes;return n.length?React.createElement("div",{className:"pods-inspector-rows",__self:xr,__source:{fileName:wr,lineNumber:29,columnNumber:3}},n.map((function(e){var t=e.name;return React.createElement(l.PanelRow,{key:t,className:"pods-inspector-row",__self:xr,__source:{fileName:wr,lineNumber:36,columnNumber:6}},React.createElement(yr,{field:e,attributes:r,setAttributes:i,__self:xr,__source:{fileName:wr,lineNumber:37,columnNumber:7}}))}))):null};var Or=n(1036),Cr=n.n(Or);const kr=window.wp.autop,_r=window.wp.date,Er=window.wp.serverSideRender;var Tr=n.n(Er);function Nr(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pr(e)}const Ar=window.wp.element,Mr=window.wp.apiFetch;var Dr=n.n(Mr);const Ir=window.wp.url;var Rr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/components/PodsServerSideRender.js",Lr=void 0;function jr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pr(e);if(t){var i=Pr(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nr(this,n)}}function Vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qr=function(e){Ke(n,e);var t=jr(n);function n(e){var r;return Ze(this,n),(r=t.call(this,e)).state={response:null},r}return Ye(n,[{key:"componentDidMount",value:function(){this.isStillMounted=!0,this.fetch(this.props),this.fetch=(0,pr.debounce)(this.fetch,500)}},{key:"componentWillUnmount",value:function(){this.isStillMounted=!1}},{key:"componentDidUpdate",value:function(e){(0,pr.isEqual)(e,this.props)||this.fetch(this.props)}},{key:"fetch",value:function(e){var t=this;if(this.isStillMounted){null!==this.state.response&&this.setState({response:null});var n=e.block,r=e.attributes,i=void 0===r?null:r,o=e.httpMethod,s=void 0===o?"GET":o,a=e.urlQueryArgs,l="POST"===s,c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,Ir.addQueryArgs)("/wp/v2/block-renderer/".concat(e),Fr(Fr({context:"edit"},null!==t?{attributes:t}:{}),n))}(n,l?null:i,void 0===a?{}:a),u=l?{attributes:i}:null,p=this.currentFetchRequest=Dr()({path:c,data:u,method:l?"POST":"GET"}).then((function(e){t.isStillMounted&&p===t.currentFetchRequest&&e&&t.setState({response:e.rendered})})).catch((function(e){t.isStillMounted&&p===t.currentFetchRequest&&t.setState({response:{error:!0,errorMsg:e.message}})}));return p}}},{key:"render",value:function(){var e=this,t=this.state.response,n=this.props,r=n.className,i=n.EmptyResponsePlaceholder,o=n.ErrorResponsePlaceholder,l=n.LoadingResponsePlaceholder;return""===t?React.createElement(i,c({response:t},this.props,{__self:this,__source:{fileName:Rr,lineNumber:117,columnNumber:11}})):t?t.error?React.createElement(o,c({response:t},this.props,{__self:this,__source:{fileName:Rr,lineNumber:126,columnNumber:5}})):s(t,{replace:function(t){if("innerblocks"===t.name)return void 0!==t.attribs.template&&(t.attribs.template=JSON.parse(t.attribs.template)),void 0!==t.attribs.allowedBlocks&&(t.attribs.allowedBlocks=JSON.parse(t.attribs.allowedBlocks)),void 0!==t.attribs.templateLock&&"false"===t.attribs.templateLock&&(t.attribs.templateLock=!1),React.createElement(a.InnerBlocks,c({className:r},t.attribs,{__self:e,__source:{fileName:Rr,lineNumber:144,columnNumber:13}}))}}):React.createElement(l,c({response:t},this.props,{__self:this,__source:{fileName:Rr,lineNumber:121,columnNumber:5}}))}}]),n}(Ar.Component);qr.defaultProps={EmptyResponsePlaceholder:function(e){var t=e.className;return React.createElement(l.Placeholder,{className:t,__self:Lr,__source:{fileName:Rr,lineNumber:153,columnNumber:3}},(0,Jn.__)("Block rendered as empty."))},ErrorResponsePlaceholder:function(e){var t=e.response,n=e.className,r=(0,Jn.sprintf)((0,Jn.__)("Error loading block: %s"),t.errorMsg);return React.createElement(l.Placeholder,{className:n,__self:Lr,__source:{fileName:Rr,lineNumber:163,columnNumber:10}},r)},LoadingResponsePlaceholder:function(e){var t=e.className;return React.createElement(l.Placeholder,{className:t,__self:Lr,__source:{fileName:Rr,lineNumber:167,columnNumber:4}},React.createElement(l.Spinner,{__self:Lr,__source:{fileName:Rr,lineNumber:168,columnNumber:5}}))}};const Br=qr;var Hr={allowedTags:["blockquote","caption","div","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","li","ol","p","pre","section","table","tbody","td","th","thead","tr","ul","a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],allowedAttributes:{"*":["class","id","data-*","style"],iframe:["*"],a:["href","name","target"],img:["src","srcset","sizes","alt","width","height"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},Ur={allowedTags:[],allowedAttributes:{}};function zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zr(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Wr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=Cr()(e,Hr),a=[];return t.forEach((function(e){var t="function"==typeof i?r(e,n,i):r(e,n);t&&(a[e.name]=$r({},t.props));var s=t?(0,Ar.renderToString)(t):"";o=o.replace(new RegExp("{@".concat(e.name,"}"),"g"),s)})),s(o)};var Gr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/components/BlockPreview.js",Zr=void 0,Xr=function(e,t){var n=e.name,r=e.fieldOptions,i=e.type,o=t[n];if(void 0===o)return null;switch(i){case"TextControl":return React.createElement("div",{key:n,className:"field--textcontrol",__self:Zr,__source:{fileName:Gr,lineNumber:51,columnNumber:5}},Cr()(o,Ur));case"TextareaControl":var s=r.auto_p,l=Cr()(o,Ur);return React.createElement("div",{key:n,className:"field--textareacontrol",dangerouslySetInnerHTML:{__html:s?(0,kr.autop)(l):l},__self:Zr,__source:{fileName:Gr,lineNumber:64,columnNumber:5}});case"RichText":return React.createElement(a.RichText.Content,{key:n,tagName:"p",value:o,className:"field--richtext",__self:Zr,__source:{fileName:Gr,lineNumber:75,columnNumber:5}});case"CheckboxControl":return React.createElement("div",{key:n,className:"field--checkbox",__self:Zr,__source:{fileName:Gr,lineNumber:85,columnNumber:5}},o?(0,Jn.__)("Yes"):(0,Jn.__)("No"));case"CheckboxGroup":var c=r.options,u=Array.isArray(o)?o.filter((function(e){return!!e.checked})):[];return React.createElement("div",{key:n,className:"field--checkbox-group",__self:Zr,__source:{fileName:Gr,lineNumber:100,columnNumber:5}},u.length?u.map((function(e,t){var n=c.find((function(t){return e.value===t.value}));return React.createElement("span",{className:"field--checkbox-group__item",key:e.value,__self:Zr,__source:{fileName:Gr,lineNumber:106,columnNumber:9}},n.label,t<u.length-1?", ":"")})):"N/A");case"RadioControl":var p=r.options.find((function(e){return o===e.value}));return React.createElement("div",{key:n,className:"field--radio-control",__self:Zr,__source:{fileName:Gr,lineNumber:125,columnNumber:5}},p?p.label:"N/A");case"SelectControl":if(!Array.isArray(o))return React.createElement("div",{key:n,className:"field--select-control",__self:Zr,__source:{fileName:Gr,lineNumber:134,columnNumber:6}},o.label||"N/A");var f=o;return React.createElement("div",{key:n,className:"field--select-control field--multiple-select-control",__self:Zr,__source:{fileName:Gr,lineNumber:142,columnNumber:5}},f.length?f.map((function(e,t){return React.createElement("span",{className:"field--select-group__item",key:e,__self:Zr,__source:{fileName:Gr,lineNumber:146,columnNumber:9}},e.label,t<f.length-1?", ":"")})):"N/A");case"DateTimePicker":var d=(0,_r.__experimentalGetSettings)().formats.datetime;return React.createElement("div",{key:n,className:"field--date-time",__self:Zr,__source:{fileName:Gr,lineNumber:163,columnNumber:5}},React.createElement("time",{dateTime:(0,_r.format)("c",o),__self:Zr,__source:{fileName:Gr,lineNumber:164,columnNumber:6}},(0,_r.dateI18n)(d,o)));case"NumberControl":var h=(0,_r.__experimentalGetSettings)().l10n.locale;return h=h.replace("_","-"),React.createElement("div",{key:n,className:"field--number",__self:Zr,__source:{fileName:Gr,lineNumber:178,columnNumber:5}},!!o&&o.toLocaleString(h));case"MediaUpload":return React.createElement("div",{key:n,className:"field--media-upload",__self:Zr,__source:{fileName:Gr,lineNumber:185,columnNumber:5}},o&&o.url||"N/A");case"ColorPicker":return React.createElement("div",{key:n,className:"field--color",style:{color:o},__self:Zr,__source:{fileName:Gr,lineNumber:192,columnNumber:5}},o);default:return null}};const Yr=function(e){var t=e.block,n=e.attributes,r=void 0===n?{}:n,i=e.context,o=void 0===i?{}:i,s=t.blockName,a=t.fields,l=void 0===a?[]:a,c=t.renderTemplate,u=t.renderType,p=t.supports,f=void 0===p?{jsx:!1}:p,d=t.usesContext;if("php"===u){var h={podsContext:{}};return(void 0===d?[]:d).forEach((function(e){var t;h.podsContext[e]=null!==(t=o[e])&&void 0!==t?t:null})),!0===f.jsx?React.createElement(Br,{block:s,attributes:r,urlQueryArgs:h,__self:Zr,__source:{fileName:Gr,lineNumber:234,columnNumber:5}}):React.createElement(Tr(),{block:s,attributes:r,urlQueryArgs:h,__self:Zr,__source:{fileName:Gr,lineNumber:243,columnNumber:4}})}return React.createElement(React.Fragment,null,Wr(c,l,r,Xr,o))};var Jr="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/createBlockEditComponent.js",Kr=void 0;const Qr=function(e){return function(t){var n=e.fields,r=void 0===n?[]:n,i=e.blockName,o=e.blockGroupLabel,s=t.className,c=t.attributes,u=void 0===c?{}:c,p=t.setAttributes,f=t.context,d=void 0===f?{}:f;return React.createElement("div",{className:s,__self:Kr,__source:{fileName:Jr,lineNumber:35,columnNumber:3}},React.createElement(a.InspectorControls,{__self:Kr,__source:{fileName:Jr,lineNumber:36,columnNumber:4}},React.createElement(l.PanelBody,{title:o,key:i,__self:Kr,__source:{fileName:Jr,lineNumber:37,columnNumber:5}},React.createElement(Sr,{fields:r,attributes:u,setAttributes:p,__self:Kr,__source:{fileName:Jr,lineNumber:41,columnNumber:6}}))),React.createElement(Yr,{block:e,attributes:u,context:d,__self:Kr,__source:{fileName:Jr,lineNumber:48,columnNumber:4}}))}};function ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ti(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ei(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ni=function(e){return e.reduce((function(e,t){if(!t.name)return e;var n=t.name,r=t.attributeOptions;return ti(ti({},e),{},i({},n,ti(ti({},r),{},{type:r.type||"string"})))}),{})};var ri="/Users/sc0ttkclark/DropboxMain/Local Sites/test.pods.local/app/public/wp-content/plugins/pods/ui/js/blocks/src/blocks/index.js",ii=void 0;function oi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function si(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oi(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ai=function(t){var n=t.blockName,i=t.fields,o=t.icon;o="pods"===o?React.createElement("svg",{width:"366",height:"364",viewBox:"0 0 366 364",fill:"none",xmlns:"http://www.w3.org/2000/svg",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:4}},React.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"20",y:"20",width:"323",height:"323",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:103}},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.9831 181.536C20.9831 270.512 93.6969 342.643 183.391 342.643V342.643C249.369 342.643 306.158 303.616 331.578 247.565V247.565C324.498 226.102 318.371 188.341 342.809 150.596V150.596C341.764 145.264 340.453 140.028 338.892 134.9V134.9C263.955 208.73 203.453 215.645 157.9 214.441V214.441C157.479 214.428 155.947 214.182 155.54 213.271V213.271C155.54 213.271 154.876 210.318 156.817 210.318V210.318C244.089 210.318 293.793 159.374 334.401 122.125V122.125C332.186 116.587 329.669 111.202 326.872 105.984V105.984C283.096 94.0368 266.274 58.4662 260.302 39.603V39.603C237.409 27.369 211.218 20.4269 183.391 20.4269V20.4269C93.6969 20.4269 20.9831 92.5574 20.9831 181.536V181.536ZM227.603 68.9767C227.603 68.9767 289.605 62.283 307.865 138.292V138.292C240.112 133.656 227.603 68.9767 227.603 68.9767V68.9767ZM202.795 100.959C202.795 100.959 257.765 99.1382 270.278 167.335V167.335C210.771 158.793 202.795 100.959 202.795 100.959V100.959ZM172.601 128.062C172.601 128.062 222.07 124.859 234.729 185.925V185.925C180.956 179.926 172.601 128.062 172.601 128.062V128.062ZM307.865 138.292C307.936 138.296 308 138.3 308.07 138.306V138.306L307.921 138.528C307.903 138.449 307.884 138.37 307.865 138.292V138.292ZM146.277 149.601C146.277 149.601 189.744 146.781 200.869 200.439V200.439C153.619 195.171 146.277 149.601 146.277 149.601V149.601ZM111.451 154.862C111.451 154.862 153.207 152.159 163.891 203.7V203.7C118.507 198.639 111.451 154.862 111.451 154.862V154.862ZM76.9799 157.234C76.9799 157.234 114.875 154.782 124.574 201.557V201.557C83.3817 196.962 76.9799 157.234 76.9799 157.234V157.234ZM39.5 164.081C39.5 164.081 71.2916 155.788 84.9886 193.798V193.798C83.4985 193.918 82.0535 193.976 80.6516 193.976V193.976C48.7552 193.975 39.5 164.081 39.5 164.081V164.081ZM310.084 167.245C310.06 167.175 310.035 167.102 310.013 167.033V167.033L310.233 167.093C310.184 167.143 310.134 167.194 310.084 167.245V167.245C333.75 238.013 291.599 276.531 291.599 276.531V276.531C291.599 276.531 261.982 216.144 310.084 167.245V167.245ZM270.278 167.335C270.337 167.343 270.396 167.351 270.455 167.36V167.36L270.317 167.544C270.305 167.473 270.293 167.406 270.278 167.335V167.335ZM234.729 185.925C234.782 185.931 234.838 185.937 234.89 185.943V185.943L234.769 186.111C234.756 186.046 234.744 185.988 234.729 185.925V185.925ZM275.24 192.061C275.232 191.992 275.224 191.919 275.218 191.849V191.849L275.405 191.966C275.35 191.999 275.296 192.03 275.24 192.061V192.061C282.645 263.228 236.486 286.583 236.486 286.583V286.583C236.486 286.583 221.57 223.215 275.24 192.061V192.061ZM85.0914 193.789L85.0296 193.912C85.0164 193.873 85.0009 193.834 84.9888 193.798V193.798C85.023 193.795 85.0572 193.792 85.0914 193.789V193.789ZM200.869 200.439C200.916 200.443 200.96 200.449 201.007 200.453V200.453L200.903 200.605C200.891 200.549 200.88 200.494 200.869 200.439V200.439ZM124.574 201.557C124.615 201.563 124.658 201.567 124.699 201.572V201.572L124.604 201.7C124.594 201.651 124.585 201.605 124.574 201.557V201.557ZM68.5101 213.185C68.5101 213.185 95.2467 187.93 129.068 216.089V216.089C118.738 224.846 108.962 227.859 100.399 227.859V227.859C81.5012 227.859 68.5101 213.185 68.5101 213.185V213.185ZM163.892 203.7C163.937 203.704 163.982 203.71 164.027 203.714V203.714L163.926 203.862C163.915 203.809 163.903 203.753 163.892 203.7V203.7ZM234.165 211.88C234.166 211.817 234.166 211.751 234.168 211.688V211.688L234.322 211.818C234.269 211.839 234.218 211.859 234.165 211.88V211.88C233.531 275.684 190.467 289.79 190.467 289.79V289.79C190.467 289.79 183.695 231.809 234.165 211.88V211.88ZM129.165 216.006V216.17C129.132 216.143 129.1 216.117 129.068 216.089V216.089C129.099 216.061 129.132 216.034 129.165 216.006V216.006ZM107.192 250.617C107.192 250.617 121.444 213.844 162.374 221.007V221.007C150.672 247.473 132.265 252.505 119.969 252.505V252.505C112.432 252.505 107.192 250.617 107.192 250.617V250.617ZM162.431 220.877L162.492 221.028C162.452 221.021 162.414 221.014 162.374 221.007V221.007C162.394 220.963 162.412 220.921 162.431 220.877V220.877ZM196.004 223.125C196.014 223.072 196.024 223.016 196.034 222.962V222.962L196.15 223.104C196.101 223.111 196.053 223.119 196.004 223.125V223.125C186.212 277.983 147.054 281.435 147.054 281.435V281.435C147.054 281.435 149.621 230.095 196.004 223.125V223.125Z",fill:"white",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:204}})),React.createElement("g",{mask:"url(#mask0)",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:4543}},React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.95319 9.48413H353.838V353.586H9.95319V9.48413Z",fill:"#95BF3B",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:4565}})),React.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M182.999 11.2219C88.3278 11.2219 11.3101 87.6245 11.3101 181.535C11.3101 275.448 88.3278 351.85 182.999 351.85C277.67 351.85 354.69 275.448 354.69 181.535C354.69 87.6245 277.67 11.2219 182.999 11.2219M182.999 363.071C82.0925 363.071 0 281.633 0 181.535C0 81.4362 82.0925 0 182.999 0C283.905 0 366 81.4362 366 181.535C366 281.633 283.905 363.071 182.999 363.071",fill:"#95BF3B",__self:ii,__source:{fileName:ri,lineNumber:29,columnNumber:4684}})):s(o);var a=si({},t);delete a.blockName,delete a.fields,delete a.renderType;if(a.attributes=ni(i),a.transforms&&a.transforms.from&&[]!==a.transforms.from){var l=[];a.transforms.from.forEach((function(e){if("shortcode"===e.type){var t=a.attributes;if(e.attributes=function(e,t){var n,i=null!==(n=e.attributes)&&void 0!==n?n:null;if(!i)return{};var o=Object.keys(i),s={};return o.forEach((function(e){var n,o=i[e];if("shortcode"===(null!==(n=o.source)&&void 0!==n?n:"")){var a,l,c,u;delete o.source;var p=null!==(a=null!==(l=o.selector)&&void 0!==l?l:o.attribute)&&void 0!==a?a:null,f=null!==(c=o.type)&&void 0!==c?c:"string",d=null!==(u=o.attribute)&&void 0!==u?u:e;if(!p)return;null!=o&&o.selector&&delete o.selector,o.shortcode=function(e,n){var i,s,a,l,c=e.named,u=n.shortcode,h=null!==(i=c[p])&&void 0!==i?i:null,m=null!==(s=t[d])&&void 0!==s?s:null,g=null!==(a=null==m?void 0:m.default)&&void 0!==a?a:null,b=null!==(l=u.content)&&void 0!==l?l:"";return null===h&&(h=g),"boolean"===f?null!==h&&("true"===h||!0===h||"1"===h||1===h||"yes"===h||"on"===h):"object"===f?null===h?{label:"",value:""}:"object"===r(h)?h:{label:h=h.toString(),value:h}:"array"===f?null===h?[]:Array.isArray(h)?h:h.split(","):"string"===f?null===h?"":h.toString():"integer"===f||"number"===f?null===h?0:parseInt(h):"string_integer"===f?(o.type="string",null===h?"0":parseInt(h).toString()):"content"===f?(o.type="string",""!==b?b.toString():null===h?"":h.toString()):h}}s[e]=o})),s}(e,t),(null==e||!e.isMatch)&&null!=e&&e.isMatchConfig){var n=e.isMatchConfig;delete e.isMatchConfig,e.isMatch=function(e){var t=e.named;return function(e,t){if(!e||!Array.isArray(e))return!0;var n=!0;return e.forEach((function(e){var r,i=null!==(r=t[e.name])&&void 0!==r?r:null;(null!=e&&e.required&&!i||null!=e&&e.excluded&&null!=i)&&(n=!1)})),n}(n,t)}}l.push(e)}else l.push(e)})),a.transforms.from=l}else delete a.transforms;(0,e.registerBlockType)(n,si(si({},a),{},{apiVersion:1,edit:Qr(t),icon:o,save:function(){return null}}))};window.podsBlocksConfig.collections.forEach(t),window.podsBlocksConfig.blocks.forEach(ai)})()})();
|
ui/js/dfv/pods-dfv.min.asset.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"dependencies":["lodash","moment","react","react-dom","wp-api-fetch","wp-autop","wp-components","wp-compose","wp-data","wp-element","wp-hooks","wp-i18n","wp-keycodes","wp-plugins","wp-polyfill","wp-primitives","wp-url"],"version":"
|
1 |
+
{"dependencies":["lodash","moment","react","react-dom","wp-api-fetch","wp-autop","wp-components","wp-compose","wp-data","wp-element","wp-hooks","wp-i18n","wp-keycodes","wp-plugins","wp-polyfill","wp-primitives","wp-url"],"version":"c88af0651e1e29ce5183"}
|
ui/js/dfv/pods-dfv.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{var e={4184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},4631:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,s=a&&(r?document.documentMode||6:+(i||o)[1]),l=!i&&/WebKit\//.test(e),u=l&&/Qt\/\d+\.\d+/.test(e),c=!i&&/Chrome\//.test(e),d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=m||/Mac/.test(t),y=/\bCrOS\b/.test(e),_=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,l=!0);var x=b&&(u||d&&(null==w||w<12.11)),k=n||a&&s>=9;function O(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,E=function(e,t){var n=e.className,r=O(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function C(e,t){return N(e).appendChild(t)}function q(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function T(e,t,n,r){var o=q(e,t,n,r);return o.setAttribute("role","presentation"),o}function P(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function j(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function A(e,t){var n=e.className;O(t).test(n)||(e.className+=(n?" ":"")+t)}function D(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!O(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var M=function(e){e.select()};function L(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function I(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var s=e.indexOf("\t",i);if(s<0||s>=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var F=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function V(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}F.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},F.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var B=50,z={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},U={origin:"*mouse"},W={origin:"+move"};function G(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var K=[""];function Z(e){for(;K.length<=e;)K.push($(K)+" ");return K[e]}function $(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function X(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)}function J(){}function Q(e,t){var n;return Object.create?n=Object.create(e):(J.prototype=e,n=new J),t&&R(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var oe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&oe.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function se(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}var ue=null;function ce(e,t,n){var r;ue=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ue=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ue=o)}return null!=r?r:ue}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,i=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var u="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var c=e.length,d=[],p=0;p<c;++p)d.push(n(e.charCodeAt(p)));for(var f=0,h=u;f<c;++f){var m=d[f];"m"==m?d[f]=h:h=m}for(var g=0,v=u;g<c;++g){var b=d[g];"1"==b&&"r"==v?d[g]="n":i.test(b)&&(v=b,"r"==b&&(d[g]="R"))}for(var y=1,_=d[0];y<c-1;++y){var w=d[y];"+"==w&&"1"==_&&"1"==d[y+1]?d[y]="1":","!=w||_!=d[y+1]||"1"!=_&&"n"!=_||(d[y]=_),_=w}for(var x=0;x<c;++x){var k=d[x];if(","==k)d[x]="N";else if("%"==k){var O=void 0;for(O=x+1;O<c&&"%"==d[O];++O);for(var S=x&&"!"==d[x-1]||O<c&&"1"==d[O]?"1":"N",E=x;E<O;++E)d[E]=S;x=O-1}}for(var N=0,C=u;N<c;++N){var q=d[N];"L"==C&&"1"==q?d[N]="L":i.test(q)&&(C=q)}for(var T=0;T<c;++T)if(o.test(d[T])){var P=void 0;for(P=T+1;P<c&&o.test(d[P]);++P);for(var j="L"==(T?d[T-1]:u),A=j==("L"==(P<c?d[P]:u))?j?"L":"R":u,D=T;D<P;++D)d[D]=A;T=P-1}for(var M,L=[],R=0;R<c;)if(a.test(d[R])){var I=R;for(++R;R<c&&a.test(d[R]);++R);L.push(new l(0,I,R))}else{var F=R,V=L.length,B="rtl"==t?1:0;for(++R;R<c&&"L"!=d[R];++R);for(var z=F;z<R;)if(s.test(d[z])){F<z&&(L.splice(V,0,new l(1,F,z)),V+=B);var H=z;for(++z;z<R&&s.test(d[z]);++z);L.splice(V,0,new l(2,H,z)),V+=B,F=z}else++z;F<R&&L.splice(V,0,new l(1,F,R))}return"ltr"==t&&(1==L[0].level&&(M=e.match(/^\s+/))&&(L[0].from=M[0].length,L.unshift(new l(0,0,M[0].length))),1==$(L).level&&(M=e.match(/\s+$/))&&($(L).to-=M[0].length,L.push(new l(0,c-M[0].length,c)))),"rtl"==t?L.reverse():L}}();function pe(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var fe=[],he=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||fe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||fe}function ge(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=V(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function ve(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function be(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ve(e,n||t.type,e,t),Oe(t)||t.codemirrorIgnore}function ye(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==V(n,t[r])&&n.push(t[r])}function _e(e,t){return me(e,t).length>0}function we(e){e.prototype.on=function(e,t){he(this,e,t)},e.prototype.off=function(e,t){ge(this,e,t)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){xe(e),ke(e)}function Ee(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Ce,qe,Te=function(){if(a&&s<9)return!1;var e=q("div");return"draggable"in e||"dragDrop"in e}();function Pe(e){if(null==Ce){var t=q("span","");C(e,q("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ce=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Ce?q("span",""):q("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function je(e){if(null!=qe)return qe;var t=C(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(qe=r.right-n.right<3)}var Ae,De=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in(Ae=q("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Re=null;function Ie(e){if(null!=Re)return Re;var t=C(e,q("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Re=Math.abs(n.left-r.left)>1}var Fe={},Ve={};function Be(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function ze(e,t){Ve[e]=t}function He(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return He("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return He("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ue(e,t){t=He(t);var n=Fe[t.name];if(!n)return Ue(e,"text/plain");var r=n(e,t);if(We.hasOwnProperty(t.name)){var o=We[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var We={};function Ge(e,t){R(t,We.hasOwnProperty(e)?We[e]:We[e]={})}function Ke(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Ze(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function $e(e,t,n){return!e.startState||e.startState(t,n)}var Ye=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function Je(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o})),r}function Qe(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function et(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=V(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function rt(e,t){return t>=e.first&&t<e.first+e.size}function ot(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function it(e,t,n){if(void 0===n&&(n=null),!(this instanceof it))return new it(e,t,n);this.line=e,this.ch=t,this.sticky=n}function at(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==at(e,t)}function lt(e){return it(e.line,e.ch)}function ut(e,t){return at(e,t)<0?t:e}function ct(e,t){return at(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function pt(e,t){if(t.line<e.first)return it(e.first,0);var n=e.first+e.size-1;return t.line>n?it(n,Xe(e,n).text.length):ft(t,Xe(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?it(e.line,t):n<0?it(e.line,0):e}function ht(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=pt(e,t[r]);return n}Ye.prototype.eol=function(){return this.pos>=this.string.length},Ye.prototype.sol=function(){return this.pos==this.lineStart},Ye.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ye.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ye.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ye.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ye.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ye.prototype.skipToEnd=function(){this.pos=this.string.length},Ye.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ye.prototype.backUp=function(e){this.pos-=e},Ye.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ye.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ye.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ye.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ye.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ye.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},gt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function vt(e,t,n,r){var o=[e.state.modeGen],i={};Et(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,s=function(r){n.baseTokens=o;var s=e.state.overlays[r],l=1,u=0;n.state=!0,Et(e,t.text,s.mode,n,(function(e,t){for(var n=l;u<e;){var r=o[l];r>e&&o.splice(l,1,e,o[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}}),i),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function bt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=yt(e,tt(t)),o=t.text.length>e.options.maxHighlightLength&&Ke(e.doc.mode,r.state),i=vt(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function yt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new gt(r,!0,t);var i=Nt(e,t,n),a=i>r.first&&Xe(r,i-1).stateAfter,s=a?gt.fromSaved(r,a,i):new gt(r,$e(r.mode),i);return r.iter(i,t,(function(n){_t(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function _t(e,t,n,r){var o=e.doc.mode,i=new Ye(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&wt(o,n.state);!i.eol();)xt(o,i,n.state),i.start=i.pos}function wt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function xt(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=Ze(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}gt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},gt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},gt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},gt.fromSaved=function(e,t,n){return t instanceof mt?new gt(e,Ke(e.mode,t.state),n,t.lookAhead):new gt(e,Ke(e.mode,t),n)},gt.prototype.save=function(e){var t=!1!==e?Ke(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ot(e,t,n,r){var o,i,a=e.doc,s=a.mode,l=Xe(a,(t=pt(a,t)).line),u=yt(e,t.line,n),c=new Ye(l.text,e.options.tabSize,u);for(r&&(i=[]);(r||c.pos<t.ch)&&!c.eol();)c.start=c.pos,o=xt(s,c,u.state),r&&i.push(new kt(c,o,Ke(a.mode,u.state)));return r?i:new kt(c,o,u.state)}function St(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,o,i,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,u=0,c=null,d=new Ye(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&St(wt(n,r.state),i);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&_t(e,t,r,d.pos),d.pos=t.length,l=null):l=St(xt(n,d,r.state,p),i),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||c!=l){for(;u<d.start;)o(u=Math.min(d.start,u+5e3),c);c=l}d.start=d.pos}for(;u<d.pos;){var h=Math.min(d.pos,u+5e3);o(h,c),u=h}}function Nt(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=Xe(i,s-1),u=l.stateAfter;if(u&&(!n||s+(u instanceof mt?u.lookAhead:0)<=i.modeFrontier))return s;var c=I(l.text,null,e.options.tabSize);(null==o||r>c)&&(o=s-1,r=c)}return o}function Ct(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=Xe(e,r).stateAfter;if(o&&(!(o instanceof mt)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var qt=!1,Tt=!1;function Pt(){qt=!0}function jt(){Tt=!0}function At(e,t,n){this.marker=e,this.from=t,this.to=n}function Dt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Mt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Lt(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Rt(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new At(a,i.from,s?null:i.to))}}return r}function It(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new At(a,s?null:i.from-t,null==i.to?null:i.to-t))}}return r}function Ft(e,t){if(t.full)return null;var n=rt(e,t.from.line)&&Xe(e,t.from.line).markedSpans,r=rt(e,t.to.line)&&Xe(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==at(t.from,t.to),s=Rt(n,o,a),l=It(r,i,a),u=1==t.text.length,c=$(t.text).length+(u?o:0);if(s)for(var d=0;d<s.length;++d){var p=s[d];if(null==p.to){var f=Dt(l,p.marker);f?u&&(p.to=null==f.to?null:f.to+c):p.to=o}}if(l)for(var h=0;h<l.length;++h){var m=l[h];null!=m.to&&(m.to+=c),null==m.from?Dt(s,m.marker)||(m.from=c,u&&(s||(s=[])).push(m)):(m.from+=c,u&&(s||(s=[])).push(m))}s&&(s=Vt(s)),l&&l!=s&&(l=Vt(l));var g=[s];if(!u){var v,b=t.text.length-2;if(b>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(v||(v=[])).push(new At(s[y].marker,null,null));for(var _=0;_<b;++_)g.push(v);g.push(l)}return g}function Vt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Bt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=V(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],s=a.find(0),l=0;l<o.length;++l){var u=o[l];if(!(at(u.to,s.from)<0||at(u.from,s.to)>0)){var c=[l,1],d=at(u.from,s.from),p=at(u.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:u.to}),o.splice.apply(o,c),l+=c.length-3}}return o}function zt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Ht(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Ut(e){return e.inclusiveLeft?-1:0}function Wt(e){return e.inclusiveRight?1:0}function Gt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=at(r.from,o.from)||Ut(e)-Ut(t);if(i)return-i;var a=at(r.to,o.to)||Wt(e)-Wt(t);return a||t.id-e.id}function Kt(e,t){var n,r=Tt&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||Gt(n,o.marker)<0)&&(n=o.marker);return n}function Zt(e){return Kt(e,!0)}function $t(e){return Kt(e,!1)}function Yt(e,t){var n,r=Tt&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||Gt(n,i.marker)<0)&&(n=i.marker)}return n}function Xt(e,t,n,r,o){var i=Xe(e,t),a=Tt&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var u=l.marker.find(0),c=at(u.from,n)||Ut(l.marker)-Ut(o),d=at(u.to,r)||Wt(l.marker)-Wt(o);if(!(c>=0&&d<=0||c<=0&&d>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(u.to,n)>=0:at(u.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(u.from,r)<=0:at(u.from,r)<0)))return!0}}}function Jt(e){for(var t;t=Zt(e);)e=t.find(-1,!0).line;return e}function Qt(e){for(var t;t=$t(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=$t(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Xe(e,t),r=Jt(n);return n==r?t:tt(r)}function nn(e,t){if(t>e.lastLine())return t;var n,r=Xe(e,t);if(!rn(e,r))return t;for(;n=$t(r);)r=n.find(1,!0).line;return tt(r)+1}function rn(e,t){var n=Tt&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&on(e,t,r))return!0}}function on(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return on(e,r.line,Dt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&on(e,t,o))return!0}function an(e){for(var t=0,n=(e=Jt(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;t+=s.height}return t}function sn(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Zt(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=$t(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function ln(e){var t=e.display,n=e.doc;t.maxLine=Xe(n,n.first),t.maxLineLength=sn(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=sn(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var un=function(e,t,n){this.text=e,Ht(this,t),this.height=n?n(this):1};function cn(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),zt(e),Ht(e,n);var o=r?r(e):1;o!=e.height&&et(e,o)}function dn(e){e.parent=null,zt(e)}un.prototype.lineNo=function(){return tt(this)},we(un);var pn={},fn={};function hn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:pn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=T("span",null,null,l?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=vn,je(e.display.measure)&&(a=pe(i,e.doc.direction))&&(r.addToken=yn(r.addToken,a)),r.map=[],wn(i,r,bt(e,i,t!=e.display.externalMeasured&&tt(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=D(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=D(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Pe(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ve(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=D(r.pre.className,r.textClass||"")),r}function gn(e){var t=q("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function vn(e,t,n,r,o,i,l){if(t){var u,c=e.splitSpaces?bn(t,e.trailingSpace):t,d=e.cm.state.specialChars,p=!1;if(d.test(t)){u=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var h=d.exec(t),m=h?h.index-f:t.length-f;if(m){var g=document.createTextNode(c.slice(f,f+m));a&&s<9?u.appendChild(q("span",[g])):u.appendChild(g),e.map.push(e.pos,e.pos+m,g),e.col+=m,e.pos+=m}if(!h)break;f+=m+1;var v=void 0;if("\t"==h[0]){var b=e.cm.options.tabSize,y=b-e.col%b;(v=u.appendChild(q("span",Z(y),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),e.col+=y}else"\r"==h[0]||"\n"==h[0]?((v=u.appendChild(q("span","\r"==h[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((v=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?u.appendChild(q("span",[v])):u.appendChild(v),e.col+=1);e.map.push(e.pos,e.pos+1,v),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),n||r||o||p||i||l){var _=n||"";r&&(_+=r),o&&(_+=o);var w=q("span",[u],_,i);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return e.content.appendChild(w)}e.content.appendChild(u)}}function bn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}function yn(e,t){return function(n,r,o,i,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var u=n.pos,c=u+r.length;;){for(var d=void 0,p=0;p<t.length&&!((d=t[p]).to>u&&d.from<=u);p++);if(d.to>=c)return e(n,r,o,i,a,s,l);e(n,r.slice(0,d.to-u),o,i,null,s,l),i=null,r=r.slice(d.to-u),u=d.to}}}function _n(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function wn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,u,c,d,p,f=o.length,h=0,m=1,g="",v=0;;){if(v==h){l=u=c=s="",p=null,d=null,v=1/0;for(var b=[],y=void 0,_=0;_<r.length;++_){var w=r[_],x=w.marker;if("bookmark"==x.type&&w.from==h&&x.widgetNode)b.push(x);else if(w.from<=h&&(null==w.to||w.to>h||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,u=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==h&&(c+=" "+x.startStyle),x.endStyle&&w.to==v&&(y||(y=[])).push(x.endStyle,w.to),x.title&&((p||(p={})).title=x.title),x.attributes)for(var k in x.attributes)(p||(p={}))[k]=x.attributes[k];x.collapsed&&(!d||Gt(d.marker,x)<0)&&(d=w)}else w.from>h&&v>w.from&&(v=w.from)}if(y)for(var O=0;O<y.length;O+=2)y[O+1]==v&&(u+=" "+y[O]);if(!d||d.from==h)for(var S=0;S<b.length;++S)_n(t,0,b[S]);if(d&&(d.from||0)==h){if(_n(t,(null==d.to?f+1:d.to)-h,d.marker,null==d.from),null==d.to)return;d.to==h&&(d=!1)}}if(h>=f)break;for(var E=Math.min(f,v);;){if(g){var N=h+g.length;if(!d){var C=N>E?g.slice(0,E-h):g;t.addToken(t,C,a?a+l:l,c,h+C.length==v?u:"",s,p)}if(N>=E){g=g.slice(E-h),h=E;break}h=N,c=""}g=o.slice(i,i=n[m++]),a=hn(n[m++],t.cm.options)}}else for(var q=1;q<n.length;q+=2)t.addToken(t,o.slice(i,i=n[q]),hn(n[q+1],t.cm.options))}function xn(e,t,n){this.line=t,this.rest=en(t),this.size=this.rest?tt($(this.rest))-n+1:1,this.node=this.text=null,this.hidden=rn(e,t)}function kn(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new xn(e.doc,Xe(e.doc,i),i);r=i+a.size,o.push(a)}return o}var On=null;function Sn(e){On?On.ops.push(e):e.ownsGroup=On={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}function Nn(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{On=null,t(n)}}var Cn=null;function qn(e,t){var n=me(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);On?r=On.delayedCallbacks:Cn?r=Cn:(r=Cn=[],setTimeout(Tn,0));for(var i=function(e){r.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)i(a)}}function Tn(){var e=Cn;Cn=null;for(var t=0;t<e.length;++t)e[t]()}function Pn(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?Mn(e,t):"gutter"==i?Rn(e,t,n,r):"class"==i?Ln(e,t):"widget"==i&&In(e,t,r)}t.changes=null}function jn(e){return e.node==e.text&&(e.node=q("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function An(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=jn(t);t.background=r.insertBefore(q("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Dn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):mn(e,t)}function Mn(e,t){var n=t.text.className,r=Dn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Ln(e,t)):n&&(t.text.className=n)}function Ln(e,t){An(e,t),t.line.wrapClass?jn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Rn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=jn(t);t.gutterBackground=q("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=jn(t),s=t.gutter=q("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(q("div",ot(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.display.gutterSpecs.length;++l){var u=e.display.gutterSpecs[l].className,c=i.hasOwnProperty(u)&&i[u];c&&s.appendChild(q("div",[c],"CodeMirror-gutter-elt","left: "+r.gutterLeft[u]+"px; width: "+r.gutterWidth[u]+"px"))}}}function In(e,t,n){t.alignable&&(t.alignable=null);for(var r=O("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,r.test(o.className)&&t.node.removeChild(o);Vn(e,t,n)}function Fn(e,t,n,r){var o=Dn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),Ln(e,t),Rn(e,t,n,r),Vn(e,t,r),t.node}function Vn(e,t,n){if(Bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)Bn(e,t.rest[r],t,n,!1)}function Bn(e,t,n,r,o){if(t.widgets)for(var i=jn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],u=q("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),zn(l,u,n,r),e.display.input.setUneditable(u),o&&l.above?i.insertBefore(u,n.gutter||n.text):i.appendChild(u),qn(l,"redraw")}}function zn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Hn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!P(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),C(t.display.measure,q("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Un(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Wn(e){return e.lineSpace.offsetTop}function Gn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Kn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=C(e.measure,q("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Zn(e){return B-e.display.nativeBarWidth}function $n(e){return e.display.scroller.clientWidth-Zn(e)-e.display.barWidth}function Yn(e){return e.display.scroller.clientHeight-Zn(e)-e.display.barHeight}function Xn(e,t,n){var r=e.options.lineWrapping,o=r&&$n(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],u=a[s+1];Math.abs(l.bottom-u.bottom)>2&&i.push((l.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Jn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(tt(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Qn(e,t){var n=tt(t=Jt(t)),r=e.display.externalMeasured=new xn(e.doc,t,n);r.lineN=n;var o=r.built=mn(e,r);return r.text=o.pre,C(e.display.lineMeasure,o.pre),r}function er(e,t,n,r){return rr(e,nr(e,t),n,r)}function tr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Lr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function nr(e,t){var n=tt(t),r=tr(e,n);r&&!r.text?r=null:r&&r.changes&&(Pn(e,r,n,Pr(e)),e.curOp.forceUpdate=!0),r||(r=Qn(e,t));var o=Jn(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function rr(e,t,n,r,o){t.before&&(n=-1);var i,a=n+(r||"");return t.cache.hasOwnProperty(a)?i=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Xn(e,t.view,t.rect),t.hasHeights=!0),(i=lr(e,t,n,r)).bogus||(t.cache[a]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var or,ir={left:0,right:0,top:0,bottom:0};function ar(e,t,n){for(var r,o,i,a,s,l,u=0;u<e.length;u+=3)if(s=e[u],l=e[u+1],t<s?(o=0,i=1,a="left"):t<l?i=1+(o=t-s):(u==e.length-3||t==l&&e[u+3]>t)&&(o=(i=l-s)-1,t>=l&&(a="right")),null!=o){if(r=e[u+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==l-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)r=e[(u+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:s,coverEnd:l}}function sr(e,t){var n=ir;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function lr(e,t,n,r){var o,i=ar(t.map,n,r),l=i.node,u=i.start,c=i.end,d=i.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;u&&ie(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+c<i.coverEnd&&ie(t.line.text.charAt(i.coverStart+c));)++c;if((o=a&&s<9&&0==u&&c==i.coverEnd-i.coverStart?l.parentNode.getBoundingClientRect():sr(S(l,u,c).getClientRects(),r)).left||o.right||0==u)break;c=u,u-=1,d="right"}a&&s<11&&(o=ur(e.display.measure,o))}else{var f;u>0&&(d=r="right"),o=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!u&&(!o||!o.left&&!o.right)){var h=l.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+Tr(e.display),top:h.top,bottom:h.bottom}:ir}for(var m=o.top-t.rect.top,g=o.bottom-t.rect.top,v=(m+g)/2,b=t.view.measure.heights,y=0;y<b.length-1&&!(v<b[y]);y++);var _=y?b[y-1]:0,w=b[y],x={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:_,bottom:w};return o.left||o.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=m,x.rbottom=g),x}function ur(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ie(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function cr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function dr(e){e.display.externalMeasure=null,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)cr(e.display.view[t])}function pr(e){dr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(){return c&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hr(){return c&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mr(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Hn(e.widgets[n]));return t}function gr(e,t,n,r,o){if(!o){var i=mr(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=an(t);if("local"==r?a+=Wn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:hr());var l=s.left+("window"==r?0:fr());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function vr(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=fr(),o-=hr();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function br(e,t,n,r,o){return r||(r=Xe(e.doc,t.line)),gr(e,r,er(e,r,t.ch,o),n)}function yr(e,t,n,r,o,i){function a(t,a){var s=rr(e,o,t,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,gr(e,r,s,n)}r=r||Xe(e.doc,t.line),o||(o=nr(e,r));var s=pe(r,e.doc.direction),l=t.ch,u=t.sticky;if(l>=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!s)return a("before"==u?l-1:l,"before"==u);function c(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=ce(s,l,u),p=ue,f=c(l,d,"before"==u);return null!=p&&(f.other=c(l,p,"before"!=u)),f}function _r(e,t){var n=0;t=pt(e.doc,t),e.options.lineWrapping||(n=Tr(e.display)*t.ch);var r=Xe(e.doc,t.line),o=an(r)+Wn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function wr(e,t,n,r,o){var i=it(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function xr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return wr(r.first,0,null,-1,-1);var o=nt(r,n),i=r.first+r.size-1;if(o>i)return wr(r.first+r.size-1,Xe(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=Xe(r,o);;){var s=Er(e,a,o,t,n),l=Yt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var u=l.find(1);if(u.line==o)return u;a=Xe(r,o=u.line)}}function kr(e,t,n,r){r-=mr(t);var o=t.text.length,i=se((function(t){return rr(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=se((function(t){return rr(e,n,t).top>r}),i,o)}}function Or(e,t,n,r){return n||(n=nr(e,t)),kr(e,t,n,gr(e,t,rr(e,n,r),"line").top)}function Sr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Er(e,t,n,r,o){o-=an(t);var i=nr(e,t),a=mr(t),s=0,l=t.text.length,u=!0,c=pe(t,e.doc.direction);if(c){var d=(e.options.lineWrapping?Cr:Nr)(e,t,n,i,c,r,o);s=(u=1!=d.level)?d.from:d.to-1,l=u?d.to:d.from-1}var p,f,h=null,m=null,g=se((function(t){var n=rr(e,i,t);return n.top+=a,n.bottom+=a,!!Sr(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,m=n),!0)}),s,l),v=!1;if(m){var b=r-m.left<m.right-r,y=b==u;g=h+(y?0:1),f=y?"after":"before",p=b?m.left:m.right}else{u||g!=l&&g!=s||g++,f=0==g?"after":g==t.text.length?"before":rr(e,i,g-(u?1:0)).bottom+a<=o==u?"after":"before";var _=yr(e,it(n,g,f),"line",t,i);p=_.left,v=o<_.top?-1:o>=_.bottom?1:0}return wr(n,g=ae(t.text,g,1),f,v,r-p)}function Nr(e,t,n,r,o,i,a){var s=se((function(s){var l=o[s],u=1!=l.level;return Sr(yr(e,it(n,u?l.to:l.from,u?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[s];if(s>0){var u=1!=l.level,c=yr(e,it(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Sr(c,i,a,!0)&&c.top>a&&(l=o[s-1])}return l}function Cr(e,t,n,r,o,i,a){var s=kr(e,t,r,a),l=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,d=null,p=0;p<o.length;p++){var f=o[p];if(!(f.from>=u||f.to<=l)){var h=rr(e,r,1!=f.level?Math.min(u,f.to)-1:Math.max(l,f.from)).right,m=h<i?i-h+1e9:h-i;(!c||d>m)&&(c=f,d=m)}}return c||(c=o[o.length-1]),c.from<l&&(c={from:l,to:c.to,level:c.level}),c.to>u&&(c={from:c.from,to:u,level:c.level}),c}function qr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==or){or=q("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)or.appendChild(document.createTextNode("x")),or.appendChild(q("br"));or.appendChild(document.createTextNode("x"))}C(e.measure,or);var n=or.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Tr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=q("span","xxxxxxxxxx"),n=q("pre",[t],"CodeMirror-line-like");C(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function Pr(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.clientWidth}return{fixedPos:jr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function jr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ar(e){var t=qr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Tr(e.display)-3);return function(o){if(rn(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function Dr(e){var t=e.doc,n=Ar(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function Mr(e,t,n,r){var o=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,u=xr(e,i,a);if(r&&u.xRel>0&&(l=Xe(e.doc,u.line).text).length==u.ch){var c=I(l,l.length,e.options.tabSize)-l.length;u=it(u.line,Math.max(0,Math.round((i-Kn(e.display).left)/Tr(e.display))-c))}return u}function Lr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Rr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Tt&&tn(e.doc,t)<o.viewTo&&Fr(e);else if(n<=o.viewFrom)Tt&&nn(e.doc,n+r)>o.viewFrom?Fr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)Fr(e);else if(t<=o.viewFrom){var i=Vr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):Fr(e)}else if(n>=o.viewTo){var a=Vr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):Fr(e)}else{var s=Vr(e,t,t,-1),l=Vr(e,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(kn(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):Fr(e)}var u=o.externalMeasured;u&&(n<u.lineN?u.lineN+=r:t<u.lineN+u.size&&(o.externalMeasured=null))}function Ir(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[Lr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==V(a,n)&&a.push(n)}}}function Fr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Vr(e,t,n,r){var o,i=Lr(e,t),a=e.display.view;if(!Tt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=t){if(r>0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;tn(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Br(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=kn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=kn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Lr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(kn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,Lr(e,n)))),r.viewTo=n}function zr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function Hr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ur(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&Wr(e,s.head,o),l||Kr(e,s,i)}}return r}function Wr(e,t,n){var r=yr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(q("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var i=n.appendChild(q("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function Gr(e,t){return e.top-t.top||e.left-t.left}function Kr(e,t,n){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=Kn(e.display),s=a.left,l=Math.max(r.sizerWidth,$n(e)-r.sizer.offsetLeft)-a.right,u="ltr"==o.direction;function c(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(q("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var i,a,d=Xe(o,t),p=d.text.length;function f(n,r){return br(e,it(t,n),"div",d,r)}function h(t,n,r){var o=Or(e,d,null,t),i="ltr"==n==("after"==r)?"left":"right";return f("after"==r?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),i)[i]}var m=pe(d,o.direction);return le(m,n||0,null==r?p:r,(function(e,t,o,d){var g="ltr"==o,v=f(e,g?"left":"right"),b=f(t-1,g?"right":"left"),y=null==n&&0==e,_=null==r&&t==p,w=0==d,x=!m||d==m.length-1;if(b.top-v.top<=3){var k=(u?_:y)&&x,O=(u?y:_)&&w?s:(g?v:b).left,S=k?l:(g?b:v).right;c(O,v.top,S-O,v.bottom)}else{var E,N,C,q;g?(E=u&&y&&w?s:v.left,N=u?l:h(e,o,"before"),C=u?s:h(t,o,"after"),q=u&&_&&x?l:b.right):(E=u?h(e,o,"before"):s,N=!u&&y&&w?l:v.right,C=!u&&_&&x?s:b.left,q=u?h(t,o,"after"):l),c(E,v.top,N-E,v.bottom),v.bottom<b.top&&c(s,v.bottom,null,b.top),c(C,b.top,q-C,b.bottom)}(!i||Gr(v,i)<0)&&(i=v),Gr(b,i)<0&&(i=b),(!a||Gr(v,a)<0)&&(a=v),Gr(b,a)<0&&(a=b)})),{start:i,end:a}}var p=t.from(),f=t.to();if(p.line==f.line)d(p.line,p.ch,f.ch);else{var h=Xe(o,p.line),m=Xe(o,f.line),g=Jt(h)==Jt(m),v=d(p.line,p.ch,g?h.text.length+1:null).end,b=d(f.line,g?0:null,f.ch).start;g&&(v.top<b.top-2?(c(v.right,v.top,null,v.bottom),c(s,b.top,b.left,b.bottom)):c(v.right,v.top,b.left-v.right,v.bottom)),v.bottom<b.top&&c(s,v.bottom,null,b.top)}n.appendChild(i)}function Zr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function $r(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Xr(e))}function Yr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Jr(e))}),100)}function Xr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ve(e,"focus",e,t),e.state.focused=!0,A(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Zr(e))}function Jr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ve(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Qr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var o=t.view[r],i=e.options.lineWrapping,l=void 0,u=0;if(!o.hidden){if(a&&s<8){var c=o.node.offsetTop+o.node.offsetHeight;l=c-n,n=c}else{var d=o.node.getBoundingClientRect();l=d.bottom-d.top,!i&&o.text.firstChild&&(u=o.text.firstChild.getBoundingClientRect().right-d.left-1)}var p=o.line.height-l;if((p>.005||p<-.005)&&(et(o.line,l),eo(o.line),o.rest))for(var f=0;f<o.rest.length;f++)eo(o.rest[f]);if(u>e.display.sizerWidth){var h=Math.ceil(u/Tr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function eo(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function to(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Wn(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=nt(t,r),a=nt(t,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=nt(t,an(Xe(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=nt(t,an(Xe(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function no(e,t){if(!be(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(t.top+r.top<0?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var i=q("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Wn(e.display))+"px;\n height: "+(t.bottom-t.top+Zn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}function ro(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?it(t.line,t.ch+1,"before"):t,t=t.ch?it(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,s=yr(e,t),l=n&&n!=t?yr(e,n):s,u=io(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=u.scrollTop&&(fo(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=u.scrollLeft&&(mo(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}function oo(e,t){var n=io(e,t);null!=n.scrollTop&&fo(e,n.scrollTop),null!=n.scrollLeft&&mo(e,n.scrollLeft)}function io(e,t){var n=e.display,r=qr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=Yn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+Gn(n),l=t.top<r,u=t.bottom>s-r;if(t.top<o)a.scrollTop=l?0:t.top;else if(t.bottom>o+i){var c=Math.min(t.top,(u?s:t.bottom)-i);c!=o&&(a.scrollTop=c)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=$n(e)-n.gutters.offsetWidth,h=t.right-t.left>f;return h&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+d-(h?0:10)):t.right>f+p-3&&(a.scrollLeft=t.right+(h?0:10)-f),a}function ao(e,t){null!=t&&(co(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function so(e){co(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function lo(e,t,n){null==t&&null==n||co(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function uo(e,t){co(e),e.curOp.scrollToPos=t}function co(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,po(e,_r(e,t.from),_r(e,t.to),t.margin))}function po(e,t,n,r){var o=io(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});lo(e,o.scrollLeft,o.scrollTop)}function fo(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Uo(e,{top:t}),ho(e,t,!0),n&&Uo(e),Lo(e,100))}function ho(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function mo(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Zo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function go(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Gn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Zn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vo=function(e,t,n){this.cm=n;var r=this.vert=q("div",[q("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=q("div",[q("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),he(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),he(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vo.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},vo.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vo.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vo.prototype.zeroWidthHack=function(){var e=b&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new F,this.disableVert=new F},vo.prototype.enableZeroWidthBar=function(e,t,n){function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},vo.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bo=function(){};function yo(e,t){t||(t=go(e));var n=e.display.barWidth,r=e.display.barHeight;_o(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Qr(e),_o(e,go(e)),n=e.display.barWidth,r=e.display.barHeight}function _o(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}bo.prototype.update=function(){return{bottom:0,right:0}},bo.prototype.setScrollLeft=function(){},bo.prototype.setScrollTop=function(){},bo.prototype.clear=function(){};var wo={native:vo,null:bo};function xo(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wo[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),he(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?mo(e,t):fo(e,t)}),e),e.display.scrollbars.addClass&&A(e.display.wrapper,e.display.scrollbars.addClass)}var ko=0;function Oo(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ko,markArrays:null},Sn(e.curOp)}function So(e){var t=e.curOp;t&&Nn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;Eo(e)}))}function Eo(e){for(var t=e.ops,n=0;n<t.length;n++)No(t[n]);for(var r=0;r<t.length;r++)Co(t[r]);for(var o=0;o<t.length;o++)qo(t[o]);for(var i=0;i<t.length;i++)To(t[i]);for(var a=0;a<t.length;a++)Po(t[a])}function No(e){var t=e.cm,n=t.display;Fo(t),e.updateMaxLine&&ln(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Co(e){e.updatedDisplay=e.mustUpdate&&zo(e.cm,e.update)}function qo(e){var t=e.cm,n=t.display;e.updatedDisplay&&Qr(t),e.barMeasure=go(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=er(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Zn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-$n(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function To(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&mo(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==j();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yo(t,e.barMeasure),e.updatedDisplay&&Ko(t,e.barMeasure),e.selectionChanged&&Zr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&$r(e.cm)}function Po(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Ho(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&ho(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&mo(t,e.scrollLeft,!0,!0),e.scrollToPos&&no(t,ro(t,pt(r,e.scrollToPos.from),pt(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ve(o[a],"hide");if(i)for(var s=0;s<i.length;++s)i[s].lines.length&&ve(i[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ve(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function jo(e,t){if(e.curOp)return t();Oo(e);try{return t()}finally{So(e)}}function Ao(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Oo(e);try{return t.apply(e,arguments)}finally{So(e)}}}function Do(e){return function(){if(this.curOp)return e.apply(this,arguments);Oo(this);try{return e.apply(this,arguments)}finally{So(this)}}}function Mo(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Oo(t);try{return e.apply(this,arguments)}finally{So(t)}}}function Lo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,L(Ro,e))}function Ro(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=yt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?Ke(t.mode,r.state):null,l=vt(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var u=i.styleClasses,c=l.classes;c?i.styleClasses=c:u&&(i.styleClasses=null);for(var d=!a||a.length!=i.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),p=0;!d&&p<a.length;++p)d=a[p]!=i.styles[p];d&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&_t(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Lo(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&jo(e,(function(){for(var t=0;t<o.length;t++)Ir(e,o[t],"text")}))}}var Io=function(e,t,n){var r=e.display;this.viewport=t,this.visible=to(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=$n(e),this.force=n,this.dims=Pr(e),this.events=[]};function Fo(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Zn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Zn(e)+"px",t.scrollbarsClipped=!0)}function Vo(e){if(e.hasFocus())return null;var t=j();if(!t||!P(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&P(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Bo(e){if(e&&e.activeElt&&e.activeElt!=j()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&P(document.body,e.anchorNode)&&P(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function zo(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Fr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==zr(e))return!1;$o(e)&&(Fr(e),t.dims=Pr(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Tt&&(i=tn(e.doc,i),a=nn(e.doc,a));var s=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Br(e,i,a),n.viewOffset=an(Xe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=zr(e);if(!s&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=Vo(e);return l>4&&(n.lineDiv.style.display="none"),Wo(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Bo(u),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Lo(e,400)),n.updateLineNumbers=null,!0}function Ho(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=$n(e))r&&(t.visible=to(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Gn(e.display)-Yn(e),n.top)}),t.visible=to(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!zo(e,t))break;Qr(e);var o=go(e);Hr(e),yo(e,o),Ko(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Uo(e,t){var n=new Io(e,t);if(zo(e,n)){Qr(e),Ho(e,n);var r=go(e);Hr(e),yo(e,r),Ko(e,r),n.finish()}}function Wo(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(t){var n=t.nextSibling;return l&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,c=r.viewFrom,d=0;d<u.length;d++){var p=u[d];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=s(a);var f=o&&null!=t&&t<=c&&p.lineNumber;p.changes&&(V(p.changes,"gutter")>-1&&(f=!1),Pn(e,p,c,n)),f&&(N(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(ot(e.options,c)))),a=p.node.nextSibling}else{var h=Fn(e,p,c,n);i.insertBefore(h,a)}c+=p.size}for(;a;)a=s(a)}function Go(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",qn(e,"gutterChanged",e)}function Ko(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Zn(e)+"px"}function Zo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=jr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function $o(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ot(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(q("div",[q("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Go(e.display),!0}return!1}function Yo(e,t){for(var n=[],r=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;r=!0}n.push({className:i,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Xo(e){var t=e.gutters,n=e.gutterSpecs;N(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],i=o.className,a=o.style,s=t.appendChild(q("div",null,"CodeMirror-gutter "+i));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Go(e)}function Jo(e){Xo(e.display),Rr(e),Zo(e)}function Qo(e,t,r,o){var i=this;this.input=r,i.scrollbarFiller=q("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=q("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=T("div",null,"CodeMirror-code"),i.selectionDiv=q("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=q("div",null,"CodeMirror-cursors"),i.measure=q("div",null,"CodeMirror-measure"),i.lineMeasure=q("div",null,"CodeMirror-measure"),i.lineSpace=T("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var u=T("div",[i.lineSpace],"CodeMirror-lines");i.mover=q("div",[u],null,"position: relative"),i.sizer=q("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=q("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),i.gutters=q("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=q("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=q("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&v||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=Yo(o.gutters,o.lineNumbers),Xo(i),r.init(i)}Io.prototype.signal=function(e,t){_e(e,t)&&this.events.push(arguments)},Io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ve.apply(null,this.events[e])};var ei=0,ti=null;function ni(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function ri(e){var t=ni(e);return t.x*=ti,t.y*=ti,t}function oi(e,t){var r=ni(t),o=r.x,i=r.y,a=e.display,s=a.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(o&&u||i&&c){if(i&&b&&l)e:for(var p=t.target,f=a.view;p!=s;p=p.parentNode)for(var h=0;h<f.length;h++)if(f[h].node==p){e.display.currentWheelTarget=p;break e}if(o&&!n&&!d&&null!=ti)return i&&c&&fo(e,Math.max(0,s.scrollTop+i*ti)),mo(e,Math.max(0,s.scrollLeft+o*ti)),(!i||i&&c)&&xe(t),void(a.wheelStartX=null);if(i&&null!=ti){var m=i*ti,g=e.doc.scrollTop,v=g+a.wrapper.clientHeight;m<0?g=Math.max(0,g+m-50):v=Math.min(e.doc.height,v+m+50),Uo(e,{top:g,bottom:v})}ei<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=o,a.wheelDY=i,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(ti=(ti*ei+n)/(ei+1),++ei)}}),200)):(a.wheelDX+=o,a.wheelDY+=i))}}a?ti=-.53:n?ti=15:c?ti=-.7:p&&(ti=-1/3);var ii=function(e,t){this.ranges=e,this.primIndex=t};ii.prototype.primary=function(){return this.ranges[this.primIndex]},ii.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!st(n.anchor,r.anchor)||!st(n.head,r.head))return!1}return!0},ii.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ai(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new ii(e,this.primIndex)},ii.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ii.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(at(t,r.from())>=0&&at(e,r.to())<=0)return n}return-1};var ai=function(e,t){this.anchor=e,this.head=t};function si(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=V(t,o);for(var i=1;i<t.length;i++){var a=t[i],s=t[i-1],l=at(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var u=ct(s.from(),a.from()),c=ut(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,t.splice(--i,2,new ai(d?c:u,d?u:c))}}return new ii(t,n)}function li(e,t){return new ii([new ai(e,t||e)],0)}function ui(e){return e.text?it(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ci(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return ui(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=ui(t).ch-t.to.ch),it(n,r)}function di(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new ai(ci(o.anchor,t),ci(o.head,t)))}return si(e.cm,n,e.sel.primIndex)}function pi(e,t,n){return e.line==t.line?it(n.line,e.ch-t.ch+n.ch):it(n.line+(e.line-t.line),e.ch)}function fi(e,t,n){for(var r=[],o=it(e.first,0),i=o,a=0;a<t.length;a++){var s=t[a],l=pi(s.from,o,i),u=pi(ui(s),o,i);if(o=s.to,i=u,"around"==n){var c=e.sel.ranges[a],d=at(c.head,c.anchor)<0;r[a]=new ai(d?u:l,d?l:u)}else r[a]=new ai(l,l)}return new ii(r,e.sel.primIndex)}function hi(e){e.doc.mode=Ue(e.options,e.doc.modeOption),mi(e)}function mi(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Lo(e,100),e.state.modeGen++,e.curOp&&Rr(e)}function gi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==$(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function vi(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){cn(e,n,o,r),qn(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new un(u[i],o(i),r));return n}var s=t.from,l=t.to,u=t.text,c=Xe(e,s.line),d=Xe(e,l.line),p=$(u),f=o(u.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,u.length)),e.remove(u.length,e.size-u.length);else if(gi(e,t)){var m=a(0,u.length-1);i(d,d.text,f),h&&e.remove(s.line,h),m.length&&e.insert(s.line,m)}else if(c==d)if(1==u.length)i(c,c.text.slice(0,s.ch)+p+c.text.slice(l.ch),f);else{var g=a(1,u.length-1);g.push(new un(p+c.text.slice(l.ch),f,r)),i(c,c.text.slice(0,s.ch)+u[0],o(0)),e.insert(s.line+1,g)}else if(1==u.length)i(c,c.text.slice(0,s.ch)+u[0]+d.text.slice(l.ch),o(0)),e.remove(s.line+1,h);else{i(c,c.text.slice(0,s.ch)+u[0],o(0)),i(d,p+d.text.slice(l.ch),f);var v=a(1,u.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}qn(e,"change",e,t)}function bi(e,t,n){function r(e,o,i){if(e.linked)for(var a=0;a<e.linked.length;++a){var s=e.linked[a];if(s.doc!=o){var l=i&&s.sharedHist;n&&!l||(t(s.doc,l),r(s.doc,e,l))}}}r(e,null,!0)}function yi(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Dr(e),hi(e),_i(e),e.options.direction=t.direction,e.options.lineWrapping||ln(e),e.options.mode=t.modeOption,Rr(e)}function _i(e){("rtl"==e.doc.direction?A:E)(e.display.lineDiv,"CodeMirror-rtl")}function wi(e){jo(e,(function(){_i(e),Rr(e)}))}function xi(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function ki(e,t){var n={from:lt(t.from),to:ui(t),text:Je(e,t.from,t.to)};return Ti(e,n,t.from.line,t.to.line+1),bi(e,(function(e){return Ti(e,n,t.from.line,t.to.line+1)}),!0),n}function Oi(e){for(;e.length&&$(e).ranges;)e.pop()}function Si(e,t){return t?(Oi(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}function Ei(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,s=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=Si(o,o.lastOp==r)))a=$(i.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=ui(t):i.changes.push(ki(e,t));else{var l=$(o.done);for(l&&l.ranges||qi(e.sel,o.done),i={changes:[ki(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||ve(e,"historyAdded")}function Ni(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Ci(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||Ni(e,i,$(o.done),t))?o.done[o.done.length-1]=t:qi(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Oi(o.undone)}function qi(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ti(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Pi(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function ji(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(Pi(n[o]));return r}function Ai(e,t){var n=ji(e,t),r=Ft(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],u=0;u<i.length;++u)if(i[u].marker==l.marker)continue e;i.push(l)}else a&&(n[o]=a)}return n}function Di(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?ii.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var u=a[l],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&V(t,Number(c[1]))>-1&&($(s)[d]=u[d],delete u[d])}}}return r}function Mi(e,t,n,r){if(r){var o=e.anchor;if(n){var i=at(t,o)<0;i!=at(n,o)<0?(o=t,t=n):i!=at(t,n)<0&&(t=n)}return new ai(o,t)}return new ai(n||t,t)}function Li(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),zi(e,new ii([Mi(e.sel.primary(),t,n,o)],0),r)}function Ri(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=Mi(e.sel.ranges[i],t[i],null,o);zi(e,si(e.cm,r,e.sel.primIndex),n)}function Ii(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,zi(e,si(e.cm,o,e.sel.primIndex),r)}function Fi(e,t,n,r){zi(e,li(t,n),r)}function Vi(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ai(pt(e,t[n].anchor),pt(e,t[n].head))},origin:n&&n.origin};return ve(e,"beforeSelectionChange",e,r),e.cm&&ve(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?si(e.cm,r.ranges,r.ranges.length-1):t}function Bi(e,t,n){var r=e.history.done,o=$(r);o&&o.ranges?(r[r.length-1]=t,Hi(e,t,n)):zi(e,t,n)}function zi(e,t,n){Hi(e,t,n),Ci(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Hi(e,t,n){(_e(e,"beforeSelectionChange")||e.cm&&_e(e.cm,"beforeSelectionChange"))&&(t=Vi(e,t,n));var r=n&&n.bias||(at(t.primary().head,e.sel.primary().head)<0?-1:1);Ui(e,Gi(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||so(e.cm)}function Ui(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ye(e.cm)),qn(e,"cursorActivity",e))}function Wi(e){Ui(e,Gi(e,e.sel,null,!1))}function Gi(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=Zi(e,a.anchor,s&&s.anchor,n,r),u=Zi(e,a.head,s&&s.head,n,r);(o||l!=a.anchor||u!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new ai(l,u))}return o?si(e.cm,o,t.primIndex):t}function Ki(e,t,n,r,o){var i=Xe(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker,u="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,c="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(u?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(c?s.to>=t.ch:s.to>t.ch))){if(o&&(ve(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),p=void 0;if((r<0?c:u)&&(d=$i(e,d,-r,d&&d.line==t.line?i:null)),d&&d.line==t.line&&(p=at(d,n))&&(r<0?p<0:p>0))return Ki(e,d,t,r,o)}var f=l.find(r<0?-1:1);return(r<0?u:c)&&(f=$i(e,f,r,f.line==t.line?i:null)),f?Ki(e,f,t,r,o):null}}return t}function Zi(e,t,n,r,o){var i=r||1,a=Ki(e,t,n,i,o)||!o&&Ki(e,t,n,i,!0)||Ki(e,t,n,-i,o)||!o&&Ki(e,t,n,-i,!0);return a||(e.cantEdit=!0,it(e.first,0))}function $i(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?pt(e,it(t.line-1)):null:n>0&&t.ch==(r||Xe(e,t.line)).text.length?t.line<e.first+e.size-1?it(t.line+1,0):null:new it(t.line,t.ch+n)}function Yi(e){e.setSelection(it(e.firstLine(),0),it(e.lastLine()),H)}function Xi(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=pt(e,t)),n&&(r.to=pt(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),ve(e,"beforeChange",e,r),e.cm&&ve(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Ji(e,t,n){if(e.cm){if(!e.cm.curOp)return Ao(e.cm,Ji)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"))||(t=Xi(e,t,!0))){var r=qt&&!n&&Bt(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)Qi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else Qi(e,t)}}function Qi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=di(e,t);Ei(e,t,n,e.cm?e.cm.curOp.id:NaN),na(e,t,n,Ft(e,t));var r=[];bi(e,(function(e,n){n||-1!=V(r,e.history)||(sa(e.history,t),r.push(e.history)),na(e,t,null,Ft(e,t))}))}}function ea(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,u=0;u<s.length&&(o=s[u],n?!o.ranges||o.equals(e.sel):o.ranges);u++);if(u!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(r)return void s.push(o);break}if(qi(o,l),n&&!o.equals(e.sel))return void zi(e,o,{clearRedo:!1});a=o}var c=[];qi(a,l),l.push({changes:c,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var d=_e(e,"beforeChange")||e.cm&&_e(e.cm,"beforeChange"),p=function(n){var r=o.changes[n];if(r.origin=t,d&&!Xi(e,r,!1))return s.length=0,{};c.push(ki(e,r));var i=n?di(e,r):$(s);na(e,r,i,Ai(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:ui(r)});var a=[];bi(e,(function(e,t){t||-1!=V(a,e.history)||(sa(e.history,r),a.push(e.history)),na(e,r,null,Ai(e,r))}))},f=o.changes.length-1;f>=0;--f){var h=p(f);if(h)return h.v}}}}function ta(e,t){if(0!=t&&(e.first+=t,e.sel=new ii(Y(e.sel.ranges,(function(e){return new ai(it(e.anchor.line+t,e.anchor.ch),it(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Rr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Ir(e.cm,r,"gutter")}}function na(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ao(e.cm,na)(e,t,n,r);if(t.to.line<e.first)ta(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);ta(e,o),t={from:it(e.first,0),to:it(t.to.line+o,t.to.ch),text:[$(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:it(i,Xe(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Je(e,t.from,t.to),n||(n=di(e,t)),e.cm?ra(e.cm,t,r):vi(e,t,r),Hi(e,n,H),e.cantEdit&&Zi(e,it(e.firstLine(),0))&&(e.cantEdit=!1)}}function ra(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=tt(Jt(Xe(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ye(e),vi(r,t,n,Ar(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=sn(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),Ct(r,i.line),Lo(e,400);var u=t.text.length-(a.line-i.line)-1;t.full?Rr(e):i.line!=a.line||1!=t.text.length||gi(e.doc,t)?Rr(e,i.line,a.line+1,u):Ir(e,i.line,"text");var c=_e(e,"changes"),d=_e(e,"change");if(d||c){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&qn(e,"change",e,p),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function oa(e,t,n,r,o){var i;r||(r=n),at(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof t&&(t=e.splitLines(t)),Ji(e,{from:n,to:r,text:t,origin:o})}function ia(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function aa(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var s=0;s<i.ranges.length;s++)ia(i.ranges[s].anchor,t,n,r),ia(i.ranges[s].head,t,n,r)}else{for(var l=0;l<i.changes.length;++l){var u=i.changes[l];if(n<u.from.line)u.from=it(u.from.line+r,u.from.ch),u.to=it(u.to.line+r,u.to.ch);else if(t<=u.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function sa(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;aa(e.done,n,r,o),aa(e.undone,n,r,o)}function la(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=Xe(e,dt(e,t)):o=tt(t),null==o?null:(r(i,o)&&e.cm&&Ir(e.cm,o,n),i)}function ua(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ca(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}ai.prototype.from=function(){return ct(this.anchor,this.head)},ai.prototype.to=function(){return ut(this.anchor,this.head)},ai.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ua.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,dn(o),qn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},ca.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ua))){var s=[];this.collapse(s),this.children=[new ua(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new ua(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++r,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ca(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=V(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new ca(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var da=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function pa(e,t,n){an(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ao(e,n)}function fa(e,t,n,r){var o=new da(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),la(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!rn(e,t)){var r=an(t)<e.scrollTop;et(t,t.height+Hn(o)),r&&ao(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&qn(i,"lineWidgetAdded",i,o,"number"==typeof t?t:tt(t)),o}da.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=tt(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=Hn(this);et(n,Math.max(0,n.height-i)),e&&(jo(e,(function(){pa(e,n,-i),Ir(e,r,"widget")})),qn(e,"lineWidgetCleared",e,this,r))}},da.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=Hn(this)-t;o&&(rn(this.doc,r)||et(r,r.height+o),n&&jo(n,(function(){n.curOp.forceUpdate=!0,pa(n,r,o),qn(n,"lineWidgetChanged",n,e,tt(r))})))},we(da);var ha=0,ma=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ha};function ga(e,t,n,r,o){if(r&&r.shared)return ba(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return Ao(e.cm,ga)(e,t,n,r,o);var i=new ma(e,o),a=at(t,n);if(r&&R(r,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=T("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Xt(e,t.line,t,n,i)||t.line!=n.line&&Xt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");jt()}i.addToHistory&&Ei(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(r){u&&i.collapsed&&!u.options.lineWrapping&&Jt(r)==u.display.maxLine&&(s=!0),i.collapsed&&l!=t.line&&et(r,0),Lt(r,new At(i,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),i.clearOnEnter&&he(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Pt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ha,i.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),i.collapsed)Rr(u,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var c=t.line;c<=n.line;c++)Ir(u,c,"text");i.atomic&&Wi(u.doc),qn(u,"markerAdded",u,i)}return i}ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Oo(e),_e(this,"clear")){var n=this.find();n&&qn(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=Dt(a.markedSpans,this);e&&!this.collapsed?Ir(e,tt(a),"text"):e&&(null!=s.to&&(o=tt(a)),null!=s.from&&(r=tt(a))),a.markedSpans=Mt(a.markedSpans,s),null==s.from&&this.collapsed&&!rn(this.doc,a)&&e&&et(a,qr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var u=Jt(this.lines[l]),c=sn(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Rr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Wi(e.doc)),e&&qn(e,"markerCleared",e,this,r,o),t&&So(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=Dt(i.markedSpans,this);if(null!=a.from&&(n=it(t?i:tt(i),a.from),-1==e))return n;if(null!=a.to&&(r=it(t?i:tt(i),a.to),1==e))return r}return n&&{from:n,to:r}},ma.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&jo(r,(function(){var o=t.line,i=tt(t.line),a=tr(r,i);if(a&&(cr(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!rn(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=Hn(n)-s;l&&et(o,o.height+l)}qn(r,"markerChanged",r,e)}))},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=V(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(V(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(ma);var va=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ba(e,t,n,r,o){(r=R(r)).shared=!1;var i=[ga(e,t,n,r,o)],a=i[0],s=r.widgetNode;return bi(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),i.push(ga(e,pt(e,t),pt(e,n),r,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=$(i)})),new va(i,a)}function ya(e){return e.findMarks(it(e.first,0),e.clipPos(it(e.lastLine())),(function(e){return e.parent}))}function _a(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(at(i,a)){var s=ga(e,i,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}function wa(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];bi(n.primary.doc,(function(e){return r.push(e)}));for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==V(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();qn(this,"clear")}},va.prototype.find=function(e,t){return this.primary.find(e,t)},we(va);var xa=0,ka=function(e,t,n,r,o){if(!(this instanceof ka))return new ka(e,t,n,r,o);null==n&&(n=0),ca.call(this,[new ua([new un("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=it(n,0);this.sel=li(i),this.history=new xi(null),this.id=++xa,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),vi(this,{from:i,to:i,text:e}),zi(this,li(i),H)};ka.prototype=Q(ca.prototype,{constructor:ka,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Qe(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Mo((function(e){var t=it(this.first,0),n=this.first+this.size-1;Ji(this,{from:t,to:it(n,Xe(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&lo(this.cm,0,0),zi(this,li(t),H)})),replaceRange:function(e,t,n,r){oa(this,e,t=pt(this,t),n=n?pt(this,n):t,r)},getRange:function(e,t,n){var r=Je(this,pt(this,e),pt(this,t));return!1===n?r:""===n?r.join(""):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(rt(this,e))return Xe(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Xe(this,e)),Jt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return pt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mo((function(e,t,n){Fi(this,pt(this,"number"==typeof e?it(e,t||0):e),null,n)})),setSelection:Mo((function(e,t,n){Fi(this,pt(this,e),pt(this,t||e),n)})),extendSelection:Mo((function(e,t,n){Li(this,pt(this,e),t&&pt(this,t),n)})),extendSelections:Mo((function(e,t){Ri(this,ht(this,e),t)})),extendSelectionsBy:Mo((function(e,t){Ri(this,ht(this,Y(this.sel.ranges,e)),t)})),setSelections:Mo((function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new ai(pt(this,e[o].anchor),pt(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),zi(this,si(this.cm,r,t),n)}})),addSelection:Mo((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ai(pt(this,e),pt(this,t||e))),zi(this,si(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=Je(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=Je(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Mo((function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var s=t&&"end"!=t&&fi(this,r,t),l=r.length-1;l>=0;l--)Ji(this,r[l]);s?Bi(this,s):this.cm&&so(this.cm)})),undo:Mo((function(){ea(this,"undo")})),redo:Mo((function(){ea(this,"redo")})),undoSelection:Mo((function(){ea(this,"undo",!0)})),redoSelection:Mo((function(){ea(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new xi(this.history),bi(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Di(this.history.done),undone:Di(this.history.undone)}},setHistory:function(e){var t=this.history=new xi(this.history);t.done=Di(e.done.slice(0),null,!0),t.undone=Di(e.undone.slice(0),null,!0)},setGutterMarker:Mo((function(e,t,n){return la(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&re(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Mo((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&la(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!rt(this,e))return null;if(t=e,!(e=Xe(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Mo((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(O(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Mo((function(e,t,n){return la(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var i=o.match(O(n));if(!i)return!1;var a=i.index+i[0].length;e[r]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:Mo((function(e,t,n){return fa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return ga(this,pt(this,e),pt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return ga(this,e=pt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Xe(this,(e=pt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=pt(this,e),t=pt(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n})),pt(this,it(n,t))},indexFromPos:function(e){var t=(e=pt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new ka(Qe(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new ka(Qe(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],_a(r,ya(this)),r},unlinkDoc:function(e){if(e instanceof Rs&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),wa(ya(this));break}if(e.history==this.history){var n=[e.id];bi(e,(function(e){return n.push(e.id)}),!0),e.history=new xi(null),e.history.done=Di(this.history.done,n),e.history.undone=Di(this.history.undone,n)}},iterLinkedDocs:function(e){bi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):De(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Mo((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&wi(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Oa=0;function Sa(e){var t=this;if(Ca(t),!be(t,e)&&!Un(t.display,e)){xe(e),a&&(Oa=+new Date);var n=Mr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),s=0,l=function(){++s==o&&Ao(t,(function(){var e={from:n=pt(t.doc,n),to:n,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Ji(t.doc,e),Bi(t.doc,li(pt(t.doc,n),pt(t.doc,ui(e))))}))()},u=function(e,n){if(t.options.allowDropFileTypes&&-1==V(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[n]=e),l()},r.readAsText(e)}},c=0;c<r.length;c++)u(r[c],c);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),Hi(t.doc,li(n,n)),p)for(var f=0;f<p.length;++f)oa(t.doc,"",p[f].anchor,p[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Ea(e,t){if(a&&(!e.state.draggingText||+new Date-Oa<100))Se(t);else if(!be(e,t)&&!Un(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=q("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Na(e,t){var n=Mr(e,t);if(n){var r=document.createDocumentFragment();Wr(e,n,r),e.display.dragCursor||(e.display.dragCursor=q("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),C(e.display.dragCursor,r)}}function Ca(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function qa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var o=t[r].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ta=!1;function Pa(){Ta||(ja(),Ta=!0)}function ja(){var e;he(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,qa(Aa)}),100))})),he(window,"blur",(function(){return qa(Jr)}))}function Aa(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Da={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",
|
|