Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin - Version 3.0.9

Version Description

  • Change shortcut key to CTRL + P instead of CTRL + K
  • Support for Nofollow and Tracking Quick Edit and Bulk Edit on the links list page
  • Fix keyword replacement regex
Download this release

Release Info

Developer cartpauj
Plugin Icon 128x128 Shortlinks by Pretty Links – Best WordPress Link Tracking Plugin
Version 3.0.9
Comparing to
See all releases

Code changes from version 3.0.8 to 3.0.9

app/controllers/PrliLinksController.php CHANGED
@@ -38,6 +38,10 @@ class PrliLinksController extends PrliBaseController {
38
  add_filter('manage_edit-'.PrliLink::$cpt.'_columns', array($this,'columns'));
39
  add_filter('manage_edit-'.PrliLink::$cpt.'_sortable_columns', array($this,'sortable_columns'));
40
  add_filter('default_hidden_columns', array($this, 'default_hidden_columns'), 10, 2);
 
 
 
 
41
 
42
  add_filter('post_row_actions', array($this, 'add_row_actions'), 10, 2);
43
 
@@ -539,9 +543,9 @@ class PrliLinksController extends PrliBaseController {
539
  elseif('links' == $column) {
540
  PrliLinksHelper::link_list_url_clipboard($link);
541
  }
542
- elseif('slug' == $column) {
543
- echo esc_html(stripslashes($link->slug));
544
- }
545
  elseif('target' == $column) {
546
  printf(
547
  '<a href="%s" target="_blank">%s</a>',
@@ -567,6 +571,102 @@ class PrliLinksController extends PrliBaseController {
567
  return $hidden;
568
  }
569
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570
  /**
571
  * Append row actions to list page
572
  * @see add_filter('post_row_actions')
@@ -585,6 +685,8 @@ class PrliLinksController extends PrliBaseController {
585
 
586
  $new_actions = array();
587
  $new_actions['edit'] = $actions['edit'];
 
 
588
  $new_actions['reset'] = PrliLinksHelper::link_action_reset($link, __('Reset', 'pretty-link'));
589
 
590
  if( $link->redirect_type !== 'pixel' ) {
@@ -620,7 +722,6 @@ class PrliLinksController extends PrliBaseController {
620
  }
621
  }
622
 
623
- $new_actions['trash'] = $actions['trash'];
624
  $actions = $new_actions;
625
  }
626
 
38
  add_filter('manage_edit-'.PrliLink::$cpt.'_columns', array($this,'columns'));
39
  add_filter('manage_edit-'.PrliLink::$cpt.'_sortable_columns', array($this,'sortable_columns'));
40
  add_filter('default_hidden_columns', array($this, 'default_hidden_columns'), 10, 2);
41
+ add_action('quick_edit_custom_box', array($this, 'quick_bulk_edit_add'), 10, 2);
42
+ add_action('bulk_edit_custom_box', array($this, 'quick_bulk_edit_add'), 10, 2);
43
+ add_action('save_post', array($this, 'save_quick_edit'), 10, 2);
44
+ add_action('wp_ajax_prli_links_list_save_bulk_edit', array($this, 'save_bulk_edit'));
45
 
46
  add_filter('post_row_actions', array($this, 'add_row_actions'), 10, 2);
47
 
543
  elseif('links' == $column) {
544
  PrliLinksHelper::link_list_url_clipboard($link);
545
  }
546
+ // elseif('slug' == $column) {
547
+ // echo esc_html(stripslashes($link->slug));
548
+ // }
549
  elseif('target' == $column) {
550
  printf(
551
  '<a href="%s" target="_blank">%s</a>',
571
  return $hidden;
572
  }
573
 
574
+ public function quick_bulk_edit_add($column, $post_type) {
575
+ if($column != 'settings' || $post_type != PrliLink::$cpt) { return; }
576
+
577
+ ?>
578
+ <fieldset class="inline-edit-col-right inline-edit-prli-links-<?php echo "{$column}"; ?>">
579
+ <div class="inline-edit-group">
580
+ <label>
581
+ <span class="title"><?php echo esc_html(__('No Follow', 'pretty-link')); ?></span>
582
+ <select name="prli_quick_edit_nofollow">
583
+ <option value="no-change"> - <?php echo esc_html(__('No Change', 'pretty-link')); ?> - </option>
584
+ <option value="on"><?php echo esc_html(__('Enabled', 'pretty-link')); ?></option>
585
+ <option value="off"><?php echo esc_html(__('Disabled', 'pretty-link')); ?></option>
586
+ </select>
587
+ <br/>
588
+ <span class="title"><?php echo esc_html(__('Tracking', 'pretty-link')); ?></span>
589
+ <select name="prli_quick_edit_tracking">
590
+ <option value="no-change"> - <?php echo esc_html(__('No Change', 'pretty-link')); ?> - </option>
591
+ <option value="on"><?php echo esc_html(__('Enabled', 'pretty-link')); ?></option>
592
+ <option value="off"><?php echo esc_html(__('Disabled', 'pretty-link')); ?></option>
593
+ </select>
594
+ </label>
595
+ </div>
596
+ </fieldset>
597
+ <fieldset class="inline-edit-col-right">
598
+ <!-- here to capture the tags field in bulk edit. WP uses JS to append tag field to last fieldset. -->
599
+ <span id="prli_bulk_edit_spinner"><img src="<?php echo admin_url('images/wpspin_light.gif'); ?>" /></span>
600
+ </fieldset>
601
+ <?php
602
+ }
603
+
604
+ public function save_quick_edit($post_id, $post) {
605
+ global $prli_link;
606
+
607
+ if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $post_id; }
608
+ if(isset($post->post_type) && $post->post_type == 'revision') { return $post_id; }
609
+ if(!isset($_POST['action']) || $_POST['action'] != 'inline-save') { return $post_id; } // This action is set when doing Quick Edit save
610
+
611
+ if($post->post_type == PrliLink::$cpt) {
612
+ $id = $prli_link->get_link_from_cpt($post->ID);
613
+ $link = $prli_link->getOne($id);
614
+
615
+ $tracking = ($_POST['prli_quick_edit_tracking'] == 'no-change') ? '' : ( ($_POST['prli_quick_edit_tracking'] == 'on') ? true : false );
616
+ $nofollow = ($_POST['prli_quick_edit_nofollow'] == 'no-change') ? '' : ( ($_POST['prli_quick_edit_nofollow'] == 'on') ? true : false );
617
+
618
+ prli_update_pretty_link(
619
+ $link->id,
620
+ $link->url,
621
+ $link->slug,
622
+ sanitize_text_field(stripslashes($_POST['post_title'])),
623
+ $link->description,
624
+ null,// group_id deprecated
625
+ $tracking,
626
+ $nofollow,
627
+ $link->redirect_type,
628
+ $link->param_forwarding,
629
+ '' // param_struct deprecated
630
+ );
631
+ }
632
+ }
633
+
634
+ public function save_bulk_edit() {
635
+ global $prli_link;
636
+
637
+ $post_ids = (isset($_POST['post_ids']) && !empty($_POST['post_ids'])) ? $_POST['post_ids'] : array();
638
+
639
+ if(!empty($post_ids) && is_array($post_ids)) {
640
+ foreach($post_ids as $post_id) {
641
+ $post_type = get_post_type($post_id);
642
+
643
+ if($post_type != PrliLink::$cpt) { return; }
644
+
645
+ $tracking = ($_POST['tracking'] == 'no-change') ? '' : ( ($_POST['tracking'] == 'on') ? true : false );
646
+ $nofollow = ($_POST['nofollow'] == 'no-change') ? '' : ( ($_POST['nofollow'] == 'on') ? true : false );
647
+
648
+ if($tracking === '' && $nofollow === '') { return; } // Nothing to change
649
+
650
+ $id = $prli_link->get_link_from_cpt($post_id);
651
+ $link = $prli_link->getOne($id);
652
+
653
+ prli_update_pretty_link(
654
+ $link->id,
655
+ $link->url,
656
+ $link->slug,
657
+ $link->name,
658
+ $link->description,
659
+ null,// group_id deprecated
660
+ $tracking,
661
+ $nofollow,
662
+ $link->redirect_type,
663
+ $link->param_forwarding,
664
+ '' // param_struct deprecated
665
+ );
666
+ }
667
+ }
668
+ }
669
+
670
  /**
671
  * Append row actions to list page
672
  * @see add_filter('post_row_actions')
685
 
686
  $new_actions = array();
687
  $new_actions['edit'] = $actions['edit'];
688
+ $new_actions['trash'] = $actions['trash'];
689
+ $new_actions['inline hide-if-no-js'] = $actions['inline hide-if-no-js'];
690
  $new_actions['reset'] = PrliLinksHelper::link_action_reset($link, __('Reset', 'pretty-link'));
691
 
692
  if( $link->redirect_type !== 'pixel' ) {
722
  }
723
  }
724
 
 
725
  $actions = $new_actions;
726
  }
727
 
app/controllers/PrliLocalApiController.php CHANGED
@@ -138,8 +138,8 @@ class PrliLocalApiController extends PrliBaseController {
138
  $values['redirect_type'] = (($redirect_type == '')?$record->redirect_type:$redirect_type);
139
  $values['nofollow'] = (($nofollow === '')?$record->nofollow:$nofollow);
140
  $values['track_me'] = (($track_me === '')?(int)$record->track_me:$track_me);
141
- $values['param_forwarding'] = !empty($param_forwarding);
142
- $values['param_struct'] = (($param_struct == -1)?$record->param_struct:$param_struct);
143
  $values['link_cpt_id'] = $record->link_cpt_id;
144
 
145
  // make array look like $_POST
@@ -147,21 +147,23 @@ class PrliLocalApiController extends PrliBaseController {
147
  unset($values['nofollow']);
148
  if(empty($values['track_me']) or !$values['track_me'])
149
  unset($values['track_me']);
 
 
150
 
151
  $prli_error_messages = $prli_link->validate( $values, $id );
152
 
153
- if( count($prli_error_messages) == 0 )
154
- {
155
- if( $prli_link->update( $id, $values ) )
156
  return true;
157
- else
158
- {
159
  $prli_error_messages[] = __("An error prevented your Pretty Link from being created", 'pretty-link');
160
  return false;
161
  }
162
  }
163
- else
164
  return false;
 
165
  }
166
 
167
  /**
138
  $values['redirect_type'] = (($redirect_type == '')?$record->redirect_type:$redirect_type);
139
  $values['nofollow'] = (($nofollow === '')?$record->nofollow:$nofollow);
140
  $values['track_me'] = (($track_me === '')?(int)$record->track_me:$track_me);
141
+ $values['param_forwarding'] = (($param_forwarding === '')?(int)$record->param_forwarding:$param_forwarding);
142
+ $values['param_struct'] = ''; // deprecated
143
  $values['link_cpt_id'] = $record->link_cpt_id;
144
 
145
  // make array look like $_POST
147
  unset($values['nofollow']);
148
  if(empty($values['track_me']) or !$values['track_me'])
149
  unset($values['track_me']);
150
+ if(empty($values['param_forwarding']) or !$values['param_forwarding'])
151
+ unset($values['param_forwarding']);
152
 
153
  $prli_error_messages = $prli_link->validate( $values, $id );
154
 
155
+ if( count($prli_error_messages) == 0 ) {
156
+ if( $prli_link->update( $id, $values ) ) {
 
157
  return true;
158
+ }
159
+ else {
160
  $prli_error_messages[] = __("An error prevented your Pretty Link from being created", 'pretty-link');
161
  return false;
162
  }
163
  }
164
+ else {
165
  return false;
166
+ }
167
  }
168
 
169
  /**
css/prli-admin-links.css CHANGED
@@ -170,3 +170,12 @@ table.wp-list-table .prli-pro-only-indicator a:hover {
170
  }
171
  }
172
 
 
 
 
 
 
 
 
 
 
170
  }
171
  }
172
 
173
+ span#prli_bulk_edit_spinner {
174
+ display:block;
175
+ text-align:right;
176
+ width:100%;
177
+ }
178
+ span#prli_bulk_edit_spinner img {
179
+ display:none;
180
+ padding-top:10px;
181
+ }
i18n/pretty-link.pot CHANGED
@@ -2,22 +2,22 @@
2
  # This file is distributed under the same license as the Pretty Links plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Pretty Links 3.0.8\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pretty-link\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2019-07-30T13:59:27-06:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.2.0\n"
15
  "X-Domain: pretty-link\n"
16
 
17
  #. Plugin Name of the plugin
18
  #: pro/app/views/links/prettybar.php:68
19
- #: app/controllers/PrliLinksController.php:54
20
- #: app/controllers/PrliLinksController.php:476
21
  msgid "Pretty Links"
22
  msgstr ""
23
 
@@ -64,7 +64,7 @@ msgstr ""
64
  #: app/models/PrliClick.php:256
65
  #: app/views/groups/list.php:81
66
  #: app/views/clicks/list.php:4
67
- #: app/controllers/PrliLinksController.php:474
68
  #: app/controllers/PrliAppController.php:115
69
  msgid "Clicks"
70
  msgstr ""
@@ -160,7 +160,7 @@ msgid "Digg"
160
  msgstr ""
161
 
162
  #: pro/app/models/PlpOptions.php:155
163
- #: app/controllers/PrliLinksController.php:592
164
  msgid "Email"
165
  msgstr ""
166
 
@@ -338,7 +338,7 @@ msgstr ""
338
  #: pro/app/views/links/form.php:38
339
  #: pro/app/views/links/form.php:73
340
  #: app/models/PrliClick.php:256
341
- #: app/controllers/PrliLinksController.php:475
342
  msgid "Date"
343
  msgstr ""
344
 
@@ -387,7 +387,7 @@ msgstr ""
387
 
388
  #: pro/app/views/links/form.php:133
389
  #: app/views/links/form_pro.php:30
390
- #: app/controllers/PrliLinksController.php:437
391
  msgid "Keywords"
392
  msgstr ""
393
 
@@ -859,7 +859,7 @@ msgstr ""
859
  #: pro/app/views/reports/list.php:20
860
  #: app/views/groups/list.php:24
861
  #: app/views/clicks/list.php:64
862
- #: app/controllers/PrliLinksController.php:588
863
  msgid "Reset"
864
  msgstr ""
865
 
@@ -2122,7 +2122,7 @@ msgid "New Link Category Name"
2122
  msgstr ""
2123
 
2124
  #: pro/app/controllers/PlpLinkCategoriesController.php:25
2125
- #: app/controllers/PrliLinksController.php:435
2126
  msgid "Categories"
2127
  msgstr ""
2128
 
@@ -2218,7 +2218,7 @@ msgid "Unauthorized"
2218
  msgstr ""
2219
 
2220
  #: pro/app/controllers/PlpPublicLinksController.php:37
2221
- #: app/controllers/PrliLinksController.php:658
2222
  msgid "Security check failed"
2223
  msgstr ""
2224
 
@@ -2273,7 +2273,7 @@ msgid "No Link Tags found."
2273
  msgstr ""
2274
 
2275
  #: pro/app/controllers/PlpLinkTagsController.php:29
2276
- #: app/controllers/PrliLinksController.php:436
2277
  msgid "Tags"
2278
  msgstr ""
2279
 
@@ -3327,9 +3327,9 @@ msgstr ""
3327
 
3328
  #: app/helpers/PrliAppHelper.php:20
3329
  #: app/views/links/form.php:30
3330
- #: app/controllers/PrliLinksController.php:448
3331
- #: app/controllers/PrliLinksController.php:454
3332
- #: app/controllers/PrliLinksController.php:460
3333
  msgid "Pro"
3334
  msgstr ""
3335
 
@@ -3449,7 +3449,7 @@ msgstr ""
3449
  #: app/views/links/form_basic.php:48
3450
  #: app/views/shared/tinymce_form_popup.php:78
3451
  #: app/views/widgets/widget.php:15
3452
- #: app/controllers/PrliLinksController.php:55
3453
  msgid "Pretty Link"
3454
  msgstr ""
3455
 
@@ -3511,6 +3511,7 @@ msgid "Group must have a name."
3511
  msgstr ""
3512
 
3513
  #: app/views/links/form_advanced.php:6
 
3514
  msgid "No Follow"
3515
  msgstr ""
3516
 
@@ -3543,6 +3544,7 @@ msgstr ""
3543
  #: app/views/links/form_advanced.php:45
3544
  #: app/views/links/form_advanced.php:48
3545
  #: app/views/shared/tinymce_form_popup.php:54
 
3546
  msgid "Tracking"
3547
  msgstr ""
3548
 
@@ -3715,11 +3717,15 @@ msgstr ""
3715
 
3716
  #: app/views/shared/tinymce_form_popup.php:49
3717
  #: app/views/shared/tinymce_form_popup.php:57
 
 
3718
  msgid "Enabled"
3719
  msgstr ""
3720
 
3721
  #: app/views/shared/tinymce_form_popup.php:50
3722
  #: app/views/shared/tinymce_form_popup.php:58
 
 
3723
  msgid "Disabled"
3724
  msgstr ""
3725
 
@@ -4884,8 +4890,8 @@ msgid "An unknown error occurred."
4884
  msgstr ""
4885
 
4886
  #: app/controllers/PrliPopupController.php:93
4887
- #: app/controllers/PrliLinksController.php:402
4888
- #: app/controllers/PrliLinksController.php:636
4889
  msgid "Forbidden"
4890
  msgstr ""
4891
 
@@ -4906,7 +4912,7 @@ msgid "The popup was successfully stopped"
4906
  msgstr ""
4907
 
4908
  #: app/controllers/PrliLocalApiController.php:100
4909
- #: app/controllers/PrliLocalApiController.php:159
4910
  msgid "An error prevented your Pretty Link from being created"
4911
  msgstr ""
4912
 
@@ -4914,122 +4920,127 @@ msgstr ""
4914
  msgid "Pretty Link ID must be set for successful update."
4915
  msgstr ""
4916
 
4917
- #: app/controllers/PrliLinksController.php:56
4918
  msgid "Add New Pretty Link"
4919
  msgstr ""
4920
 
4921
- #: app/controllers/PrliLinksController.php:57
4922
  msgid "Edit Pretty Link"
4923
  msgstr ""
4924
 
4925
- #: app/controllers/PrliLinksController.php:58
4926
  #: js/editor/components/link-editor/index.js:324
4927
  #: js/editor.js:12
4928
  msgid "New Pretty Link"
4929
  msgstr ""
4930
 
4931
- #: app/controllers/PrliLinksController.php:59
4932
  msgid "View Pretty Link"
4933
  msgstr ""
4934
 
4935
- #: app/controllers/PrliLinksController.php:60
4936
  msgid "Search Pretty Links"
4937
  msgstr ""
4938
 
4939
- #: app/controllers/PrliLinksController.php:61
4940
  msgid "No Pretty Links found"
4941
  msgstr ""
4942
 
4943
- #: app/controllers/PrliLinksController.php:62
4944
  msgid "No Pretty Links found in Trash"
4945
  msgstr ""
4946
 
4947
- #: app/controllers/PrliLinksController.php:63
4948
  msgid "Parent Pretty Link:"
4949
  msgstr ""
4950
 
4951
- #: app/controllers/PrliLinksController.php:124
4952
  msgid "Pretty Link Settings"
4953
  msgstr ""
4954
 
4955
- #: app/controllers/PrliLinksController.php:320
4956
  msgid "Pretty Link updated."
4957
  msgstr ""
4958
 
4959
- #: app/controllers/PrliLinksController.php:322
4960
  msgid "Pretty Link created."
4961
  msgstr ""
4962
 
4963
- #: app/controllers/PrliLinksController.php:390
4964
  msgid "Pretty Link Cleanup Visitor Locks"
4965
  msgstr ""
4966
 
4967
- #: app/controllers/PrliLinksController.php:411
4968
  msgid "Success!"
4969
  msgstr ""
4970
 
4971
- #: app/controllers/PrliLinksController.php:413
4972
  msgid "Fix the following errors:"
4973
  msgstr ""
4974
 
4975
- #: app/controllers/PrliLinksController.php:449
4976
  msgid "Upgrade to a Pretty Links premium plan to get Link Categories"
4977
  msgstr ""
4978
 
4979
- #: app/controllers/PrliLinksController.php:455
4980
  msgid "Upgrade to a Pretty Links premium plan to get Link Tags"
4981
  msgstr ""
4982
 
4983
- #: app/controllers/PrliLinksController.php:461
4984
  msgid "Upgrade to a Pretty Links premium plan to get Keyword Replacements"
4985
  msgstr ""
4986
 
4987
- #: app/controllers/PrliLinksController.php:467
4988
  msgid "Settings"
4989
  msgstr ""
4990
 
4991
- #: app/controllers/PrliLinksController.php:468
4992
  msgid "Link Title"
4993
  msgstr ""
4994
 
4995
- #: app/controllers/PrliLinksController.php:470
4996
  msgid "Target"
4997
  msgstr ""
4998
 
4999
- #: app/controllers/PrliLinksController.php:591
 
 
 
 
 
5000
  msgid "Tweet"
5001
  msgstr ""
5002
 
5003
- #: app/controllers/PrliLinksController.php:593
5004
  msgid "Target &raquo;"
5005
  msgstr ""
5006
 
5007
- #: app/controllers/PrliLinksController.php:594
5008
  msgid "Pretty Link &raquo;"
5009
  msgstr ""
5010
 
5011
- #: app/controllers/PrliLinksController.php:616
5012
- #: app/controllers/PrliLinksController.php:617
5013
  msgid "View Split Test Report"
5014
  msgstr ""
5015
 
5016
- #: app/controllers/PrliLinksController.php:642
5017
  msgid "Your Pretty Link was Successfully Reset"
5018
  msgstr ""
5019
 
5020
- #: app/controllers/PrliLinksController.php:650
5021
  msgid "Bad request"
5022
  msgstr ""
5023
 
5024
- #: app/controllers/PrliLinksController.php:654
5025
  msgid "Insufficient permissions"
5026
  msgstr ""
5027
 
5028
- #: app/controllers/PrliLinksController.php:683
5029
  msgid "An error occurred creating the link"
5030
  msgstr ""
5031
 
5032
- #: app/controllers/PrliLinksController.php:720
5033
  msgid "All Groups (Legacy)"
5034
  msgstr ""
5035
 
2
  # This file is distributed under the same license as the Pretty Links plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Pretty Links 3.0.9\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/pretty-link\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2019-08-12T10:41:15-06:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.2.0\n"
15
  "X-Domain: pretty-link\n"
16
 
17
  #. Plugin Name of the plugin
18
  #: pro/app/views/links/prettybar.php:68
19
+ #: app/controllers/PrliLinksController.php:58
20
+ #: app/controllers/PrliLinksController.php:480
21
  msgid "Pretty Links"
22
  msgstr ""
23
 
64
  #: app/models/PrliClick.php:256
65
  #: app/views/groups/list.php:81
66
  #: app/views/clicks/list.php:4
67
+ #: app/controllers/PrliLinksController.php:478
68
  #: app/controllers/PrliAppController.php:115
69
  msgid "Clicks"
70
  msgstr ""
160
  msgstr ""
161
 
162
  #: pro/app/models/PlpOptions.php:155
163
+ #: app/controllers/PrliLinksController.php:694
164
  msgid "Email"
165
  msgstr ""
166
 
338
  #: pro/app/views/links/form.php:38
339
  #: pro/app/views/links/form.php:73
340
  #: app/models/PrliClick.php:256
341
+ #: app/controllers/PrliLinksController.php:479
342
  msgid "Date"
343
  msgstr ""
344
 
387
 
388
  #: pro/app/views/links/form.php:133
389
  #: app/views/links/form_pro.php:30
390
+ #: app/controllers/PrliLinksController.php:441
391
  msgid "Keywords"
392
  msgstr ""
393
 
859
  #: pro/app/views/reports/list.php:20
860
  #: app/views/groups/list.php:24
861
  #: app/views/clicks/list.php:64
862
+ #: app/controllers/PrliLinksController.php:690
863
  msgid "Reset"
864
  msgstr ""
865
 
2122
  msgstr ""
2123
 
2124
  #: pro/app/controllers/PlpLinkCategoriesController.php:25
2125
+ #: app/controllers/PrliLinksController.php:439
2126
  msgid "Categories"
2127
  msgstr ""
2128
 
2218
  msgstr ""
2219
 
2220
  #: pro/app/controllers/PlpPublicLinksController.php:37
2221
+ #: app/controllers/PrliLinksController.php:759
2222
  msgid "Security check failed"
2223
  msgstr ""
2224
 
2273
  msgstr ""
2274
 
2275
  #: pro/app/controllers/PlpLinkTagsController.php:29
2276
+ #: app/controllers/PrliLinksController.php:440
2277
  msgid "Tags"
2278
  msgstr ""
2279
 
3327
 
3328
  #: app/helpers/PrliAppHelper.php:20
3329
  #: app/views/links/form.php:30
3330
+ #: app/controllers/PrliLinksController.php:452
3331
+ #: app/controllers/PrliLinksController.php:458
3332
+ #: app/controllers/PrliLinksController.php:464
3333
  msgid "Pro"
3334
  msgstr ""
3335
 
3449
  #: app/views/links/form_basic.php:48
3450
  #: app/views/shared/tinymce_form_popup.php:78
3451
  #: app/views/widgets/widget.php:15
3452
+ #: app/controllers/PrliLinksController.php:59
3453
  msgid "Pretty Link"
3454
  msgstr ""
3455
 
3511
  msgstr ""
3512
 
3513
  #: app/views/links/form_advanced.php:6
3514
+ #: app/controllers/PrliLinksController.php:581
3515
  msgid "No Follow"
3516
  msgstr ""
3517
 
3544
  #: app/views/links/form_advanced.php:45
3545
  #: app/views/links/form_advanced.php:48
3546
  #: app/views/shared/tinymce_form_popup.php:54
3547
+ #: app/controllers/PrliLinksController.php:588
3548
  msgid "Tracking"
3549
  msgstr ""
3550
 
3717
 
3718
  #: app/views/shared/tinymce_form_popup.php:49
3719
  #: app/views/shared/tinymce_form_popup.php:57
3720
+ #: app/controllers/PrliLinksController.php:584
3721
+ #: app/controllers/PrliLinksController.php:591
3722
  msgid "Enabled"
3723
  msgstr ""
3724
 
3725
  #: app/views/shared/tinymce_form_popup.php:50
3726
  #: app/views/shared/tinymce_form_popup.php:58
3727
+ #: app/controllers/PrliLinksController.php:585
3728
+ #: app/controllers/PrliLinksController.php:592
3729
  msgid "Disabled"
3730
  msgstr ""
3731
 
4890
  msgstr ""
4891
 
4892
  #: app/controllers/PrliPopupController.php:93
4893
+ #: app/controllers/PrliLinksController.php:406
4894
+ #: app/controllers/PrliLinksController.php:737
4895
  msgid "Forbidden"
4896
  msgstr ""
4897
 
4912
  msgstr ""
4913
 
4914
  #: app/controllers/PrliLocalApiController.php:100
4915
+ #: app/controllers/PrliLocalApiController.php:160
4916
  msgid "An error prevented your Pretty Link from being created"
4917
  msgstr ""
4918
 
4920
  msgid "Pretty Link ID must be set for successful update."
4921
  msgstr ""
4922
 
4923
+ #: app/controllers/PrliLinksController.php:60
4924
  msgid "Add New Pretty Link"
4925
  msgstr ""
4926
 
4927
+ #: app/controllers/PrliLinksController.php:61
4928
  msgid "Edit Pretty Link"
4929
  msgstr ""
4930
 
4931
+ #: app/controllers/PrliLinksController.php:62
4932
  #: js/editor/components/link-editor/index.js:324
4933
  #: js/editor.js:12
4934
  msgid "New Pretty Link"
4935
  msgstr ""
4936
 
4937
+ #: app/controllers/PrliLinksController.php:63
4938
  msgid "View Pretty Link"
4939
  msgstr ""
4940
 
4941
+ #: app/controllers/PrliLinksController.php:64
4942
  msgid "Search Pretty Links"
4943
  msgstr ""
4944
 
4945
+ #: app/controllers/PrliLinksController.php:65
4946
  msgid "No Pretty Links found"
4947
  msgstr ""
4948
 
4949
+ #: app/controllers/PrliLinksController.php:66
4950
  msgid "No Pretty Links found in Trash"
4951
  msgstr ""
4952
 
4953
+ #: app/controllers/PrliLinksController.php:67
4954
  msgid "Parent Pretty Link:"
4955
  msgstr ""
4956
 
4957
+ #: app/controllers/PrliLinksController.php:128
4958
  msgid "Pretty Link Settings"
4959
  msgstr ""
4960
 
4961
+ #: app/controllers/PrliLinksController.php:324
4962
  msgid "Pretty Link updated."
4963
  msgstr ""
4964
 
4965
+ #: app/controllers/PrliLinksController.php:326
4966
  msgid "Pretty Link created."
4967
  msgstr ""
4968
 
4969
+ #: app/controllers/PrliLinksController.php:394
4970
  msgid "Pretty Link Cleanup Visitor Locks"
4971
  msgstr ""
4972
 
4973
+ #: app/controllers/PrliLinksController.php:415
4974
  msgid "Success!"
4975
  msgstr ""
4976
 
4977
+ #: app/controllers/PrliLinksController.php:417
4978
  msgid "Fix the following errors:"
4979
  msgstr ""
4980
 
4981
+ #: app/controllers/PrliLinksController.php:453
4982
  msgid "Upgrade to a Pretty Links premium plan to get Link Categories"
4983
  msgstr ""
4984
 
4985
+ #: app/controllers/PrliLinksController.php:459
4986
  msgid "Upgrade to a Pretty Links premium plan to get Link Tags"
4987
  msgstr ""
4988
 
4989
+ #: app/controllers/PrliLinksController.php:465
4990
  msgid "Upgrade to a Pretty Links premium plan to get Keyword Replacements"
4991
  msgstr ""
4992
 
4993
+ #: app/controllers/PrliLinksController.php:471
4994
  msgid "Settings"
4995
  msgstr ""
4996
 
4997
+ #: app/controllers/PrliLinksController.php:472
4998
  msgid "Link Title"
4999
  msgstr ""
5000
 
5001
+ #: app/controllers/PrliLinksController.php:474
5002
  msgid "Target"
5003
  msgstr ""
5004
 
5005
+ #: app/controllers/PrliLinksController.php:583
5006
+ #: app/controllers/PrliLinksController.php:590
5007
+ msgid "No Change"
5008
+ msgstr ""
5009
+
5010
+ #: app/controllers/PrliLinksController.php:693
5011
  msgid "Tweet"
5012
  msgstr ""
5013
 
5014
+ #: app/controllers/PrliLinksController.php:695
5015
  msgid "Target &raquo;"
5016
  msgstr ""
5017
 
5018
+ #: app/controllers/PrliLinksController.php:696
5019
  msgid "Pretty Link &raquo;"
5020
  msgstr ""
5021
 
5022
+ #: app/controllers/PrliLinksController.php:718
5023
+ #: app/controllers/PrliLinksController.php:719
5024
  msgid "View Split Test Report"
5025
  msgstr ""
5026
 
5027
+ #: app/controllers/PrliLinksController.php:743
5028
  msgid "Your Pretty Link was Successfully Reset"
5029
  msgstr ""
5030
 
5031
+ #: app/controllers/PrliLinksController.php:751
5032
  msgid "Bad request"
5033
  msgstr ""
5034
 
5035
+ #: app/controllers/PrliLinksController.php:755
5036
  msgid "Insufficient permissions"
5037
  msgstr ""
5038
 
5039
+ #: app/controllers/PrliLinksController.php:784
5040
  msgid "An error occurred creating the link"
5041
  msgstr ""
5042
 
5043
+ #: app/controllers/PrliLinksController.php:821
5044
  msgid "All Groups (Legacy)"
5045
  msgstr ""
5046
 
js/admin_link_list.js CHANGED
@@ -1,5 +1,5 @@
1
  jQuery(document).ready(function($) {
2
-
3
  $('.icon-clipboardjs').each(function(i, el) {
4
  var $el = $(el),
5
  copy_text = 'Copy to Clipboard',
@@ -47,17 +47,64 @@ jQuery(document).ready(function($) {
47
  }
48
  });
49
 
50
- //var clipboardURL = new ClipboardJS('.icon-clipboardjs');
 
 
 
51
 
52
- //$('.icon-clipboardjs').tooltipster( {
53
- // theme: 'tooltipster-borderless',
54
- // content: 'Copied!',
55
- // timer: 800
56
- //} );
 
57
 
58
- //clipboardURL.on('success',function(e){
59
- // //$(e.trigger).trigger('showtooltip').delay(800).trigger('hidetooltip');
60
- // $('.icon-clipboardjs').tooltipster('open');
61
- //});
62
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  jQuery(document).ready(function($) {
2
+ // TOOLTIPS
3
  $('.icon-clipboardjs').each(function(i, el) {
4
  var $el = $(el),
5
  copy_text = 'Copy to Clipboard',
47
  }
48
  });
49
 
50
+ // Hide Status from Link Bulk Edit
51
+ if (window.pagenow === 'edit-pretty-link' && $('#bulk-edit').length) {
52
+ $('#bulk-edit').find('select[name="_status"]').closest('.inline-edit-col').hide();
53
+ }
54
 
55
+ // Hide Date/Password/Status from Quick Edit
56
+ if (window.pagenow === 'edit-pretty-link') {
57
+ $('fieldset.inline-edit-date').hide();
58
+ $('.inline-edit-password-input').parent().parent().parent().hide();
59
+ $('label.inline-edit-status').parent().hide();
60
+ }
61
 
62
+ /*
63
+ NOT NEEDED SINCE SWITCHING TO "- No Change -" SELECT FIELD
64
+ Leaving here in case we need sample code of how to do this in the future though
65
+
66
+ // QUICK EDIT JS
67
+ $('body').on('click', 'button.editinline', function(e) {
68
+ var tr = $(this).closest("tr");
69
+ var trid = tr.attr('id');
70
+ var parts = trid.toString().split('-');
71
+ var post_id = parts[1];
72
+ var nofollow = $(this).data('nofollow');
73
+ var tracking = $(this).data('tracking');
74
+
75
+ if(nofollow == 'on') {
76
+ $('#edit-' + post_id + ' .prli_quick_edit_nofollow:first').prop("checked", true);
77
+ }
78
+ if(tracking == 'on') {
79
+ $('#edit-' + post_id + ' .prli_quick_edit_tracking:first').prop("checked", true);
80
+ }
81
+ });
82
+ */
83
 
84
+ // BULK EDIT JS
85
+ $(document).on('click', '#bulk_edit', function() {
86
+ // Display spinner as ajax can take a while if there's a lot of posts to edit
87
+ $('span#prli_bulk_edit_spinner img').fadeIn();
88
+ var bulk_row = $('#bulk-edit');
89
+ var post_ids = [];
90
+
91
+ bulk_row.find('#bulk-titles').children().each(function() {
92
+ post_ids.push($(this).attr('id').replace(/^(ttle)/i, ''));
93
+ });
94
+
95
+ var nofollow = bulk_row.find('select[name="prli_quick_edit_nofollow"]').val();
96
+ var tracking = bulk_row.find('select[name="prli_quick_edit_tracking"]').val();
97
+
98
+ $.ajax({
99
+ url: ajaxurl,
100
+ type: 'POST',
101
+ cache: false,
102
+ data: {
103
+ action: 'prli_links_list_save_bulk_edit',
104
+ post_ids: post_ids,
105
+ nofollow: nofollow,
106
+ tracking: tracking
107
+ }
108
+ });
109
+ });
110
+ });
js/admin_shared.js CHANGED
@@ -15,10 +15,5 @@ jQuery(document).ready(function($) {
15
  }
16
  });
17
  }
