Plugin Directory

Changeset 2874796


Ignore:
Timestamp:
03/04/2023 07:04:05 PM (3 years ago)
Author:
blazk
Message:

Release version 3.4.0

Location:
rate-my-post
Files:
76 added
8 edited

Legend:

Unmodified
Added
Removed
  • rate-my-post/trunk/admin/templates/menu-options.php

    r2327017 r2874796  
    598598        </p>
    599599      </td>
     600      <td>
     601        <input
     602          id="rmp-disable-clear-cache"
     603          type="checkbox"
     604          data-key="disableClearCache"
     605          class="rmp-tab-content__input-checkbox js-rmp-option"
     606          <?php echo ($rmp_options['disableClearCache'] === 2) ? 'checked':""; ?>>
     607        <label class="rmp-tab-content__label" for="rmp-disable-clear-cache">
     608          <?php echo ( esc_html__( 'Disable clear cache', 'rate-my-post' ) ); ?>
     609        </label>
     610        <p class="rmp-tab-content__notice">
     611          <?php echo ( esc_html__( 'Enable this option if you don\'t want to clear post cache on every vote submission', 'rate-my-post' ) ); ?>.
     612        </p>
     613      </td>
    600614    </tr>
    601615  </table>
  • rate-my-post/trunk/common/class-rate-my-post-settings.php

    r2327017 r2874796  
    6060      'structuredDataType'  => 'none',
    6161      'ajaxLoad'            => 1,
     62      'disableClearCache'   => 1,
    6263    );
    6364    return $options;
     
    8788    'widgetAlign',
    8889    'ajaxLoad',
     90    'disableClearCache',
    8991  );
    9092
  • rate-my-post/trunk/includes/class-rate-my-post.php

    r2778391 r2874796  
    2929            $this->version = RATE_MY_POST_VERSION;
    3030        } else {
    31             $this->version = '3.3.3';
     31            $this->version = '3.4.0';
    3232        }
    3333        $this->rate_my_post = 'rate-my-post';
  • rate-my-post/trunk/languages/rate-my-post.pot

    r2778391 r2874796  
    1 # Copyright (C) 2022 rate-my-post
     1# Copyright (C) 2023 rate-my-post
    22# This file is distributed under the same license as the rate-my-post package.
    33msgid ""
     
    742742msgstr ""
    743743
    744 #: admin/templates/menu-options.php:608, admin/templates/menu-options.php:619, rate-my-post/admin/templates/menu-options.php:608, rate-my-post/admin/templates/menu-options.php:619
     744#: admin/templates/menu-options.php:608, rate-my-post/admin/templates/menu-options.php:608
     745msgid "Disable clear cache"
     746msgstr ""
     747
     748#: admin/templates/menu-options.php:611, rate-my-post/admin/templates/menu-options.php:611
     749msgid "Enable this option if you don't want to clear post cache on every vote submission"
     750msgstr ""
     751
     752#: admin/templates/menu-options.php:622, admin/templates/menu-options.php:633, rate-my-post/admin/templates/menu-options.php:622, rate-my-post/admin/templates/menu-options.php:633
    745753msgid "Save Settings"
    746754msgstr ""
    747755
    748 #: admin/templates/menu-options.php:612, rate-my-post/admin/templates/menu-options.php:612
     756#: admin/templates/menu-options.php:626, rate-my-post/admin/templates/menu-options.php:626
    749757msgid "Reset Settings"
    750758msgstr ""
     
    978986msgstr ""
    979987
    980 #: common/class-rate-my-post-settings.php:110, public/class-rate-my-post-public.php:1647, rate-my-post/common/class-rate-my-post-settings.php:110, rate-my-post/public/class-rate-my-post-public.php:1647
     988#: common/class-rate-my-post-settings.php:112, public/class-rate-my-post-public.php:1654, rate-my-post/common/class-rate-my-post-settings.php:112, rate-my-post/public/class-rate-my-post-public.php:1654
    981989msgid "How useful was this post?"
    982990msgstr ""
    983991
    984 #: common/class-rate-my-post-settings.php:111, public/class-rate-my-post-public.php:1648, rate-my-post/common/class-rate-my-post-settings.php:111, rate-my-post/public/class-rate-my-post-public.php:1648
     992#: common/class-rate-my-post-settings.php:113, public/class-rate-my-post-public.php:1655, rate-my-post/common/class-rate-my-post-settings.php:113, rate-my-post/public/class-rate-my-post-public.php:1655
    985993msgid "Click on a star to rate it!"
    986994msgstr ""
    987995
    988 #: common/class-rate-my-post-settings.php:112, public/class-rate-my-post-public.php:1649, rate-my-post/common/class-rate-my-post-settings.php:112, rate-my-post/public/class-rate-my-post-public.php:1649
     996#: common/class-rate-my-post-settings.php:114, public/class-rate-my-post-public.php:1656, rate-my-post/common/class-rate-my-post-settings.php:114, rate-my-post/public/class-rate-my-post-public.php:1656
    989997msgid "Average rating"
    990998msgstr ""
    991999
    992 #: common/class-rate-my-post-settings.php:113, public/class-rate-my-post-public.php:1650, rate-my-post/common/class-rate-my-post-settings.php:113, rate-my-post/public/class-rate-my-post-public.php:1650
     1000#: common/class-rate-my-post-settings.php:115, public/class-rate-my-post-public.php:1657, rate-my-post/common/class-rate-my-post-settings.php:115, rate-my-post/public/class-rate-my-post-public.php:1657
    9931001msgid "Vote count:"
    9941002msgstr ""
    9951003
    996 #: common/class-rate-my-post-settings.php:114, public/class-rate-my-post-public.php:1651, rate-my-post/common/class-rate-my-post-settings.php:114, rate-my-post/public/class-rate-my-post-public.php:1651
     1004#: common/class-rate-my-post-settings.php:116, public/class-rate-my-post-public.php:1658, rate-my-post/common/class-rate-my-post-settings.php:116, rate-my-post/public/class-rate-my-post-public.php:1658
    9971005msgid "You already voted! This vote will not be counted!"
    9981006msgstr ""
    9991007
    1000 #: common/class-rate-my-post-settings.php:115, public/class-rate-my-post-public.php:1652, rate-my-post/common/class-rate-my-post-settings.php:115, rate-my-post/public/class-rate-my-post-public.php:1652
     1008#: common/class-rate-my-post-settings.php:117, public/class-rate-my-post-public.php:1659, rate-my-post/common/class-rate-my-post-settings.php:117, rate-my-post/public/class-rate-my-post-public.php:1659
    10011009msgid "No votes so far! Be the first to rate this post."
    10021010msgstr ""
    10031011
    1004 #: common/class-rate-my-post-settings.php:116, public/class-rate-my-post-public.php:1653, rate-my-post/common/class-rate-my-post-settings.php:116, rate-my-post/public/class-rate-my-post-public.php:1653
     1012#: common/class-rate-my-post-settings.php:118, public/class-rate-my-post-public.php:1660, rate-my-post/common/class-rate-my-post-settings.php:118, rate-my-post/public/class-rate-my-post-public.php:1660
    10051013msgid "Thank you for rating this post!"
    10061014msgstr ""
    10071015
    1008 #: common/class-rate-my-post-settings.php:117, public/class-rate-my-post-public.php:1654, rate-my-post/common/class-rate-my-post-settings.php:117, rate-my-post/public/class-rate-my-post-public.php:1654
     1016#: common/class-rate-my-post-settings.php:119, public/class-rate-my-post-public.php:1661, rate-my-post/common/class-rate-my-post-settings.php:119, rate-my-post/public/class-rate-my-post-public.php:1661
    10091017msgid "Not at all useful"
    10101018msgstr ""
    10111019
    1012 #: common/class-rate-my-post-settings.php:118, public/class-rate-my-post-public.php:1655, rate-my-post/common/class-rate-my-post-settings.php:118, rate-my-post/public/class-rate-my-post-public.php:1655
     1020#: common/class-rate-my-post-settings.php:120, public/class-rate-my-post-public.php:1662, rate-my-post/common/class-rate-my-post-settings.php:120, rate-my-post/public/class-rate-my-post-public.php:1662
    10131021msgid "Somewhat useful"
    10141022msgstr ""
    10151023
    1016 #: common/class-rate-my-post-settings.php:119, public/class-rate-my-post-public.php:1656, rate-my-post/common/class-rate-my-post-settings.php:119, rate-my-post/public/class-rate-my-post-public.php:1656
     1024#: common/class-rate-my-post-settings.php:121, public/class-rate-my-post-public.php:1663, rate-my-post/common/class-rate-my-post-settings.php:121, rate-my-post/public/class-rate-my-post-public.php:1663
    10171025msgid "Useful"
    10181026msgstr ""
    10191027
    1020 #: common/class-rate-my-post-settings.php:120, public/class-rate-my-post-public.php:1657, rate-my-post/common/class-rate-my-post-settings.php:120, rate-my-post/public/class-rate-my-post-public.php:1657
     1028#: common/class-rate-my-post-settings.php:122, public/class-rate-my-post-public.php:1664, rate-my-post/common/class-rate-my-post-settings.php:122, rate-my-post/public/class-rate-my-post-public.php:1664
    10211029msgid "Fairly useful"
    10221030msgstr ""
    10231031
    1024 #: common/class-rate-my-post-settings.php:121, public/class-rate-my-post-public.php:1658, rate-my-post/common/class-rate-my-post-settings.php:121, rate-my-post/public/class-rate-my-post-public.php:1658
     1032#: common/class-rate-my-post-settings.php:123, public/class-rate-my-post-public.php:1665, rate-my-post/common/class-rate-my-post-settings.php:123, rate-my-post/public/class-rate-my-post-public.php:1665
    10251033msgid "Very useful"
    10261034msgstr ""
    10271035
    1028 #: common/class-rate-my-post-settings.php:122, public/class-rate-my-post-public.php:1659, rate-my-post/common/class-rate-my-post-settings.php:122, rate-my-post/public/class-rate-my-post-public.php:1659
     1036#: common/class-rate-my-post-settings.php:124, public/class-rate-my-post-public.php:1666, rate-my-post/common/class-rate-my-post-settings.php:124, rate-my-post/public/class-rate-my-post-public.php:1666
    10291037msgid "As you found this post useful..."
    10301038msgstr ""
    10311039
    1032 #: common/class-rate-my-post-settings.php:123, public/class-rate-my-post-public.php:1660, rate-my-post/common/class-rate-my-post-settings.php:123, rate-my-post/public/class-rate-my-post-public.php:1660
     1040#: common/class-rate-my-post-settings.php:125, public/class-rate-my-post-public.php:1667, rate-my-post/common/class-rate-my-post-settings.php:125, rate-my-post/public/class-rate-my-post-public.php:1667
    10331041msgid "Follow us on social media!"
    10341042msgstr ""
    10351043
    1036 #: common/class-rate-my-post-settings.php:124, public/class-rate-my-post-public.php:1661, rate-my-post/common/class-rate-my-post-settings.php:124, rate-my-post/public/class-rate-my-post-public.php:1661
     1044#: common/class-rate-my-post-settings.php:126, public/class-rate-my-post-public.php:1668, rate-my-post/common/class-rate-my-post-settings.php:126, rate-my-post/public/class-rate-my-post-public.php:1668
    10371045msgid "We are sorry that this post was not useful for you!"
    10381046msgstr ""
    10391047
    1040 #: common/class-rate-my-post-settings.php:125, public/class-rate-my-post-public.php:1662, rate-my-post/common/class-rate-my-post-settings.php:125, rate-my-post/public/class-rate-my-post-public.php:1662
     1048#: common/class-rate-my-post-settings.php:127, public/class-rate-my-post-public.php:1669, rate-my-post/common/class-rate-my-post-settings.php:127, rate-my-post/public/class-rate-my-post-public.php:1669
    10411049msgid "Let us improve this post!"
    10421050msgstr ""
    10431051
    1044 #: common/class-rate-my-post-settings.php:126, public/class-rate-my-post-public.php:1663, rate-my-post/common/class-rate-my-post-settings.php:126, rate-my-post/public/class-rate-my-post-public.php:1663
     1052#: common/class-rate-my-post-settings.php:128, public/class-rate-my-post-public.php:1670, rate-my-post/common/class-rate-my-post-settings.php:128, rate-my-post/public/class-rate-my-post-public.php:1670
    10451053msgid "Tell us how we can improve this post?"
    10461054msgstr ""
    10471055
    1048 #: common/class-rate-my-post-settings.php:127, public/class-rate-my-post-public.php:1664, rate-my-post/common/class-rate-my-post-settings.php:127, rate-my-post/public/class-rate-my-post-public.php:1664
     1056#: common/class-rate-my-post-settings.php:129, public/class-rate-my-post-public.php:1671, rate-my-post/common/class-rate-my-post-settings.php:129, rate-my-post/public/class-rate-my-post-public.php:1671
    10491057msgid "Thanks for your feedback!"
    10501058msgstr ""
    10511059
    1052 #: common/class-rate-my-post-settings.php:128, public/class-rate-my-post-public.php:1665, rate-my-post/common/class-rate-my-post-settings.php:128, rate-my-post/public/class-rate-my-post-public.php:1665
     1060#: common/class-rate-my-post-settings.php:130, public/class-rate-my-post-public.php:1672, rate-my-post/common/class-rate-my-post-settings.php:130, rate-my-post/public/class-rate-my-post-public.php:1672
    10531061msgid "Submit Feedback"
    10541062msgstr ""
    10551063
    1056 #: common/class-rate-my-post-settings.php:135, public/class-rate-my-post-public.php:1188, public/class-rate-my-post-public.php:1666, rate-my-post/common/class-rate-my-post-settings.php:135, rate-my-post/public/class-rate-my-post-public.php:1188, rate-my-post/public/class-rate-my-post-public.php:1666
     1064#: common/class-rate-my-post-settings.php:137, public/class-rate-my-post-public.php:1189, public/class-rate-my-post-public.php:1673, rate-my-post/common/class-rate-my-post-settings.php:137, rate-my-post/public/class-rate-my-post-public.php:1189, rate-my-post/public/class-rate-my-post-public.php:1673
    10571065msgid "Please insert your feedback in the box above!"
    10581066msgstr ""
    10591067
    1060 #: common/class-rate-my-post-settings.php:147, public/class-rate-my-post-public.php:1667, rate-my-post/common/class-rate-my-post-settings.php:147, rate-my-post/public/class-rate-my-post-public.php:1667
     1068#: common/class-rate-my-post-settings.php:149, public/class-rate-my-post-public.php:1674, rate-my-post/common/class-rate-my-post-settings.php:149, rate-my-post/public/class-rate-my-post-public.php:1674
    10611069msgid "Submit Rating"
    10621070msgstr ""
    10631071
    1064 #: public/class-rate-my-post-public.php:220, public/class-rate-my-post-public.php:1171, rate-my-post/public/class-rate-my-post-public.php:220, rate-my-post/public/class-rate-my-post-public.php:1171
     1072#: public/class-rate-my-post-public.php:221, public/class-rate-my-post-public.php:1172, rate-my-post/public/class-rate-my-post-public.php:221, rate-my-post/public/class-rate-my-post-public.php:1172
    10651073msgid "You cannot rate a web page without an id!"
    10661074msgstr ""
    10671075
    1068 #: public/class-rate-my-post-public.php:258, rate-my-post/public/class-rate-my-post-public.php:258
     1076#: public/class-rate-my-post-public.php:259, rate-my-post/public/class-rate-my-post-public.php:259
    10691077msgid "Ajax rating fail"
    10701078msgstr ""
    10711079
    1072 #: public/class-rate-my-post-public.php:362, rate-my-post/public/class-rate-my-post-public.php:362
     1080#: public/class-rate-my-post-public.php:363, rate-my-post/public/class-rate-my-post-public.php:363
    10731081msgid "AMP ajax rating fail"
    10741082msgstr ""
    10751083
    1076 #: public/class-rate-my-post-public.php:466, rate-my-post/public/class-rate-my-post-public.php:466
     1084#: public/class-rate-my-post-public.php:467, rate-my-post/public/class-rate-my-post-public.php:467
    10771085msgid "Ajax feedback fail"
    10781086msgstr ""
    10791087
    1080 #: public/class-rate-my-post-public.php:664, rate-my-post/public/class-rate-my-post-public.php:664
     1088#: public/class-rate-my-post-public.php:665, rate-my-post/public/class-rate-my-post-public.php:665
    10811089msgid "Somebody rated"
    10821090msgstr ""
    10831091
    1084 #: public/class-rate-my-post-public.php:666, rate-my-post/public/class-rate-my-post-public.php:666
     1092#: public/class-rate-my-post-public.php:667, rate-my-post/public/class-rate-my-post-public.php:667
    10851093msgid "was rated"
    10861094msgstr ""
    10871095
    1088 #: public/class-rate-my-post-public.php:667, rate-my-post/public/class-rate-my-post-public.php:667
     1096#: public/class-rate-my-post-public.php:668, rate-my-post/public/class-rate-my-post-public.php:668
    10891097msgid "and now has an average rating of"
    10901098msgstr ""
    10911099
    1092 #: public/class-rate-my-post-public.php:668, rate-my-post/public/class-rate-my-post-public.php:668
     1100#: public/class-rate-my-post-public.php:669, rate-my-post/public/class-rate-my-post-public.php:669
    10931101msgid "based on"
    10941102msgstr ""
    10951103
    1096 #: public/class-rate-my-post-public.php:669, rate-my-post/public/class-rate-my-post-public.php:669
     1104#: public/class-rate-my-post-public.php:670, rate-my-post/public/class-rate-my-post-public.php:670
    10971105msgid "vote(s)"
    10981106msgstr ""
    10991107
    1100 #: public/class-rate-my-post-public.php:670, rate-my-post/public/class-rate-my-post-public.php:670
     1108#: public/class-rate-my-post-public.php:671, rate-my-post/public/class-rate-my-post-public.php:671
    11011109msgid "See the post: "
    11021110msgstr ""
    11031111
    1104 #: public/class-rate-my-post-public.php:699, rate-my-post/public/class-rate-my-post-public.php:699
     1112#: public/class-rate-my-post-public.php:700, rate-my-post/public/class-rate-my-post-public.php:700
    11051113msgid "Somebody left feedback on"
    11061114msgstr ""
    11071115
    1108 #: public/class-rate-my-post-public.php:700, rate-my-post/public/class-rate-my-post-public.php:700
     1116#: public/class-rate-my-post-public.php:701, rate-my-post/public/class-rate-my-post-public.php:701
    11091117msgid "Feedback on"
    11101118msgstr ""
    11111119
    1112 #: public/class-rate-my-post-public.php:999, public/class-rate-my-post-public.php:995, rate-my-post/public/class-rate-my-post-public.php:999, rate-my-post/public/class-rate-my-post-public.php:995
     1120#: public/class-rate-my-post-public.php:1000, public/class-rate-my-post-public.php:996, rate-my-post/public/class-rate-my-post-public.php:1000, rate-my-post/public/class-rate-my-post-public.php:996
    11131121msgid "Invalid Token"
    11141122msgstr ""
    11151123
    1116 #: public/class-rate-my-post-public.php:1048, rate-my-post/public/class-rate-my-post-public.php:1048
     1124#: public/class-rate-my-post-public.php:1049, rate-my-post/public/class-rate-my-post-public.php:1049
    11171125msgid "Wrong reCAPTCHA keys"
    11181126msgstr ""
    11191127
    1120 #: public/class-rate-my-post-public.php:1053, rate-my-post/public/class-rate-my-post-public.php:1053
     1128#: public/class-rate-my-post-public.php:1054, rate-my-post/public/class-rate-my-post-public.php:1054
    11211129msgid "Blocked by reCAPTCHA"
    11221130msgstr ""
    11231131
    1124 #: public/class-rate-my-post-public.php:1072, rate-my-post/public/class-rate-my-post-public.php:1072
     1132#: public/class-rate-my-post-public.php:1073, rate-my-post/public/class-rate-my-post-public.php:1073
    11251133msgid "You need to be logged in to rate!"
    11261134msgstr ""
    11271135
    1128 #: public/class-rate-my-post-public.php:1149, rate-my-post/public/class-rate-my-post-public.php:1149
     1136#: public/class-rate-my-post-public.php:1150, rate-my-post/public/class-rate-my-post-public.php:1150
    11291137msgid "Invalid WP token!"
    11301138msgstr ""
    11311139
    1132 #: public/class-rate-my-post-public.php:1175, rate-my-post/public/class-rate-my-post-public.php:1175
     1140#: public/class-rate-my-post-public.php:1176, rate-my-post/public/class-rate-my-post-public.php:1176
    11331141msgid "No rating submitted!"
    11341142msgstr ""
  • rate-my-post/trunk/public/class-rate-my-post-public.php

    r2779544 r2874796  
    7575        $customization = $this->custom_strings( $post_id );
    7676        // register scripts
    77         wp_register_script( $this->rate_my_post, plugin_dir_url( __FILE__ ) . 'js/rate-my-post.js', array( 'jquery' ), $this->version, true );
     77        wp_register_script( $this->rate_my_post, plugin_dir_url( __FILE__ ) . 'js/rate-my-post.js', array(), $this->version, true );
    7878        wp_register_script( 'rmp-recaptcha', 'https://www.google.com/recaptcha/api.js?render=' . $security['siteKey'], array(), null, false );
    7979        // enqueue scripts
     
    102102                 'positiveThreshold'    => intval( $options['positiveNegative'] ),
    103103                 'ajaxLoad'                         => intval( $options['ajaxLoad'] ),
     104                 'disableClearCache' => intval( $options['disableClearCache'] ),
    104105                 'nonce'                        => wp_create_nonce( 'rmp_public_nonce' ),
    105106        )
     
    12141215            return;
    12151216        }
     1217
     1218        // If disable clear cache option is enable, no need to clear cache
     1219        if ($options['disableClearCache'] === 2 ) {
     1220            return;
     1221        }
     1222
    12161223        // WP Super Cache
    12171224        if ( function_exists( 'wp_cache_post_change' ) ) {
  • rate-my-post/trunk/public/js/rate-my-post.js

    r2307984 r2874796  
    1 var RateMyPost=function(t){function e(e){for(var n,r,s=e[0],a=e[1],o=0,c=[];o<s.length;o++)r=s[o],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&c.push(i[r][0]),i[r]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(h&&h(e);c.length;)c.shift()()}var n={},i={0:0};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=n,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r.oe=function(t){throw console.error(t),t};var s=window.webpackJsonpRateMyPost=window.webpackJsonpRateMyPost||[],a=s.push.bind(s);s.push=e,s=s.slice();for(var o=0;o<s.length;o++)e(s[o]);var h=a;return r(r.s=3)}([function(t,e){t.exports=jQuery},function(t,e){t.exports=rmp_frontend},function(t,e,n){var i,r;
     1var RateMyPost=function(t){function e(e){for(var n,r,o=e[0],s=e[1],a=0,u=[];a<o.length;a++)r=o[a],Object.prototype.hasOwnProperty.call(i,r)&&i[r]&&u.push(i[r][0]),i[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n]);for(c&&c(e);u.length;)u.shift()()}var n={},i={0:0};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=n,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpRateMyPost=window.webpackJsonpRateMyPost||[],s=o.push.bind(o);o.push=e,o=o.slice();for(var a=0;a<o.length;a++)e(o[a]);var c=s;return r(r.s=8)}([function(t,e){t.exports=rmp_frontend},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}t.exports=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}},function(t,e,n){t.exports=n(7)},function(t,e,n){var i,r;
    22/*!
    33 * JavaScript Cookie v2.2.1
     
    66 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
    77 * Released under the MIT license
    8  */!function(s){if(void 0===(r="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=r),!0,t.exports=s(),!!0){var a=window.Cookies,o=window.Cookies=s();o.noConflict=function(){return window.Cookies=a,o}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(i){function r(){}function s(e,n,s){if("undefined"!=typeof document){"number"==typeof(s=t({path:"/"},r.defaults,s)).expires&&(s.expires=new Date(1*new Date+864e5*s.expires)),s.expires=s.expires?s.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(t){}n=i.write?i.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var o="";for(var h in s)s[h]&&(o+="; "+h,!0!==s[h]&&(o+="="+s[h].split(";")[0]));return document.cookie=e+"="+n+o}}function a(t,n){if("undefined"!=typeof document){for(var r={},s=document.cookie?document.cookie.split("; "):[],a=0;a<s.length;a++){var o=s[a].split("="),h=o.slice(1).join("=");n||'"'!==h.charAt(0)||(h=h.slice(1,-1));try{var c=e(o[0]);if(h=(i.read||i)(h,c)||e(h),n)try{h=JSON.parse(h)}catch(t){}if(r[c]=h,t===c)break}catch(t){}}return t?r[t]:r}}return r.set=s,r.get=function(t){return a(t,!1)},r.getJSON=function(t){return a(t,!0)},r.remove=function(e,n){s(e,"",t(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}((function(){}))}))},function(t,e,n){"use strict";n.r(e),n.d(e,"re_init",(function(){return K}));var i=n(0),r=n.n(i),s=n(1),a=n.n(s);function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var h=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgetContainer=e,this.socialEnabled=a.a.social,this.ratingRequired=a.a.positiveThreshold,this.rating=n,this.ratingWidget=r()(this.widgetContainer+".js-rmp-rating-widget"),this.socialWidget=r()(this.widgetContainer+".js-rmp-social-widget"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){2!=this.socialEnabled||this.rating<=this.ratingRequired||(this.socialWidget.addClass("rmp-social-widget--visible"),this.ratingWidget.addClass("rmp-rating-widget--hidden"))}}])&&o(e.prototype,n),i&&o(e,i),t}();function c(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var u=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgetContainer=e,this.successMsg=n.successMsg,this.errorMsg=n.errorMsg,this.msgContainer=r()(this.widgetContainer+".js-rmp-feedback-msg"),this.input=r()(this.widgetContainer+".js-rmp-feedback-input"),this.button=r()(this.widgetContainer+".js-rmp-feedback-button"),this.loader=r()(this.widgetContainer+".js-rmp-feedback-loader"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){if(this.loader.removeClass("rmp-feedback-widget__loader--visible"),this.errorMsg.length)return this.msgContainer.addClass("rmp-feedback-widget__msg--alert"),void this.msgContainer.html(this.errorMsg.join("<br />"));this.msgContainer.removeClass("rmp-feedback-widget__msg--alert"),this.msgContainer.text(this.successMsg),this.input.remove(),this.button.remove()}}])&&c(e.prototype,n),i&&c(e,i),t}();function l(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var g=function(){function t(e,n,i,r,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgetContainer=e,this.postID=n,this.feedback=i,this.settings=a.a,this.duration=!1,this.ratingID=s,this.token=r,this.recaptcha=a.a.grecaptcha,this.recaptchaKey=a.a.siteKey,this.data={action:"process_feedback",feedback:this.feedback,postID:this.postID,duration:this.duration,rating_id:this.ratingID,rating_token:this.token,nonce:this.settings.nonce},this.events()}var e,i,s;return e=t,(i=[{key:"events",value:function(){var t=this;2==this.recaptcha?Promise.resolve().then(n.t.bind(null,4,7)).then((function(e){e.ready((function(){e.execute(t.recaptchaKey,{action:"RMPfeedback"}).then((function(e){t.data.token=e,t.saveFeedback()}))}))})):this.saveFeedback()}},{key:"saveFeedback",value:function(){var t=this;r.a.ajax({type:"POST",url:this.settings.admin_ajax,data:this.data,dataType:"JSON",success:function(e){new u(t.widgetContainer,e)}})}}])&&l(e.prototype,i),s&&l(e,s),t}();function d(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var f=function(){function t(e,n,i,s,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgetContainer=e,this.postID=n,this.feedbackEnabled=a.a.feedback,this.maxRating=a.a.positiveThreshold,this.emptyFeedbackMsg=a.a.emptyFeedback,this.msgContainer=r()(this.widgetContainer+".js-rmp-feedback-msg"),this.rating=i,this.ratingWidget=r()(this.widgetContainer+".js-rmp-rating-widget"),this.feedbackWidget=r()(this.widgetContainer+".js-rmp-feedback-widget"),this.inputContainer=r()(this.widgetContainer+".js-rmp-feedback-input"),this.submitButton=r()(this.widgetContainer+".js-rmp-feedback-button"),this.loader=r()(this.widgetContainer+".js-rmp-feedback-loader"),this.input=!1,this.token=s,this.ratingID=o,this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){var t=this;2!=this.feedbackEnabled||this.rating>this.maxRating||(this.feedbackWidget.addClass("rmp-feedback-widget--visible"),this.ratingWidget.addClass("rmp-rating-widget--hidden"),this.submitButton.on("click",(function(e){return t.submitButtonClicked()})))}},{key:"submitButtonClicked",value:function(){if(this.input=r()(this.inputContainer).val(),this.input.trim().length<1)return this.msgContainer.addClass("rmp-feedback-widget__msg--alert"),void this.msgContainer.text(this.emptyFeedbackMsg);this.submitButton.off(),this.loader.addClass("rmp-feedback-widget__loader--visible"),new g(this.widgetContainer,this.postID,this.input,this.token,this.ratingID)}}])&&d(e.prototype,n),i&&d(e,i),t}();function p(t){return(p="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 v(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var m=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.starsToBeReplaced=r()(".js-rmp-replace-half-star"),this.starsToBeRemoved=r()(".js-rmp-remove-half-star"),this.testElement=document.createElement("x-test"),this.supportTest=p(this.testElement.style.webkitBackgroundClip),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){var t=!0;"undefined"===this.supportTest&&(t=!1),t||(this.starsToBeReplaced.removeClass("rmp-icon--half-highlight"),this.starsToBeReplaced.addClass("rmp-icon--full-highlight"),this.starsToBeRemoved.removeClass("rmp-icon--half-highlight"))}}])&&v(e.prototype,n),i&&v(e,i),t}();function w(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var C=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=n,this.widgetContainer=e,this.avgRating=i,this.resultIcons=r()(".js-rmp-results-widget--"+n+" .js-rmp-results-icon"),this.ratingIcons=r()(this.widgetContainer+".js-rmp-rating-icon"),this.hideRatings=a.a.notShowRating,this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){var t=Math.floor(this.avgRating),e=!1,n=!1,i="",s=Math.round(this.avgRating%1*10);s>2&&s<8&&(e=!0),s>=8&&(n=!0),s>2&&s<5&&(i="js-rmp-remove-half-star"),s>=5&&s<8&&(i="js-rmp-replace-half-star"),r()(this.resultIcons).each((function(s,a){s+1<=t&&r()(a).addClass("rmp-icon--full-highlight"),e&&s+1==t+1&&(r()(a).addClass("rmp-icon--half-highlight"),r()(a).addClass(i)),n&&s+1==t+1&&r()(a).addClass("rmp-icon--full-highlight")})),2!=this.hideRatings&&(r()(this.ratingIcons).each((function(s,a){s+1<=t&&r()(a).addClass("rmp-icon--full-highlight"),e&&s+1==t+1&&(r()(a).addClass("rmp-icon--half-highlight"),r()(a).addClass(i)),n&&s+1==t+1&&r()(a).addClass("rmp-icon--full-highlight")})),new m)}}])&&w(e.prototype,n),i&&w(e,i),t}(),b=n(2),y=n.n(b);function k(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var j=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=e,this.existingCookie=y.a.get("rmp-rate"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){if(void 0!==this.existingCookie){y.a.remove("rmp-rate");var t=this.existingCookie.split(",");t.length>=20&&t.shift(),t.push(this.postID);var e=t.toString();y.a.set("rmp-rate",e,{expires:20})}else y.a.set("rmp-rate",this.postID,{expires:20})}}])&&k(e.prototype,n),i&&k(e,i),t}();function I(t){return(I="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 x(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var T=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.commonAnalyticsTracker=I(window.ga),this.MiAnalyticsTracker=I(window.__gaTracker),this.rating=e,this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){return"undefined"!==this.commonAnalyticsTracker?(ga("send","event","Rate my Post","Post Rated "+this.rating+"/5"),void console.log("ga analytics tracker")):"undefined"!==this.MiAnalyticsTracker?(__gaTracker("send","event","Rate my Post","Post Rated "+this.rating+"/5"),void console.log("__gaTracker analytics tracker")):void console.log("Analytics tracker not found")}}])&&x(e.prototype,n),i&&x(e,i),t}();function _(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var R=function(){function t(e,n,i,s){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=e,this.widgetContainer=n,this.voteCount=i.voteCount,this.avgRating=i.avgRating,this.errorMsg=i.errorMsg,this.token=i.token,this.id=i.id,this.avgRatingContainer=r()(this.widgetContainer+".js-rmp-avg-rating, .js-rmp-results-widget--"+e+" .js-rmp-avg-rating"),this.voteCountContainer=r()(this.widgetContainer+".js-rmp-vote-count, .js-rmp-results-widget--"+e+" .js-rmp-vote-count"),this.noVotesContainer=r()(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=r()(this.widgetContainer+".js-rmp-results"),this.ratingIcons=r()(this.widgetContainer+".js-rmp-rating-icon"),this.resultIcons=r()(".js-rmp-results-widget--"+e+" .js-rmp-results-icon"),this.msgContainer=r()(this.widgetContainer+".js-rmp-msg"),this.tnxMsg=a.a.afterVote,this.rating=s,this.hideRatings=a.a.notShowRating,this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){if(this.errorMsg.length)return this.msgContainer.html(this.errorMsg.join("<br />")),this.msgContainer.addClass("rmp-rating-widget__msg--alert"),void this.ratingIcons.removeClass("rmp-icon--processing-rating rmp-icon--hovered");this.avgRatingContainer.text(this.avgRating),this.voteCountContainer.text(this.voteCount),this.toneDownIcons(),this.highlightIcons(),this.noVotesContainer.addClass("rmp-rating-widget__not-rated--hidden"),this.resultsTextContainer.removeClass("rmp-rating-widget__results--hidden"),this.msgContainer.text(this.tnxMsg),new h(this.widgetContainer,this.rating),new f(this.widgetContainer,this.postID,this.rating,this.token,this.id),new j(this.postID),new T(this.rating)}},{key:"toneDownIcons",value:function(){this.ratingIcons.removeClass("rmp-icon--full-highlight rmp-icon--half-highlight rmp-icon--processing-rating rmp-icon--hovered js-rmp-remove-half-star js-rmp-replace-half-star"),this.resultIcons.removeClass("rmp-icon--full-highlight rmp-icon--half-highlight rmp-icon--processing-rating js-rmp-remove-half-star js-rmp-replace-half-star")}},{key:"highlightIcons",value:function(){new C(this.widgetContainer,this.postID,this.avgRating)}}])&&_(e.prototype,n),i&&_(e,i),t}();function D(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var O=function(){function t(e,n,i,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=e,this.widgetContainer=n,this.rating=i,this.duration=Math.floor(Date.now()/1e3)-r,this.settings=a.a,this.recaptcha=a.a.grecaptcha,this.recaptchaKey=a.a.siteKey,this.data={action:"process_rating",star_rating:this.rating,postID:this.postID,duration:this.duration,nonce:this.settings.nonce},this.events()}var e,i,s;return e=t,(i=[{key:"events",value:function(){var t=this;2==this.recaptcha?Promise.resolve().then(n.t.bind(null,4,7)).then((function(e){e.ready((function(){e.execute(t.recaptchaKey,{action:"RMPrating"}).then((function(e){t.data.token=e,t.saveRating()}))}))})):this.saveRating()}},{key:"saveRating",value:function(){var t=this;r.a.ajax({type:"POST",url:this.settings.admin_ajax,data:this.data,dataType:"JSON",success:function(e){new R(t.postID,t.widgetContainer,e,t.rating)}})}}])&&D(e.prototype,i),s&&D(e,s),t}();function P(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var M=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.widgetContainer=e,this.ratingItems=r()(this.widgetContainer+".js-rmp-rating-item"),this.ratingTextContainer=r()(this.widgetContainer+".js-rmp-hover-text"),this.submitBtn=r()(this.widgetContainer+".js-submit-rating-btn"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){this.ratingItems.off(),this.submitBtn.off(),this.ratingItems.css("cursor","default"),this.submitBtn.removeClass("rmp-rating-widget__submit-btn--visible"),r()(this.ratingTextContainer).text("")}}])&&P(e.prototype,n),i&&P(e,i),t}();function E(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var S=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=n,this.widgetContainer=e,this.existingCookie=y.a.get("rmp-rate"),this.cookiesDisabled=a.a.cookieDisable,this.tnxMsg=a.a.afterVote,this.msgContainer=r()(this.widgetContainer+".js-rmp-msg"),this.ratingWidget=r()(this.widgetContainer+".js-rmp-rating-widget"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){if(2!=this.cookiesDisabled&&void 0!==this.existingCookie){var t=this.existingCookie.split(",");-1!==jQuery.inArray(this.postID,t)&&(new M(this.widgetContainer),this.msgContainer.text(this.tnxMsg),this.ratingWidget.addClass("rmp-rating-widget--has-rated"))}}}])&&E(e.prototype,n),i&&E(e,i),t}();function B(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var W=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.requiresLogin=a.a.votingPriv,this.isLoggedIn=a.a.loggedIn,this.ratingWidget=r()(".js-rmp-rating-widget"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){2!=this.requiresLogin||this.isLoggedIn||(new M(""),this.ratingWidget.addClass("rmp-rating-widget--no-privilege"))}}])&&B(e.prototype,n),i&&B(e,i),t}();function A(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var L=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=e,this.widgetContainer=".js-rmp-widgets-container--"+e+" ",this.resultsWidget=".js-rmp-results-widget--"+e,this.ratingItems=r()(this.widgetContainer+".js-rmp-rating-item"),this.ratingItemsList=r()(this.widgetContainer+".js-rmp-rating-icons-list"),this.ratingIcons=r()(this.widgetContainer+".js-rmp-rating-icon"),this.ratingTextContainer=r()(this.widgetContainer+".js-rmp-hover-text"),this.ratingText=!1,this.hoveredItemOrder=0,this.rating=0,this.supportsHover=window.matchMedia("(hover: hover)"),this.startTime=Math.floor(Date.now()/1e3),this.preventAccidental=a.a.preventAccidental,this.hoverTexts=a.a.hoverTexts,this.submitBtn=r()(this.widgetContainer+".js-submit-rating-btn"),this.saveRating=!1,this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){var t=this;this.doubleWidgetCheck(),this.ratingItems.css("cursor","pointer"),this.ratingItems.on("mouseover",(function(e){return t.hoverIcons()})),this.ratingItems.on("mouseout",(function(e){return t.stopHoverIcons()})),this.ratingItemsList.on("mouseleave",(function(e){return t.removeHoverTexts()})),this.ratingItems.on("click",(function(e){return t.ratingIconClicked()})),new S(this.widgetContainer,this.postID),new W}},{key:"doubleWidgetCheck",value:function(){var t=r()(this.widgetContainer),e=r()(this.resultsWidget);(t.length>1||e.length>1)&&(r()(t).each((function(t,e){t>0&&r()(e).remove()})),r()(e).each((function(t,e){t>0&&r()(e).remove()})))}},{key:"hoverIcons",value:function(){var t=this;this.hoveredItemOrder=parseInt(r()(event.currentTarget).data("value"),10),this.ratingText=r()(event.currentTarget).attr("data-descriptive-rating"),r()(this.ratingIcons).each((function(e,n){e<t.hoveredItemOrder?r()(n).addClass("rmp-icon--hovered"):r()(n).removeClass("rmp-icon--hovered"),t.supportsHover&&2==t.hoverTexts&&r()(t.ratingTextContainer).text(t.ratingText)}))}},{key:"stopHoverIcons",value:function(){r()(this.ratingIcons).removeClass("rmp-icon--hovered")}},{key:"removeHoverTexts",value:function(){r()(this.ratingTextContainer).text("")}},{key:"ratingIconClicked",value:function(){var t=this;this.rating=parseInt(r()(event.currentTarget).data("value"),10),this.ratingIcons.removeClass("rmp-icon--processing-rating"),r()(this.ratingIcons).each((function(e,n){e<t.rating&&r()(n).addClass("rmp-icon--processing-rating")})),2!=this.preventAccidental?(new M(this.widgetContainer),this.saveRating=new O(this.postID,this.widgetContainer,this.rating,this.startTime)):this.submitButtonHandler()}},{key:"submitButtonHandler",value:function(){var t=this;this.submitBtn.addClass("rmp-rating-widget__submit-btn--visible"),this.submitBtn.on("click",(function(e){t.saveRating||(t.saveRating=new O(t.postID,t.widgetContainer,t.rating,t.startTime)),new M(t.widgetContainer)}))}}])&&A(e.prototype,n),i&&A(e,i),t}();function N(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var F=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.postID=e,this.widgetContainer=".js-rmp-widgets-container--"+e+" ",this.settings=a.a,this.avgRatingContainer=r()(this.widgetContainer+".js-rmp-avg-rating, .js-rmp-results-widget--"+e+" .js-rmp-avg-rating"),this.voteCountContainer=r()(this.widgetContainer+".js-rmp-vote-count, .js-rmp-results-widget--"+e+" .js-rmp-vote-count"),this.noVotesContainer=r()(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=r()(this.widgetContainer+".js-rmp-results"),this.noVotesContainer=r()(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=r()(this.widgetContainer+".js-rmp-results"),this.msgContainer=r()(this.widgetContainer+".js-rmp-msg"),this.data={action:"load_results",postID:this.postID,nonce:this.settings.nonce},this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){var t=this;r.a.ajax({type:"POST",url:this.settings.admin_ajax,data:this.data,dataType:"JSON",success:function(e){var n=e.voteCount,i=e.avgRating,r=e.errorMsg;t.loadResults(n,i,r)}})}},{key:"loadResults",value:function(t,e,n){if(n.length)return this.msgContainer.text(n),void this.msgContainer.addClass("rmp-rating-widget__msg--alert");this.avgRatingContainer.text(e),this.voteCountContainer.text(t),new C(this.widgetContainer,this.postID,e),0===e?(this.noVotesContainer.removeClass("rmp-rating-widget__not-rated--hidden"),this.resultsTextContainer.addClass("rmp-rating-widget__results--hidden")):(this.noVotesContainer.addClass("rmp-rating-widget__not-rated--hidden"),this.resultsTextContainer.removeClass("rmp-rating-widget__results--hidden")),new m}}])&&N(e.prototype,n),i&&N(e,i),t}();function H(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ratingItems=r()(".js-rmp-rating-item"),this.ratingItemsLists=r()(".js-rmp-rating-icons-list"),this.events()}var e,n,i;return e=t,(n=[{key:"events",value:function(){this.ratingItems.css("cursor","auto"),this.ratingItems.off(),this.ratingItemsLists.off()}}])&&H(e.prototype,n),i&&H(e,i),t}();function V(){new m;var t=document.getElementsByClassName("js-rmp-rating-widget"),e=document.getElementsByClassName("js-rmp-results-widget"),n=document.getElementsByClassName("js-rmp-widgets-container");if(!(t.length<1&&e.length<1)){var i=[];r()(n).each((function(t,e){var n=r()(e).attr("data-post-id");i.push(n)}));var s=i.filter((function(t,e){return i.indexOf(t)===e}));if(2!=a.a.ajaxLoad)s.forEach((function(t){new L(t)}));else new F(s[0]),new L(s[0])}}function K(){console.log("re-init running");new J;V()}r()(document).ready((function(){V()}))},function(t,e){t.exports=grecaptcha}]);
     8 */!function(o){if(void 0===(r="function"==typeof(i=o)?i.call(e,n,e,t):i)||(t.exports=r),!0,t.exports=o(),!!0){var s=window.Cookies,a=window.Cookies=o();a.noConflict=function(){return window.Cookies=s,a}}}((function(){function t(){for(var t=0,e={};t<arguments.length;t++){var n=arguments[t];for(var i in n)e[i]=n[i]}return e}function e(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(i){function r(){}function o(e,n,o){if("undefined"!=typeof document){"number"==typeof(o=t({path:"/"},r.defaults,o)).expires&&(o.expires=new Date(1*new Date+864e5*o.expires)),o.expires=o.expires?o.expires.toUTCString():"";try{var s=JSON.stringify(n);/^[\{\[]/.test(s)&&(n=s)}catch(t){}n=i.write?i.write(n,e):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,!0!==o[c]&&(a+="="+o[c].split(";")[0]));return document.cookie=e+"="+n+a}}function s(t,n){if("undefined"!=typeof document){for(var r={},o=document.cookie?document.cookie.split("; "):[],s=0;s<o.length;s++){var a=o[s].split("="),c=a.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=e(a[0]);if(c=(i.read||i)(c,u)||e(c),n)try{c=JSON.parse(c)}catch(t){}if(r[u]=c,t===u)break}catch(t){}}return t?r[t]:r}}return r.set=o,r.get=function(t){return s(t,!1)},r.getJSON=function(t){return s(t,!0)},r.remove=function(e,n){o(e,"",t(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}((function(){}))}))},function(t,e){function n(t,e,n,i,r,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(i,r)}t.exports=function(t){return function(){var e=this,i=arguments;return new Promise((function(r,o){var s=t.apply(e,i);function a(t){n(s,r,o,a,c,"next",t)}function c(t){n(s,r,o,a,c,"throw",t)}a(void 0)}))}}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){var i=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function a(t,e,n,i){var r=e&&e.prototype instanceof h?e:h,o=Object.create(r.prototype),s=new k(i||[]);return o._invoke=function(t,e,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return j()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=w(s,n);if(a){if(a===u)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var h=c(t,e,n);if("normal"===h.type){if(i=n.done?"completed":"suspendedYield",h.arg===u)continue;return{value:h.arg,done:n.done}}"throw"===h.type&&(i="completed",n.method="throw",n.arg=h.arg)}}}(t,n,s),o}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=a;var u={};function h(){}function l(){}function d(){}var g={};g[r]=function(){return this};var f=Object.getPrototypeOf,p=f&&f(f(x([])));p&&p!==e&&n.call(p,r)&&(g=p);var m=d.prototype=h.prototype=Object.create(g);function v(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function y(t,e){var i;this._invoke=function(r,o){function s(){return new e((function(i,s){!function i(r,o,s,a){var u=c(t[r],t,o);if("throw"!==u.type){var h=u.arg,l=h.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){i("next",t,s,a)}),(function(t){i("throw",t,s,a)})):e.resolve(l).then((function(t){h.value=t,s(h)}),(function(t){return i("throw",t,s,a)}))}a(u.arg)}(r,o,i,s)}))}return i=i?i.then(s,s):s()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=c(n,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,u;var r=i.arg;return r?r.done?(e[t.resultName]=r.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):r:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function x(t){if(t){var e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function e(){for(;++i<t.length;)if(n.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return l.prototype=m.constructor=d,d.constructor=l,d[s]=l.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},v(y.prototype),y.prototype[o]=function(){return this},t.AsyncIterator=y,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var s=new y(a(e,n,i,r),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},v(m),m[s]="Generator",m[r]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}},t.values=x,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(n,i){return s.type="throw",s.arg=t,e.next=n,i&&(e.method="next",e.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),b(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;b(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=i}catch(t){Function("r","regeneratorRuntime = r")(i)}},function(t,e,n){"use strict";n.r(e),n.d(e,"re_init",(function(){return M}));var i=n(1),r=n.n(i),o=n(2),s=n.n(o),a=n(5),c=n.n(a),u=n(3),h=n.n(u),l=n(0),d=n.n(l),g=function(){function t(e,n){r()(this,t),this.widgetContainer=e,this.socialEnabled=d.a.social,this.ratingRequired=d.a.positiveThreshold,this.rating=n,this.ratingWidget=document.querySelector(this.widgetContainer+".js-rmp-rating-widget"),this.socialWidget=document.querySelector(this.widgetContainer+".js-rmp-social-widget"),this.events()}return s()(t,[{key:"events",value:function(){var t,e,n,i;2!=this.socialEnabled||this.rating<=this.ratingRequired||(null===(t=this.socialWidget)||void 0===t||null===(e=t.classList)||void 0===e||e.add("rmp-social-widget--visible"),null===(n=this.ratingWidget)||void 0===n||null===(i=n.classList)||void 0===i||i.add("rmp-rating-widget--hidden"))}}]),t}(),f=function(){function t(e,n){r()(this,t),this.widgetContainer=e,this.successMsg=n.successMsg,this.errorMsg=n.errorMsg,this.msgContainer=document.querySelector(this.widgetContainer+".js-rmp-feedback-msg"),this.input=document.querySelector(this.widgetContainer+".js-rmp-feedback-input"),this.button=document.querySelector(this.widgetContainer+".js-rmp-feedback-button"),this.loader=document.querySelector(this.widgetContainer+".js-rmp-feedback-loader"),this.events()}return s()(t,[{key:"events",value:function(){if(this.loader.classList.remove("rmp-feedback-widget__loader--visible"),this.errorMsg.length)return this.msgContainer.classList.add("rmp-feedback-widget__msg--alert"),void(this.msgContainer.innerHTML=this.errorMsg.join("<br />"));this.msgContainer.classList.remove("rmp-feedback-widget__msg--alert"),this.msgContainer.textContent=this.successMsg,this.input.remove(),this.button.remove()}}]),t}(),p=function(){function t(e,n,i,o,s){r()(this,t),this.widgetContainer=e,this.postID=n,this.feedback=i,this.settings=d.a,this.duration=!1,this.ratingID=s,this.token=o,this.recaptcha=d.a.grecaptcha,this.recaptchaKey=d.a.siteKey,this.data={action:"process_feedback",feedback:this.feedback,postID:this.postID,duration:this.duration,rating_id:this.ratingID,rating_token:this.token,nonce:this.settings.nonce},this.events()}var e;return s()(t,[{key:"events",value:function(){var t=this;2==this.recaptcha?Promise.resolve().then(n.t.bind(null,9,7)).then((function(e){e.ready((function(){e.execute(t.recaptchaKey,{action:"RMPfeedback"}).then((function(e){t.data.token=e,t.saveFeedback()}))}))})):this.saveFeedback()}},{key:"saveFeedback",value:(e=c()(h.a.mark((function t(){var e,n,i,r=this;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new FormData,Object.keys(this.data).forEach((function(t){return e.append(t,r.data[t])})),t.next=4,fetch(this.settings.admin_ajax,{method:"POST",body:e});case 4:if((n=t.sent).ok){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,n.json();case 9:i=t.sent,new f(this.widgetContainer,i);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}(),m=function(){function t(e,n,i,o,s){r()(this,t),this.widgetContainer=e,this.postID=n,this.feedbackEnabled=d.a.feedback,this.maxRating=d.a.positiveThreshold,this.emptyFeedbackMsg=d.a.emptyFeedback,this.msgContainer=document.querySelector(this.widgetContainer+".js-rmp-feedback-msg"),this.rating=i,this.ratingWidget=document.querySelector(this.widgetContainer+".js-rmp-rating-widget"),this.feedbackWidget=document.querySelector(this.widgetContainer+".js-rmp-feedback-widget"),this.inputContainer=document.querySelector(this.widgetContainer+".js-rmp-feedback-input"),this.submitButton=document.querySelector(this.widgetContainer+".js-rmp-feedback-button"),this.loader=document.querySelector(this.widgetContainer+".js-rmp-feedback-loader"),this.input=!1,this.token=o,this.ratingID=s,this.events()}return s()(t,[{key:"events",value:function(){var t=this;2!=this.feedbackEnabled||this.rating>this.maxRating||(this.feedbackWidget.classList.add("rmp-feedback-widget--visible"),this.ratingWidget.classList.add("rmp-rating-widget--hidden"),this.submitButton.addEventListener("click",(function(e){return t.submitButtonClicked()})))}},{key:"submitButtonClicked",value:function(){if(this.input=this.inputContainer.value,this.input.trim().length<1)return this.msgContainer.classList.add("rmp-feedback-widget__msg--alert"),void(this.msgContainer.textContent=this.emptyFeedbackMsg);this.submitButton.replaceWith(this.submitButton.cloneNode(!0)),this.submitButton=document.querySelector(this.widgetContainer+".js-rmp-feedback-button"),this.loader.classList.add("rmp-feedback-widget__loader--visible");new p(this.widgetContainer,this.postID,this.input,this.token,this.ratingID)}}]),t}(),v=n(6),y=n.n(v),w=function(){function t(){r()(this,t),this.starsToBeReplaced=document.querySelectorAll(".js-rmp-replace-half-star"),this.starsToBeRemoved=document.querySelectorAll(".js-rmp-remove-half-star"),this.testElement=document.createElement("x-test"),this.supportTest=y()(this.testElement.style.webkitBackgroundClip),this.events()}return s()(t,[{key:"events",value:function(){var t=!0;"undefined"===this.supportTest&&(t=!1),t||(this.starsToBeReplaced.forEach((function(t){t.classList.remove("rmp-icon--half-highlight"),t.classList.add("rmp-icon--full-highlight")})),this.starsToBeRemoved.forEach((function(t){t.classList.remove("rmp-icon--half-highlight")})))}}]),t}(),C=function(){function t(e,n,i){r()(this,t),this.postID=n,this.widgetContainer=e,this.avgRating=i,this.resultIcons=document.querySelectorAll(".js-rmp-results-widget--"+n+" .js-rmp-results-icon"),this.ratingIcons=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-icon"),this.hideRatings=d.a.notShowRating,this.events()}return s()(t,[{key:"events",value:function(){var t=Math.floor(this.avgRating),e=!1,n=!1,i="",r=Math.round(this.avgRating%1*10);if(r>2&&r<8&&(e=!0),r>=8&&(n=!0),r>2&&r<5&&(i="js-rmp-remove-half-star"),r>=5&&r<8&&(i="js-rmp-replace-half-star"),this.resultIcons.forEach((function(r,o){o+1<=t&&r.classList.add("rmp-icon--full-highlight"),e&&o+1==t+1&&(r.classList.add("rmp-icon--half-highlight"),r.classList.add(i)),n&&o+1==t+1&&r.classList.add("rmp-icon--full-highlight")})),2!=this.hideRatings){this.ratingIcons.forEach((function(r,o){o+1<=t&&r.classList.add("rmp-icon--full-highlight"),e&&o+1==t+1&&(r.classList.add("rmp-icon--half-highlight"),r.classList.add(i)),n&&o+1==t+1&&r.classList.add("rmp-icon--full-highlight")}));new w}}}]),t}(),b=n(4),k=n.n(b),x=function(){function t(e){r()(this,t),this.postID=e,this.existingCookie=k.a.get("rmp-rate"),this.events()}return s()(t,[{key:"events",value:function(){if(void 0!==this.existingCookie){k.a.remove("rmp-rate");var t=this.existingCookie.split(",");t.length>=20&&t.shift(),t.push(this.postID);var e=t.toString();k.a.set("rmp-rate",e,{expires:20})}else k.a.set("rmp-rate",this.postID,{expires:20})}}]),t}(),j=function(){function t(e){r()(this,t),this.commonAnalyticsTracker=y()(window.ga),this.MiAnalyticsTracker=y()(window.__gaTracker),this.rating=e,this.events()}return s()(t,[{key:"events",value:function(){return"undefined"!==this.commonAnalyticsTracker?(ga("send","event","Rate my Post","Post Rated "+this.rating+"/5"),void console.log("ga analytics tracker")):"undefined"!==this.MiAnalyticsTracker?(__gaTracker("send","event","Rate my Post","Post Rated "+this.rating+"/5"),void console.log("__gaTracker analytics tracker")):void console.log("Analytics tracker not found")}}]),t}(),L=function(){function t(e,n,i,o){r()(this,t),this.postID=e,this.widgetContainer=n,this.voteCount=i.voteCount,this.avgRating=i.avgRating,this.errorMsg=i.errorMsg,this.token=i.token,this.id=i.id,this.avgRatingContainer=document.querySelectorAll(this.widgetContainer+".js-rmp-avg-rating, .js-rmp-results-widget--"+e+" .js-rmp-avg-rating"),this.voteCountContainer=document.querySelectorAll(this.widgetContainer+".js-rmp-vote-count, .js-rmp-results-widget--"+e+" .js-rmp-vote-count"),this.noVotesContainer=document.querySelector(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=document.querySelector(this.widgetContainer+".js-rmp-results"),this.ratingIcons=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-icon"),this.resultIcons=document.querySelectorAll(".js-rmp-results-widget--"+e+" .js-rmp-results-icon"),this.msgContainer=document.querySelector(this.widgetContainer+".js-rmp-msg"),this.tnxMsg=d.a.afterVote,this.rating=o,this.hideRatings=d.a.notShowRating,this.events()}return s()(t,[{key:"events",value:function(){var t,e,n,i,r=this;if(this.errorMsg.length)return this.msgContainer.innerHTML=this.errorMsg.join("<br />"),this.msgContainer.classList.add("rmp-rating-widget__msg--alert"),void this.ratingIcons.forEach((function(t){t.classList.remove("rmp-icon--processing-rating","rmp-icon--hovered")}));this.avgRatingContainer&&this.avgRatingContainer.forEach((function(t){t.textContent=r.avgRating})),this.voteCountContainer&&this.voteCountContainer.forEach((function(t){t.textContent=r.voteCount})),this.toneDownIcons(),this.highlightIcons(),null===(t=this.noVotesContainer)||void 0===t||null===(e=t.classList)||void 0===e||e.add("rmp-rating-widget__not-rated--hidden"),null===(n=this.resultsTextContainer)||void 0===n||null===(i=n.classList)||void 0===i||i.remove("rmp-rating-widget__results--hidden"),this.msgContainer.textContent=this.tnxMsg;new g(this.widgetContainer,this.rating),new m(this.widgetContainer,this.postID,this.rating,this.token,this.id),new x(this.postID),new j(this.rating)}},{key:"toneDownIcons",value:function(){this.ratingIcons.forEach((function(t){t.classList.remove("rmp-icon--full-highlight","rmp-icon--half-highlight","rmp-icon--processing-rating","rmp-icon--hovered","js-rmp-remove-half-star","js-rmp-replace-half-star")})),this.resultIcons.forEach((function(t){t.classList.remove("rmp-icon--full-highlight","rmp-icon--half-highlight","rmp-icon--processing-rating","js-rmp-remove-half-star","js-rmp-replace-half-star")}))}},{key:"highlightIcons",value:function(){new C(this.widgetContainer,this.postID,this.avgRating)}}]),t}(),I=function(){function t(e,n,i,o){r()(this,t),this.postID=e,this.widgetContainer=n,this.rating=i,this.duration=Math.floor(Date.now()/1e3)-o,this.settings=d.a,this.recaptcha=d.a.grecaptcha,this.recaptchaKey=d.a.siteKey,this.data={action:"process_rating",star_rating:this.rating,postID:this.postID,duration:this.duration,nonce:this.settings.nonce},this.events()}var e;return s()(t,[{key:"events",value:function(){var t=this;2==this.recaptcha?Promise.resolve().then(n.t.bind(null,9,7)).then((function(e){e.ready((function(){e.execute(t.recaptchaKey,{action:"RMPrating"}).then((function(e){t.data.token=e,t.saveRating()}))}))})):this.saveRating()}},{key:"saveRating",value:(e=c()(h.a.mark((function t(){var e,n,i,r=this;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new FormData,Object.keys(this.data).forEach((function(t){return e.append(t,r.data[t])})),t.next=4,fetch(this.settings.admin_ajax,{method:"POST",body:e});case 4:if((n=t.sent).ok){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,n.json();case 9:i=t.sent,new L(this.postID,this.widgetContainer,i,this.rating);case 11:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),t}(),S=function(){function t(e){r()(this,t),this.widgetContainer=e,this.ratingItems=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-item"),this.ratingTextContainer=document.querySelector(this.widgetContainer+".js-rmp-hover-text"),this.submitBtn=document.querySelector(this.widgetContainer+".js-submit-rating-btn"),this.events()}return s()(t,[{key:"events",value:function(){this.ratingItems.forEach((function(t){t.replaceWith(t.cloneNode(!0))})),this.ratingItems=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-item"),this.submitBtn.replaceWith(this.submitBtn.cloneNode(!0)),this.submitBtn=document.querySelector(this.widgetContainer+".js-submit-rating-btn"),this.ratingItems.forEach((function(t){t.style.cursor="default"})),this.submitBtn.classList.remove("rmp-rating-widget__submit-btn--visible"),this.ratingTextContainer&&(this.ratingTextContainer.textContent="")}}]),t}(),E=function(){function t(e,n){r()(this,t),this.postID=n,this.widgetContainer=e,this.existingCookie=k.a.get("rmp-rate"),this.cookiesDisabled=d.a.cookieDisable,this.tnxMsg=d.a.afterVote,this.msgContainer=document.querySelector(this.widgetContainer+".js-rmp-msg"),this.ratingWidget=document.querySelector(this.widgetContainer+".js-rmp-rating-widget"),this.events()}return s()(t,[{key:"events",value:function(){var t,e;if(2!=this.cookiesDisabled&&(void 0!==this.existingCookie&&this.existingCookie.split(",").includes(this.postID))){new S(this.widgetContainer);this.msgContainer&&(this.msgContainer.textContent=this.tnxMsg),null===(t=this.ratingWidget)||void 0===t||null===(e=t.classList)||void 0===e||e.add("rmp-rating-widget--has-rated")}}}]),t}(),_=function(){function t(){r()(this,t),this.requiresLogin=d.a.votingPriv,this.isLoggedIn=d.a.loggedIn,this.ratingWidget=document.querySelectorAll(".js-rmp-rating-widget"),this.events()}return s()(t,[{key:"events",value:function(){if(2==this.requiresLogin&&!this.isLoggedIn){new S("");this.ratingWidget.forEach((function(t){t.classList.add("rmp-rating-widget--no-privilege")}))}}}]),t}(),T=function(){function t(e){r()(this,t),this.postID=e,this.widgetContainer=".js-rmp-widgets-container--"+e+" ",this.resultsWidget=".js-rmp-results-widget--"+e,this.ratingItems=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-item"),this.ratingItemsList=document.querySelector(this.widgetContainer+".js-rmp-rating-icons-list"),this.ratingIcons=document.querySelectorAll(this.widgetContainer+".js-rmp-rating-icon"),this.ratingTextContainer=document.querySelector(this.widgetContainer+".js-rmp-hover-text"),this.ratingText=!1,this.hoveredItemOrder=0,this.rating=0,this.supportsHover=window.matchMedia("(hover: hover)"),this.startTime=Math.floor(Date.now()/1e3),this.preventAccidental=d.a.preventAccidental,this.hoverTexts=d.a.hoverTexts,this.submitBtn=document.querySelector(this.widgetContainer+".js-submit-rating-btn"),this.saveRating=!1,this.events()}return s()(t,[{key:"events",value:function(){var t=this;this.doubleWidgetCheck(),this.ratingItems.forEach((function(e){e.style.cursor="pointer",e.addEventListener("mouseover",(function(e){return t.hoverIcons(e)})),e.addEventListener("mouseout",(function(e){return t.stopHoverIcons()})),e.addEventListener("click",(function(e){return t.ratingIconClicked(e)}))})),this.ratingItemsList.addEventListener("mouseleave",(function(e){return t.removeHoverTexts()}));new E(this.widgetContainer,this.postID),new _}},{key:"doubleWidgetCheck",value:function(){var t=document.querySelectorAll(this.widgetContainer),e=document.querySelectorAll(this.resultsWidget);(t.length>1||e.length>1)&&(t.forEach((function(t,e){e>0&&t.remove()})),e.forEach((function(t,e){e>0&&t.remove()})))}},{key:"hoverIcons",value:function(t){var e=this;this.hoveredItemOrder=parseInt(t.currentTarget.dataset.value,10),this.ratingText=t.currentTarget.dataset.descriptiveRating,this.ratingIcons.forEach((function(t,n){n<e.hoveredItemOrder?t.classList.add("rmp-icon--hovered"):t.classList.remove("rmp-icon--hovered"),e.supportsHover&&2==e.hoverTexts&&e.ratingTextContainer&&(e.ratingTextContainer.textContent=e.ratingText)}))}},{key:"stopHoverIcons",value:function(){this.ratingIcons.forEach((function(t){t.classList.remove("rmp-icon--hovered")}))}},{key:"removeHoverTexts",value:function(){this.ratingTextContainer&&(this.ratingTextContainer.textContent="")}},{key:"ratingIconClicked",value:function(t){var e=this;if(this.rating=parseInt(t.currentTarget.dataset.value,10),this.ratingIcons.forEach((function(t,n){t.classList.remove("rmp-icon--processing-rating"),n<e.rating&&t.classList.add("rmp-icon--processing-rating")})),2!=this.preventAccidental){new S(this.widgetContainer);this.saveRating=new I(this.postID,this.widgetContainer,this.rating,this.startTime)}else this.submitButtonHandler()}},{key:"submitButtonHandler",value:function(){var t=this;this.submitBtn.classList.add("rmp-rating-widget__submit-btn--visible"),this.submitBtn.addEventListener("click",(function(e){t.saveRating||(t.saveRating=new I(t.postID,t.widgetContainer,t.rating,t.startTime));new S(t.widgetContainer)}))}}]),t}(),q=function(){function t(e){r()(this,t),this.postID=e,this.widgetContainer=".js-rmp-widgets-container--"+e+" ",this.settings=d.a,this.avgRatingContainer=document.querySelectorAll(this.widgetContainer+".js-rmp-avg-rating, .js-rmp-results-widget--"+e+" .js-rmp-avg-rating"),this.voteCountContainer=document.querySelectorAll(this.widgetContainer+".js-rmp-vote-count, .js-rmp-results-widget--"+e+" .js-rmp-vote-count"),this.noVotesContainer=document.querySelector(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=document.querySelector(this.widgetContainer+".js-rmp-results"),this.noVotesContainer=document.querySelector(this.widgetContainer+".js-rmp-not-rated"),this.resultsTextContainer=document.querySelector(this.widgetContainer+".js-rmp-results"),this.msgContainer=document.querySelector(this.widgetContainer+".js-rmp-msg"),this.data={action:"load_results",postID:this.postID,nonce:this.settings.nonce},this.events()}var e;return s()(t,[{key:"events",value:(e=c()(h.a.mark((function t(){var e,n,i,r,o,s,a=this;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new FormData,Object.keys(this.data).forEach((function(t){return e.append(t,a.data[t])})),t.next=4,fetch(this.settings.admin_ajax,{method:"POST",body:e});case 4:if((n=t.sent).ok){t.next=7;break}return t.abrupt("return");case 7:return t.next=9,n.json();case 9:i=t.sent,r=i.voteCount,o=i.avgRating,s=i.errorMsg,this.loadResults(r,o,s);case 14:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"loadResults",value:function(t,e,n){if(n.length)this.msgContainer&&(this.msgContainer.textContent=n,this.msgContainer.classList.add("rmp-rating-widget__msg--alert"));else{this.avgRatingContainer&&this.avgRatingContainer.forEach((function(t){t.textContent=e})),this.voteCountContainer&&this.voteCountContainer.forEach((function(e){e.textContent=t}));var i,r,o,s,a,c,u,h;new C(this.widgetContainer,this.postID,e);if(0===e)null===(i=this.noVotesContainer)||void 0===i||null===(r=i.classList)||void 0===r||r.remove("rmp-rating-widget__not-rated--hidden"),null===(o=this.resultsTextContainer)||void 0===o||null===(s=o.classList)||void 0===s||s.add("rmp-rating-widget__results--hidden");else null===(a=this.noVotesContainer)||void 0===a||null===(c=a.classList)||void 0===c||c.add("rmp-rating-widget__not-rated--hidden"),null===(u=this.resultsTextContainer)||void 0===u||null===(h=u.classList)||void 0===h||h.remove("rmp-rating-widget__results--hidden");new w}}}]),t}(),R=function(){function t(){r()(this,t),this.ratingItems=document.querySelectorAll(".js-rmp-rating-item"),this.ratingItemsLists=document.querySelector(".js-rmp-rating-icons-list"),this.events()}return s()(t,[{key:"events",value:function(){this.ratingItems.forEach((function(t){t.replaceWith(t.cloneNode(!0))})),this.ratingItems=document.querySelectorAll(".js-rmp-rating-item"),this.ratingItems.forEach((function(t){t.style.cursor="auto"})),this.ratingItemsLists.replaceWith(this.ratingItemsLists.cloneNode(!0)),this.ratingItemsLists=document.querySelector(".js-rmp-rating-icons-list")}}]),t}();function D(){new w;var t=document.getElementsByClassName("js-rmp-rating-widget"),e=document.getElementsByClassName("js-rmp-results-widget"),n=document.getElementsByClassName("js-rmp-widgets-container");if(!(t.length<1&&e.length<1)){var i=[];Array.from(n).forEach((function(t){var e=t.dataset.postId;i.push(e)}));var r=i.filter((function(t,e){return i.indexOf(t)===e}));if(2!=d.a.ajaxLoad)r.forEach((function(t){new T(t)}));else new q(r[0]),new T(r[0])}}function M(){console.log("re-init running");new R;D()}"loading"!==document.readyState?D():document.addEventListener("DOMContentLoaded",D)},function(t,e){t.exports=grecaptcha}]);
  • rate-my-post/trunk/rate-my-post.php

    r2839305 r2874796  
    1010 * Plugin URI:        https://wordpress.org/plugins/rate-my-post/
    1111 * Description:       Allows you to easily add rating functionality to your WordPress website.
    12  * Version:           3.3.9
     12 * Version:           3.4.0
    1313 * Author:            Blaz K.
    1414 * Author URI:        https://blazzdev.com
     
    4545
    4646// Plugin version
    47 define( 'RATE_MY_POST_VERSION', '3.3.9' );
     47define( 'RATE_MY_POST_VERSION', '3.4.0' );
    4848
    4949// Plugin activation
     
    9090//OPTIONS ARRAY
    9191// var_dump(get_option( 'rmp_options' ));
    92 //CUSTOMIZATION ARRAY
     92// CUSTOMIZATION ARRAY
    9393// var_dump(get_option( 'rmp_customize_strings' ));
    94 //SECURITY OPTIONS ARRAY
     94// SECURITY OPTIONS ARRAY
    9595// var_dump(get_option( 'rmp_security' ));
    96 //VERSION
     96// VERSION
    9797// var_dump(get_option( 'rmp_version' ));
    98 //ADMIN NOTICES
     98// ADMIN NOTICES
    9999// var_dump(get_option( 'rmp_admin_notices' ));
    100 //lICENSE
     100// lICENSE
    101101// var_dump(get_option( 'rmp_license_key' ));
  • rate-my-post/trunk/readme.txt

    r2839305 r2874796  
    55Requires at least: 4.7.0
    66Tested up to: 6.1
    7 Stable tag: 3.3.9
     7Stable tag: 3.4.0
    88Requires PHP: 5.3
    99License: GPLv3
     
    255255
    256256== Changelog ==
     257= 3.4.0 =
     258* Removed jQuery dependency on frontend - thanks to [Alfredo Arena](https://github.com/alfredoct96)
     259* Ditching support for IE
     260* Improved performance - thanks to [Alfredo Arena](https://github.com/alfredoct96)
     261* Added option to disable clear post cache - thanks to [Alfredo Arena](https://github.com/alfredoct96)
    257262
    258263= 3.3.9 =
Note: See TracChangeset for help on using the changeset viewer.