diff --git a/composer.json b/composer.json index 9e1d6bff..7c4170fc 100644 --- a/composer.json +++ b/composer.json @@ -139,6 +139,7 @@ "drupal/restui": "^1.16", "drupal/role_delegation": "^1.1", "drupal/role_expire": "^2.0", + "drupal/rules": "3.x-dev@dev", "drupal/search_api": "^1.19", "drupal/search_api_autocomplete": "^1.2", "drupal/search_api_page": "^1.x-dev", diff --git a/composer.lock b/composer.lock index 07525677..df523f89 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "28c5d047d6b22eec98aba7c5c09e2978", + "content-hash": "1b136647bf70d7d1c350f23bced3287a", "packages": [ { "name": "alchemy/zippy", @@ -12236,6 +12236,62 @@ "source": "https://git.drupalcode.org/project/role_expire" } }, + { + "name": "drupal/rules", + "version": "dev-3.x", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/rules.git", + "reference": "ec0b4dbc1fb9a0b59cac43908f1af5137e946dea" + }, + "require": { + "drupal/core": "^9.1 || ^10", + "drupal/typed_data": "^1.0" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev" + }, + "drupal": { + "version": "8.x-3.x-dev", + "datestamp": "1645514637", + "security-coverage": { + "status": "not-covered", + "message": "Dev releases are not covered by Drupal security advisories." + } + }, + "drush": { + "services": { + "drush.services.yml": "^9 || ^10" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "TR", + "homepage": "https://www.drupal.org/user/202830" + }, + { + "name": "fago", + "homepage": "https://www.drupal.org/user/16747" + }, + { + "name": "klausi", + "homepage": "https://www.drupal.org/user/262198" + } + ], + "description": "React on events and conditionally evaluate actions.", + "homepage": "https://www.drupal.org/project/rules", + "support": { + "source": "https://git.drupalcode.org/project/rules", + "issues": "https://www.drupal.org/project/issues/rules" + } + }, { "name": "drupal/search_api", "version": "1.23.0", @@ -25086,6 +25142,7 @@ "drupal/mimemail": 20, "drupal/profile": 20, "drupal/redirect": 20, + "drupal/rules": 20, "drupal/search_api_page": 20, "drupal/select_translation": 20, "drupal/session_limit": 10, diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 848fb12d..0bb309d9 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -172,6 +172,7 @@ module: restui: 0 role_delegation: 0 role_expire: 0 + rules: 0 search_api: 0 search_api_db: 0 search_api_solr: 0 diff --git a/config/sync/filter.format.restricted_html.yml b/config/sync/filter.format.restricted_html.yml new file mode 100644 index 00000000..37b1ea6d --- /dev/null +++ b/config/sync/filter.format.restricted_html.yml @@ -0,0 +1,36 @@ +uuid: 3ca6603a-2a65-4276-9cc7-50b1a9a6a7f9 +langcode: en +status: true +dependencies: + enforced: + module: + - filter + - rules +_core: + default_config_hash: VrFjOQn2l2n6baaj2Z6IkYt9OdtsLjYPUVg7HgkkGLU +name: 'Restricted HTML' +format: restricted_html +weight: 1 +filters: + filter_html: + id: filter_html + provider: filter + status: true + weight: -10 + settings: + allowed_html: '
    1. ' + filter_html_help: true + filter_html_nofollow: false + filter_autop: + id: filter_autop + provider: filter + status: true + weight: 0 + settings: { } + filter_url: + id: filter_url + provider: filter + status: true + weight: 0 + settings: + filter_url_length: 72 diff --git a/config/sync/language/fr/filter.format.restricted_html.yml b/config/sync/language/fr/filter.format.restricted_html.yml new file mode 100644 index 00000000..439ae980 --- /dev/null +++ b/config/sync/language/fr/filter.format.restricted_html.yml @@ -0,0 +1 @@ +name: 'HTML restreint' diff --git a/config/sync/rules.settings.yml b/config/sync/rules.settings.yml new file mode 100644 index 00000000..fe1e8d62 --- /dev/null +++ b/config/sync/rules.settings.yml @@ -0,0 +1,8 @@ +_core: + default_config_hash: ZKaBtyYFEhfwE4xVP-khSsZabdsN3NSjwOfzaZksez0 +system_log: + log_level: warning +debug_log: + enabled: false + system_debug: false + log_level: debug diff --git a/config/sync/ultimate_cron.job.rules_cron.yml b/config/sync/ultimate_cron.job.rules_cron.yml new file mode 100644 index 00000000..bcfd55aa --- /dev/null +++ b/config/sync/ultimate_cron.job.rules_cron.yml @@ -0,0 +1,17 @@ +uuid: bd0b5826-cc41-44ad-b62a-e342aa06f0ce +langcode: en +status: true +dependencies: + module: + - rules +title: 'Default cron handler' +id: rules_cron +weight: 0 +module: rules +callback: rules_cron +scheduler: + id: simple +launcher: + id: serial +logger: + id: database diff --git a/config/sync/user.role.anonymous.yml b/config/sync/user.role.anonymous.yml index 15c2da89..cf28d0bf 100644 --- a/config/sync/user.role.anonymous.yml +++ b/config/sync/user.role.anonymous.yml @@ -3,6 +3,7 @@ langcode: fr status: true dependencies: config: + - filter.format.restricted_html - filter.format.wysiwyg - rest.resource.user_registration module: @@ -35,6 +36,7 @@ permissions: - 'execute materio persisted graphql requests' - 'restful post user_registration' - 'subscribe to newsletters' + - 'use text format restricted_html' - 'use text format wysiwyg' - 'view body' - 'view commerce_product' diff --git a/web/modules/custom/materio_simplenews/src/Form/MaterioSubscriptionsBlockForm.php b/web/modules/custom/materio_simplenews/src/Form/MaterioSubscriptionsBlockForm.php index d4075368..41908e48 100644 --- a/web/modules/custom/materio_simplenews/src/Form/MaterioSubscriptionsBlockForm.php +++ b/web/modules/custom/materio_simplenews/src/Form/MaterioSubscriptionsBlockForm.php @@ -3,8 +3,11 @@ namespace Drupal\materio_simplenews\Form; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Url; use Drupal\simplenews\Form\SubscriptionsFormBase; +// ! NOT USED ANY MORE + /** * Configure simplenews subscriptions of the logged user. */ @@ -19,6 +22,27 @@ class MaterioSubscriptionsBlockForm extends SubscriptionsFormBase { */ public $message; + /** + * The newsletters available to select from. + * + * @var string[] + */ + protected $newsletterIds = []; + + /** + * The default newsletters. + * + * @var string[] + */ + protected $defaultNewsletterIds = []; + + /** + * Whether to show "Manage existing" link. + * + * @var bool + */ + protected $showManage = FALSE; + /** * {@inheritdoc} */ @@ -34,23 +58,95 @@ class MaterioSubscriptionsBlockForm extends SubscriptionsFormBase { */ public function setUniqueId($id) { $this->uniqueId = $id; + return $this; + } + + /** + * Set message. + * + * @param string $message + * Message to use as description for the block. + * + * @return $this + */ + public function setMessage($message) { + $this->message = $message; + return $this; + } + + /** + * Set the newsletters available to select from. + * + * @param string[] $newsletters + * Newsletter IDs available to select from. + * @param string[] $defaults + * (optional) Newsletter IDs selected by default. + * + * @return $this + */ + public function setNewsletterIds(array $newsletters, array $defaults = []) { + $visible = array_keys(simplenews_newsletter_get_visible()); + // Exclude newsletters already subscribed. + $subscribed = $this->entity->getSubscribedNewsletterIds(); + $this->newsletterIds = array_diff(array_intersect($newsletters, $visible), $subscribed); + $this->defaultNewsletterIds = array_diff(array_intersect($defaults, $visible), $subscribed); + return $this; + } + + /** + * Returns the newsletters available to select from. + * + * @return string[] + * The newsletter IDs available to select from, as an indexed array. + */ + public function getNewsletterIds() { + return $this->newsletterIds; + } + + /** + * Set whether to show "Manage existing" link. + * + * @param bool $show + * TRUE to show "Manage existing" link, FALSE to hide. + * + * @return $this + */ + public function setShowManage($show) { + $this->showManage = $show; + return $this; } /** * {@inheritdoc} */ public function form(array $form, FormStateInterface $form_state) { - // Hide subscription widget if only one newsletter available. - if (count($this->getNewsletters()) == 1) { - $this->getSubscriptionWidget($form_state)->setHidden(); + $this->getSubscriptionWidget($form_state)->setAvailableNewsletterIds($this->newsletterIds); + + if (!$form_state->getUserInput()) { + // Set defaults. + foreach ($this->defaultNewsletterIds as $newsletter_id) { + $this->entity->subscribe($newsletter_id, SIMPLENEWS_SUBSCRIPTION_STATUS_SUBSCRIBED, 'website'); + } } $form = parent::form($form, $form_state); + $form['subscriptions']['widget']['#title'] = $this->t('Manage your newsletter subscriptions'); + $form['subscriptions']['widget']['#description'] = $this->t('Select the newsletter(s) to which you want to subscribe.'); + $hidden_default_ids = array_diff($this->defaultNewsletterIds, $this->getNewsletterIds()); + $form['subscriptions']['widget']['#required'] = empty($hidden_default_ids); + $form['subscriptions']['widget']['#access'] = !empty($this->newsletterIds); - $form['message'] = array( - '#type' => 'item', - '#markup' => $this->message, - ); + + if (!$this->newsletterIds && !$this->defaultNewsletterIds) { + $this->message = $this->t('You are already subscribed'); + } + + if ($this->message) { + $form['message'] = [ + '#type' => 'item', + '#markup' => $this->message, + ]; + } unset($form['subscriptions']['widget']['#title']); unset($form['subscriptions']['widget']['#description']); @@ -63,41 +159,84 @@ class MaterioSubscriptionsBlockForm extends SubscriptionsFormBase { unset($form['mail']['widget'][0]['value']['#title']); unset($form['mail']['widget'][0]['value']['#description']); - $mailvalue = $form['mail']['widget'][0]; - $test='test'; - return $form; } + /** * {@inheritdoc} */ protected function actions(array $form, FormStateInterface $form_state) { $actions = parent::actions($form, $form_state); - $actions[static::SUBMIT_UPDATE]['#value'] = $this->t('Update'); + + $actions['submit']['#value'] = $this->t('Subscribe'); + if (!$this->newsletterIds && !$this->defaultNewsletterIds) { + $actions['submit']['#attributes']['disabled'] = TRUE; + } + + if ($this->showManage) { + $user = \Drupal::currentUser(); + $link = $user->isAuthenticated() ? Url::fromRoute('simplenews.newsletter_subscriptions_user', ['user' => $user->id()]) : Url::fromRoute('simplenews.newsletter_validate'); + $actions['manage'] = [ + '#title' => $this->t('Manage existing'), + '#type' => 'link', + '#url' => $link, + ]; + } + return $actions; } + + /** + * {@inheritdoc} + */ + public function validateForm(array &$form, FormStateInterface $form_state) { + $mail = $form_state->getValue(['mail', 0, 'value']); + if ($this->entity->isNew() && $subscriber = Subscriber::loadByMail($mail)) { + $this->setEntity($subscriber); + } + + parent::validateForm($form, $form_state); + + $mail = $form_state->getValue(['mail', 0, 'value']); + // Cannot subscribe blocked users. + if (($user = user_load_by_mail($mail)) && $user->isBlocked()) { + $message = $this->t('The email address %mail belongs to a blocked user.', ['%mail' => $mail]); + $form_state->setErrorByName('mail', $message); + } + } + + /** + * Submit callback that subscribes to selected newsletters. + * + * @param array $form + * The form structure. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The form state object. + */ + public function submitExtra(array $form, FormStateInterface $form_state) { + /** @var \Drupal\simplenews\Subscription\SubscriptionManagerInterface $subscription_manager */ + $subscription_manager = \Drupal::service('simplenews.subscription_manager'); + + // Subscribe the selected newsletters and any defaults that are hidden. + $selected_ids = $this->extractNewsletterIds($form_state, TRUE); + $hidden_default_ids = array_diff($this->defaultNewsletterIds, $this->getNewsletterIds()); + + foreach (array_unique(array_merge($selected_ids, $hidden_default_ids)) as $newsletter_id) { + $subscription_manager->subscribe($this->entity->getMail(), $newsletter_id, NULL, 'website'); + } + $sent = $subscription_manager->sendConfirmations(); + $this->messenger()->addMessage($this->getSubmitMessage($form_state, $sent)); + } /** * {@inheritdoc} */ - protected function getSubmitMessage(FormStateInterface $form_state, $op, $confirm) { - switch ($op) { - case static::SUBMIT_UPDATE: - return $this->t('The newsletter subscriptions for %mail have been updated.', array('%mail' => $form_state->getValue('mail')[0]['value'])); - - case static::SUBMIT_SUBSCRIBE: - if ($confirm) { - return $this->t('You will receive a confirmation e-mail shortly containing further instructions on how to complete your subscription.'); - } - return $this->t('You have been subscribed.'); - - case static::SUBMIT_UNSUBSCRIBE: - if ($confirm) { - return $this->t('You will receive a confirmation e-mail shortly containing further instructions on how to cancel your subscription.'); - } - return $this->t('You have been unsubscribed.'); + protected function getSubmitMessage(FormStateInterface $form_state, $confirm) { + if ($confirm) { + return $this->t('You will receive a confirmation e-mail shortly containing further instructions on how to complete your subscription.'); } + return $this->t('You have been subscribed.'); } } diff --git a/web/modules/custom/materio_simplenews/src/Plugin/Block/MaterioSimplenewsSubscriptionBlock.php b/web/modules/custom/materio_simplenews/src/Plugin/Block/MaterioSimplenewsSubscriptionBlock.php index 4809a1cd..6f73bc3c 100644 --- a/web/modules/custom/materio_simplenews/src/Plugin/Block/MaterioSimplenewsSubscriptionBlock.php +++ b/web/modules/custom/materio_simplenews/src/Plugin/Block/MaterioSimplenewsSubscriptionBlock.php @@ -12,6 +12,8 @@ use Drupal\Core\Session\AccountInterface; use Drupal\simplenews\Entity\Subscriber; use Symfony\Component\DependencyInjection\ContainerInterface; +// ! NOT USED ANY MORE + /** * Provides an 'Simplenews subscription' block with all available newsletters and an email field. * diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 0dd44b31..e317e8c4 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.js +++ b/web/themes/custom/materiotheme/assets/dist/main.js @@ -5,7 +5,7 @@ } } ${b()} - `;h.Z.post("",{query:(0,m.S)(e)}).then((({data:{data:{materiau:e}}})=>{this.material=e,this.loading=!1,e.note&&e.note.id&&(this.note_id=e.note.id,this.note=e.note.contenu),this.setcoolLightBoxItems(this.material.images)})).catch((e=>{console.warn("Issue with loadMaterial",e),Promise.reject(e)}))},onCreateFlagColl(){this.new_folder_name,this.is_creating_folder=!0,this.createFlagColl(this.new_folder_name).then((e=>{this.new_folder_name="",this.is_creating_folder=!1;let t=e.id;this.loadingFlag=t,this.flagUnflag({action:"flag",id:this.item.id,collid:t}).then((e=>{this.loadingFlag=!1}))}))},flagIsActive(e){return-1!==this.flagcolls[e].items.indexOf(this.item.id)},flagIsLoading(e){return e===this.loadingFlag},onFlagActionCard(e){if(!this.loadingFlag){let t=e.target.getAttribute("collid"),n=this.flagIsActive(t)?"unflag":"flag";this.loadingFlag=t,this.flagUnflag({action:n,id:this.item.id,collid:t}).then((e=>{this.loadingFlag=!1}))}},onCloseModalCard(e){this.$modal.hide(`modal-${this.item.id}`)},onSwipeCard(e){switch(e){case"top":case"bottom":break;case"left":case"right":this.$modal.hide(`modal-${this.item.id}`)}},prettyFileSize:e=>_(parseInt(e)),shortUrl:e=>e.replace(/^http:\/\//,"").replace(/^www\./,""),onNoteInput(e){this.note,this.note=e.target.value,this.debouncedSaveNote()},saveNote(){this.note_id,this.note,this.note_id?this.updateNote():this.createNote()},updateNote(){let e={type:[{target_id:"note"}],field_contenu:this.note},t={headers:{"X-CSRF-Token":this.csrf_token}};p.Z.patch(`/node/${this.note_id}?_format=json`,e,t).then((({data:e})=>{})).catch((e=>{console.warn("Issue with updateNote",e)}))},createNote(){let e={type:[{target_id:"note"}],title:[{value:"note"}],field_contenu:this.note,field_target:this.item.id},t={headers:{"X-CSRF-Token":this.csrf_token}};p.Z.post("/node?_format=json",e,t).then((({data:e})=>{this.note_id=e.nid[0].value,this.addNoteId(this.note_id)})).catch((e=>{console.warn("Issue with createNote",e)}))},onTapTool(e){e.target.parentNode.parentNode.querySelectorAll("section.tool").forEach(((e,t)=>{e.classList.remove("tapped")})),e.target.parentNode.classList.add("tapped")},onTapCard(e){if(e.target.tagName,"TEXTAREA"==e.target.tagName)return;this.$refs.tools.querySelectorAll("section.tool").forEach(((e,t)=>{e.classList.remove("tapped")}))}}};var x=(0,u.Z)(k,i,[],!1,null,"62d62e96",null);x.options.__file="web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue";const S=x.exports},1900:(e,t,n)=>{"use strict";function i(e,t,n,i,r,o,a,s){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),a?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},l._ssrRegister=c):r&&(c=s?function(){r.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:r),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(e,t){return c.call(t),u(e,t)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:e,options:l}}n.d(t,{Z:()=>i})},6850:e=>{e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"00ee":function(e,t,n){var i={};i[n("b622")("toStringTag")]="z",e.exports="[object z]"===String(i)},"0366":function(e,t,n){var i=n("1c0b");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},"057f":function(e,t,n){var i=n("fc6a"),r=n("241c").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(i(e))}},"06cf":function(e,t,n){var i=n("83ab"),r=n("d1e7"),o=n("5c6c"),a=n("fc6a"),s=n("c04e"),c=n("5135"),l=n("0cfb"),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=a(e),t=s(t,!0),l)try{return u(e,t)}catch(e){}if(c(e,t))return o(!r.f.call(e,t),e[t])}},"0cfb":function(e,t,n){var i=n("83ab"),r=n("d039"),o=n("cc12");e.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d03":function(e,t,n){var i=n("6eeb"),r=Date.prototype,o="Invalid Date",a="toString",s=r.toString,c=r.getTime;new Date(NaN)+""!=o&&i(r,a,(function(){var e=c.call(this);return e==e?s.call(this):o}))},"0df6":function(e,t,n){},"159b":function(e,t,n){var i=n("da84"),r=n("fdbc"),o=n("17c2"),a=n("9112");for(var s in r){var c=i[s],l=c&&c.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},"17c2":function(e,t,n){"use strict";var i=n("b727").forEach,r=n("a640"),o=n("ae40"),a=r("forEach"),s=o("forEach");e.exports=a&&s?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},"1be4":function(e,t,n){var i=n("d066");e.exports=i("document","documentElement")},"1c0b":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},"1c6c":function(e,t,n){},"1c7e":function(e,t,n){var i=n("b622")("iterator"),r=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){r=!0}};a[i]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var o={};o[i]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},"1d1c":function(e,t,n){var i=n("23e7"),r=n("83ab");i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n("37e8")})},"1d80":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"1dde":function(e,t,n){var i=n("d039"),r=n("b622"),o=n("2d00"),a=r("species");e.exports=function(e){return o>=51||!i((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},"23cb":function(e,t,n){var i=n("a691"),r=Math.max,o=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):o(n,t)}},"23e7":function(e,t,n){var i=n("da84"),r=n("06cf").f,o=n("9112"),a=n("6eeb"),s=n("ce4e"),c=n("e893"),l=n("94ca");e.exports=function(e,t){var n,u,d,f,p,h=e.target,m=e.global,v=e.stat;if(n=m?i:v?i[h]||s(h,{}):(i[h]||{}).prototype)for(u in t){if(f=t[u],d=e.noTargetGet?(p=r(n,u))&&p.value:n[u],!l(m?u:h+(v?".":"#")+u,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,u,f,e)}}},"241c":function(e,t,n){var i=n("ca84"),r=n("7839").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"25f0":function(e,t,n){"use strict";var i=n("6eeb"),r=n("825a"),o=n("d039"),a=n("ad6d"),s="toString",c=RegExp.prototype,l=c.toString,u=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d=l.name!=s;(u||d)&&i(RegExp.prototype,s,(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in c)?a.call(e):n)}),{unsafe:!0})},"277d":function(e,t,n){n("23e7")({target:"Array",stat:!0},{isArray:n("e8b5")})},"2d00":function(e,t,n){var i,r,o=n("da84"),a=n("342f"),s=o.process,c=s&&s.versions,l=c&&c.v8;l?r=(i=l.split("."))[0]+i[1]:a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},"342f":function(e,t,n){var i=n("d066");e.exports=i("navigator","userAgent")||""},"35a1":function(e,t,n){var i=n("f5df"),r=n("3f8c"),o=n("b622")("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},"37e8":function(e,t,n){var i=n("83ab"),r=n("9bf2"),o=n("825a"),a=n("df75");e.exports=i?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),s=i.length,c=0;s>c;)r.f(e,n=i[c++],t[n]);return e}},"3bbe":function(e,t,n){var i=n("861d");e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},"3ca3":function(e,t,n){"use strict";var i=n("6547").charAt,r=n("69f3"),o=n("7dd0"),a="String Iterator",s=r.set,c=r.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},"3d02":function(e,t,n){},"3f8c":function(e,t){e.exports={}},4160:function(e,t,n){"use strict";var i=n("23e7"),r=n("17c2");i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},"428f":function(e,t,n){var i=n("da84");e.exports=i},"44ad":function(e,t,n){var i=n("d039"),r=n("c6b6"),o="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},"44d2":function(e,t,n){var i=n("b622"),r=n("7c73"),o=n("9bf2"),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),e.exports=function(e){s[a][e]=!0}},4930:function(e,t,n){var i=n("d039");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},"49b2":function(e,t,n){},"4d64":function(e,t,n){var i=n("fc6a"),r=n("50c4"),o=n("23cb"),a=function(e){return function(t,n,a){var s,c=i(t),l=r(c.length),u=o(a,l);if(e&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"4de4":function(e,t,n){"use strict";var i=n("23e7"),r=n("b727").filter,o=n("1dde"),a=n("ae40"),s=o("filter"),c=a("filter");i({target:"Array",proto:!0,forced:!s||!c},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(e,t,n){"use strict";var i=n("0366"),r=n("7b0b"),o=n("9bdd"),a=n("e95a"),s=n("50c4"),c=n("8418"),l=n("35a1");e.exports=function(e){var t,n,u,d,f,p,h=r(e),m="function"==typeof this?this:Array,v=arguments.length,g=v>1?arguments[1]:void 0,y=void 0!==g,b=l(h),_=0;if(y&&(g=i(g,v>2?arguments[2]:void 0,2)),null==b||m==Array&&a(b))for(n=new m(t=s(h.length));t>_;_++)p=y?g(h[_],_):h[_],c(n,_,p);else for(f=(d=b.call(h)).next,n=new m;!(u=f.call(d)).done;_++)p=y?o(d,g,[u.value,_],!0):u.value,c(n,_,p);return n.length=_,n}},"4e6f":function(e,t,n){},"4fad":function(e,t,n){var i=n("23e7"),r=n("6f53").entries;i({target:"Object",stat:!0},{entries:function(e){return r(e)}})},"50c4":function(e,t,n){var i=n("a691"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},5135:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},5692:function(e,t,n){var i=n("c430"),r=n("c6cd");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(e,t,n){var i=n("d066"),r=n("241c"),o=n("7418"),a=n("825a");e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},5899:function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(e,t,n){var i=n("1d80"),r="["+n("5899")+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"62e4":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"64c0":function(e,t,n){},6547:function(e,t,n){var i=n("a691"),r=n("1d80"),o=function(e){return function(t,n){var o,a,s=String(r(t)),c=i(n),l=s.length;return c<0||c>=l?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===l||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},"65f0":function(e,t,n){var i=n("861d"),r=n("e8b5"),o=n("b622")("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},"69f3":function(e,t,n){var i,r,o,a=n("7f9a"),s=n("da84"),c=n("861d"),l=n("9112"),u=n("5135"),d=n("f772"),f=n("d012"),p=s.WeakMap;if(a){var h=new p,m=h.get,v=h.has,g=h.set;i=function(e,t){return g.call(h,e,t),t},r=function(e){return m.call(h,e)||{}},o=function(e){return v.call(h,e)}}else{var y=d("state");f[y]=!0,i=function(e,t){return l(e,y,t),t},r=function(e){return u(e,y)?e[y]:{}},o=function(e){return u(e,y)}}e.exports={set:i,get:r,has:o,enforce:function(e){return o(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},"6eeb":function(e,t,n){var i=n("da84"),r=n("9112"),o=n("5135"),a=n("ce4e"),s=n("8925"),c=n("69f3"),l=c.get,u=c.enforce,d=String(String).split("String");(e.exports=function(e,t,n,s){var c=!!s&&!!s.unsafe,l=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||r(n,"name",t),u(n).source=d.join("string"==typeof t?t:"")),e!==i?(c?!f&&e[t]&&(l=!0):delete e[t],l?e[t]=n:r(e,t,n)):l?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||s(this)}))},"6f53":function(e,t,n){var i=n("83ab"),r=n("df75"),o=n("fc6a"),a=n("d1e7").f,s=function(e){return function(t){for(var n,s=o(t),c=r(s),l=c.length,u=0,d=[];l>u;)n=c[u++],i&&!a.call(s,n)||d.push(e?[n,s[n]]:s[n]);return d}};e.exports={entries:s(!0),values:s(!1)}},7156:function(e,t,n){var i=n("861d"),r=n("d2bb");e.exports=function(e,t,n){var o,a;return r&&"function"==typeof(o=t.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&r(e,a),e}},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"746f":function(e,t,n){var i=n("428f"),r=n("5135"),o=n("e538"),a=n("9bf2").f;e.exports=function(e){var t=i.Symbol||(i.Symbol={});r(t,e)||a(t,e,{value:o.f(e)})}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a82":function(e,t,n){var i=n("23e7"),r=n("83ab");i({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n("9bf2").f})},"7b0b":function(e,t,n){var i=n("1d80");e.exports=function(e){return Object(i(e))}},"7c73":function(e,t,n){var i,r=n("825a"),o=n("37e8"),a=n("7839"),s=n("d012"),c=n("1be4"),l=n("cc12"),u=n("f772"),d=u("IE_PROTO"),f=function(){},p=function(e){return"