18
-
19
- // Remove Status from Link quick edit
20
- if (window.pagenow === 'edit-pretty-link' && $('#bulk-edit').length) {
21
- $('#bulk-edit').find('select[name="_status"]').closest('.inline-edit-col').remove();
22
- }
23
  });
24
 
15
  }
16
  });
17
  }
 
 
 
 
 
18
  });
19
 
js/editor.js CHANGED
@@ -9,4 +9,4 @@
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
- !function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var s=r.apply(null,o);s&&t.push(s)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}void 0!==t&&t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){var o=n(32);t.exports=function(t,e){if(null==t)return{};var n,r,i=o(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e,n){"use strict";n.r(e);var o=n(12),r=n.n(o),i=n(11),s=n.n(i),a=n(10),c=n.n(a),u=n(9),l=n.n(u),f=n(3),p=n.n(f),d=n(8),h=n.n(d),v=n(23),b=n.n(v),g=n(16),m=n.n(g),y=n(0),k=n(15),w=n.n(k),O=n(1),j=n(4),L=n(6),S=n(22),x=n(2),E=n(5),_=n(7),C=(n(19),n(14)),R=(n(31),n(13));function T(t){if(!t)return!1;var e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){var n=Object(x.getProtocol)(e);if(!Object(x.isValidProtocol)(n))return!1;if(Object(R.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;var o=Object(x.getAuthority)(e);if(!Object(x.isValidAuthority)(o))return!1;var r=Object(x.getPath)(e);if(r&&!Object(x.isValidPath)(r))return!1;var i=Object(x.getQueryString)(e);if(i&&!Object(x.isValidQueryString)(i))return!1;var s=Object(x.getFragment)(e);if(s&&!Object(x.isValidFragment)(s))return!1}return!(Object(R.startsWith)(e,"#")&&!Object(x.isValidFragment)(e))}function P(t){var e=t.url,n=t.opensInNewWindow,o=t.text,r={type:"core/link",attributes:{url:e}};if(n){var i=Object(O.sprintf)(Object(O.__)("%s (opens in a new tab)"),o);r.attributes.target="_blank",r.attributes.rel="noreferrer noopener",r.attributes["aria-label"]=i}return r}var N=function(t){return t.stopPropagation()};function A(t,e){return t.addingLink||e.editLink}var I=function(t){var e=t.value,n=t.onChangeInputValue,o=t.onKeyDown,r=t.submitLink,i=t.autocompleteRef;return Object(y.createElement)("form",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:N,onKeyDown:o,onSubmit:r},Object(y.createElement)(C.default,{value:e,onChange:n,autocompleteRef:i}),Object(y.createElement)(j.IconButton,{icon:"editor-break",label:Object(O.__)("Insert Pretty Link"),type:"submit"}))},U=function(t){var e=t.url,n=Object(x.prependHTTP)(e),o=w()("editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value",{"has-invalid-link":!T(n)});return e?Object(y.createElement)(j.ExternalLink,{className:o,href:e},Object(x.filterURLForDisplay)(Object(x.safeDecodeURI)(e))):Object(y.createElement)("span",{className:o})},W=function(t){var e=t.isActive,n=t.addingLink,o=t.value,r=m()(t,["isActive","addingLink","value"]),i=Object(y.useMemo)(function(){var t=window.getSelection(),e=t.rangeCount>0?t.getRangeAt(0):null;if(e){if(n)return Object(S.getRectangleFromRange)(e);var o=e.startContainer;for(o=o.nextElementSibling||o;o.nodeType!==window.Node.ELEMENT_NODE;)o=o.parentNode;var r=o.closest("a");return r?r.getBoundingClientRect():void 0}},[e,n,o.start,o.end]);return i?Object(y.createElement)(_.URLPopover,b()({anchorRect:i},r)):null},D=function(t){var e=t.url,n=t.editLink;return Object(y.createElement)("div",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:N},Object(y.createElement)(U,{url:e}),Object(y.createElement)(j.IconButton,{icon:"edit",label:Object(O.__)("Edit"),onClick:n}))},F=function(t){function e(){var t;return r()(this,e),(t=c()(this,l()(e).apply(this,arguments))).editLink=t.editLink.bind(p()(t)),t.submitLink=t.submitLink.bind(p()(t)),t.onKeyDown=t.onKeyDown.bind(p()(t)),t.onChangeInputValue=t.onChangeInputValue.bind(p()(t)),t.setLinkTarget=t.setLinkTarget.bind(p()(t)),t.onClickOutside=t.onClickOutside.bind(p()(t)),t.resetState=t.resetState.bind(p()(t)),t.autocompleteRef=Object(y.createRef)(),t.state={opensInNewWindow:!1,inputValue:"",newLinkUrl:"",newLinkSlug:"",creatingLink:!1,createdLink:!1,createdLinkError:!1},t}return h()(e,t),s()(e,[{key:"onKeyDown",value:function(t){[L.LEFT,L.DOWN,L.RIGHT,L.UP,L.BACKSPACE,L.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"onChangeInputValue",value:function(t){this.setState({inputValue:t})}},{key:"setLinkTarget",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({opensInNewWindow:t}),!A(this.props,this.state)){var s=Object(E.getTextContent)(Object(E.slice)(r));i(Object(E.applyFormat)(r,P({url:o,opensInNewWindow:t,text:s})))}}},{key:"editLink",value:function(t){this.setState({editLink:!0}),t.preventDefault()}},{key:"submitLink",value:function(t){var e=this.props,n=e.isActive,o=e.value,r=e.onChange,i=e.speak,s=this.state,a=s.inputValue,c=s.opensInNewWindow,u=Object(x.prependHTTP)(a),l=P({url:u,opensInNewWindow:c,text:Object(E.getTextContent)(Object(E.slice)(o))});if(t.preventDefault(),Object(E.isCollapsed)(o)&&!n){var f=Object(E.applyFormat)(Object(E.create)({text:u}),l,0,u.length);r(Object(E.insert)(o,f))}else r(Object(E.applyFormat)(o,l));this.resetState(),T(u)?i(n?Object(O.__)("Link edited."):Object(O.__)("Link inserted."),"assertive"):i(Object(O.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}},{key:"onClickOutside",value:function(t){var e=this.autocompleteRef.current;e&&e.contains(t.target)||this.resetState()}},{key:"resetState",value:function(){this.props.stopAddingLink(),this.setState({editLink:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.isActive,o=e.activeAttributes.url,r=e.addingLink,i=e.value;if(!n&&!r)return null;var s=this.state,a=s.inputValue,c=s.opensInNewWindow,u=s.newLinkUrl,l=s.newLinkSlug,f=s.creatingLink,p=s.createdLink,d=s.createdLinkError,h=A(this.props,this.state);return Object(y.createElement)(W,{className:"pretty-link-inserter",value:i,isActive:n,addingLink:r,onClickOutside:this.onClickOutside,onClose:this.resetState,focusOnMount:!!h&&"firstElement",renderSettings:function(){return Object(y.createElement)(y.Fragment,null,Object(y.createElement)("div",null,Object(y.createElement)(j.ToggleControl,{label:Object(O.__)("Open in New Tab"),checked:c,onChange:t.setLinkTarget})),Object(y.createElement)("div",{className:"pretty-link-inserter-form-container"},p&&Object(y.createElement)(j.Notice,{status:"success",onRemove:function(){return t.setState({createdLink:!1})}},Object(y.createElement)("p",null,Object(O.__)("Pretty Link created successfully.","memberpress"))),d&&Object(y.createElement)(j.Notice,{status:"error",onRemove:function(){return t.setState({createdLink:!1,createdLinkError:!1})}},Object(y.createElement)("p",null,Object(O.__)("Pretty Link could not be created. Please try a slug that is not already used.","memberpress"))),Object(y.createElement)("strong",null,Object(O.__)("New Pretty Link","pretty-link")),Object(y.createElement)("form",{onSubmit:function(e){e.preventDefault(),t.setState({creatingLink:!0,createdLinkError:!1}),function(t,e){return new Promise(function(n,o){jQuery.post(ajaxurl,{action:"prli_create_pretty_link",target:t,slug:e,redirect:"",nofollow:1,tracking:1},function(t,e,r){"true"===t?n(t):o(t)}).fail(function(t){o(t)})})}(u,l).then(function(e){t.setState({createdLink:!0,creatingLink:!1,inputValue:plEditor.homeUrl+l,newLinkUrl:"",newLinkSlug:""})}).catch(function(e){t.setState({createdLink:!1,creatingLink:!1,createdLinkError:!0})})}},Object(y.createElement)("p",null,Object(y.createElement)(j.TextControl,{placeholder:"URL",className:"pretty-link-new-link-url",value:u,onChange:function(e){t.setState({newLinkUrl:e})}})),Object(y.createElement)("p",null,Object(y.createElement)(j.TextControl,{placeholder:"Slug",className:"pretty-link-new-link-slug",value:l,onChange:function(e){t.setState({newLinkSlug:e})}})),Object(y.createElement)("p",null,Object(y.createElement)("button",{className:"pretty-link-submit-new-link components-button is-button is-primary",onClick:function(){console.log("Creating new Pretty Link...")}},Object(O.__)("Create New Pretty Link","pretty-link")),f&&Object(y.createElement)(j.Spinner,null)))))}},h?Object(y.createElement)(I,{value:a,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,submitLink:this.submitLink,autocompleteRef:this.autocompleteRef}):Object(y.createElement)(D,{url:o,editLink:this.editLink}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeAttributes,o=n.url,r="_blank"===n.target;if(!A(t,e)){if(o!==e.inputValue)return{inputValue:o};if(r!==e.opensInNewWindow)return{opensInNewWindow:r}}return null}}]),e}(y.Component);e.default=Object(j.withSpokenMessages)(F)},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e){!function(){t.exports=this.regeneratorRuntime}()},function(t,e){!function(){t.exports=this.wp.dom}()},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e,n){"use strict";t.exports=n(34)},function(t,e){function n(t,e,n,o,r,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(o,r)}t.exports=function(t){return function(){var e=this,o=arguments;return new Promise(function(r,i){var s=t.apply(e,o);function a(t){n(s,r,i,a,c,"next",t)}function c(t){n(s,r,i,a,c,"throw",t)}a(void 0)})}}},function(t,e,n){"use strict";n.r(e),n.d(e,"prettyLink",function(){return x});var o=n(16),r=n.n(o),i=n(12),s=n.n(i),a=n(11),c=n.n(a),u=n(10),l=n.n(u),f=n(9),p=n.n(f),d=n(3),h=n.n(d),v=n(8),b=n.n(v),g=n(0),m=n(1),y=n(4),k=n(5),w=n(2),O=n(7),j=n(18),L="pretty-link/pretty-link",S=Object(m.__)("Pretty Link"),x={name:L,title:S,tagName:"a",className:"pretty-link",attributes:{url:"href",target:"target"},edit:Object(y.withSpokenMessages)(function(t){function e(){var t;return s()(this,e),(t=l()(this,p()(e).apply(this,arguments))).addLink=t.addLink.bind(h()(t)),t.stopAddingLink=t.stopAddingLink.bind(h()(t)),t.onRemoveFormat=t.onRemoveFormat.bind(h()(t)),t.state={addingLink:!1},t}return b()(e,t),c()(e,[{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,o=Object(k.getTextContent)(Object(k.slice)(e));o&&Object(w.isURL)(o)?n(Object(k.applyFormat)(e,{type:L,attributes:{url:o}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1})}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,o=t.speak;n(Object(k.removeFormat)(e,L)),o(Object(m.__)("Link removed."),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.isActive,n=t.activeAttributes,o=t.value,r=t.onChange;return Object(g.createElement)(g.Fragment,null,Object(g.createElement)(O.RichTextShortcut,{type:"primary",character:"k",onUse:this.addLink}),Object(g.createElement)(O.RichTextShortcut,{type:"primaryShift",character:"k",onUse:this.onRemoveFormat}),e&&Object(g.createElement)(O.RichTextToolbarButton,{icon:"star-filled",title:Object(m.__)("Unlink"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"k"}),!e&&Object(g.createElement)(O.RichTextToolbarButton,{icon:"star-filled",title:S,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"k"}),Object(g.createElement)(j.default,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:n,value:o,onChange:r}))}}]),e}(g.Component))};[x].forEach(function(t){var e=t.name,n=r()(t,["name"]);return Object(k.registerFormatType)(e,n)})},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(t,e,n){var o={},r=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),i=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var o=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),s=null,a=0,c=[],u=n(28);function l(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(b(r.parts[s],e))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(b(r.parts[s],e));o[r.id]={id:r.id,refs:1,parts:a}}}}function f(t,e){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],s=e.base?i[0]+e.base:i[0],a={css:i[1],media:i[2],sourceMap:i[3]};o[s]?o[s].parts.push(a):n.push(o[s]={id:s,parts:[a]})}return n}function p(t,e){var n=i(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),c.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=i(t.insertAt.before,n);n.insertBefore(e,r)}}function d(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function h(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return n.nc}();o&&(t.attrs.nonce=o)}return v(e,t.attrs),p(t,e),e}function v(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=a++;n=s||(s=h(e)),o=m.bind(null,n,c,!1),r=m.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),p(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=u(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([o],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,e),r=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){d(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return l(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}t&&l(f(t,e),e);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete o[a.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=g(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}},function(t,e){t.exports=".pretty-link-inserter .block-editor-url-popover__settings {\n display: block; }\n\n.pretty-link-inserter .pretty-link-inserter-form-container {\n margin-top: 30px; }\n"},function(t,e,n){var o=n(30);"string"==typeof o&&(o=[[t.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(29)(o,r);o.locals&&(t.exports=o.locals)},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}},function(t,e,n){"use strict";var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function i(t,e){var n=t["page"+(e?"Y":"X")+"Offset"],o="scroll"+(e?"Top":"Left");if("number"!=typeof n){var r=t.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function s(t){return i(t)}function a(t){return i(t,!0)}function c(t){var e=function(t){var e,n=void 0,o=void 0,r=t.ownerDocument,i=r.body,s=r&&r.documentElement;return n=(e=t.getBoundingClientRect()).left,o=e.top,{left:n-=s.clientLeft||i.clientLeft||0,top:o-=s.clientTop||i.clientTop||0}}(t),n=t.ownerDocument,o=n.defaultView||n.parentWindow;return e.left+=s(o),e.top+=a(o),e}var u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,f="currentStyle",p="runtimeStyle",d="left",h="px";var v=void 0;function b(t,e){for(var n=0;n<t.length;n++)e(t[n])}function g(t){return"border-box"===v(t,"boxSizing")}"undefined"!=typeof window&&(v=window.getComputedStyle?function(t,e,n){var o="",r=t.ownerDocument,i=n||r.defaultView.getComputedStyle(t,null);return i&&(o=i.getPropertyValue(e)||i[e]),o}:function(t,e){var n=t[f]&&t[f][e];if(u.test(n)&&!l.test(e)){var o=t.style,r=o[d],i=t[p][d];t[p][d]=t[f][d],o[d]="fontSize"===e?"1em":n||0,n=o.pixelLeft+h,o[d]=r,t[p][d]=i}return""===n?"auto":n});var m=["margin","border","padding"],y=-1,k=2,w=1;function O(t,e,n){var o=0,r=void 0,i=void 0,s=void 0;for(i=0;i<e.length;i++)if(r=e[i])for(s=0;s<n.length;s++){var a=void 0;a="border"===r?r+n[s]+"Width":r+n[s],o+=parseFloat(v(t,a))||0}return o}function j(t){return null!=t&&t==t.window}var L={};function S(t,e,n){if(j(t))return"width"===e?L.viewportWidth(t):L.viewportHeight(t);if(9===t.nodeType)return"width"===e?L.docWidth(t):L.docHeight(t);var o="width"===e?["Left","Right"]:["Top","Bottom"],r="width"===e?t.offsetWidth:t.offsetHeight,i=(v(t),g(t)),s=0;(null==r||r<=0)&&(r=void 0,(null==(s=v(t,e))||Number(s)<0)&&(s=t.style[e]||0),s=parseFloat(s)||0),void 0===n&&(n=i?w:y);var a=void 0!==r||i,c=r||s;if(n===y)return a?c-O(t,["border","padding"],o):s;if(a){var u=n===k?-O(t,["border"],o):O(t,["margin"],o);return c+(n===w?0:u)}return s+O(t,m.slice(n),o)}b(["Width","Height"],function(t){L["doc"+t]=function(e){var n=e.document;return Math.max(n.documentElement["scroll"+t],n.body["scroll"+t],L["viewport"+t](n))},L["viewport"+t]=function(e){var n="client"+t,o=e.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}});var x={position:"absolute",visibility:"hidden",display:"block"};function E(t){var e=void 0,n=arguments;return 0!==t.offsetWidth?e=S.apply(void 0,n):function(t,e,n){var o={},r=t.style,i=void 0;for(i in e)e.hasOwnProperty(i)&&(o[i]=r[i],r[i]=e[i]);for(i in n.call(t),e)e.hasOwnProperty(i)&&(r[i]=o[i])}(t,x,function(){e=S.apply(void 0,n)}),e}function _(t,e,n){var o=n;if("object"!==(void 0===e?"undefined":r(e)))return void 0!==o?("number"==typeof o&&(o+="px"),void(t.style[e]=o)):v(t,e);for(var i in e)e.hasOwnProperty(i)&&_(t,i,e[i])}b(["width","height"],function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);L["outer"+e]=function(e,n){return e&&E(e,t,n?0:w)};var n="width"===t?["Left","Right"]:["Top","Bottom"];L[t]=function(e,o){if(void 0===o)return e&&E(e,t,y);if(e){v(e);return g(e)&&(o+=O(e,["padding","border"],n)),_(e,t,o)}}}),t.exports=o({getWindow:function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},offset:function(t,e){if(void 0===e)return c(t);!function(t,e){"static"===_(t,"position")&&(t.style.position="relative");var n=c(t),o={},r=void 0,i=void 0;for(i in e)e.hasOwnProperty(i)&&(r=parseFloat(_(t,i))||0,o[i]=r+e[i]-n[i]);_(t,o)}(t,e)},isWindow:j,each:b,css:_,clone:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);if(t.overflow)for(var n in t)t.hasOwnProperty(n)&&(e.overflow[n]=t.overflow[n]);return e},scrollLeft:function(t,e){if(j(t)){if(void 0===e)return s(t);window.scrollTo(e,a(t))}else{if(void 0===e)return t.scrollLeft;t.scrollLeft=e}},scrollTop:function(t,e){if(j(t)){if(void 0===e)return a(t);window.scrollTo(s(t),e)}else{if(void 0===e)return t.scrollTop;t.scrollTop=e}},viewportWidth:0,viewportHeight:0},L)},function(t,e,n){"use strict";var o=n(33);t.exports=function(t,e,n){n=n||{},9===e.nodeType&&(e=o.getWindow(e));var r=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,s=n.alignWithTop,a=n.alignWithLeft,c=n.offsetTop||0,u=n.offsetLeft||0,l=n.offsetBottom||0,f=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(e),d=o.offset(t),h=o.outerHeight(t),v=o.outerWidth(t),b=void 0,g=void 0,m=void 0,y=void 0,k=void 0,w=void 0,O=void 0,j=void 0,L=void 0,S=void 0;p?(O=e,S=o.height(O),L=o.width(O),j={left:o.scrollLeft(O),top:o.scrollTop(O)},k={left:d.left-j.left-u,top:d.top-j.top-c},w={left:d.left+v-(j.left+L)+f,top:d.top+h-(j.top+S)+l},y=j):(b=o.offset(e),g=e.clientHeight,m=e.clientWidth,y={left:e.scrollLeft,top:e.scrollTop},k={left:d.left-(b.left+(parseFloat(o.css(e,"borderLeftWidth"))||0))-u,top:d.top-(b.top+(parseFloat(o.css(e,"borderTopWidth"))||0))-c},w={left:d.left+v-(b.left+m+(parseFloat(o.css(e,"borderRightWidth"))||0))+f,top:d.top+h-(b.top+g+(parseFloat(o.css(e,"borderBottomWidth"))||0))+l}),k.top<0||w.top>0?!0===s?o.scrollTop(e,y.top+k.top):!1===s?o.scrollTop(e,y.top+w.top):k.top<0?o.scrollTop(e,y.top+k.top):o.scrollTop(e,y.top+w.top):i||((s=void 0===s||!!s)?o.scrollTop(e,y.top+k.top):o.scrollTop(e,y.top+w.top)),r&&(k.left<0||w.left>0?!0===a?o.scrollLeft(e,y.left+k.left):!1===a?o.scrollLeft(e,y.left+w.left):k.left<0?o.scrollLeft(e,y.left+k.left):o.scrollLeft(e,y.left+w.left):i||((a=void 0===a||!!a)?o.scrollLeft(e,y.left+k.left):o.scrollLeft(e,y.left+w.left)))}},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e,n){"use strict";n.r(e);var o=n(14);n.d(e,"URLInput",function(){return o.default})},function(t,e,n){n(37),n(18),n(14),t.exports=n(27)}]);
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
+ !function(){"use strict";var n={}.hasOwnProperty;function r(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var i=typeof o;if("string"===i||"number"===i)t.push(o);else if(Array.isArray(o)&&o.length){var s=r.apply(null,o);s&&t.push(s)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}void 0!==t&&t.exports?(r.default=r,t.exports=r):void 0===(o=function(){return r}.apply(e,[]))||(t.exports=o)}()},function(t,e,n){var o=n(32);t.exports=function(t,e){if(null==t)return{};var n,r,i=o(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(r=0;r<s.length;r++)n=s[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}},function(t,e){!function(){t.exports=this.wp.compose}()},function(t,e,n){"use strict";n.r(e);var o=n(12),r=n.n(o),i=n(11),s=n.n(i),a=n(10),c=n.n(a),u=n(9),l=n.n(u),f=n(3),p=n.n(f),d=n(8),h=n.n(d),v=n(23),b=n.n(v),g=n(16),m=n.n(g),y=n(0),k=n(15),w=n.n(k),O=n(1),j=n(4),L=n(6),S=n(22),x=n(2),E=n(5),_=n(7),C=(n(19),n(14)),R=(n(31),n(13));function T(t){if(!t)return!1;var e=t.trim();if(!e)return!1;if(/^\S+:/.test(e)){var n=Object(x.getProtocol)(e);if(!Object(x.isValidProtocol)(n))return!1;if(Object(R.startsWith)(n,"http")&&!/^https?:\/\/[^\/\s]/i.test(e))return!1;var o=Object(x.getAuthority)(e);if(!Object(x.isValidAuthority)(o))return!1;var r=Object(x.getPath)(e);if(r&&!Object(x.isValidPath)(r))return!1;var i=Object(x.getQueryString)(e);if(i&&!Object(x.isValidQueryString)(i))return!1;var s=Object(x.getFragment)(e);if(s&&!Object(x.isValidFragment)(s))return!1}return!(Object(R.startsWith)(e,"#")&&!Object(x.isValidFragment)(e))}function P(t){var e=t.url,n=t.opensInNewWindow,o=t.text,r={type:"core/link",attributes:{url:e}};if(n){var i=Object(O.sprintf)(Object(O.__)("%s (opens in a new tab)"),o);r.attributes.target="_blank",r.attributes.rel="noreferrer noopener",r.attributes["aria-label"]=i}return r}var N=function(t){return t.stopPropagation()};function A(t,e){return t.addingLink||e.editLink}var I=function(t){var e=t.value,n=t.onChangeInputValue,o=t.onKeyDown,r=t.submitLink,i=t.autocompleteRef;return Object(y.createElement)("form",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:N,onKeyDown:o,onSubmit:r},Object(y.createElement)(C.default,{value:e,onChange:n,autocompleteRef:i}),Object(y.createElement)(j.IconButton,{icon:"editor-break",label:Object(O.__)("Insert Pretty Link"),type:"submit"}))},U=function(t){var e=t.url,n=Object(x.prependHTTP)(e),o=w()("editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value",{"has-invalid-link":!T(n)});return e?Object(y.createElement)(j.ExternalLink,{className:o,href:e},Object(x.filterURLForDisplay)(Object(x.safeDecodeURI)(e))):Object(y.createElement)("span",{className:o})},W=function(t){var e=t.isActive,n=t.addingLink,o=t.value,r=m()(t,["isActive","addingLink","value"]),i=Object(y.useMemo)(function(){var t=window.getSelection(),e=t.rangeCount>0?t.getRangeAt(0):null;if(e){if(n)return Object(S.getRectangleFromRange)(e);var o=e.startContainer;for(o=o.nextElementSibling||o;o.nodeType!==window.Node.ELEMENT_NODE;)o=o.parentNode;var r=o.closest("a");return r?r.getBoundingClientRect():void 0}},[e,n,o.start,o.end]);return i?Object(y.createElement)(_.URLPopover,b()({anchorRect:i},r)):null},D=function(t){var e=t.url,n=t.editLink;return Object(y.createElement)("div",{className:"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",onKeyPress:N},Object(y.createElement)(U,{url:e}),Object(y.createElement)(j.IconButton,{icon:"edit",label:Object(O.__)("Edit"),onClick:n}))},F=function(t){function e(){var t;return r()(this,e),(t=c()(this,l()(e).apply(this,arguments))).editLink=t.editLink.bind(p()(t)),t.submitLink=t.submitLink.bind(p()(t)),t.onKeyDown=t.onKeyDown.bind(p()(t)),t.onChangeInputValue=t.onChangeInputValue.bind(p()(t)),t.setLinkTarget=t.setLinkTarget.bind(p()(t)),t.onClickOutside=t.onClickOutside.bind(p()(t)),t.resetState=t.resetState.bind(p()(t)),t.autocompleteRef=Object(y.createRef)(),t.state={opensInNewWindow:!1,inputValue:"",newLinkUrl:"",newLinkSlug:"",creatingLink:!1,createdLink:!1,createdLinkError:!1},t}return h()(e,t),s()(e,[{key:"onKeyDown",value:function(t){[L.LEFT,L.DOWN,L.RIGHT,L.UP,L.BACKSPACE,L.ENTER].indexOf(t.keyCode)>-1&&t.stopPropagation()}},{key:"onChangeInputValue",value:function(t){this.setState({inputValue:t})}},{key:"setLinkTarget",value:function(t){var e=this.props,n=e.activeAttributes.url,o=void 0===n?"":n,r=e.value,i=e.onChange;if(this.setState({opensInNewWindow:t}),!A(this.props,this.state)){var s=Object(E.getTextContent)(Object(E.slice)(r));i(Object(E.applyFormat)(r,P({url:o,opensInNewWindow:t,text:s})))}}},{key:"editLink",value:function(t){this.setState({editLink:!0}),t.preventDefault()}},{key:"submitLink",value:function(t){var e=this.props,n=e.isActive,o=e.value,r=e.onChange,i=e.speak,s=this.state,a=s.inputValue,c=s.opensInNewWindow,u=Object(x.prependHTTP)(a),l=P({url:u,opensInNewWindow:c,text:Object(E.getTextContent)(Object(E.slice)(o))});if(t.preventDefault(),Object(E.isCollapsed)(o)&&!n){var f=Object(E.applyFormat)(Object(E.create)({text:u}),l,0,u.length);r(Object(E.insert)(o,f))}else r(Object(E.applyFormat)(o,l));this.resetState(),T(u)?i(n?Object(O.__)("Link edited."):Object(O.__)("Link inserted."),"assertive"):i(Object(O.__)("Warning: the link has been inserted but may have errors. Please test it."),"assertive")}},{key:"onClickOutside",value:function(t){var e=this.autocompleteRef.current;e&&e.contains(t.target)||this.resetState()}},{key:"resetState",value:function(){this.props.stopAddingLink(),this.setState({editLink:!1})}},{key:"render",value:function(){var t=this,e=this.props,n=e.isActive,o=e.activeAttributes.url,r=e.addingLink,i=e.value;if(!n&&!r)return null;var s=this.state,a=s.inputValue,c=s.opensInNewWindow,u=s.newLinkUrl,l=s.newLinkSlug,f=s.creatingLink,p=s.createdLink,d=s.createdLinkError,h=A(this.props,this.state);return Object(y.createElement)(W,{className:"pretty-link-inserter",value:i,isActive:n,addingLink:r,onClickOutside:this.onClickOutside,onClose:this.resetState,focusOnMount:!!h&&"firstElement",renderSettings:function(){return Object(y.createElement)(y.Fragment,null,Object(y.createElement)("div",null,Object(y.createElement)(j.ToggleControl,{label:Object(O.__)("Open in New Tab"),checked:c,onChange:t.setLinkTarget})),Object(y.createElement)("div",{className:"pretty-link-inserter-form-container"},p&&Object(y.createElement)(j.Notice,{status:"success",onRemove:function(){return t.setState({createdLink:!1})}},Object(y.createElement)("p",null,Object(O.__)("Pretty Link created successfully.","memberpress"))),d&&Object(y.createElement)(j.Notice,{status:"error",onRemove:function(){return t.setState({createdLink:!1,createdLinkError:!1})}},Object(y.createElement)("p",null,Object(O.__)("Pretty Link could not be created. Please try a slug that is not already used.","memberpress"))),Object(y.createElement)("strong",null,Object(O.__)("New Pretty Link","pretty-link")),Object(y.createElement)("form",{onSubmit:function(e){e.preventDefault(),t.setState({creatingLink:!0,createdLinkError:!1}),function(t,e){return new Promise(function(n,o){jQuery.post(ajaxurl,{action:"prli_create_pretty_link",target:t,slug:e,redirect:"",nofollow:1,tracking:1},function(t,e,r){"true"===t?n(t):o(t)}).fail(function(t){o(t)})})}(u,l).then(function(e){t.setState({createdLink:!0,creatingLink:!1,inputValue:plEditor.homeUrl+l,newLinkUrl:"",newLinkSlug:""})}).catch(function(e){t.setState({createdLink:!1,creatingLink:!1,createdLinkError:!0})})}},Object(y.createElement)("p",null,Object(y.createElement)(j.TextControl,{placeholder:"URL",className:"pretty-link-new-link-url",value:u,onChange:function(e){t.setState({newLinkUrl:e})}})),Object(y.createElement)("p",null,Object(y.createElement)(j.TextControl,{placeholder:"Slug",className:"pretty-link-new-link-slug",value:l,onChange:function(e){t.setState({newLinkSlug:e})}})),Object(y.createElement)("p",null,Object(y.createElement)("button",{className:"pretty-link-submit-new-link components-button is-button is-primary",onClick:function(){console.log("Creating new Pretty Link...")}},Object(O.__)("Create New Pretty Link","pretty-link")),f&&Object(y.createElement)(j.Spinner,null)))))}},h?Object(y.createElement)(I,{value:a,onChangeInputValue:this.onChangeInputValue,onKeyDown:this.onKeyDown,submitLink:this.submitLink,autocompleteRef:this.autocompleteRef}):Object(y.createElement)(D,{url:o,editLink:this.editLink}))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.activeAttributes,o=n.url,r="_blank"===n.target;if(!A(t,e)){if(o!==e.inputValue)return{inputValue:o};if(r!==e.opensInNewWindow)return{opensInNewWindow:r}}return null}}]),e}(y.Component);e.default=Object(j.withSpokenMessages)(F)},function(t,e){!function(){t.exports=this.wp.apiFetch}()},function(t,e){!function(){t.exports=this.wp.htmlEntities}()},function(t,e){!function(){t.exports=this.regeneratorRuntime}()},function(t,e){!function(){t.exports=this.wp.dom}()},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){!function(){t.exports=this.wp.data}()},function(t,e,n){"use strict";t.exports=n(34)},function(t,e){function n(t,e,n,o,r,i,s){try{var a=t[i](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(o,r)}t.exports=function(t){return function(){var e=this,o=arguments;return new Promise(function(r,i){var s=t.apply(e,o);function a(t){n(s,r,i,a,c,"next",t)}function c(t){n(s,r,i,a,c,"throw",t)}a(void 0)})}}},function(t,e,n){"use strict";n.r(e),n.d(e,"prettyLink",function(){return x});var o=n(16),r=n.n(o),i=n(12),s=n.n(i),a=n(11),c=n.n(a),u=n(10),l=n.n(u),f=n(9),p=n.n(f),d=n(3),h=n.n(d),v=n(8),b=n.n(v),g=n(0),m=n(1),y=n(4),k=n(5),w=n(2),O=n(7),j=n(18),L="pretty-link/pretty-link",S=Object(m.__)("Pretty Link"),x={name:L,title:S,tagName:"a",className:"pretty-link",attributes:{url:"href",target:"target"},edit:Object(y.withSpokenMessages)(function(t){function e(){var t;return s()(this,e),(t=l()(this,p()(e).apply(this,arguments))).addLink=t.addLink.bind(h()(t)),t.stopAddingLink=t.stopAddingLink.bind(h()(t)),t.onRemoveFormat=t.onRemoveFormat.bind(h()(t)),t.state={addingLink:!1},t}return b()(e,t),c()(e,[{key:"addLink",value:function(){var t=this.props,e=t.value,n=t.onChange,o=Object(k.getTextContent)(Object(k.slice)(e));o&&Object(w.isURL)(o)?n(Object(k.applyFormat)(e,{type:L,attributes:{url:o}})):this.setState({addingLink:!0})}},{key:"stopAddingLink",value:function(){this.setState({addingLink:!1})}},{key:"onRemoveFormat",value:function(){var t=this.props,e=t.value,n=t.onChange,o=t.speak;n(Object(k.removeFormat)(e,L)),o(Object(m.__)("Link removed."),"assertive")}},{key:"render",value:function(){var t=this.props,e=t.isActive,n=t.activeAttributes,o=t.value,r=t.onChange;return Object(g.createElement)(g.Fragment,null,Object(g.createElement)(O.RichTextShortcut,{type:"primary",character:"p",onUse:this.addLink}),Object(g.createElement)(O.RichTextShortcut,{type:"primaryShift",character:"p",onUse:this.onRemoveFormat}),e&&Object(g.createElement)(O.RichTextToolbarButton,{icon:"star-filled",title:Object(m.__)("Unlink"),onClick:this.onRemoveFormat,isActive:e,shortcutType:"primaryShift",shortcutCharacter:"p"}),!e&&Object(g.createElement)(O.RichTextToolbarButton,{icon:"star-filled",title:S,onClick:this.addLink,isActive:e,shortcutType:"primary",shortcutCharacter:"p"}),Object(g.createElement)(j.default,{addingLink:this.state.addingLink,stopAddingLink:this.stopAddingLink,isActive:e,activeAttributes:n,value:o,onChange:r}))}}]),e}(g.Component))};[x].forEach(function(t){var e=t.name,n=r()(t,["name"]);return Object(k.registerFormatType)(e,n)})},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var r,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(t,e,n){var o={},r=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),i=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var o=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),s=null,a=0,c=[],u=n(28);function l(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(b(r.parts[s],e))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(b(r.parts[s],e));o[r.id]={id:r.id,refs:1,parts:a}}}}function f(t,e){for(var n=[],o={},r=0;r<t.length;r++){var i=t[r],s=e.base?i[0]+e.base:i[0],a={css:i[1],media:i[2],sourceMap:i[3]};o[s]?o[s].parts.push(a):n.push(o[s]={id:s,parts:[a]})}return n}function p(t,e){var n=i(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),c.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=i(t.insertAt.before,n);n.insertBefore(e,r)}}function d(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function h(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return n.nc}();o&&(t.attrs.nonce=o)}return v(e,t.attrs),p(t,e),e}function v(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,o,r,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var c=a++;n=s||(s=h(e)),o=m.bind(null,n,c,!1),r=m.bind(null,n,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),p(t,e),e}(e),o=function(t,e,n){var o=n.css,r=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(o=u(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var s=new Blob([o],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,e),r=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){d(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return l(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}t&&l(f(t,e),e);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete o[a.id]}}}};var g=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function m(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=g(e,r);else{var i=document.createTextNode(r),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(i,s[e]):t.appendChild(i)}}},function(t,e){t.exports=".pretty-link-inserter .block-editor-url-popover__settings {\n display: block; }\n\n.pretty-link-inserter .pretty-link-inserter-form-container {\n margin-top: 30px; }\n"},function(t,e,n){var o=n(30);"string"==typeof o&&(o=[[t.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(29)(o,r);o.locals&&(t.exports=o.locals)},function(t,e){t.exports=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}},function(t,e,n){"use strict";var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function i(t,e){var n=t["page"+(e?"Y":"X")+"Offset"],o="scroll"+(e?"Top":"Left");if("number"!=typeof n){var r=t.document;"number"!=typeof(n=r.documentElement[o])&&(n=r.body[o])}return n}function s(t){return i(t)}function a(t){return i(t,!0)}function c(t){var e=function(t){var e,n=void 0,o=void 0,r=t.ownerDocument,i=r.body,s=r&&r.documentElement;return n=(e=t.getBoundingClientRect()).left,o=e.top,{left:n-=s.clientLeft||i.clientLeft||0,top:o-=s.clientTop||i.clientTop||0}}(t),n=t.ownerDocument,o=n.defaultView||n.parentWindow;return e.left+=s(o),e.top+=a(o),e}var u=new RegExp("^("+/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source+")(?!px)[a-z%]+$","i"),l=/^(top|right|bottom|left)$/,f="currentStyle",p="runtimeStyle",d="left",h="px";var v=void 0;function b(t,e){for(var n=0;n<t.length;n++)e(t[n])}function g(t){return"border-box"===v(t,"boxSizing")}"undefined"!=typeof window&&(v=window.getComputedStyle?function(t,e,n){var o="",r=t.ownerDocument,i=n||r.defaultView.getComputedStyle(t,null);return i&&(o=i.getPropertyValue(e)||i[e]),o}:function(t,e){var n=t[f]&&t[f][e];if(u.test(n)&&!l.test(e)){var o=t.style,r=o[d],i=t[p][d];t[p][d]=t[f][d],o[d]="fontSize"===e?"1em":n||0,n=o.pixelLeft+h,o[d]=r,t[p][d]=i}return""===n?"auto":n});var m=["margin","border","padding"],y=-1,k=2,w=1;function O(t,e,n){var o=0,r=void 0,i=void 0,s=void 0;for(i=0;i<e.length;i++)if(r=e[i])for(s=0;s<n.length;s++){var a=void 0;a="border"===r?r+n[s]+"Width":r+n[s],o+=parseFloat(v(t,a))||0}return o}function j(t){return null!=t&&t==t.window}var L={};function S(t,e,n){if(j(t))return"width"===e?L.viewportWidth(t):L.viewportHeight(t);if(9===t.nodeType)return"width"===e?L.docWidth(t):L.docHeight(t);var o="width"===e?["Left","Right"]:["Top","Bottom"],r="width"===e?t.offsetWidth:t.offsetHeight,i=(v(t),g(t)),s=0;(null==r||r<=0)&&(r=void 0,(null==(s=v(t,e))||Number(s)<0)&&(s=t.style[e]||0),s=parseFloat(s)||0),void 0===n&&(n=i?w:y);var a=void 0!==r||i,c=r||s;if(n===y)return a?c-O(t,["border","padding"],o):s;if(a){var u=n===k?-O(t,["border"],o):O(t,["margin"],o);return c+(n===w?0:u)}return s+O(t,m.slice(n),o)}b(["Width","Height"],function(t){L["doc"+t]=function(e){var n=e.document;return Math.max(n.documentElement["scroll"+t],n.body["scroll"+t],L["viewport"+t](n))},L["viewport"+t]=function(e){var n="client"+t,o=e.document,r=o.body,i=o.documentElement[n];return"CSS1Compat"===o.compatMode&&i||r&&r[n]||i}});var x={position:"absolute",visibility:"hidden",display:"block"};function E(t){var e=void 0,n=arguments;return 0!==t.offsetWidth?e=S.apply(void 0,n):function(t,e,n){var o={},r=t.style,i=void 0;for(i in e)e.hasOwnProperty(i)&&(o[i]=r[i],r[i]=e[i]);for(i in n.call(t),e)e.hasOwnProperty(i)&&(r[i]=o[i])}(t,x,function(){e=S.apply(void 0,n)}),e}function _(t,e,n){var o=n;if("object"!==(void 0===e?"undefined":r(e)))return void 0!==o?("number"==typeof o&&(o+="px"),void(t.style[e]=o)):v(t,e);for(var i in e)e.hasOwnProperty(i)&&_(t,i,e[i])}b(["width","height"],function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);L["outer"+e]=function(e,n){return e&&E(e,t,n?0:w)};var n="width"===t?["Left","Right"]:["Top","Bottom"];L[t]=function(e,o){if(void 0===o)return e&&E(e,t,y);if(e){v(e);return g(e)&&(o+=O(e,["padding","border"],n)),_(e,t,o)}}}),t.exports=o({getWindow:function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},offset:function(t,e){if(void 0===e)return c(t);!function(t,e){"static"===_(t,"position")&&(t.style.position="relative");var n=c(t),o={},r=void 0,i=void 0;for(i in e)e.hasOwnProperty(i)&&(r=parseFloat(_(t,i))||0,o[i]=r+e[i]-n[i]);_(t,o)}(t,e)},isWindow:j,each:b,css:_,clone:function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);if(t.overflow)for(var n in t)t.hasOwnProperty(n)&&(e.overflow[n]=t.overflow[n]);return e},scrollLeft:function(t,e){if(j(t)){if(void 0===e)return s(t);window.scrollTo(e,a(t))}else{if(void 0===e)return t.scrollLeft;t.scrollLeft=e}},scrollTop:function(t,e){if(j(t)){if(void 0===e)return a(t);window.scrollTo(s(t),e)}else{if(void 0===e)return t.scrollTop;t.scrollTop=e}},viewportWidth:0,viewportHeight:0},L)},function(t,e,n){"use strict";var o=n(33);t.exports=function(t,e,n){n=n||{},9===e.nodeType&&(e=o.getWindow(e));var r=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,s=n.alignWithTop,a=n.alignWithLeft,c=n.offsetTop||0,u=n.offsetLeft||0,l=n.offsetBottom||0,f=n.offsetRight||0;r=void 0===r||r;var p=o.isWindow(e),d=o.offset(t),h=o.outerHeight(t),v=o.outerWidth(t),b=void 0,g=void 0,m=void 0,y=void 0,k=void 0,w=void 0,O=void 0,j=void 0,L=void 0,S=void 0;p?(O=e,S=o.height(O),L=o.width(O),j={left:o.scrollLeft(O),top:o.scrollTop(O)},k={left:d.left-j.left-u,top:d.top-j.top-c},w={left:d.left+v-(j.left+L)+f,top:d.top+h-(j.top+S)+l},y=j):(b=o.offset(e),g=e.clientHeight,m=e.clientWidth,y={left:e.scrollLeft,top:e.scrollTop},k={left:d.left-(b.left+(parseFloat(o.css(e,"borderLeftWidth"))||0))-u,top:d.top-(b.top+(parseFloat(o.css(e,"borderTopWidth"))||0))-c},w={left:d.left+v-(b.left+m+(parseFloat(o.css(e,"borderRightWidth"))||0))+f,top:d.top+h-(b.top+g+(parseFloat(o.css(e,"borderBottomWidth"))||0))+l}),k.top<0||w.top>0?!0===s?o.scrollTop(e,y.top+k.top):!1===s?o.scrollTop(e,y.top+w.top):k.top<0?o.scrollTop(e,y.top+k.top):o.scrollTop(e,y.top+w.top):i||((s=void 0===s||!!s)?o.scrollTop(e,y.top+k.top):o.scrollTop(e,y.top+w.top)),r&&(k.left<0||w.left>0?!0===a?o.scrollLeft(e,y.left+k.left):!1===a?o.scrollLeft(e,y.left+w.left):k.left<0?o.scrollLeft(e,y.left+k.left):o.scrollLeft(e,y.left+w.left):i||((a=void 0===a||!!a)?o.scrollLeft(e,y.left+k.left):o.scrollLeft(e,y.left+w.left)))}},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(e){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?t.exports=o=function(t){return n(t)}:t.exports=o=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},o(e)}t.exports=o},function(t,e,n){"use strict";n.r(e);var o=n(14);n.d(e,"URLInput",function(){return o.default})},function(t,e,n){n(37),n(18),n(14),t.exports=n(27)}]);
js/editor.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/editor/components/index.js","webpack:///./js/editor/components/link-editor/index.js","webpack:///./js/editor/components/link-editor/style.scss?a870","webpack:///./js/editor/components/link-editor/utils.js","webpack:///./js/editor/components/url-input/index.js","webpack:///./js/editor/formats/pretty-link/index.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack:///./node_modules/dom-scroll-into-view/lib/index.js","webpack:///./node_modules/dom-scroll-into-view/lib/util.js","webpack:///./js/editor/components/link-editor/style.scss","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///external {\"this\":\"regeneratorRuntime\"}","webpack:///external {\"this\":[\"wp\",\"apiFetch\"]}","webpack:///external {\"this\":[\"wp\",\"blockEditor\"]}","webpack:///external {\"this\":[\"wp\",\"components\"]}","webpack:///external {\"this\":[\"wp\",\"compose\"]}","webpack:///external {\"this\":[\"wp\",\"data\"]}","webpack:///external {\"this\":[\"wp\",\"dom\"]}","webpack:///external {\"this\":[\"wp\",\"element\"]}","webpack:///external {\"this\":[\"wp\",\"htmlEntities\"]}","webpack:///external {\"this\":[\"wp\",\"i18n\"]}","webpack:///external {\"this\":[\"wp\",\"keycodes\"]}","webpack:///external {\"this\":[\"wp\",\"richText\"]}","webpack:///external {\"this\":[\"wp\",\"url\"]}","webpack:///external {\"this\":\"lodash\"}"],"names":["stopKeyPropagation","event","stopPropagation","isShowingInput","props","state","addingLink","editLink","LinkEditor","value","onChangeInputValue","onKeyDown","submitLink","autocompleteRef","__","LinkViewerUrl","url","prependedURL","prependHTTP","linkClassName","classnames","isValidHref","filterURLForDisplay","safeDecodeURI","URLPopoverAtLink","isActive","anchorRect","useMemo","selection","window","getSelection","range","rangeCount","getRangeAt","getRectangleFromRange","element","startContainer","nextElementSibling","nodeType","Node","ELEMENT_NODE","parentNode","closest","getBoundingClientRect","start","end","LinkViewer","createNewPrettyLink","target","slug","Promise","resolve","reject","jQuery","post","ajaxurl","action","redirect","nofollow","tracking","data","textStatus","xhr","fail","error","InlineLinkUI","arguments","bind","setLinkTarget","onClickOutside","resetState","createRef","opensInNewWindow","inputValue","newLinkUrl","newLinkSlug","creatingLink","createdLink","createdLinkError","LEFT","DOWN","RIGHT","UP","BACKSPACE","ENTER","indexOf","keyCode","setState","activeAttributes","onChange","selectedText","getTextContent","slice","applyFormat","createLinkFormat","text","preventDefault","speak","format","isCollapsed","toInsert","create","length","insert","autocompleteElement","current","contains","stopAddingLink","showInput","then","plEditor","homeUrl","catch","console","log","Component","withSpokenMessages","href","trimmedHref","trim","test","protocol","getProtocol","isValidProtocol","startsWith","authority","getAuthority","isValidAuthority","path","getPath","isValidPath","queryString","getQueryString","isValidQueryString","fragment","getFragment","isValidFragment","type","attributes","label","sprintf","rel","stopEventPropagation","fetchLinkSuggestions","search","apiFetch","addQueryArgs","term","links","map","link","title","decodeEntities","URLInput","inputRef","updateSuggestions","throttle","suggestionNodes","suggestions","showSuggestions","selectedSuggestion","scrollingIntoView","scrollIntoView","onlyScrollIfNeeded","setTimeout","suggestionsRequest","index","ref","loading","request","debouncedSpeak","_n","selectionStart","setSelectionRange","suggestion","previousIndex","nextIndex","TAB","selectLink","focus","autoFocus","instanceId","className","suggestionsListboxId","suggestionOptionIdPrefix","undefined","id","bindSuggestionNode","handleOnClick","compose","withSafeTimeout","withInstanceId","withSelect","select","getSettings","__experimentalFetchLinkSuggestions","name","prettyLink","tagName","edit","addLink","onRemoveFormat","isURL","removeFormat","registerFormats","forEach","settings","registerFormatType"],"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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA,gC;;;;;;;;;;;;AChIa;;AAEb,iBAAiB,mBAAO,CAAC,+FAAwB,E;;;;;;;;;;;;ACFpC;;AAEb,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P,oGAAoG,mBAAmB,EAAE,mBAAmB,kGAAkG;;AAE9O;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,CAAC,Y;;;;;;;;;;;ACtbD,6EAA6E,mBAAmB,EAAE,gEAAgE,qBAAqB,EAAE,G;;;;;;;;;;;ACAzL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,uDAAQ;;AAE9B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB,mBAAmB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA,mBAAmB,2BAA2B;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA;;AAEA;AACA;;AAEA,iBAAiB,2BAA2B;AAC5C;AACA;;AAEA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;;AAEA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,kDAAkD,sBAAsB;AACxE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA,KAAK,KAAwC,EAAE,EAE7C;;AAEF,QAAQ,sBAAiB;AACzB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;;;;;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW,EAAE;AACrD,wCAAwC,WAAW,EAAE;;AAErD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,sCAAsC;AACtC,GAAG;AACH;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxFA,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,4CAA4C,EAAE,I;;;;;;;;;;;ACA3D,aAAa,2CAA2C,EAAE,I;;;;;;;;;;;ACA1D,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,iCAAiC,EAAE,I","file":"editor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","export { default as URLInput } from './url-input';","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, Fragment, createRef, useMemo } from '@wordpress/element';\nimport {\n\tExternalLink,\n\tIconButton,\n\tToggleControl,\n\tButton,\n\tTextControl,\n\tNotice,\n\tSpinner,\n\twithSpokenMessages,\n} from '@wordpress/components';\nimport { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes';\nimport { getRectangleFromRange } from '@wordpress/dom';\nimport { prependHTTP, safeDecodeURI, filterURLForDisplay } from '@wordpress/url';\nimport {\n\tcreate,\n\tinsert,\n\tisCollapsed,\n\tapplyFormat,\n\tgetTextContent,\n\tslice,\n} from '@wordpress/rich-text';\nimport { URLPopover } from '@wordpress/block-editor';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport URLInput from '../url-input';\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport { createLinkFormat, isValidHref } from './utils';\n\nconst stopKeyPropagation = ( event ) => event.stopPropagation();\n\nfunction isShowingInput( props, state ) {\n\treturn props.addingLink || state.editLink;\n}\n\nconst LinkEditor = ( { value, onChangeInputValue, onKeyDown, submitLink, autocompleteRef } ) => (\n\t// Disable reason: KeyPress must be suppressed so the block doesn't hide the toolbar\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n\t<form\n\t\tclassName=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n\t\tonKeyPress={ stopKeyPropagation }\n\t\tonKeyDown={ onKeyDown }\n\t\tonSubmit={ submitLink }\n\t>\n\t\t<URLInput\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChangeInputValue }\n\t\t\tautocompleteRef={ autocompleteRef }\n\t\t/>\n\t\t<IconButton icon=\"editor-break\" label={ __( 'Insert Pretty Link' ) } type=\"submit\" />\n\t</form>\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions */\n);\n\nconst LinkViewerUrl = ( { url } ) => {\n\tconst prependedURL = prependHTTP( url );\n\tconst linkClassName = classnames( 'editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value', {\n\t\t'has-invalid-link': ! isValidHref( prependedURL ),\n\t} );\n\n\tif ( ! url ) {\n\t\treturn <span className={ linkClassName }></span>;\n\t}\n\n\treturn (\n\t\t<ExternalLink\n\t\t\tclassName={ linkClassName }\n\t\t\thref={ url }\n\t\t>\n\t\t\t{ filterURLForDisplay( safeDecodeURI( url ) ) }\n\t\t</ExternalLink>\n\t);\n};\n\nconst URLPopoverAtLink = ( { isActive, addingLink, value, ...props } ) => {\n\tconst anchorRect = useMemo( () => {\n\t\tconst selection = window.getSelection();\n\t\tconst range = selection.rangeCount > 0 ? selection.getRangeAt( 0 ) : null;\n\t\tif ( ! range ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( addingLink ) {\n\t\t\treturn getRectangleFromRange( range );\n\t\t}\n\n\t\tlet element = range.startContainer;\n\n\t\t// If the caret is right before the element, select the next element.\n\t\telement = element.nextElementSibling || element;\n\n\t\twhile ( element.nodeType !== window.Node.ELEMENT_NODE ) {\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\tconst closest = element.closest( 'a' );\n\t\tif ( closest ) {\n\t\t\treturn closest.getBoundingClientRect();\n\t\t}\n\t}, [ isActive, addingLink, value.start, value.end ] );\n\n\tif ( ! anchorRect ) {\n\t\treturn null;\n\t}\n\n\treturn <URLPopover anchorRect={ anchorRect } { ...props } />;\n};\n\nconst LinkViewer = ( { url, editLink } ) => {\n\treturn (\n\t\t// Disable reason: KeyPress must be suppressed so the block doesn't hide the toolbar\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\t<div\n\t\t\tclassName=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n\t\t\tonKeyPress={ stopKeyPropagation }\n\t\t>\n\t\t\t<LinkViewerUrl url={ url } />\n\t\t\t<IconButton icon=\"edit\" label={ __( 'Edit' ) } onClick={ editLink } />\n\t\t</div>\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t);\n};\n\nconst createNewPrettyLink = (target, slug) => {\n\treturn new Promise((resolve, reject) => {\n\t\tjQuery.post(\n\t\t\tajaxurl, \n\t\t\t{\n\t\t\t\taction: 'prli_create_pretty_link',\n\t\t\t\ttarget: target,\n\t\t\t\tslug: slug,\n\t\t\t\tredirect: '',\n\t\t\t\tnofollow: 1,\n\t\t\t\ttracking: 1\n\t\t\t}, \n\t\t\t(data, textStatus, xhr) => {\n\t\t\t\t'true' === data ? resolve(data) : reject(data);\n\t\t\t}\n\t \t).fail(error => {\n\t \t\treject(error);\n\t \t});\n\t});\n}\n\nclass InlineLinkUI extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.editLink = this.editLink.bind( this );\n\t\tthis.submitLink = this.submitLink.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.onChangeInputValue = this.onChangeInputValue.bind( this );\n\t\tthis.setLinkTarget = this.setLinkTarget.bind( this );\n\t\tthis.onClickOutside = this.onClickOutside.bind( this );\n\t\tthis.resetState = this.resetState.bind( this );\n\t\tthis.autocompleteRef = createRef();\n\n\t\tthis.state = {\n\t\t\topensInNewWindow: false,\n\t\t\tinputValue: '',\n\t\t\tnewLinkUrl: '',\n\t\t\tnewLinkSlug: '',\n\t\t\tcreatingLink: false,\n\t\t\tcreatedLink: false,\n\t\t\tcreatedLinkError: false\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\tconst { activeAttributes: { url, target } } = props;\n\t\tconst opensInNewWindow = target === '_blank';\n\n\t\tif ( ! isShowingInput( props, state ) ) {\n\t\t\tif ( url !== state.inputValue ) {\n\t\t\t\treturn { inputValue: url };\n\t\t\t}\n\n\t\t\tif ( opensInNewWindow !== state.opensInNewWindow ) {\n\t\t\t\treturn { opensInNewWindow };\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( [ LEFT, DOWN, RIGHT, UP, BACKSPACE, ENTER ].indexOf( event.keyCode ) > -1 ) {\n\t\t\t// Stop the key event from propagating up to ObserveTyping.startTypingInTextField.\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n\n\tonChangeInputValue( inputValue ) {\n\t\tthis.setState( { inputValue } );\n\t}\n\n\tsetLinkTarget( opensInNewWindow ) {\n\t\tconst { activeAttributes: { url = '' }, value, onChange } = this.props;\n\n\t\tthis.setState( { opensInNewWindow } );\n\n\t\t// Apply now if URL is not being edited.\n\t\tif ( ! isShowingInput( this.props, this.state ) ) {\n\t\t\tconst selectedText = getTextContent( slice( value ) );\n\n\t\t\tonChange( applyFormat( value, createLinkFormat( {\n\t\t\t\turl,\n\t\t\t\topensInNewWindow,\n\t\t\t\ttext: selectedText,\n\t\t\t} ) ) );\n\t\t}\n\t}\n\n\teditLink( event ) {\n\t\tthis.setState( { editLink: true } );\n\t\tevent.preventDefault();\n\t}\n\n\tsubmitLink( event ) {\n\t\tconst { isActive, value, onChange, speak } = this.props;\n\t\tconst { inputValue, opensInNewWindow } = this.state;\n\t\tconst url = prependHTTP( inputValue );\n\t\tconst selectedText = getTextContent( slice( value ) );\n\t\tconst format = createLinkFormat( {\n\t\t\turl,\n\t\t\topensInNewWindow,\n\t\t\ttext: selectedText,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( isCollapsed( value ) && ! isActive ) {\n\t\t\tconst toInsert = applyFormat( create( { text: url } ), format, 0, url.length );\n\t\t\tonChange( insert( value, toInsert ) );\n\t\t} else {\n\t\t\tonChange( applyFormat( value, format ) );\n\t\t}\n\n\t\tthis.resetState();\n\n\t\tif ( ! isValidHref( url ) ) {\n\t\t\tspeak( __( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );\n\t\t} else if ( isActive ) {\n\t\t\tspeak( __( 'Link edited.' ), 'assertive' );\n\t\t} else {\n\t\t\tspeak( __( 'Link inserted.' ), 'assertive' );\n\t\t}\n\t}\n\n\tonClickOutside( event ) {\n\t\t// The autocomplete suggestions list renders in a separate popover (in a portal),\n\t\t// so onClickOutside fails to detect that a click on a suggestion occurred in the\n\t\t// LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and\n\t\t// return to avoid the popover being closed.\n\t\tconst autocompleteElement = this.autocompleteRef.current;\n\t\tif ( autocompleteElement && autocompleteElement.contains( event.target ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resetState();\n\t}\n\n\tresetState() {\n\t\tthis.props.stopAddingLink();\n\t\tthis.setState( { editLink: false } );\n\t}\n\n\trender() {\n\t\tconst { isActive, activeAttributes: { url }, addingLink, value } = this.props;\n\n\t\tif ( ! isActive && ! addingLink ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { inputValue, opensInNewWindow, newLinkUrl, newLinkSlug, creatingLink, createdLink, createdLinkError } = this.state;\n\t\tconst showInput = isShowingInput( this.props, this.state );\n\n\t\treturn (\n\t\t\t<URLPopoverAtLink\n\t\t\t\tclassName=\"pretty-link-inserter\"\n\t\t\t\tvalue={ value }\n\t\t\t\tisActive={ isActive }\n\t\t\t\taddingLink={ addingLink }\n\t\t\t\tonClickOutside={ this.onClickOutside }\n\t\t\t\tonClose={ this.resetState }\n\t\t\t\tfocusOnMount={ showInput ? 'firstElement' : false }\n\t\t\t\trenderSettings={ () => (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Open in New Tab' ) }\n\t\t\t\t\t\t\t\tchecked={ opensInNewWindow }\n\t\t\t\t\t\t\t\tonChange={ this.setLinkTarget }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"pretty-link-inserter-form-container\">\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcreatedLink && (\n\t\t\t\t\t\t\t\t\t<Notice status=\"success\" onRemove={() => this.setState({createdLink: false})}>\n\t\t\t\t\t\t\t\t <p>{__( 'Pretty Link created successfully.', 'memberpress' )}</p>\n\t\t\t\t\t\t\t\t </Notice>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcreatedLinkError && (\n\t\t\t\t\t\t\t\t\t<Notice status=\"error\" onRemove={() => this.setState({createdLink: false, createdLinkError: false})}>\n\t\t\t\t\t\t\t\t <p>{__( 'Pretty Link could not be created. Please try a slug that is not already used.', 'memberpress' )}</p>\n\t\t\t\t\t\t\t\t </Notice>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<strong>{__('New Pretty Link', 'pretty-link')}</strong>\n\t\t\t\t\t\t\t<form onSubmit={(event) => {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t// Send request to create new Pretty Link\n\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\tcreatingLink: true,\n\t\t\t\t\t\t\t\t\tcreatedLinkError: false,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tcreateNewPrettyLink( newLinkUrl, newLinkSlug )\n\t\t\t\t\t\t\t\t\t.then(data => {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tcreatedLink: true,\n\t\t\t\t\t\t\t\t\t\t\tcreatingLink: false,\n\t\t\t\t\t\t\t\t\t\t\tinputValue: plEditor.homeUrl + newLinkSlug,\n\t\t\t\t\t\t\t\t\t\t\tnewLinkUrl: '',\n\t\t\t\t\t\t\t\t\t\t\tnewLinkSlug: ''\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t.catch(error => {\n\t\t\t\t\t\t\t\t\t\tthis.setState({\n\t\t\t\t\t\t\t\t\t\t\tcreatedLink: false,\n\t\t\t\t\t\t\t\t\t\t\tcreatingLink: false,\n\t\t\t\t\t\t\t\t\t\t\tcreatedLinkError: true,\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}}>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t placeholder=\"URL\"\n\t\t\t\t\t\t\t\t className=\"pretty-link-new-link-url\"\n\t\t\t\t\t\t\t\t value={newLinkUrl}\n\t\t\t\t\t\t\t\t onChange={ ( newLinkUrl ) => {\n\t\t\t\t\t\t\t\t \tthis.setState( { newLinkUrl } );\n\t\t\t\t\t\t\t\t } }\n\t\t\t\t\t\t\t\t />\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t \t<p>\n\t\t\t\t \t\t\t\t<TextControl\n\t\t\t\t \t\t\t placeholder=\"Slug\"\n\t\t\t\t \t\t\t className=\"pretty-link-new-link-slug\"\n\t\t\t\t \t\t\t value={newLinkSlug}\n\t\t\t\t \t\t\t onChange={ ( newLinkSlug ) => {\n\t\t\t\t \t\t\t \tthis.setState( { newLinkSlug } );\n\t\t\t\t \t\t\t } }\n\t\t\t\t \t\t\t />\n\t\t\t\t\t\t \t</p>\n\t\t\t\t\t\t \t<p>\n\t\t\t\t\t\t \t\t<button \n\t\t\t\t\t\t \t\t\tclassName=\"pretty-link-submit-new-link components-button is-button is-primary\"\n\t\t\t\t\t\t \t\t\tonClick={ () => {\n\t\t\t\t\t\t \t\t\t\tconsole.log('Creating new Pretty Link...');\n\t\t\t\t\t\t \t\t\t} }\n\t\t\t\t\t\t \t\t>\n\t\t\t\t\t\t \t\t\t{ __( 'Create New Pretty Link', 'pretty-link' ) }\n\t\t\t\t\t\t \t\t</button>\n\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t \t\t\tcreatingLink && (\n\t\t\t\t\t\t \t\t\t\t<Spinner />\n\t\t\t\t\t\t \t\t\t)\n\t\t\t\t\t\t \t\t}\n\t\t\t\t\t\t \t</p>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Fragment>\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ showInput ? (\n\t\t\t\t\t<LinkEditor\n\t\t\t\t\t\tvalue={ inputValue }\n\t\t\t\t\t\tonChangeInputValue={ this.onChangeInputValue }\n\t\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\t\tsubmitLink={ this.submitLink }\n\t\t\t\t\t\tautocompleteRef={ this.autocompleteRef }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<LinkViewer\n\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\teditLink={ this.editLink }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</URLPopoverAtLink>\n\t\t);\n\t}\n}\n\nexport default withSpokenMessages( InlineLinkUI );\n","\nvar content = require(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","/**\n * External dependencies\n */\nimport { startsWith } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetProtocol,\n\tisValidProtocol,\n\tgetAuthority,\n\tisValidAuthority,\n\tgetPath,\n\tisValidPath,\n\tgetQueryString,\n\tisValidQueryString,\n\tgetFragment,\n\tisValidFragment,\n} from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Check for issues with the provided href.\n *\n * @param {string} href The href.\n *\n * @return {boolean} Is the href invalid?\n */\nexport function isValidHref( href ) {\n\tif ( ! href ) {\n\t\treturn false;\n\t}\n\n\tconst trimmedHref = href.trim();\n\n\tif ( ! trimmedHref ) {\n\t\treturn false;\n\t}\n\n\t// Does the href start with something that looks like a URL protocol?\n\tif ( /^\\S+:/.test( trimmedHref ) ) {\n\t\tconst protocol = getProtocol( trimmedHref );\n\t\tif ( ! isValidProtocol( protocol ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Add some extra checks for http(s) URIs, since these are the most common use-case.\n\t\t// This ensures URIs with an http protocol have exactly two forward slashes following the protocol.\n\t\tif ( startsWith( protocol, 'http' ) && ! /^https?:\\/\\/[^\\/\\s]/i.test( trimmedHref ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst authority = getAuthority( trimmedHref );\n\t\tif ( ! isValidAuthority( authority ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst path = getPath( trimmedHref );\n\t\tif ( path && ! isValidPath( path ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst queryString = getQueryString( trimmedHref );\n\t\tif ( queryString && ! isValidQueryString( queryString ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst fragment = getFragment( trimmedHref );\n\t\tif ( fragment && ! isValidFragment( fragment ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Validate anchor links.\n\tif ( startsWith( trimmedHref, '#' ) && ! isValidFragment( trimmedHref ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Generates the format object that will be applied to the link text.\n *\n * @param {string} url The href of the link.\n * @param {boolean} opensInNewWindow Whether this link will open in a new window.\n * @param {Object} text The text that is being hyperlinked.\n *\n * @return {Object} The final format object.\n */\nexport function createLinkFormat( { url, opensInNewWindow, text } ) {\n\tconst format = {\n\t\ttype: 'core/link',\n\t\tattributes: {\n\t\t\turl,\n\t\t},\n\t};\n\n\tif ( opensInNewWindow ) {\n\t\t// translators: accessibility label for external links, where the argument is the link text\n\t\tconst label = sprintf( __( '%s (opens in a new tab)' ), text );\n\n\t\tformat.attributes.target = '_blank';\n\t\tformat.attributes.rel = 'noreferrer noopener';\n\t\tformat.attributes[ 'aria-label' ] = label;\n\t}\n\n\treturn format;\n}\n","/**\n * External dependencies\n */\nimport { throttle, map, pick, defaultTo } from 'lodash';\nimport classnames from 'classnames';\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport { Spinner, withSpokenMessages, Popover } from '@wordpress/components';\nimport { withInstanceId, withSafeTimeout, compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Since URLInput is rendered in the context of other inputs, but should be\n// considered a separate modal node, prevent keyboard events from propagating\n// as being considered from the input.\nconst stopEventPropagation = ( event ) => event.stopPropagation();\n\nconst fetchLinkSuggestions = async ( search ) => {\n\n\tconst links = await apiFetch( {\n\t\turl: addQueryArgs( ajaxurl, {\n\t\t\taction: 'prli_search_for_links',\n\t\t\tterm: search,\n\t\t} ),\n\t} );\n\n\treturn map( links, ( link ) => ( {\n\t\turl: plEditor.homeUrl + link.slug,\n\t\ttitle: decodeEntities( link.value ) + ' (' + decodeEntities( link.slug ) + ')' || __( '(no title)' ),\n\t} ) );\n};\n\nclass URLInput extends Component {\n\tconstructor( { autocompleteRef } ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.autocompleteRef = autocompleteRef || createRef();\n\t\tthis.inputRef = createRef();\n\t\tthis.updateSuggestions = throttle( this.updateSuggestions.bind( this ), 200 );\n\n\t\tthis.suggestionNodes = [];\n\n\t\tthis.state = {\n\t\t\tsuggestions: [],\n\t\t\tshowSuggestions: false,\n\t\t\tselectedSuggestion: null,\n\t\t};\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst { showSuggestions, selectedSuggestion } = this.state;\n\t\t// only have to worry about scrolling selected suggestion into view\n\t\t// when already expanded\n\t\tif ( showSuggestions && selectedSuggestion !== null && ! this.scrollingIntoView ) {\n\t\t\tthis.scrollingIntoView = true;\n\t\t\tscrollIntoView( this.suggestionNodes[ selectedSuggestion ], this.autocompleteRef.current, {\n\t\t\t\tonlyScrollIfNeeded: true,\n\t\t\t} );\n\n\t\t\tthis.props.setTimeout( () => {\n\t\t\t\tthis.scrollingIntoView = false;\n\t\t\t}, 100 );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdelete this.suggestionsRequest;\n\t}\n\n\tbindSuggestionNode( index ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.suggestionNodes[ index ] = ref;\n\t\t};\n\t}\n\n\tupdateSuggestions( value ) {\n\n\t\t// Show the suggestions after typing at least 2 characters\n\t\t// and also for URLs\n\t\tif ( value.length < 2 || /^https?:/.test( value ) ) {\n\t\t\tthis.setState( {\n\t\t\t\tshowSuggestions: false,\n\t\t\t\tselectedSuggestion: null,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tshowSuggestions: true,\n\t\t\tselectedSuggestion: null,\n\t\t\tloading: true,\n\t\t} );\n\n\t\tconst request = fetchLinkSuggestions( value );\n\n\t\trequest.then( ( suggestions ) => {\n\t\t\t// A fetch Promise doesn't have an abort option. It's mimicked by\n\t\t\t// comparing the request reference in on the instance, which is\n\t\t\t// reset or deleted on subsequent requests or unmounting.\n\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setState( {\n\t\t\t\tsuggestions,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\tif ( !! suggestions.length ) {\n\t\t\t\tthis.props.debouncedSpeak( sprintf( _n(\n\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\tsuggestions.length\n\t\t\t\t), suggestions.length ), 'assertive' );\n\t\t\t} else {\n\t\t\t\tthis.props.debouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t} ).catch( () => {\n\t\t\tif ( this.suggestionsRequest === request ) {\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tthis.suggestionsRequest = request;\n\t}\n\n\tonChange( event ) {\n\t\tconst inputValue = event.target.value;\n\t\tthis.props.onChange( inputValue );\n\t\tthis.updateSuggestions( inputValue );\n\t}\n\n\tonKeyDown( event ) {\n\t\tconst { showSuggestions, selectedSuggestion, suggestions, loading } = this.state;\n\t\t// If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n\t\t// We shouldn't preventDefault to allow block arrow keys navigation\n\t\tif ( ! showSuggestions || ! suggestions.length || loading ) {\n\t\t\t// In the Windows version of Firefox the up and down arrows don't move the caret\n\t\t\t// within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n\t\t\t// a form of focus trapping that is disruptive to the user experience. This disruption\n\t\t\t// only happens if the caret is not in the first or last position in the text input.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t// When UP is pressed, if the caret is at the start of the text, move it to the 0\n\t\t\t\t// position.\n\t\t\t\tcase UP: {\n\t\t\t\t\tif ( 0 !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to position 0\n\t\t\t\t\t\tevent.target.setSelectionRange( 0, 0 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// When DOWN is pressed, if the caret is not at the end of the text, move it to the\n\t\t\t\t// last position.\n\t\t\t\tcase DOWN: {\n\t\t\t\t\tif ( this.props.value.length !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to the last position\n\t\t\t\t\t\tevent.target.setSelectionRange( this.props.value.length, this.props.value.length );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst suggestion = this.state.suggestions[ this.state.selectedSuggestion ];\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase UP: {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst previousIndex = ! selectedSuggestion ? suggestions.length - 1 : selectedSuggestion - 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: previousIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DOWN: {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst nextIndex = selectedSuggestion === null || ( selectedSuggestion === suggestions.length - 1 ) ? 0 : selectedSuggestion + 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: nextIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TAB: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\t\t\t\t\t// Announce a link has been selected when tabbing away from the input field.\n\t\t\t\t\tthis.props.speak( __( 'Link selected.' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ENTER: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis.selectLink( suggestion );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tselectLink( suggestion ) {\n\t\tthis.props.onChange( suggestion.url, suggestion );\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tshowSuggestions: false,\n\t\t} );\n\t}\n\n\thandleOnClick( suggestion ) {\n\t\tthis.selectLink( suggestion );\n\t\t// Move focus to the input field when a link suggestion is clicked.\n\t\tthis.inputRef.current.focus();\n\t}\n\n\trender() {\n\t\tconst { value = '', autoFocus = true, instanceId, className } = this.props;\n\t\tconst { showSuggestions, suggestions, selectedSuggestion, loading } = this.state;\n\n\t\tconst suggestionsListboxId = `block-editor-url-input-suggestions-${ instanceId }`;\n\t\tconst suggestionOptionIdPrefix = `block-editor-url-input-suggestion-${ instanceId }`;\n\n\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\treturn (\n\t\t\t<div className={ classnames( 'editor-url-input block-editor-url-input', className ) }>\n\t\t\t\t<input\n\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\taria-label={ __( 'URL' ) }\n\t\t\t\t\trequired\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ this.onChange }\n\t\t\t\t\tonInput={ stopEventPropagation }\n\t\t\t\t\tplaceholder={ __( 'Paste or type to search for your Pretty Link' ) }\n\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={ showSuggestions }\n\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\taria-owns={ suggestionsListboxId }\n\t\t\t\t\taria-activedescendant={ selectedSuggestion !== null ? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }` : undefined }\n\t\t\t\t\tref={ this.inputRef }\n\t\t\t\t/>\n\n\t\t\t\t{ ( loading ) && <Spinner /> }\n\n\t\t\t\t{ showSuggestions && !! suggestions.length &&\n\t\t\t\t\t<Popover position=\"bottom\" noArrow focusOnMount={ false }>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"editor-url-input__suggestions block-editor-url-input__suggestions\"\n\t\t\t\t\t\t\tid={ suggestionsListboxId }\n\t\t\t\t\t\t\tref={ this.autocompleteRef }\n\t\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ suggestions.map( ( suggestion, index ) => (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tkey={ suggestion.id }\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t\tid={ `${ suggestionOptionIdPrefix }-${ index }` }\n\t\t\t\t\t\t\t\t\tref={ this.bindSuggestionNode( index ) }\n\t\t\t\t\t\t\t\t\tclassName={ classnames( 'editor-url-input__suggestion block-editor-url-input__suggestion', {\n\t\t\t\t\t\t\t\t\t\t'is-selected': index === selectedSuggestion,\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t\tonClick={ () => this.handleOnClick( suggestion ) }\n\t\t\t\t\t\t\t\t\taria-selected={ index === selectedSuggestion }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ suggestion.title }\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover>\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md\n */\nexport default compose(\n\twithSafeTimeout,\n\twithSpokenMessages,\n\twithInstanceId,\n\twithSelect( ( select ) => {\n\t\tconst { getSettings } = select( 'core/block-editor' );\n\t\treturn {\n\t\t\tfetchLinkSuggestions: getSettings().__experimentalFetchLinkSuggestions,\n\t\t};\n\t} )\n)( URLInput );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withSpokenMessages } from '@wordpress/components';\nimport { Component, Fragment } from '@wordpress/element';\nimport {\n getTextContent,\n applyFormat,\n removeFormat,\n slice,\n registerFormatType\n} from '@wordpress/rich-text';\nimport { isURL, isEmail } from '@wordpress/url';\nimport { RichTextToolbarButton, RichTextShortcut } from '@wordpress/block-editor';\nimport InlineLinkUI from '../../components/link-editor';\n\n/**\n * Block constants\n */\nconst name = 'pretty-link/pretty-link';\nconst title = __( 'Pretty Link' );\n\nexport const prettyLink = {\n name,\n title,\n tagName: 'a',\n className: 'pretty-link',\n attributes: {\n url: 'href',\n target: 'target'\n },\n edit: withSpokenMessages( class LinkEdit extends Component {\n constructor() {\n super( ...arguments );\n\n this.addLink = this.addLink.bind( this );\n this.stopAddingLink = this.stopAddingLink.bind( this );\n this.onRemoveFormat = this.onRemoveFormat.bind( this );\n this.state = {\n addingLink: false,\n };\n }\n\n addLink() {\n const { value, onChange } = this.props;\n const text = getTextContent( slice( value ) );\n\n if ( text && isURL( text ) ) {\n onChange( applyFormat( value, { type: name, attributes: { url: text } } ) );\n } else {\n this.setState( { addingLink: true } );\n }\n }\n\n stopAddingLink() {\n this.setState( { addingLink: false } );\n }\n\n onRemoveFormat() {\n const { value, onChange, speak } = this.props;\n\n onChange( removeFormat( value, name ) );\n speak( __( 'Link removed.' ), 'assertive' );\n }\n\n render() {\n const { isActive, activeAttributes, value, onChange } = this.props;\n\n return (\n <>\n <RichTextShortcut\n type=\"primary\"\n character=\"k\"\n onUse={ this.addLink }\n />\n <RichTextShortcut\n type=\"primaryShift\"\n character=\"k\"\n onUse={ this.onRemoveFormat }\n />\n { isActive && <RichTextToolbarButton\n icon=\"star-filled\"\n title={ __( 'Unlink' ) }\n onClick={ this.onRemoveFormat }\n isActive={ isActive }\n shortcutType=\"primaryShift\"\n shortcutCharacter=\"k\"\n /> }\n { ! isActive && <RichTextToolbarButton\n icon=\"star-filled\"\n title={ title }\n onClick={ this.addLink }\n isActive={ isActive }\n shortcutType=\"primary\"\n shortcutCharacter=\"k\"\n /> }\n <InlineLinkUI\n addingLink={ this.state.addingLink }\n stopAddingLink={ this.stopAddingLink }\n isActive={ isActive }\n activeAttributes={ activeAttributes }\n value={ value }\n onChange={ onChange }\n />\n </>\n );\n }\n } ),\n \n};\n\nfunction registerFormats () {\n [\n prettyLink,\n ].forEach( ( { name, ...settings } ) => registerFormatType( name, settings ) );\n};\nregisterFormats();","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","'use strict';\n\nvar util = require('./util');\n\nfunction scrollIntoView(elem, container, config) {\n config = config || {};\n // document 归一化到 window\n if (container.nodeType === 9) {\n container = util.getWindow(container);\n }\n\n var allowHorizontalScroll = config.allowHorizontalScroll;\n var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n var alignWithTop = config.alignWithTop;\n var alignWithLeft = config.alignWithLeft;\n var offsetTop = config.offsetTop || 0;\n var offsetLeft = config.offsetLeft || 0;\n var offsetBottom = config.offsetBottom || 0;\n var offsetRight = config.offsetRight || 0;\n\n allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n var isWin = util.isWindow(container);\n var elemOffset = util.offset(elem);\n var eh = util.outerHeight(elem);\n var ew = util.outerWidth(elem);\n var containerOffset = undefined;\n var ch = undefined;\n var cw = undefined;\n var containerScroll = undefined;\n var diffTop = undefined;\n var diffBottom = undefined;\n var win = undefined;\n var winScroll = undefined;\n var ww = undefined;\n var wh = undefined;\n\n if (isWin) {\n win = container;\n wh = util.height(win);\n ww = util.width(win);\n winScroll = {\n left: util.scrollLeft(win),\n top: util.scrollTop(win)\n };\n // elem 相对 container 可视视窗的距离\n diffTop = {\n left: elemOffset.left - winScroll.left - offsetLeft,\n top: elemOffset.top - winScroll.top - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom\n };\n containerScroll = winScroll;\n } else {\n containerOffset = util.offset(container);\n ch = container.clientHeight;\n cw = container.clientWidth;\n containerScroll = {\n left: container.scrollLeft,\n top: container.scrollTop\n };\n // elem 相对 container 可视视窗的距离\n // 注意边框, offset 是边框到根节点\n diffTop = {\n left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,\n top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,\n top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom\n };\n }\n\n if (diffTop.top < 0 || diffBottom.top > 0) {\n // 强制向上\n if (alignWithTop === true) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else if (alignWithTop === false) {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n } else {\n // 自动调整\n if (diffTop.top < 0) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n if (alignWithTop) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n }\n\n if (allowHorizontalScroll) {\n if (diffTop.left < 0 || diffBottom.left > 0) {\n // 强制向上\n if (alignWithLeft === true) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else if (alignWithLeft === false) {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n } else {\n // 自动调整\n if (diffTop.left < 0) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n if (alignWithLeft) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n }\n }\n}\n\nmodule.exports = scrollIntoView;","'use strict';\n\nmodule.exports = require('./dom-scroll-into-view');","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n var box = undefined;\n var x = undefined;\n var y = undefined;\n var doc = elem.ownerDocument;\n var body = doc.body;\n var docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = box.left;\n y = box.top;\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y\n };\n}\n\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n var pos = getClientPosition(el);\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n var val = '';\n var d = elem.ownerDocument;\n var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n var style = elem.style;\n var left = style[LEFT];\n var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nvar getComputedStyleX = undefined;\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n var old = {};\n var style = elem.style;\n var name = undefined;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n var value = 0;\n var prop = undefined;\n var j = undefined;\n var i = undefined;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n var cssProp = undefined;\n if (prop === 'border') {\n cssProp = prop + which[i] + 'Width';\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n domUtils['doc' + name] = function (refWin) {\n var d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement['scroll' + name],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body['scroll' + name], domUtils['viewport' + name](d));\n };\n\n domUtils['viewport' + name] = function (win) {\n // pc browser includes scrollbar in window.innerWidth\n var prop = 'client' + name;\n var doc = win.document;\n var body = doc.body;\n var documentElement = doc.documentElement;\n var documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n if (isWindow(elem)) {\n return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n }\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem, computedStyle);\n var cssBoxValue = 0;\n if (borderBoxValue == null || borderBoxValue <= 0) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = parseFloat(cssBoxValue) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n var val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n }\n return cssBoxValue;\n }\n if (borderBoxValueOrIsBorderBox) {\n var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);\n return val + (extra === BORDER_INDEX ? 0 : padding);\n }\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n var val = undefined;\n var args = arguments;\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, function () {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\nfunction css(el, name, v) {\n var value = v;\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n for (var i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value += 'px';\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], function (name) {\n var first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils['outer' + first] = function (el, includeMargin) {\n return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n };\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = function (elem, val) {\n if (val !== undefined) {\n if (elem) {\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n\n var old = getOffset(elem);\n var ret = {};\n var current = undefined;\n var key = undefined;\n\n for (key in offset) {\n if (offset.hasOwnProperty(key)) {\n current = parseFloat(css(elem, key)) || 0;\n ret[key] = current + offset[key] - old[key];\n }\n }\n css(elem, ret);\n}\n\nmodule.exports = _extends({\n getWindow: function getWindow(node) {\n var doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n offset: function offset(el, value) {\n if (typeof value !== 'undefined') {\n setOffset(el, value);\n } else {\n return getOffset(el);\n }\n },\n\n isWindow: isWindow,\n each: each,\n css: css,\n clone: function clone(obj) {\n var ret = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n var overflow = obj.overflow;\n if (overflow) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n scrollLeft: function scrollLeft(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollLeft(w);\n }\n window.scrollTo(v, getScrollTop(w));\n } else {\n if (v === undefined) {\n return w.scrollLeft;\n }\n w.scrollLeft = v;\n }\n },\n scrollTop: function scrollTop(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollTop(w);\n }\n window.scrollTo(getScrollLeft(w), v);\n } else {\n if (v === undefined) {\n return w.scrollTop;\n }\n w.scrollTop = v;\n }\n },\n\n viewportWidth: 0,\n viewportHeight: 0\n}, domUtils);","module.exports = \".pretty-link-inserter .block-editor-url-popover__settings {\\n display: block; }\\n\\n.pretty-link-inserter .pretty-link-inserter-form-container {\\n margin-top: 30px; }\\n\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (typeof __webpack_nonce__ === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn __webpack_nonce__;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n","(function() { module.exports = this[\"regeneratorRuntime\"]; }());","(function() { module.exports = this[\"wp\"][\"apiFetch\"]; }());","(function() { module.exports = this[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = this[\"wp\"][\"components\"]; }());","(function() { module.exports = this[\"wp\"][\"compose\"]; }());","(function() { module.exports = this[\"wp\"][\"data\"]; }());","(function() { module.exports = this[\"wp\"][\"dom\"]; }());","(function() { module.exports = this[\"wp\"][\"element\"]; }());","(function() { module.exports = this[\"wp\"][\"htmlEntities\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"keycodes\"]; }());","(function() { module.exports = this[\"wp\"][\"richText\"]; }());","(function() { module.exports = this[\"wp\"][\"url\"]; }());","(function() { module.exports = this[\"lodash\"]; }());"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./js/editor/components/index.js","webpack:///./js/editor/components/link-editor/index.js","webpack:///./js/editor/components/link-editor/style.scss?a870","webpack:///./js/editor/components/link-editor/utils.js","webpack:///./js/editor/components/url-input/index.js","webpack:///./js/editor/formats/pretty-link/index.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime/helpers/asyncToGenerator.js","webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/classnames/index.js","webpack:///./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack:///./node_modules/dom-scroll-into-view/lib/index.js","webpack:///./node_modules/dom-scroll-into-view/lib/util.js","webpack:///./js/editor/components/link-editor/style.scss","webpack:///./node_modules/style-loader/lib/addStyles.js","webpack:///./node_modules/style-loader/lib/urls.js","webpack:///external {\"this\":\"regeneratorRuntime\"}","webpack:///external {\"this\":[\"wp\",\"apiFetch\"]}","webpack:///external {\"this\":[\"wp\",\"blockEditor\"]}","webpack:///external {\"this\":[\"wp\",\"components\"]}","webpack:///external {\"this\":[\"wp\",\"compose\"]}","webpack:///external {\"this\":[\"wp\",\"data\"]}","webpack:///external {\"this\":[\"wp\",\"dom\"]}","webpack:///external {\"this\":[\"wp\",\"element\"]}","webpack:///external {\"this\":[\"wp\",\"htmlEntities\"]}","webpack:///external {\"this\":[\"wp\",\"i18n\"]}","webpack:///external {\"this\":[\"wp\",\"keycodes\"]}","webpack:///external {\"this\":[\"wp\",\"richText\"]}","webpack:///external {\"this\":[\"wp\",\"url\"]}","webpack:///external {\"this\":\"lodash\"}"],"names":["stopKeyPropagation","event","stopPropagation","isShowingInput","props","state","addingLink","editLink","LinkEditor","value","onChangeInputValue","onKeyDown","submitLink","autocompleteRef","__","LinkViewerUrl","url","prependedURL","prependHTTP","linkClassName","classnames","isValidHref","filterURLForDisplay","safeDecodeURI","URLPopoverAtLink","isActive","anchorRect","useMemo","selection","window","getSelection","range","rangeCount","getRangeAt","getRectangleFromRange","element","startContainer","nextElementSibling","nodeType","Node","ELEMENT_NODE","parentNode","closest","getBoundingClientRect","start","end","LinkViewer","createNewPrettyLink","target","slug","Promise","resolve","reject","jQuery","post","ajaxurl","action","redirect","nofollow","tracking","data","textStatus","xhr","fail","error","InlineLinkUI","arguments","bind","setLinkTarget","onClickOutside","resetState","createRef","opensInNewWindow","inputValue","newLinkUrl","newLinkSlug","creatingLink","createdLink","createdLinkError","LEFT","DOWN","RIGHT","UP","BACKSPACE","ENTER","indexOf","keyCode","setState","activeAttributes","onChange","selectedText","getTextContent","slice","applyFormat","createLinkFormat","text","preventDefault","speak","format","isCollapsed","toInsert","create","length","insert","autocompleteElement","current","contains","stopAddingLink","showInput","then","plEditor","homeUrl","catch","console","log","Component","withSpokenMessages","href","trimmedHref","trim","test","protocol","getProtocol","isValidProtocol","startsWith","authority","getAuthority","isValidAuthority","path","getPath","isValidPath","queryString","getQueryString","isValidQueryString","fragment","getFragment","isValidFragment","type","attributes","label","sprintf","rel","stopEventPropagation","fetchLinkSuggestions","search","apiFetch","addQueryArgs","term","links","map","link","pretty_url","title","decodeEntities","URLInput","inputRef","updateSuggestions","throttle","suggestionNodes","suggestions","showSuggestions","selectedSuggestion","scrollingIntoView","scrollIntoView","onlyScrollIfNeeded","setTimeout","suggestionsRequest","index","ref","loading","request","debouncedSpeak","_n","selectionStart","setSelectionRange","suggestion","previousIndex","nextIndex","TAB","selectLink","focus","autoFocus","instanceId","className","suggestionsListboxId","suggestionOptionIdPrefix","undefined","id","bindSuggestionNode","handleOnClick","compose","withSafeTimeout","withInstanceId","withSelect","select","getSettings","__experimentalFetchLinkSuggestions","name","prettyLink","tagName","edit","addLink","onRemoveFormat","isURL","removeFormat","registerFormats","forEach","settings","registerFormatType"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;ACnEA;AAAA;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;AAGA;AAEA;;;;AAGA;AACA;AACA;AAUA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAEA;;;;AAGA;;AAEA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEC,KAAF;AAAA,SAAaA,KAAK,CAACC,eAAN,EAAb;AAAA,CAA3B;;AAEA,SAASC,cAAT,CAAyBC,KAAzB,EAAgCC,KAAhC,EAAwC;AACtC,SAAOD,KAAK,CAAC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ACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE,UAAU,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,oGAAC;AACJ,EAAE,MAAM,EAEN;AACF,CAAC;;;;;;;;;;;;;ACnDY;;AAEb,WAAW,mBAAO,CAAC,+DAAQ;;AAE3B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA,gC;;;;;;;;;;;;AChIa;;AAEb,iBAAiB,mBAAO,CAAC,+FAAwB,E;;;;;;;;;;;;ACFpC;;AAEb,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P,oGAAoG,mBAAmB,EAAE,mBAAmB,kGAAkG;;AAE9O;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,CAAC,Y;;;;;;;;;;;ACtbD,6EAA6E,mBAAmB,EAAE,gEAAgE,qBAAqB,EAAE,G;;;;;;;;;;;ACAzL;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA,cAAc,mBAAO,CAAC,uDAAQ;;AAE9B;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA,iBAAiB,mBAAmB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA,mBAAmB,2BAA2B;;AAE9C;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,mBAAmB;AACnC;AACA;;AAEA;AACA;;AAEA,iBAAiB,2BAA2B;AAC5C;AACA;;AAEA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;;AAEA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,cAAc;;AAEd,kDAAkD,sBAAsB;AACxE;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA,KAAK,KAAwC,EAAE,EAE7C;;AAEF,QAAQ,sBAAiB;AACzB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;;AAEA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;;;;;;;;;;;;;AC9YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,WAAW,EAAE;AACrD,wCAAwC,WAAW,EAAE;;AAErD;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,sCAAsC;AACtC,GAAG;AACH;AACA,8DAA8D;AAC9D;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxFA,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,4CAA4C,EAAE,I;;;;;;;;;;;ACA3D,aAAa,2CAA2C,EAAE,I;;;;;;;;;;;ACA1D,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,6CAA6C,EAAE,I;;;;;;;;;;;ACA5D,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,iCAAiC,EAAE,I","file":"editor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","export { default as URLInput } from './url-input';","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, Fragment, createRef, useMemo } from '@wordpress/element';\nimport {\n ExternalLink,\n IconButton,\n ToggleControl,\n Button,\n TextControl,\n Notice,\n Spinner,\n withSpokenMessages,\n} from '@wordpress/components';\nimport { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes';\nimport { getRectangleFromRange } from '@wordpress/dom';\nimport { prependHTTP, safeDecodeURI, filterURLForDisplay } from '@wordpress/url';\nimport {\n create,\n insert,\n isCollapsed,\n applyFormat,\n getTextContent,\n slice,\n} from '@wordpress/rich-text';\nimport { URLPopover } from '@wordpress/block-editor';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport URLInput from '../url-input';\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport { createLinkFormat, isValidHref } from './utils';\n\nconst stopKeyPropagation = ( event ) => event.stopPropagation();\n\nfunction isShowingInput( props, state ) {\n return props.addingLink || state.editLink;\n}\n\nconst LinkEditor = ( { value, onChangeInputValue, onKeyDown, submitLink, autocompleteRef } ) => (\n // Disable reason: KeyPress must be suppressed so the block doesn't hide the toolbar\n /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */\n <form\n className=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n onKeyPress={ stopKeyPropagation }\n onKeyDown={ onKeyDown }\n onSubmit={ submitLink }\n >\n <URLInput\n value={ value }\n onChange={ onChangeInputValue }\n autocompleteRef={ autocompleteRef }\n />\n <IconButton icon=\"editor-break\" label={ __( 'Insert Pretty Link' ) } type=\"submit\" />\n </form>\n /* eslint-enable jsx-a11y/no-noninteractive-element-interactions */\n);\n\nconst LinkViewerUrl = ( { url } ) => {\n const prependedURL = prependHTTP( url );\n const linkClassName = classnames( 'editor-format-toolbar__link-container-value block-editor-format-toolbar__link-container-value', {\n 'has-invalid-link': ! isValidHref( prependedURL ),\n } );\n\n if ( ! url ) {\n return <span className={ linkClassName }></span>;\n }\n\n return (\n <ExternalLink\n className={ linkClassName }\n href={ url }\n >\n { filterURLForDisplay( safeDecodeURI( url ) ) }\n </ExternalLink>\n );\n};\n\nconst URLPopoverAtLink = ( { isActive, addingLink, value, ...props } ) => {\n const anchorRect = useMemo( () => {\n const selection = window.getSelection();\n const range = selection.rangeCount > 0 ? selection.getRangeAt( 0 ) : null;\n if ( ! range ) {\n return;\n }\n\n if ( addingLink ) {\n return getRectangleFromRange( range );\n }\n\n let element = range.startContainer;\n\n // If the caret is right before the element, select the next element.\n element = element.nextElementSibling || element;\n\n while ( element.nodeType !== window.Node.ELEMENT_NODE ) {\n element = element.parentNode;\n }\n\n const closest = element.closest( 'a' );\n if ( closest ) {\n return closest.getBoundingClientRect();\n }\n }, [ isActive, addingLink, value.start, value.end ] );\n\n if ( ! anchorRect ) {\n return null;\n }\n\n return <URLPopover anchorRect={ anchorRect } { ...props } />;\n};\n\nconst LinkViewer = ( { url, editLink } ) => {\n return (\n // Disable reason: KeyPress must be suppressed so the block doesn't hide the toolbar\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n <div\n className=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n onKeyPress={ stopKeyPropagation }\n >\n <LinkViewerUrl url={ url } />\n <IconButton icon=\"edit\" label={ __( 'Edit' ) } onClick={ editLink } />\n </div>\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n );\n};\n\nconst createNewPrettyLink = (target, slug) => {\n return new Promise((resolve, reject) => {\n jQuery.post(\n ajaxurl,\n {\n action: 'prli_create_pretty_link',\n target: target,\n slug: slug,\n redirect: '',\n nofollow: 1,\n tracking: 1\n },\n (data, textStatus, xhr) => {\n 'true' === data ? resolve(data) : reject(data);\n }\n ).fail(error => {\n reject(error);\n });\n });\n}\n\nclass InlineLinkUI extends Component {\n constructor() {\n super( ...arguments );\n\n this.editLink = this.editLink.bind( this );\n this.submitLink = this.submitLink.bind( this );\n this.onKeyDown = this.onKeyDown.bind( this );\n this.onChangeInputValue = this.onChangeInputValue.bind( this );\n this.setLinkTarget = this.setLinkTarget.bind( this );\n this.onClickOutside = this.onClickOutside.bind( this );\n this.resetState = this.resetState.bind( this );\n this.autocompleteRef = createRef();\n\n this.state = {\n opensInNewWindow: false,\n inputValue: '',\n newLinkUrl: '',\n newLinkSlug: '',\n creatingLink: false,\n createdLink: false,\n createdLinkError: false\n };\n }\n\n static getDerivedStateFromProps( props, state ) {\n const { activeAttributes: { url, target } } = props;\n const opensInNewWindow = target === '_blank';\n\n if ( ! isShowingInput( props, state ) ) {\n if ( url !== state.inputValue ) {\n return { inputValue: url };\n }\n\n if ( opensInNewWindow !== state.opensInNewWindow ) {\n return { opensInNewWindow };\n }\n }\n\n return null;\n }\n\n onKeyDown( event ) {\n if ( [ LEFT, DOWN, RIGHT, UP, BACKSPACE, ENTER ].indexOf( event.keyCode ) > -1 ) {\n // Stop the key event from propagating up to ObserveTyping.startTypingInTextField.\n event.stopPropagation();\n }\n }\n\n onChangeInputValue( inputValue ) {\n this.setState( { inputValue } );\n }\n\n setLinkTarget( opensInNewWindow ) {\n const { activeAttributes: { url = '' }, value, onChange } = this.props;\n\n this.setState( { opensInNewWindow } );\n\n // Apply now if URL is not being edited.\n if ( ! isShowingInput( this.props, this.state ) ) {\n const selectedText = getTextContent( slice( value ) );\n\n onChange( applyFormat( value, createLinkFormat( {\n url,\n opensInNewWindow,\n text: selectedText,\n } ) ) );\n }\n }\n\n editLink( event ) {\n this.setState( { editLink: true } );\n event.preventDefault();\n }\n\n submitLink( event ) {\n const { isActive, value, onChange, speak } = this.props;\n const { inputValue, opensInNewWindow } = this.state;\n const url = prependHTTP( inputValue );\n const selectedText = getTextContent( slice( value ) );\n const format = createLinkFormat( {\n url,\n opensInNewWindow,\n text: selectedText,\n } );\n\n event.preventDefault();\n\n if ( isCollapsed( value ) && ! isActive ) {\n const toInsert = applyFormat( create( { text: url } ), format, 0, url.length );\n onChange( insert( value, toInsert ) );\n } else {\n onChange( applyFormat( value, format ) );\n }\n\n this.resetState();\n\n if ( ! isValidHref( url ) ) {\n speak( __( 'Warning: the link has been inserted but may have errors. Please test it.' ), 'assertive' );\n } else if ( isActive ) {\n speak( __( 'Link edited.' ), 'assertive' );\n } else {\n speak( __( 'Link inserted.' ), 'assertive' );\n }\n }\n\n onClickOutside( event ) {\n // The autocomplete suggestions list renders in a separate popover (in a portal),\n // so onClickOutside fails to detect that a click on a suggestion occurred in the\n // LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and\n // return to avoid the popover being closed.\n const autocompleteElement = this.autocompleteRef.current;\n if ( autocompleteElement && autocompleteElement.contains( event.target ) ) {\n return;\n }\n\n this.resetState();\n }\n\n resetState() {\n this.props.stopAddingLink();\n this.setState( { editLink: false } );\n }\n\n render() {\n const { isActive, activeAttributes: { url }, addingLink, value } = this.props;\n\n if ( ! isActive && ! addingLink ) {\n return null;\n }\n\n const { inputValue, opensInNewWindow, newLinkUrl, newLinkSlug, creatingLink, createdLink, createdLinkError } = this.state;\n const showInput = isShowingInput( this.props, this.state );\n\n return (\n <URLPopoverAtLink\n className=\"pretty-link-inserter\"\n value={ value }\n isActive={ isActive }\n addingLink={ addingLink }\n onClickOutside={ this.onClickOutside }\n onClose={ this.resetState }\n focusOnMount={ showInput ? 'firstElement' : false }\n renderSettings={ () => (\n <Fragment>\n <div>\n <ToggleControl\n label={ __( 'Open in New Tab' ) }\n checked={ opensInNewWindow }\n onChange={ this.setLinkTarget }\n />\n </div>\n <div className=\"pretty-link-inserter-form-container\">\n {\n createdLink && (\n <Notice status=\"success\" onRemove={() => this.setState({createdLink: false})}>\n <p>{__( 'Pretty Link created successfully.', 'memberpress' )}</p>\n </Notice>\n )\n }\n {\n createdLinkError && (\n <Notice status=\"error\" onRemove={() => this.setState({createdLink: false, createdLinkError: false})}>\n <p>{__( 'Pretty Link could not be created. Please try a slug that is not already used.', 'memberpress' )}</p>\n </Notice>\n )\n }\n <strong>{__('New Pretty Link', 'pretty-link')}</strong>\n <form onSubmit={(event) => {\n event.preventDefault();\n // Send request to create new Pretty Link\n this.setState({\n creatingLink: true,\n createdLinkError: false,\n });\n createNewPrettyLink( newLinkUrl, newLinkSlug )\n .then(data => {\n this.setState({\n createdLink: true,\n creatingLink: false,\n inputValue: plEditor.homeUrl + newLinkSlug,\n newLinkUrl: '',\n newLinkSlug: ''\n });\n })\n .catch(error => {\n this.setState({\n createdLink: false,\n creatingLink: false,\n createdLinkError: true,\n });\n });\n }}>\n <p>\n <TextControl\n placeholder=\"URL\"\n className=\"pretty-link-new-link-url\"\n value={newLinkUrl}\n onChange={ ( newLinkUrl ) => {\n this.setState( { newLinkUrl } );\n } }\n />\n </p>\n <p>\n <TextControl\n placeholder=\"Slug\"\n className=\"pretty-link-new-link-slug\"\n value={newLinkSlug}\n onChange={ ( newLinkSlug ) => {\n this.setState( { newLinkSlug } );\n } }\n />\n </p>\n <p>\n <button\n className=\"pretty-link-submit-new-link components-button is-button is-primary\"\n onClick={ () => {\n console.log('Creating new Pretty Link...');\n } }\n >\n { __( 'Create New Pretty Link', 'pretty-link' ) }\n </button>\n {\n creatingLink && (\n <Spinner />\n )\n }\n </p>\n </form>\n </div>\n </Fragment>\n ) }\n >\n { showInput ? (\n <LinkEditor\n value={ inputValue }\n onChangeInputValue={ this.onChangeInputValue }\n onKeyDown={ this.onKeyDown }\n submitLink={ this.submitLink }\n autocompleteRef={ this.autocompleteRef }\n />\n ) : (\n <LinkViewer\n url={ url }\n editLink={ this.editLink }\n />\n ) }\n </URLPopoverAtLink>\n );\n }\n}\n\nexport default withSpokenMessages( InlineLinkUI );\n","\nvar content = require(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\");\n\nif(typeof content === 'string') content = [[module.id, content, '']];\n\nvar transform;\nvar insertInto;\n\n\n\nvar options = {\"hmr\":true}\n\noptions.transform = transform\noptions.insertInto = undefined;\n\nvar update = require(\"!../../../../node_modules/style-loader/lib/addStyles.js\")(content, options);\n\nif(content.locals) module.exports = content.locals;\n\nif(module.hot) {\n\tmodule.hot.accept(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\", function() {\n\t\tvar newContent = require(\"!!../../../../node_modules/postcss-loader/src/index.js??ref--6-1!../../../../node_modules/sass-loader/lib/loader.js!./style.scss\");\n\n\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\n\t\tvar locals = (function(a, b) {\n\t\t\tvar key, idx = 0;\n\n\t\t\tfor(key in a) {\n\t\t\t\tif(!b || a[key] !== b[key]) return false;\n\t\t\t\tidx++;\n\t\t\t}\n\n\t\t\tfor(key in b) idx--;\n\n\t\t\treturn idx === 0;\n\t\t}(content.locals, newContent.locals));\n\n\t\tif(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');\n\n\t\tupdate(newContent);\n\t});\n\n\tmodule.hot.dispose(function() { update(); });\n}","/**\n * External dependencies\n */\nimport { startsWith } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n getProtocol,\n isValidProtocol,\n getAuthority,\n isValidAuthority,\n getPath,\n isValidPath,\n getQueryString,\n isValidQueryString,\n getFragment,\n isValidFragment,\n} from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Check for issues with the provided href.\n *\n * @param {string} href The href.\n *\n * @return {boolean} Is the href invalid?\n */\nexport function isValidHref( href ) {\n if ( ! href ) {\n return false;\n }\n\n const trimmedHref = href.trim();\n\n if ( ! trimmedHref ) {\n return false;\n }\n\n // Does the href start with something that looks like a URL protocol?\n if ( /^\\S+:/.test( trimmedHref ) ) {\n const protocol = getProtocol( trimmedHref );\n if ( ! isValidProtocol( protocol ) ) {\n return false;\n }\n\n // Add some extra checks for http(s) URIs, since these are the most common use-case.\n // This ensures URIs with an http protocol have exactly two forward slashes following the protocol.\n if ( startsWith( protocol, 'http' ) && ! /^https?:\\/\\/[^\\/\\s]/i.test( trimmedHref ) ) {\n return false;\n }\n\n const authority = getAuthority( trimmedHref );\n if ( ! isValidAuthority( authority ) ) {\n return false;\n }\n\n const path = getPath( trimmedHref );\n if ( path && ! isValidPath( path ) ) {\n return false;\n }\n\n const queryString = getQueryString( trimmedHref );\n if ( queryString && ! isValidQueryString( queryString ) ) {\n return false;\n }\n\n const fragment = getFragment( trimmedHref );\n if ( fragment && ! isValidFragment( fragment ) ) {\n return false;\n }\n }\n\n // Validate anchor links.\n if ( startsWith( trimmedHref, '#' ) && ! isValidFragment( trimmedHref ) ) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Generates the format object that will be applied to the link text.\n *\n * @param {string} url The href of the link.\n * @param {boolean} opensInNewWindow Whether this link will open in a new window.\n * @param {Object} text The text that is being hyperlinked.\n *\n * @return {Object} The final format object.\n */\nexport function createLinkFormat( { url, opensInNewWindow, text } ) {\n const format = {\n type: 'core/link',\n attributes: {\n url,\n },\n };\n\n if ( opensInNewWindow ) {\n // translators: accessibility label for external links, where the argument is the link text\n const label = sprintf( __( '%s (opens in a new tab)' ), text );\n\n format.attributes.target = '_blank';\n format.attributes.rel = 'noreferrer noopener';\n format.attributes[ 'aria-label' ] = label;\n }\n\n return format;\n}\n","/**\n * External dependencies\n */\nimport { throttle, map, pick, defaultTo } from 'lodash';\nimport classnames from 'classnames';\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport { Spinner, withSpokenMessages, Popover } from '@wordpress/components';\nimport { withInstanceId, withSafeTimeout, compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Since URLInput is rendered in the context of other inputs, but should be\n// considered a separate modal node, prevent keyboard events from propagating\n// as being considered from the input.\nconst stopEventPropagation = ( event ) => event.stopPropagation();\n\nconst fetchLinkSuggestions = async ( search ) => {\n\n const links = await apiFetch( {\n url: addQueryArgs( ajaxurl, {\n action: 'prli_search_for_links',\n term: search,\n } ),\n } );\n\n return map( links, ( link ) => ( {\n url: link.pretty_url,\n title: decodeEntities( link.value ) + ' (' + decodeEntities( link.slug ) + ')' || __( '(no title)' ),\n } ) );\n};\n\nclass URLInput extends Component {\n constructor( { autocompleteRef } ) {\n super( ...arguments );\n\n this.onChange = this.onChange.bind( this );\n this.onKeyDown = this.onKeyDown.bind( this );\n this.autocompleteRef = autocompleteRef || createRef();\n this.inputRef = createRef();\n this.updateSuggestions = throttle( this.updateSuggestions.bind( this ), 200 );\n\n this.suggestionNodes = [];\n\n this.state = {\n suggestions: [],\n showSuggestions: false,\n selectedSuggestion: null,\n };\n }\n\n componentDidUpdate() {\n const { showSuggestions, selectedSuggestion } = this.state;\n // only have to worry about scrolling selected suggestion into view\n // when already expanded\n if ( showSuggestions && selectedSuggestion !== null && ! this.scrollingIntoView ) {\n this.scrollingIntoView = true;\n scrollIntoView( this.suggestionNodes[ selectedSuggestion ], this.autocompleteRef.current, {\n onlyScrollIfNeeded: true,\n } );\n\n this.props.setTimeout( () => {\n this.scrollingIntoView = false;\n }, 100 );\n }\n }\n\n componentWillUnmount() {\n delete this.suggestionsRequest;\n }\n\n bindSuggestionNode( index ) {\n return ( ref ) => {\n this.suggestionNodes[ index ] = ref;\n };\n }\n\n updateSuggestions( value ) {\n\n // Show the suggestions after typing at least 2 characters\n // and also for URLs\n if ( value.length < 2 || /^https?:/.test( value ) ) {\n this.setState( {\n showSuggestions: false,\n selectedSuggestion: null,\n loading: false,\n } );\n\n return;\n }\n\n this.setState( {\n showSuggestions: true,\n selectedSuggestion: null,\n loading: true,\n } );\n\n const request = fetchLinkSuggestions( value );\n\n request.then( ( suggestions ) => {\n // A fetch Promise doesn't have an abort option. It's mimicked by\n // comparing the request reference in on the instance, which is\n // reset or deleted on subsequent requests or unmounting.\n if ( this.suggestionsRequest !== request ) {\n return;\n }\n\n this.setState( {\n suggestions,\n loading: false,\n } );\n\n if ( !! suggestions.length ) {\n this.props.debouncedSpeak( sprintf( _n(\n '%d result found, use up and down arrow keys to navigate.',\n '%d results found, use up and down arrow keys to navigate.',\n suggestions.length\n ), suggestions.length ), 'assertive' );\n } else {\n this.props.debouncedSpeak( __( 'No results.' ), 'assertive' );\n }\n } ).catch( () => {\n if ( this.suggestionsRequest === request ) {\n this.setState( {\n loading: false,\n } );\n }\n } );\n\n this.suggestionsRequest = request;\n }\n\n onChange( event ) {\n const inputValue = event.target.value;\n this.props.onChange( inputValue );\n this.updateSuggestions( inputValue );\n }\n\n onKeyDown( event ) {\n const { showSuggestions, selectedSuggestion, suggestions, loading } = this.state;\n // If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n // We shouldn't preventDefault to allow block arrow keys navigation\n if ( ! showSuggestions || ! suggestions.length || loading ) {\n // In the Windows version of Firefox the up and down arrows don't move the caret\n // within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n // a form of focus trapping that is disruptive to the user experience. This disruption\n // only happens if the caret is not in the first or last position in the text input.\n // See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n switch ( event.keyCode ) {\n // When UP is pressed, if the caret is at the start of the text, move it to the 0\n // position.\n case UP: {\n if ( 0 !== event.target.selectionStart ) {\n event.stopPropagation();\n event.preventDefault();\n\n // Set the input caret to position 0\n event.target.setSelectionRange( 0, 0 );\n }\n break;\n }\n // When DOWN is pressed, if the caret is not at the end of the text, move it to the\n // last position.\n case DOWN: {\n if ( this.props.value.length !== event.target.selectionStart ) {\n event.stopPropagation();\n event.preventDefault();\n\n // Set the input caret to the last position\n event.target.setSelectionRange( this.props.value.length, this.props.value.length );\n }\n break;\n }\n }\n\n return;\n }\n\n const suggestion = this.state.suggestions[ this.state.selectedSuggestion ];\n\n switch ( event.keyCode ) {\n case UP: {\n event.stopPropagation();\n event.preventDefault();\n const previousIndex = ! selectedSuggestion ? suggestions.length - 1 : selectedSuggestion - 1;\n this.setState( {\n selectedSuggestion: previousIndex,\n } );\n break;\n }\n case DOWN: {\n event.stopPropagation();\n event.preventDefault();\n const nextIndex = selectedSuggestion === null || ( selectedSuggestion === suggestions.length - 1 ) ? 0 : selectedSuggestion + 1;\n this.setState( {\n selectedSuggestion: nextIndex,\n } );\n break;\n }\n case TAB: {\n if ( this.state.selectedSuggestion !== null ) {\n this.selectLink( suggestion );\n // Announce a link has been selected when tabbing away from the input field.\n this.props.speak( __( 'Link selected.' ) );\n }\n break;\n }\n case ENTER: {\n if ( this.state.selectedSuggestion !== null ) {\n event.stopPropagation();\n this.selectLink( suggestion );\n }\n break;\n }\n }\n }\n\n selectLink( suggestion ) {\n this.props.onChange( suggestion.url, suggestion );\n this.setState( {\n selectedSuggestion: null,\n showSuggestions: false,\n } );\n }\n\n handleOnClick( suggestion ) {\n this.selectLink( suggestion );\n // Move focus to the input field when a link suggestion is clicked.\n this.inputRef.current.focus();\n }\n\n render() {\n const { value = '', autoFocus = true, instanceId, className } = this.props;\n const { showSuggestions, suggestions, selectedSuggestion, loading } = this.state;\n\n const suggestionsListboxId = `block-editor-url-input-suggestions-${ instanceId }`;\n const suggestionOptionIdPrefix = `block-editor-url-input-suggestion-${ instanceId }`;\n\n /* eslint-disable jsx-a11y/no-autofocus */\n return (\n <div className={ classnames( 'editor-url-input block-editor-url-input', className ) }>\n <input\n autoFocus={ autoFocus }\n type=\"text\"\n aria-label={ __( 'URL' ) }\n required\n value={ value }\n onChange={ this.onChange }\n onInput={ stopEventPropagation }\n placeholder={ __( 'Paste or type to search for your Pretty Link' ) }\n onKeyDown={ this.onKeyDown }\n role=\"combobox\"\n aria-expanded={ showSuggestions }\n aria-autocomplete=\"list\"\n aria-owns={ suggestionsListboxId }\n aria-activedescendant={ selectedSuggestion !== null ? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }` : undefined }\n ref={ this.inputRef }\n />\n\n { ( loading ) && <Spinner /> }\n\n { showSuggestions && !! suggestions.length &&\n <Popover position=\"bottom\" noArrow focusOnMount={ false }>\n <div\n className=\"editor-url-input__suggestions block-editor-url-input__suggestions\"\n id={ suggestionsListboxId }\n ref={ this.autocompleteRef }\n role=\"listbox\"\n >\n { suggestions.map( ( suggestion, index ) => (\n <button\n key={ suggestion.id }\n role=\"option\"\n tabIndex=\"-1\"\n id={ `${ suggestionOptionIdPrefix }-${ index }` }\n ref={ this.bindSuggestionNode( index ) }\n className={ classnames( 'editor-url-input__suggestion block-editor-url-input__suggestion', {\n 'is-selected': index === selectedSuggestion,\n } ) }\n onClick={ () => this.handleOnClick( suggestion ) }\n aria-selected={ index === selectedSuggestion }\n >\n { suggestion.title }\n </button>\n ) ) }\n </div>\n </Popover>\n }\n </div>\n );\n /* eslint-enable jsx-a11y/no-autofocus */\n }\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/url-input/README.md\n */\nexport default compose(\n withSafeTimeout,\n withSpokenMessages,\n withInstanceId,\n withSelect( ( select ) => {\n const { getSettings } = select( 'core/block-editor' );\n return {\n fetchLinkSuggestions: getSettings().__experimentalFetchLinkSuggestions,\n };\n } )\n)( URLInput );\n","/**\n * WordPress dependencies\n */\nimport { __ } from \"@wordpress/i18n\";\nimport { withSpokenMessages } from \"@wordpress/components\";\nimport { Component, Fragment } from \"@wordpress/element\";\nimport {\n getTextContent,\n applyFormat,\n removeFormat,\n slice,\n registerFormatType\n} from \"@wordpress/rich-text\";\nimport { isURL, isEmail } from \"@wordpress/url\";\nimport {\n RichTextToolbarButton,\n RichTextShortcut\n} from \"@wordpress/block-editor\";\nimport InlineLinkUI from \"../../components/link-editor\";\n\n/**\n * Block constants\n */\nconst name = \"pretty-link/pretty-link\";\nconst title = __(\"Pretty Link\");\n\nexport const prettyLink = {\n name,\n title,\n tagName: \"a\",\n className: \"pretty-link\",\n attributes: {\n url: \"href\",\n target: \"target\"\n },\n edit: withSpokenMessages(\n class LinkEdit extends Component {\n constructor() {\n super(...arguments);\n\n this.addLink = this.addLink.bind(this);\n this.stopAddingLink = this.stopAddingLink.bind(this);\n this.onRemoveFormat = this.onRemoveFormat.bind(this);\n this.state = {\n addingLink: false\n };\n }\n\n addLink() {\n const { value, onChange } = this.props;\n const text = getTextContent(slice(value));\n\n if (text && isURL(text)) {\n onChange(\n applyFormat(value, { type: name, attributes: { url: text } })\n );\n } else {\n this.setState({ addingLink: true });\n }\n }\n\n stopAddingLink() {\n this.setState({ addingLink: false });\n }\n\n onRemoveFormat() {\n const { value, onChange, speak } = this.props;\n\n onChange(removeFormat(value, name));\n speak(__(\"Link removed.\"), \"assertive\");\n }\n\n render() {\n const { isActive, activeAttributes, value, onChange } = this.props;\n\n return (\n <>\n <RichTextShortcut\n type=\"primary\"\n character=\"p\"\n onUse={this.addLink}\n />\n <RichTextShortcut\n type=\"primaryShift\"\n character=\"p\"\n onUse={this.onRemoveFormat}\n />\n {isActive && (\n <RichTextToolbarButton\n icon=\"star-filled\"\n title={__(\"Unlink\")}\n onClick={this.onRemoveFormat}\n isActive={isActive}\n shortcutType=\"primaryShift\"\n shortcutCharacter=\"p\"\n />\n )}\n {!isActive && (\n <RichTextToolbarButton\n icon=\"star-filled\"\n title={title}\n onClick={this.addLink}\n isActive={isActive}\n shortcutType=\"primary\"\n shortcutCharacter=\"p\"\n />\n )}\n <InlineLinkUI\n addingLink={this.state.addingLink}\n stopAddingLink={this.stopAddingLink}\n isActive={isActive}\n activeAttributes={activeAttributes}\n value={value}\n onChange={onChange}\n />\n </>\n );\n }\n }\n )\n};\n\nfunction registerFormats() {\n [prettyLink].forEach(({ name, ...settings }) =>\n registerFormatType(name, settings)\n );\n}\nregisterFormats();\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","'use strict';\n\nvar util = require('./util');\n\nfunction scrollIntoView(elem, container, config) {\n config = config || {};\n // document 归一化到 window\n if (container.nodeType === 9) {\n container = util.getWindow(container);\n }\n\n var allowHorizontalScroll = config.allowHorizontalScroll;\n var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n var alignWithTop = config.alignWithTop;\n var alignWithLeft = config.alignWithLeft;\n var offsetTop = config.offsetTop || 0;\n var offsetLeft = config.offsetLeft || 0;\n var offsetBottom = config.offsetBottom || 0;\n var offsetRight = config.offsetRight || 0;\n\n allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n var isWin = util.isWindow(container);\n var elemOffset = util.offset(elem);\n var eh = util.outerHeight(elem);\n var ew = util.outerWidth(elem);\n var containerOffset = undefined;\n var ch = undefined;\n var cw = undefined;\n var containerScroll = undefined;\n var diffTop = undefined;\n var diffBottom = undefined;\n var win = undefined;\n var winScroll = undefined;\n var ww = undefined;\n var wh = undefined;\n\n if (isWin) {\n win = container;\n wh = util.height(win);\n ww = util.width(win);\n winScroll = {\n left: util.scrollLeft(win),\n top: util.scrollTop(win)\n };\n // elem 相对 container 可视视窗的距离\n diffTop = {\n left: elemOffset.left - winScroll.left - offsetLeft,\n top: elemOffset.top - winScroll.top - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom\n };\n containerScroll = winScroll;\n } else {\n containerOffset = util.offset(container);\n ch = container.clientHeight;\n cw = container.clientWidth;\n containerScroll = {\n left: container.scrollLeft,\n top: container.scrollTop\n };\n // elem 相对 container 可视视窗的距离\n // 注意边框, offset 是边框到根节点\n diffTop = {\n left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,\n top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,\n top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom\n };\n }\n\n if (diffTop.top < 0 || diffBottom.top > 0) {\n // 强制向上\n if (alignWithTop === true) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else if (alignWithTop === false) {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n } else {\n // 自动调整\n if (diffTop.top < 0) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n if (alignWithTop) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n }\n\n if (allowHorizontalScroll) {\n if (diffTop.left < 0 || diffBottom.left > 0) {\n // 强制向上\n if (alignWithLeft === true) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else if (alignWithLeft === false) {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n } else {\n // 自动调整\n if (diffTop.left < 0) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n if (alignWithLeft) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n }\n }\n}\n\nmodule.exports = scrollIntoView;","'use strict';\n\nmodule.exports = require('./dom-scroll-into-view');","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n var box = undefined;\n var x = undefined;\n var y = undefined;\n var doc = elem.ownerDocument;\n var body = doc.body;\n var docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = box.left;\n y = box.top;\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y\n };\n}\n\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n var pos = getClientPosition(el);\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n var val = '';\n var d = elem.ownerDocument;\n var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n var style = elem.style;\n var left = style[LEFT];\n var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nvar getComputedStyleX = undefined;\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n var old = {};\n var style = elem.style;\n var name = undefined;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n var value = 0;\n var prop = undefined;\n var j = undefined;\n var i = undefined;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n var cssProp = undefined;\n if (prop === 'border') {\n cssProp = prop + which[i] + 'Width';\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n domUtils['doc' + name] = function (refWin) {\n var d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement['scroll' + name],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body['scroll' + name], domUtils['viewport' + name](d));\n };\n\n domUtils['viewport' + name] = function (win) {\n // pc browser includes scrollbar in window.innerWidth\n var prop = 'client' + name;\n var doc = win.document;\n var body = doc.body;\n var documentElement = doc.documentElement;\n var documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n if (isWindow(elem)) {\n return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n }\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem, computedStyle);\n var cssBoxValue = 0;\n if (borderBoxValue == null || borderBoxValue <= 0) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = parseFloat(cssBoxValue) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n var val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n }\n return cssBoxValue;\n }\n if (borderBoxValueOrIsBorderBox) {\n var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);\n return val + (extra === BORDER_INDEX ? 0 : padding);\n }\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n var val = undefined;\n var args = arguments;\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, function () {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\nfunction css(el, name, v) {\n var value = v;\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n for (var i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value += 'px';\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], function (name) {\n var first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils['outer' + first] = function (el, includeMargin) {\n return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n };\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = function (elem, val) {\n if (val !== undefined) {\n if (elem) {\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n\n var old = getOffset(elem);\n var ret = {};\n var current = undefined;\n var key = undefined;\n\n for (key in offset) {\n if (offset.hasOwnProperty(key)) {\n current = parseFloat(css(elem, key)) || 0;\n ret[key] = current + offset[key] - old[key];\n }\n }\n css(elem, ret);\n}\n\nmodule.exports = _extends({\n getWindow: function getWindow(node) {\n var doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n offset: function offset(el, value) {\n if (typeof value !== 'undefined') {\n setOffset(el, value);\n } else {\n return getOffset(el);\n }\n },\n\n isWindow: isWindow,\n each: each,\n css: css,\n clone: function clone(obj) {\n var ret = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n var overflow = obj.overflow;\n if (overflow) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n scrollLeft: function scrollLeft(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollLeft(w);\n }\n window.scrollTo(v, getScrollTop(w));\n } else {\n if (v === undefined) {\n return w.scrollLeft;\n }\n w.scrollLeft = v;\n }\n },\n scrollTop: function scrollTop(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollTop(w);\n }\n window.scrollTo(getScrollLeft(w), v);\n } else {\n if (v === undefined) {\n return w.scrollTop;\n }\n w.scrollTop = v;\n }\n },\n\n viewportWidth: 0,\n viewportHeight: 0\n}, domUtils);","module.exports = \".pretty-link-inserter .block-editor-url-popover__settings {\\n display: block; }\\n\\n.pretty-link-inserter .pretty-link-inserter-form-container {\\n margin-top: 30px; }\\n\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n\t// tags it will allow on a page\n\tif (!options.singleton && typeof options.singleton !== \"boolean\") options.singleton = isOldIE();\n\n\t// By default, add <style> tags to the <head> element\n if (!options.insertInto) options.insertInto = \"head\";\n\n\t// By default, add <style> tags to the bottom of the target\n\tif (!options.insertAt) options.insertAt = \"bottom\";\n\n\tvar styles = listToStyles(list, options);\n\n\taddStylesToDom(styles, options);\n\n\treturn function update (newList) {\n\t\tvar mayRemove = [];\n\n\t\tfor (var i = 0; i < styles.length; i++) {\n\t\t\tvar item = styles[i];\n\t\t\tvar domStyle = stylesInDom[item.id];\n\n\t\t\tdomStyle.refs--;\n\t\t\tmayRemove.push(domStyle);\n\t\t}\n\n\t\tif(newList) {\n\t\t\tvar newStyles = listToStyles(newList, options);\n\t\t\taddStylesToDom(newStyles, options);\n\t\t}\n\n\t\tfor (var i = 0; i < mayRemove.length; i++) {\n\t\t\tvar domStyle = mayRemove[i];\n\n\t\t\tif(domStyle.refs === 0) {\n\t\t\t\tfor (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();\n\n\t\t\t\tdelete stylesInDom[domStyle.id];\n\t\t\t}\n\t\t}\n\t};\n};\n\nfunction addStylesToDom (styles, options) {\n\tfor (var i = 0; i < styles.length; i++) {\n\t\tvar item = styles[i];\n\t\tvar domStyle = stylesInDom[item.id];\n\n\t\tif(domStyle) {\n\t\t\tdomStyle.refs++;\n\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\n\t\t\t}\n\n\t\t\tfor(; j < item.parts.length; j++) {\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\t\t} else {\n\t\t\tvar parts = [];\n\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\n\t\t\t}\n\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\n\t\t}\n\t}\n}\n\nfunction listToStyles (list, options) {\n\tvar styles = [];\n\tvar newStyles = {};\n\n\tfor (var i = 0; i < list.length; i++) {\n\t\tvar item = list[i];\n\t\tvar id = options.base ? item[0] + options.base : item[0];\n\t\tvar css = item[1];\n\t\tvar media = item[2];\n\t\tvar sourceMap = item[3];\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\n\n\t\tif(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});\n\t\telse newStyles[id].parts.push(part);\n\t}\n\n\treturn styles;\n}\n\nfunction insertStyleElement (options, style) {\n\tvar target = getElement(options.insertInto)\n\n\tif (!target) {\n\t\tthrow new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n\t}\n\n\tvar lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];\n\n\tif (options.insertAt === \"top\") {\n\t\tif (!lastStyleElementInsertedAtTop) {\n\t\t\ttarget.insertBefore(style, target.firstChild);\n\t\t} else if (lastStyleElementInsertedAtTop.nextSibling) {\n\t\t\ttarget.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);\n\t\t} else {\n\t\t\ttarget.appendChild(style);\n\t\t}\n\t\tstylesInsertedAtTop.push(style);\n\t} else if (options.insertAt === \"bottom\") {\n\t\ttarget.appendChild(style);\n\t} else if (typeof options.insertAt === \"object\" && options.insertAt.before) {\n\t\tvar nextSibling = getElement(options.insertAt.before, target);\n\t\ttarget.insertBefore(style, nextSibling);\n\t} else {\n\t\tthrow new Error(\"[Style Loader]\\n\\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\\n Must be 'top', 'bottom', or Object.\\n (https://github.com/webpack-contrib/style-loader#insertat)\\n\");\n\t}\n}\n\nfunction removeStyleElement (style) {\n\tif (style.parentNode === null) return false;\n\tstyle.parentNode.removeChild(style);\n\n\tvar idx = stylesInsertedAtTop.indexOf(style);\n\tif(idx >= 0) {\n\t\tstylesInsertedAtTop.splice(idx, 1);\n\t}\n}\n\nfunction createStyleElement (options) {\n\tvar style = document.createElement(\"style\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\n\tif(options.attrs.nonce === undefined) {\n\t\tvar nonce = getNonce();\n\t\tif (nonce) {\n\t\t\toptions.attrs.nonce = nonce;\n\t\t}\n\t}\n\n\taddAttrs(style, options.attrs);\n\tinsertStyleElement(options, style);\n\n\treturn style;\n}\n\nfunction createLinkElement (options) {\n\tvar link = document.createElement(\"link\");\n\n\tif(options.attrs.type === undefined) {\n\t\toptions.attrs.type = \"text/css\";\n\t}\n\toptions.attrs.rel = \"stylesheet\";\n\n\taddAttrs(link, options.attrs);\n\tinsertStyleElement(options, link);\n\n\treturn link;\n}\n\nfunction addAttrs (el, attrs) {\n\tObject.keys(attrs).forEach(function (key) {\n\t\tel.setAttribute(key, attrs[key]);\n\t});\n}\n\nfunction getNonce() {\n\tif (typeof __webpack_nonce__ === 'undefined') {\n\t\treturn null;\n\t}\n\n\treturn __webpack_nonce__;\n}\n\nfunction addStyle (obj, options) {\n\tvar style, update, remove, result;\n\n\t// If a transform function was defined, run it on the css\n\tif (options.transform && obj.css) {\n\t result = typeof options.transform === 'function'\n\t\t ? options.transform(obj.css) \n\t\t : options.transform.default(obj.css);\n\n\t if (result) {\n\t \t// If transform returns a value, use that instead of the original css.\n\t \t// This allows running runtime transformations on the css.\n\t \tobj.css = result;\n\t } else {\n\t \t// If the transform function returns a falsy value, don't add this css.\n\t \t// This allows conditional loading of css\n\t \treturn function() {\n\t \t\t// noop\n\t \t};\n\t }\n\t}\n\n\tif (options.singleton) {\n\t\tvar styleIndex = singletonCounter++;\n\n\t\tstyle = singleton || (singleton = createStyleElement(options));\n\n\t\tupdate = applyToSingletonTag.bind(null, style, styleIndex, false);\n\t\tremove = applyToSingletonTag.bind(null, style, styleIndex, true);\n\n\t} else if (\n\t\tobj.sourceMap &&\n\t\ttypeof URL === \"function\" &&\n\t\ttypeof URL.createObjectURL === \"function\" &&\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\n\t\ttypeof Blob === \"function\" &&\n\t\ttypeof btoa === \"function\"\n\t) {\n\t\tstyle = createLinkElement(options);\n\t\tupdate = updateLink.bind(null, style, options);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\n\t\t\tif(style.href) URL.revokeObjectURL(style.href);\n\t\t};\n\t} else {\n\t\tstyle = createStyleElement(options);\n\t\tupdate = applyToTag.bind(null, style);\n\t\tremove = function () {\n\t\t\tremoveStyleElement(style);\n\t\t};\n\t}\n\n\tupdate(obj);\n\n\treturn function updateStyle (newObj) {\n\t\tif (newObj) {\n\t\t\tif (\n\t\t\t\tnewObj.css === obj.css &&\n\t\t\t\tnewObj.media === obj.media &&\n\t\t\t\tnewObj.sourceMap === obj.sourceMap\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdate(obj = newObj);\n\t\t} else {\n\t\t\tremove();\n\t\t}\n\t};\n}\n\nvar replaceText = (function () {\n\tvar textStore = [];\n\n\treturn function (index, replacement) {\n\t\ttextStore[index] = replacement;\n\n\t\treturn textStore.filter(Boolean).join('\\n');\n\t};\n})();\n\nfunction applyToSingletonTag (style, index, remove, obj) {\n\tvar css = remove ? \"\" : obj.css;\n\n\tif (style.styleSheet) {\n\t\tstyle.styleSheet.cssText = replaceText(index, css);\n\t} else {\n\t\tvar cssNode = document.createTextNode(css);\n\t\tvar childNodes = style.childNodes;\n\n\t\tif (childNodes[index]) style.removeChild(childNodes[index]);\n\n\t\tif (childNodes.length) {\n\t\t\tstyle.insertBefore(cssNode, childNodes[index]);\n\t\t} else {\n\t\t\tstyle.appendChild(cssNode);\n\t\t}\n\t}\n}\n\nfunction applyToTag (style, obj) {\n\tvar css = obj.css;\n\tvar media = obj.media;\n\n\tif(media) {\n\t\tstyle.setAttribute(\"media\", media)\n\t}\n\n\tif(style.styleSheet) {\n\t\tstyle.styleSheet.cssText = css;\n\t} else {\n\t\twhile(style.firstChild) {\n\t\t\tstyle.removeChild(style.firstChild);\n\t\t}\n\n\t\tstyle.appendChild(document.createTextNode(css));\n\t}\n}\n\nfunction updateLink (link, options, obj) {\n\tvar css = obj.css;\n\tvar sourceMap = obj.sourceMap;\n\n\t/*\n\t\tIf convertToAbsoluteUrls isn't defined, but sourcemaps are enabled\n\t\tand there is no publicPath defined then lets turn convertToAbsoluteUrls\n\t\ton by default. Otherwise default to the convertToAbsoluteUrls option\n\t\tdirectly\n\t*/\n\tvar autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;\n\n\tif (options.convertToAbsoluteUrls || autoFixUrls) {\n\t\tcss = fixUrls(css);\n\t}\n\n\tif (sourceMap) {\n\t\t// http://stackoverflow.com/a/26603875\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\n\t}\n\n\tvar blob = new Blob([css], { type: \"text/css\" });\n\n\tvar oldSrc = link.href;\n\n\tlink.href = URL.createObjectURL(blob);\n\n\tif(oldSrc) URL.revokeObjectURL(oldSrc);\n}\n","\n/**\n * When source maps are enabled, `style-loader` uses a link element with a data-uri to\n * embed the css on the page. This breaks all relative urls because now they are relative to a\n * bundle instead of the current page.\n *\n * One solution is to only use full urls, but that may be impossible.\n *\n * Instead, this function \"fixes\" the relative urls to be absolute according to the current page location.\n *\n * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.\n *\n */\n\nmodule.exports = function (css) {\n // get current location\n var location = typeof window !== \"undefined\" && window.location;\n\n if (!location) {\n throw new Error(\"fixUrls requires window.location\");\n }\n\n\t// blank or null?\n\tif (!css || typeof css !== \"string\") {\n\t return css;\n }\n\n var baseUrl = location.protocol + \"//\" + location.host;\n var currentDir = baseUrl + location.pathname.replace(/\\/[^\\/]*$/, \"/\");\n\n\t// convert each url(...)\n\t/*\n\tThis regular expression is just a way to recursively match brackets within\n\ta string.\n\n\t /url\\s*\\( = Match on the word \"url\" with any whitespace after it and then a parens\n\t ( = Start a capturing group\n\t (?: = Start a non-capturing group\n\t [^)(] = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t (?: = Start another non-capturing groups\n\t [^)(]+ = Match anything that isn't a parentheses\n\t | = OR\n\t \\( = Match a start parentheses\n\t [^)(]* = Match anything that isn't a parentheses\n\t \\) = Match a end parentheses\n\t ) = End Group\n *\\) = Match anything and then a close parens\n ) = Close non-capturing group\n * = Match anything\n ) = Close capturing group\n\t \\) = Match a close parens\n\n\t /gi = Get all matches, not the first. Be case insensitive.\n\t */\n\tvar fixedCss = css.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(fullMatch, origUrl) {\n\t\t// strip quotes (if they exist)\n\t\tvar unquotedOrigUrl = origUrl\n\t\t\t.trim()\n\t\t\t.replace(/^\"(.*)\"$/, function(o, $1){ return $1; })\n\t\t\t.replace(/^'(.*)'$/, function(o, $1){ return $1; });\n\n\t\t// already a full url? no change\n\t\tif (/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(unquotedOrigUrl)) {\n\t\t return fullMatch;\n\t\t}\n\n\t\t// convert the url to a full url\n\t\tvar newUrl;\n\n\t\tif (unquotedOrigUrl.indexOf(\"//\") === 0) {\n\t\t \t//TODO: should we add protocol?\n\t\t\tnewUrl = unquotedOrigUrl;\n\t\t} else if (unquotedOrigUrl.indexOf(\"/\") === 0) {\n\t\t\t// path should be relative to the base url\n\t\t\tnewUrl = baseUrl + unquotedOrigUrl; // already starts with '/'\n\t\t} else {\n\t\t\t// path should be relative to current directory\n\t\t\tnewUrl = currentDir + unquotedOrigUrl.replace(/^\\.\\//, \"\"); // Strip leading './'\n\t\t}\n\n\t\t// send back the fixed url(...)\n\t\treturn \"url(\" + JSON.stringify(newUrl) + \")\";\n\t});\n\n\t// send back the fixed css\n\treturn fixedCss;\n};\n","(function() { module.exports = this[\"regeneratorRuntime\"]; }());","(function() { module.exports = this[\"wp\"][\"apiFetch\"]; }());","(function() { module.exports = this[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = this[\"wp\"][\"components\"]; }());","(function() { module.exports = this[\"wp\"][\"compose\"]; }());","(function() { module.exports = this[\"wp\"][\"data\"]; }());","(function() { module.exports = this[\"wp\"][\"dom\"]; }());","(function() { module.exports = this[\"wp\"][\"element\"]; }());","(function() { module.exports = this[\"wp\"][\"htmlEntities\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"keycodes\"]; }());","(function() { module.exports = this[\"wp\"][\"richText\"]; }());","(function() { module.exports = this[\"wp\"][\"url\"]; }());","(function() { module.exports = this[\"lodash\"]; }());"],"sourceRoot":""}
js/editor/formats/pretty-link/index.js CHANGED
@@ -1,118 +1,128 @@
1
  /**
2
  * WordPress dependencies
3
  */
4
- import { __ } from '@wordpress/i18n';
5
- import { withSpokenMessages } from '@wordpress/components';
6
- import { Component, Fragment } from '@wordpress/element';
7
  import {
8
  getTextContent,
9
  applyFormat,
10
  removeFormat,
11
  slice,
12
  registerFormatType
13
- } from '@wordpress/rich-text';
14
- import { isURL, isEmail } from '@wordpress/url';
15
- import { RichTextToolbarButton, RichTextShortcut } from '@wordpress/block-editor';
16
- import InlineLinkUI from '../../components/link-editor';
 
 
 
17
 
18
  /**
19
  * Block constants
20
  */
21
- const name = 'pretty-link/pretty-link';
22
- const title = __( 'Pretty Link' );
23
 
24
  export const prettyLink = {
25
  name,
26
  title,
27
- tagName: 'a',
28
- className: 'pretty-link',
29
  attributes: {
30
- url: 'href',
31
- target: 'target'
32
  },
33
- edit: withSpokenMessages( class LinkEdit extends Component {
34
- constructor() {
35
- super( ...arguments );
 
36
 
37
- this.addLink = this.addLink.bind( this );
38
- this.stopAddingLink = this.stopAddingLink.bind( this );
39
- this.onRemoveFormat = this.onRemoveFormat.bind( this );
40
- this.state = {
41
- addingLink: false,
42
- };
43
- }
44
 
45
- addLink() {
46
- const { value, onChange } = this.props;
47
- const text = getTextContent( slice( value ) );
48
 
49
- if ( text && isURL( text ) ) {
50
- onChange( applyFormat( value, { type: name, attributes: { url: text } } ) );
51
- } else {
52
- this.setState( { addingLink: true } );
 
 
 
53
  }
54
- }
55
 
56
- stopAddingLink() {
57
- this.setState( { addingLink: false } );
58
- }
59
 
60
- onRemoveFormat() {
61
- const { value, onChange, speak } = this.props;
62
 
63
- onChange( removeFormat( value, name ) );
64
- speak( __( 'Link removed.' ), 'assertive' );
65
- }
66
 
67
- render() {
68
- const { isActive, activeAttributes, value, onChange } = this.props;
69
 
70
- return (
71
- <>
72
- <RichTextShortcut
73
- type="primary"
74
- character="k"
75
- onUse={ this.addLink }
76
- />
77
- <RichTextShortcut
78
- type="primaryShift"
79
- character="k"
80
- onUse={ this.onRemoveFormat }
81
- />
82
- { isActive && <RichTextToolbarButton
83
- icon="star-filled"
84
- title={ __( 'Unlink' ) }
85
- onClick={ this.onRemoveFormat }
86
- isActive={ isActive }
87
- shortcutType="primaryShift"
88
- shortcutCharacter="k"
89
- /> }
90
- { ! isActive && <RichTextToolbarButton
91
- icon="star-filled"
92
- title={ title }
93
- onClick={ this.addLink }
94
- isActive={ isActive }
95
- shortcutType="primary"
96
- shortcutCharacter="k"
97
- /> }
98
- <InlineLinkUI
99
- addingLink={ this.state.addingLink }
100
- stopAddingLink={ this.stopAddingLink }
101
- isActive={ isActive }
102
- activeAttributes={ activeAttributes }
103
- value={ value }
104
- onChange={ onChange }
105
- />
106
- </>
107
- );
 
 
 
 
 
108
  }
109
- } ),
110
-
111
  };
112
 
113
- function registerFormats () {
114
- [
115
- prettyLink,
116
- ].forEach( ( { name, ...settings } ) => registerFormatType( name, settings ) );
117
- };
118
- registerFormats();
1
  /**
2
  * WordPress dependencies
3
  */
4
+ import { __ } from "@wordpress/i18n";
5
+ import { withSpokenMessages } from "@wordpress/components";
6
+ import { Component, Fragment } from "@wordpress/element";
7
  import {
8
  getTextContent,
9
  applyFormat,
10
  removeFormat,
11
  slice,
12
  registerFormatType
13
+ } from "@wordpress/rich-text";
14
+ import { isURL, isEmail } from "@wordpress/url";
15
+ import {
16
+ RichTextToolbarButton,
17
+ RichTextShortcut
18
+ } from "@wordpress/block-editor";
19
+ import InlineLinkUI from "../../components/link-editor";
20
 
21
  /**
22
  * Block constants
23
  */
24
+ const name = "pretty-link/pretty-link";
25
+ const title = __("Pretty Link");
26
 
27
  export const prettyLink = {
28
  name,
29
  title,
30
+ tagName: "a",
31
+ className: "pretty-link",
32
  attributes: {
33
+ url: "href",
34
+ target: "target"
35
  },
36
+ edit: withSpokenMessages(
37
+ class LinkEdit extends Component {
38
+ constructor() {
39
+ super(...arguments);
40
 
41
+ this.addLink = this.addLink.bind(this);
42
+ this.stopAddingLink = this.stopAddingLink.bind(this);
43
+ this.onRemoveFormat = this.onRemoveFormat.bind(this);
44
+ this.state = {
45
+ addingLink: false
46
+ };
47
+ }
48
 
49
+ addLink() {
50
+ const { value, onChange } = this.props;
51
+ const text = getTextContent(slice(value));
52
 
53
+ if (text && isURL(text)) {
54
+ onChange(
55
+ applyFormat(value, { type: name, attributes: { url: text } })
56
+ );
57
+ } else {
58
+ this.setState({ addingLink: true });
59
+ }
60
  }
 
61
 
62
+ stopAddingLink() {
63
+ this.setState({ addingLink: false });
64
+ }
65
 
66
+ onRemoveFormat() {
67
+ const { value, onChange, speak } = this.props;
68
 
69
+ onChange(removeFormat(value, name));
70
+ speak(__("Link removed."), "assertive");
71
+ }
72
 
73
+ render() {
74
+ const { isActive, activeAttributes, value, onChange } = this.props;
75
 
76
+ return (
77
+ <>
78
+ <RichTextShortcut
79
+ type="primary"
80
+ character="p"
81
+ onUse={this.addLink}
82
+ />
83
+ <RichTextShortcut
84
+ type="primaryShift"
85
+ character="p"
86
+ onUse={this.onRemoveFormat}
87
+ />
88
+ {isActive && (
89
+ <RichTextToolbarButton
90
+ icon="star-filled"
91
+ title={__("Unlink")}
92
+ onClick={this.onRemoveFormat}
93
+ isActive={isActive}
94
+ shortcutType="primaryShift"
95
+ shortcutCharacter="p"
96
+ />
97
+ )}
98
+ {!isActive && (
99
+ <RichTextToolbarButton
100
+ icon="star-filled"
101
+ title={title}
102
+ onClick={this.addLink}
103
+ isActive={isActive}
104
+ shortcutType="primary"
105
+ shortcutCharacter="p"
106
+ />
107
+ )}
108
+ <InlineLinkUI
109
+ addingLink={this.state.addingLink}
110
+ stopAddingLink={this.stopAddingLink}
111
+ isActive={isActive}
112
+ activeAttributes={activeAttributes}
113
+ value={value}
114
+ onChange={onChange}
115
+ />
116
+ </>
117
+ );
118
+ }
119
  }
120
+ )
 
121
  };
122
 
123
+ function registerFormats() {
124
+ [prettyLink].forEach(({ name, ...settings }) =>
125
+ registerFormatType(name, settings)
126
+ );
127
+ }
128
+ registerFormats();
pretty-link.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Pretty Links
4
  Plugin URI: https://prettylinks.com/pl/plugin-uri
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
- Version: 3.0.8
7
  Author: Blair Williams
8
  Author URI: http://blairwilliams.com
9
  Text Domain: pretty-link
3
  Plugin Name: Pretty Links
4
  Plugin URI: https://prettylinks.com/pl/plugin-uri
5
  Description: Shrink, track and share any URL on the Internet from your WordPress website!
6
+ Version: 3.0.9
7
  Author: Blair Williams
8
  Author URI: http://blairwilliams.com
9
  Text Domain: pretty-link
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://prettylinks.com
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, redirection, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, shortening, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 5.1
6
  Tested up to: 5.2.2
7
- Stable tag: 3.0.8
8
 
9
  Shrink, beautify, track, manage and share any URL on or off of your WordPress website. Create links that look how you want using your own domain name!
10
 
@@ -64,6 +64,11 @@ http://blairwilliams.com/w7a
64
  3. Make sure you have changed your permalink Common Settings in Settings -> Permalinks away from "Default" to something else. I prefer using custom and then "/%year%/%month%/%postname%/" for the simplest possible URL slugs with the best performance.
65
 
66
  == Changelog ==
 
 
 
 
 
67
  = 3.0.8 =
68
  * PRO: Fix replacements checkbox getting unchecked when using page builders
69
 
4
  Tags: links, link, url, urls, affiliate, affiliates, pretty, marketing, redirect, redirection, forward, plugin, twitter, tweet, rewrite, shorturl, hoplink, hop, shortlink, short, shorten, shortening, click, clicks, track, tracking, tiny, tinyurl, budurl, shrinking, domain, shrink, mask, masking, cloak, cloaking, slug, slugs, admin, administration, stats, statistics, stat, statistic, email, ajax, javascript, ui, csv, download, page, post, pages, posts, shortcode, seo, automation, widget, widgets, dashboard
5
  Requires at least: 5.1
6
  Tested up to: 5.2.2
7
+ Stable tag: 3.0.9
8
 
9
  Shrink, beautify, track, manage and share any URL on or off of your WordPress website. Create links that look how you want using your own domain name!
10
 
64
  3. Make sure you have changed your permalink Common Settings in Settings -> Permalinks away from "Default" to something else. I prefer using custom and then "/%year%/%month%/%postname%/" for the simplest possible URL slugs with the best performance.
65
 
66
  == Changelog ==
67
+ = 3.0.9 =
68
+ * Change shortcut key to CTRL + P instead of CTRL + K
69
+ * Support for Nofollow and Tracking Quick Edit and Bulk Edit on the links list page
70
+ * Fix keyword replacement regex
71
+
72
  = 3.0.8 =
73
  * PRO: Fix replacements checkbox getting unchecked when using page builders
74