Spotlight Social Media Feeds - Version 0.3.1

Version Description

(2020-09-16) =

Fixed - The page would not load or crash if an account has no access token expiry date - The top navigation bar would did not update to indicate the current tab.

Download this release

Release Info

Developer Mekku
Plugin Icon 128x128 Spotlight Social Media Feeds
Version 0.3.1
Comparing to
See all releases

Code changes from version 0.3 to 0.3.1

plugin.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * Plugin Name: Spotlight - Social Photo Feeds
7
  * Description: Easily embed beautiful Instagram feeds on your WordPress site.
8
- * Version: 0.3
9
  * Author: RebelCode
10
  * Plugin URI: https://spotlightwp.com
11
  * Author URI: https://rebelcode.com
@@ -38,7 +38,7 @@ if (!defined('SL_INSTA')) {
38
  // Used for detecting that the plugin is running
39
  define('SL_INSTA', true);
40
  // The plugin version
41
- define('SL_INSTA_VERSION', '0.3');
42
 
43
  // Dev mode constant that controls whether development tools are enabled
44
  if (!defined('SL_INSTA_DEV')) {
5
  *
6
  * Plugin Name: Spotlight - Social Photo Feeds
7
  * Description: Easily embed beautiful Instagram feeds on your WordPress site.
8
+ * Version: 0.3.1
9
  * Author: RebelCode
10
  * Plugin URI: https://spotlightwp.com
11
  * Author URI: https://rebelcode.com
38
  // Used for detecting that the plugin is running
39
  define('SL_INSTA', true);
40
  // The plugin version
41
+ define('SL_INSTA_VERSION', '0.3.1');
42
 
43
  // Dev mode constant that controls whether development tools are enabled
44
  if (!defined('SL_INSTA_DEV')) {
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: Instagram, Instagram feed, Instagram widget, Instagram stories, Instagram
6
  Requires at least: 5.0
7
  Requires PHP: 7.1
8
  Tested up to: 5.5
9
- Stable tag: 0.3
10
  License: GPLv3
11
 
12
  == Description ==
@@ -227,6 +227,12 @@ If none of these solutions work for you, please do contact us through the [suppo
227
 
228
  == Changelog ==
229
 
 
 
 
 
 
 
230
  = 0.3 (2020-09-16) =
231
 
232
  **Added**
6
  Requires at least: 5.0
7
  Requires PHP: 7.1
8
  Tested up to: 5.5
9
+ Stable tag: 0.3.1
10
  License: GPLv3
11
 
12
  == Description ==
227
 
228
  == Changelog ==
229
 
230
+ = 0.3.1 (2020-09-16) =
231
+
232
+ **Fixed**
233
+ - The page would not load or crash if an account has no access token expiry date
234
+ - The top navigation bar would did not update to indicate the current tab.
235
+
236
  = 0.3 (2020-09-16) =
237
 
238
  **Added**
ui/dist/admin-app.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[4],{0:function(t,n){t.exports=e},10:function(e,t,n){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var o=n(0),a=n.n(o),i=n(39),s=n(10),r=n.n(s),l=n(4),c=n(3),d=n(567),u=n(565),m=n(44),p=n(121),h=n(109),g=n(33),f=n(6),b=n(22),_=n(11),v=n(68),E=Object(l.b)((function({account:e,onUpdate:t}){const[n,o]=a.a.useState(!1),[i,s]=a.a.useState(""),[l,E]=a.a.useState(!1),y=e.type===c.a.Type.PERSONAL,w=c.b.getBioText(e),O=()=>{e.customBio=i,E(!0),g.a.updateAccount(e).then(()=>{o(!1),E(!1),t&&t()})},S=n=>{e.customProfilePicUrl=n,E(!0),g.a.updateAccount(e).then(()=>{E(!1),t&&t()})};return a.a.createElement("div",{className:r.a.root},a.a.createElement("div",{className:r.a.container},a.a.createElement("div",{className:r.a.infoColumn},a.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:r.a.username},"@",e.username),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Spotlight ID:"),e.id),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"User ID:"),e.userId),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Type:"),e.type),!n&&a.a.createElement("div",{className:r.a.row},a.a.createElement("div",null,a.a.createElement("span",{className:r.a.label},"Bio:"),a.a.createElement("a",{className:r.a.editBioLink,onClick:()=>{s(c.b.getBioText(e)),o(!0)}},"Edit bio"),a.a.createElement("pre",{className:r.a.bio},w.length>0?w:"(No bio)"))),n&&a.a.createElement("div",{className:r.a.row},a.a.createElement("textarea",{className:r.a.bioEditor,value:i,onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(O(),e.preventDefault(),e.stopPropagation())},rows:4}),a.a.createElement("div",{className:r.a.bioFooter},a.a.createElement("div",{className:r.a.bioEditingControls},l&&a.a.createElement("span",null,"Please wait ...")),a.a.createElement("div",{className:r.a.bioEditingControls},a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.DANGER,disabled:l,onClick:()=>{e.customBio="",E(!0),g.a.updateAccount(e).then(()=>{o(!1),E(!1),t&&t()})}},"Reset"),a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.SECONDARY,disabled:l,onClick:()=>{o(!1)}},"Cancel"),a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.PRIMARY,disabled:l,onClick:O},"Save"))))),a.a.createElement("div",{className:r.a.picColumn},a.a.createElement("div",null,a.a.createElement(v.a,{account:e,className:r.a.profilePic})),a.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),n=h.a.media.attachment(t).attributes.url;S(n)}},({open:e})=>a.a.createElement(f.a,{type:f.c.SECONDARY,className:r.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&a.a.createElement("a",{className:r.a.resetCustomPic,onClick:()=>{S("")}},"Reset profile picture"))),y&&a.a.createElement("div",{className:r.a.personalInfoMessage},a.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",a.a.createElement("a",{href:_.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),a.a.createElement(m.a,{label:"View access token",stealth:!0},a.a.createElement("div",{className:r.a.row},e.accessToken&&a.a.createElement("div",null,a.a.createElement("p",null,a.a.createElement("span",{className:r.a.label},"Expires on:"),a.a.createElement("span",null,e.accessToken.expiry?Object(d.a)(Object(u.a)(e.accessToken.expiry),"PPPP"):"Unknown")),a.a.createElement("pre",{className:r.a.accessToken},e.accessToken.code)))))}));function y({isOpen:e,onClose:t,onUpdate:n,account:o}){return a.a.createElement(i.a,{isOpen:e,title:"Account details",icon:"admin-users",onClose:t},a.a.createElement(i.a.Content,null,a.a.createElement(E,{account:o,onUpdate:n})))}},108:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var o=n(0),a=n.n(o),i=n(4),s=n(26),r=n(7);const l=Object(i.b)(({feed:e})=>{const t=s.a.getById(e.options.layout),n=r.a.ComputedOptions.compute(e);return a.a.createElement("div",{className:"feed"},a.a.createElement(t.component,{feed:e,options:n}))})},111:function(e,t,n){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},118:function(e,t,n){e.exports={pill:"ProPill__pill"}},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},124:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(86),s=n.n(i),r=n(17);function l({children:e,pathStyle:t}){let{path:n,left:o,right:i,center:r}=e;return n=null!=n?n:[],o=null!=o?o:[],i=null!=i?i:[],r=null!=r?r:[],a.a.createElement("div",{className:s.a.root},a.a.createElement("div",{className:s.a.leftList},a.a.createElement("div",{className:s.a.pathList},n.map((e,n)=>a.a.createElement(m,{key:n,style:t},a.a.createElement("div",{className:s.a.item},e)))),a.a.createElement("div",{className:s.a.leftList},a.a.createElement(d,null,o))),a.a.createElement("div",{className:s.a.centerList},a.a.createElement(d,null,r)),a.a.createElement("div",{className:s.a.rightList},a.a.createElement(d,null,i)))}function c(){return a.a.createElement("div",{className:s.a.logo},a.a.createElement("img",{src:r.a.image("spotlight-favicon.png"),alt:"Spotlight"}))}function d({children:e}){const t=Array.isArray(e)?e:[e];return a.a.createElement(a.a.Fragment,null,t.map((e,t)=>a.a.createElement(u,{key:t},e)))}function u({children:e}){return a.a.createElement("div",{className:s.a.item},e)}function m({children:e,style:t}){return a.a.createElement("div",{className:s.a.pathSegment},e,a.a.createElement(p,{style:t}))}function p({style:e}){if("none"===e)return null;const t="chevron"===e?"M0 0 L100 50 L0 100":"M50 0 L50 100";return a.a.createElement("div",{className:s.a.separator},a.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},a.a.createElement("path",{d:t,fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(1),i=n(11);n(14),function(e){e.list=Object(a.n)([]),e.fetch=function(){return i.a.restApi.getNotifications().then(t=>{"object"==typeof t&&Array.isArray(t.data)&&e.list.push(...t.data)}).catch(e=>{})}}(o||(o={}))},13:function(e,t,n){"use strict";var o;n.d(t,"a",(function(){return o})),function(e){let t,n;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(n=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let n=[];for(;e.length;)n.push(e.splice(0,t));if(n.length>0){const e=n.length-1;for(;n[e].length<t;)n[e].push({})}return n},e.isFromHashtag=e=>e.source.type===n.Type.POPULAR_HASHTAG||e.source.type===n.Type.RECENT_HASHTAG}(o||(o={}))},135:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(0),a=n.n(o),i=n(111),s=n.n(i),r=n(24),l=n(97),c=n.n(l),d=n(66),u=n.n(d),m=n(4),p=n(5),h=n(123),g=Object(m.b)((function({field:e}){const t="settings-field-"+Object(p.o)(),n=!e.label||e.fullWidth;return a.a.createElement("div",{className:u.a.root},e.label&&a.a.createElement("div",{className:u.a.label},a.a.createElement("label",{htmlFor:t},e.label)),a.a.createElement("div",{className:u.a.container},a.a.createElement("div",{className:n?u.a.controlFullWidth:u.a.controlPartialWidth},a.a.createElement(e.component,{id:t})),e.tooltip&&a.a.createElement("div",{className:u.a.tooltip},a.a.createElement(h.a,null,e.tooltip))))}));function f({group:e}){return a.a.createElement("div",{className:c.a.root},e.title.length>0&&a.a.createElement("h1",{className:c.a.title},e.title),e.component&&a.a.createElement("div",{className:c.a.content},a.a.createElement(e.component)),a.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>a.a.createElement(g,{field:e,key:e.id}))))}var b=n(18);function _({page:e}){return Object(b.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(r.b.save(),e.preventDefault(),e.stopPropagation())}),a.a.createElement("article",{className:s.a.root},e.component&&a.a.createElement("div",{className:s.a.content},a.a.createElement(e.component)),e.groups&&a.a.createElement("div",{className:s.a.groupList},e.groups.map(e=>a.a.createElement(f,{key:e.id,group:e}))))}},14:function(e,t,n){"use strict";var o=n(37),a=n.n(o),i=n(17),s=n(38);const r=i.a.config.restApi.baseUrl,l={};i.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=a.a.create({baseURL:r,headers:l}),d={config:i.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,n=0,o)=>{const i=o?new a.a.CancelToken(o):void 0;return c.post("/media/fetch",{options:e,num:n,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(s.b)(t)}};t.a=d},145:function(e,t,n){e.exports={root:"FeedNameField__root layout__flex-row",container:"FeedNameField__container layout__flex-row","edit-container":"FeedNameField__edit-container FeedNameField__container layout__flex-row",editContainer:"FeedNameField__edit-container FeedNameField__container layout__flex-row","static-container":"FeedNameField__static-container FeedNameField__container layout__flex-row",staticContainer:"FeedNameField__static-container FeedNameField__container layout__flex-row","edit-icon":"FeedNameField__edit-icon dashicons__dashicon-normal",editIcon:"FeedNameField__edit-icon dashicons__dashicon-normal",label:"FeedNameField__label","done-btn":"FeedNameField__done-btn",doneBtn:"FeedNameField__done-btn"}},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const o={value:"link",label:"Link",getIcon:()=>"admin-links",getPopupLinkText:(e,t)=>"string"==typeof t.linkText&&t.linkText.length>0?t.linkText:a.getDefaultLinkText(t),isValid:(e,t)=>t.linkType&&("url"===t.linkType&&t.url&&t.url.length>0||t.postId>0&&t.postUrl&&t.postUrl.length>0),getMediaUrl:(e,t)=>"url"===t.linkType?t.url:t.postUrl,onMediaClick:(e,t)=>{let n=o.getMediaUrl(e,t);return!!n&&(window.open(n,t.newTab?"_blank":"_self"),!0)}};var a;t.b=o,function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(a||(a={}))},148:function(e,t,n){"use strict";var o=n(0),a=n.n(o),i=n(125),s=n(20),r=n.n(s),l=n(4),c=n(47),d=n(3),u=n(6),m=n(9),p=n(120),h=n(27),g=n(23),f=n(33),b=n(102),_=n(68),v=n(11),E=n(83),y=Object(l.b)((function({accounts:e,showDelete:t,onDeleteError:n}){e=null!=e?e:[];const[o,i]=a.a.useState(!1),[s,l]=a.a.useState(null),[y,w]=a.a.useState(!1),[O,S]=a.a.useState(),[k,C]=a.a.useState(!1),N=e=>()=>{l(e),i(!0)},L=e=>()=>{f.a.openAuthWindow(e.type,0,()=>{v.a.restApi.deleteAccountMedia(e.id)})},P=e=>()=>{S(e),w(!0)},T={cols:{username:r.a.usernameCol,type:r.a.typeCol,usages:r.a.usagesCol,actions:r.a.actionsCol},cells:{username:r.a.usernameCell,type:r.a.typeCell,usages:r.a.usagesCell,actions:r.a.actionsCell}};return a.a.createElement("div",{className:"accounts-list"},a.a.createElement(p.a,{styleMap:T,rows:e,cols:[{id:"username",label:"Username",render:e=>a.a.createElement("div",null,a.a.createElement(_.a,{account:e,className:r.a.profilePic}),a.a.createElement("a",{className:r.a.username,onClick:N(e)},e.username))},{id:"type",label:"Type",render:e=>a.a.createElement("span",{className:r.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>a.a.createElement("span",{className:r.a.usages},e.usages.map((e,t)=>!!h.a.getById(e)&&a.a.createElement(c.a,{key:t,to:g.a.at({screen:"edit",id:e.toString()})},h.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&a.a.createElement("div",{className:r.a.actionsList},a.a.createElement(u.a,{className:r.a.action,type:u.c.SECONDARY,tooltip:"Account info",onClick:N(e)},a.a.createElement(m.a,{icon:"info"})),a.a.createElement(u.a,{className:r.a.action,type:u.c.SECONDARY,tooltip:"Reconnect account",onClick:L(e)},a.a.createElement(m.a,{icon:"image-rotate"})),a.a.createElement(u.a,{className:r.a.actions,type:u.c.DANGER,tooltip:"Remove account",onClick:P(e)},a.a.createElement(m.a,{icon:"trash"})))}]}),a.a.createElement(b.a,{isOpen:o,onClose:()=>i(!1),account:s}),O&&a.a.createElement(E.a,{isOpen:y,title:"Are you sure?",buttons:[k?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:k,cancelDisabled:k,onAccept:()=>{C(!0),f.a.deleteAccount(O.id).catch(()=>{n&&n("An error occurred while trying to remove the account.")}).finally(()=>C(!1))},onCancel:()=>{S(null),w(!1)}},a.a.createElement("p",null,"Are you sure you want to delete"," ",a.a.createElement("span",{style:{fontWeight:"bold"}},O.username),"?"," ","This will also delete all saved media associated with this account."),O.type===d.a.Type.BUSINESS&&1===d.b.getBusinessAccounts().length&&a.a.createElement("p",null,a.a.createElement("b",null,"Note:")," Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work.")))})),w=n(22),O=n(122),S=n(93),k=n.n(S);t.a=Object(l.b)((function(){const[e,t]=a.a.useState("");return d.b.hasAccounts()?a.a.createElement("div",{className:k.a.root},e.length>0&&a.a.createElement(w.a,{type:w.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>t("")},e),a.a.createElement("div",{className:k.a.connectBtn},a.a.createElement(i.a,null)),a.a.createElement(y,{accounts:d.b.list,showDelete:!0,onDeleteError:t})):a.a.createElement(O.a,null)}))},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));const o=(e,t)=>e.startsWith(t)?e:t+e,a=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},17:function(e,t,n){"use strict";let o;t.a=o={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${o.config.imagesUrl}/${e}`}},176:function(e,t,n){e.exports={root:"SpotlightGame__root layout__flex-column","game-text":"SpotlightGame__game-text",gameText:"SpotlightGame__game-text",score:"SpotlightGame__score SpotlightGame__game-text",message:"SpotlightGame__message SpotlightGame__game-text","message-bubble":"SpotlightGame__message-bubble",messageBubble:"SpotlightGame__message-bubble"}},179:function(e,t,n){e.exports={"field-container":"AdvancedSettings__field-container layout__flex-row",fieldContainer:"AdvancedSettings__field-container layout__flex-row","field-element":"AdvancedSettings__field-element",fieldElement:"AdvancedSettings__field-element","field-label":"AdvancedSettings__field-label AdvancedSettings__field-element",fieldLabel:"AdvancedSettings__field-label AdvancedSettings__field-element","field-control":"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column",fieldControl:"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column","field-centered":"AdvancedSettings__field-centered",fieldCentered:"AdvancedSettings__field-centered"}},18:function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return u})),n.d(t,"g",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return b})),n.d(t,"f",(function(){return _}));var o=n(0),a=n.n(o),i=n(40),s=n(36);function r(e){const[t,n]=a.a.useState(e),o=a.a.useRef(t);return[t,()=>o.current,e=>n(o.current=e)]}function l(e,t,n=[]){function a(o){!e.current||e.current.contains(o.target)||n.some(e=>e&&e.current&&e.current.contains(o.target))||t(o)}Object(o.useEffect)(()=>(document.addEventListener("mousedown",a),document.addEventListener("touchend",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchend",a)}))}function c(e,t){Object(o.useEffect)(()=>{const n=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",n),()=>document.removeEventListener("keyup",n)},e)}function d(e,t,n=100){const[i,s]=a.a.useState(e);return Object(o.useEffect)(()=>{let o=null;return e===t?o=setTimeout(()=>s(t),n):s(!t),()=>{null!==o&&clearTimeout(o)}},[e]),[i,s]}function u(e){const[t,n]=a.a.useState(Object(s.b)()),i=()=>{const t=Object(s.b)();n(t),e&&e(t)};return Object(o.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function m(){return new URLSearchParams(Object(i.e)().search)}function p(e,t){const n=n=>{if(t)return(n||window.event).returnValue=e,e};Object(o.useEffect)(()=>(window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)),[t])}function h(e,t){const n=a.a.useRef(!1);return Object(o.useEffect)(()=>{n.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),n.current=!1)},[n.current]),()=>n.current=!0}function g(e,t,n,a=[],i=[]){Object(o.useEffect)(()=>(a.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,n),()=>e.removeEventListener(t,n)),i)}function f(e,t,n=[],o=[]){g(document,e,t,n,o)}function b(e,t,n=[],o=[]){g(window,e,t,n,o)}function _(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}n(38)},180:function(e,t,n){e.exports={label:"TabNavbar__label",tab:"TabNavbar__tab",current:"TabNavbar__current TabNavbar__tab",disabled:"TabNavbar__disabled TabNavbar__tab"}},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(1),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};!function(e){class t{constructor(e,t,n){this.prop=e,this.name=t,this.icon=n}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class n{constructor(e,t,n){this.desktop=e,this.tablet=t,this.phone=n}get(e,t){return o(this,e,t)}set(e,t){s(this,t,e)}with(e,t){const o=r(this,t,e);return new n(o.desktop,o.tablet,o.phone)}}function o(e,t,n=!1){if(!e)return;const o=e[t.prop];return!n||""!==o&&null!=o&&""!==o?o:e.desktop}function s(e,t,n){return e[n.prop]=t,e}function r(e,t,n){return s({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,n)}i([a.n],n.prototype,"desktop",void 0),i([a.n],n.prototype,"tablet",void 0),i([a.n],n.prototype,"phone",void 0),e.Value=n,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(n){const o=e.MODES.findIndex(e=>e===n);return void 0===o?t.DESKTOP:e.MODES[(o+1)%e.MODES.length]},e.get=o,e.set=s,e.withValue=r,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new n(t.all,t.all,t.all):new n(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new n(e.desktop,e.tablet,e.phone):new n(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(o||(o={}))},20:function(e,t,n){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-list":"AccountsList__actions-list layout__flex-row",actionsList:"AccountsList__actions-list layout__flex-row",action:"AccountsList__action"}},210:function(e,t,n){e.exports={"contact-us":"FeedsOnboarding__contact-us",contactUs:"FeedsOnboarding__contact-us","call-to-action":"FeedsOnboarding__call-to-action",callToAction:"FeedsOnboarding__call-to-action"}},211:function(e,t,n){e.exports={buttons:"SettingsNavbar__buttons layout__flex-row","cancel-btn":"SettingsNavbar__cancel-btn",cancelBtn:"SettingsNavbar__cancel-btn"}},212:function(e,t,n){e.exports={"menu-link":"PageMenuNavbar__menu-link",menuLink:"PageMenuNavbar__menu-link","menu-ref":"PageMenuNavbar__menu-ref",menuRef:"PageMenuNavbar__menu-ref","arrow-down":"PageMenuNavbar__arrow-down",arrowDown:"PageMenuNavbar__arrow-down"}},23:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(1),a=n(63),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(a.parse)(e.search),this.unListen=null,this.listeners=[],Object(o.o)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(a.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=null){var n;return null!==(n=this.parsed[e])&&void 0!==n?n:t}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(a.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(n=>{e[n]&&0===e[n].length?delete t[n]:t[n]=e[n]}),t}}i([o.n],s.prototype,"path",void 0),i([o.n],s.prototype,"parsed",void 0),i([o.h],s.prototype,"_path",null);const r=new s},242:function(e,t,n){e.exports={"create-new-btn":"FeedsScreen__create-new-btn",createNewBtn:"FeedsScreen__create-new-btn"}},245:function(e,t,n){e.exports={message:"FeedNamePrompt__message",input:"FeedNamePrompt__input"}},246:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n.n(o),i=n(36);function s({breakpoints:e,children:t}){const[n,s]=a.a.useState(1/0),r=a.a.useCallback(()=>{const t=Object(i.b)();s(()=>e.reduce((e,n)=>t.width<=n&&n<e?n:e,1/0))},[e]);return Object(o.useEffect)(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[]),t(n)}},247:function(e,t,n){e.exports={"arrow-link":"WizardNavbar__arrow-link",arrowLink:"WizardNavbar__arrow-link","prev-link":"WizardNavbar__prev-link WizardNavbar__arrow-link",prevLink:"WizardNavbar__prev-link WizardNavbar__arrow-link","next-link":"WizardNavbar__next-link WizardNavbar__arrow-link",nextLink:"WizardNavbar__next-link WizardNavbar__arrow-link"}},26:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));class o{static getById(e){const t=o.list.find(t=>t.id===e);return!t&&o.list.length>0?o.list[0]:t}static getName(e){const t=o.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){o.list.push(e)}}o.list=[]},28:function(e,t,n){"use strict";var o=n(1),a=n(76),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(){this.types=[],this.focusSidebar=0,this.mediaStore=a.a}get selectedMedia(){return"number"==typeof this.selectedIdx?this.mediaStore.media[this.selectedIdx]:void 0}nextPost(){this.selectedIdx<this.mediaStore.media.length-1&&this.selectedIdx++}addPromotionType(e){this.types.push(e)}getPromotionType(e){return this.types.find(t=>t.value===e)}getMediaPromo(e,t){var n;const o=t.options.promotions.hasOwnProperty(e.id)?t.options.promotions[e.id]:void 0;if(!o)return[{},null];const a=this.getPromotionType(o.type);return a?[null!==(n=o.data)&&void 0!==n?n:{},a]:[{},null]}executeMediaClick(e,t){const[n,o]=this.getMediaPromo(e,t);return!(null===o||!o.isValid(e,n)||"function"!=typeof o.onMediaClick)&&o.onMediaClick(e,n)}getLinkText(e,t){var n,o;const[a,i]=this.getMediaPromo(e,t);return null!==i&&i.isValid(e,a)?{text:i.getPopupLinkText&&null!==(n=i.getPopupLinkText(e,a))&&void 0!==n?n:null,url:i.getMediaUrl&&null!==(o=i.getMediaUrl(e,a))&&void 0!==o?o:null}:{text:null,url:null}}}i([o.n],s.prototype,"selectedIdx",void 0),i([o.n],s.prototype,"focusSidebar",void 0),i([Object(o.h)({keepAlive:!0})],s.prototype,"selectedMedia",null),i([o.f],s.prototype,"nextPost",null),t.a=new s},3:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(14),i=n(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(o||(o={}));const s=Object(i.n)([]),r="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=e=>s.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===o.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return s.replace(t),s}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:s,DEFAULT_PROFILE_PIC:r,getById:l,getByUsername:e=>s.find(t=>t.username===e),hasAccounts:()=>s.length>0,filterExisting:e=>e.filter(e=>void 0!==l(e)),idsToAccounts:e=>e.map(e=>l(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>s.filter(e=>e.type===o.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:r,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return a.a.getAccounts().then(d).catch(e=>{throw a.a.getErrorReason(e)})},loadFromResponse:d}},30:function(e,n){e.exports=t},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m}));var o=n(0),a=n.n(o),i=n(30),s=n.n(i),r=n(4);class l{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let n=this.cache.get(e);if(void 0===n){n=t(this);let o=this.extensions.get(e);o&&o.forEach(e=>n=e(this,n)),this.cache.set(e,n)}return n}has(e){return this.factories.has(e)}}class c{constructor(e,t,n){this.key=e,this.mount=t,this.modules=n,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=m({root:()=>null,"root/children":()=>[]});this.container=new l(e,this.modules);const t=this.container.get("root/children").map((e,t)=>a.a.createElement(e,{key:t})),n=a.a.createElement(r.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),s.a.render(n,this.mount)})}}function d(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function m(e){return new Map(Object.entries(e))}},325:function(e,t,n){},327:function(e,t,n){e.exports={root:"ProUpgradeBtn__root"}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n(0),a=n.n(o),i=n(212),s=n.n(i),r=n(124),l=n(6),c=n(9),d=n(71);function u({pages:e,current:t,onChangePage:n,showNavArrows:o,hideMenuArrow:i,children:d}){var u,p;const{path:h,right:g}=d,f=null!==(u=e.findIndex(e=>e.key===t))&&void 0!==u?u:0,b=null!==(p=e[f].label)&&void 0!==p?p:"",_=f<=0,v=f>=e.length-1,E=_?null:e[f-1],y=v?null:e[f+1];let w=[];return o&&w.push(a.a.createElement(l.a,{type:l.c.PILL,onClick:()=>!_&&n&&n(e[f-1].key),disabled:_||E.disabled},a.a.createElement(c.a,{icon:"arrow-left-alt2"}))),w.push(a.a.createElement(m,{pages:e,current:t,onClickPage:e=>n&&n(e)},a.a.createElement("span",null,b),!i&&a.a.createElement(c.a,{icon:"arrow-down-alt2",className:s.a.arrowDown}))),o&&w.push(a.a.createElement(l.a,{type:l.c.PILL,onClick:()=>!v&&n&&n(e[f+1].key),disabled:v||y.disabled},a.a.createElement(c.a,{icon:"arrow-right-alt2"}))),a.a.createElement(r.b,{pathStyle:h.length>1?"line":"none"},{path:h,right:g,center:w})}function m({pages:e,current:t,onClickPage:n,children:o}){const[i,r]=a.a.useState(!1),l=()=>r(!0),c=()=>r(!1);return a.a.createElement(d.a,{isOpen:i,onBlur:c,placement:"bottom-start",refClassName:s.a.menuRef},({ref:e})=>a.a.createElement("a",{ref:e,className:s.a.menuLink,onClick:l},o),a.a.createElement(d.b,null,e.map(e=>{return a.a.createElement(d.c,{key:e.key,disabled:e.disabled,active:e.key===t,onClick:(o=e.key,()=>{n&&n(o),c()})},e.label);var o})))}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(180),s=n.n(i),r=n(124),l=n(18);function c({children:{path:e,tabs:t,right:n},current:o,onClickTab:i}){return a.a.createElement(r.b,{pathStyle:"chevron"},{path:e,right:n,left:t.map(e=>{return a.a.createElement(d,{tab:e,key:e.key,isCurrent:e.key===o,onClick:(t=e.key,()=>i&&i(t))});var t})})}function d({tab:e,isCurrent:t,onClick:n}){return a.a.createElement("a",{key:e.key,role:"button",tabIndex:0,className:e.disabled?s.a.disabled:t?s.a.current:s.a.tab,onClick:n,onKeyDown:Object(l.f)(n)},a.a.createElement("span",{className:s.a.label},e.label))}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n(0),a=n.n(o),i=n(247),s=n.n(i),r=n(124),l=n(6),c=n(9);function d({children:e,steps:t,current:n,onChangeStep:o,firstStep:i,lastStep:d}){var u;i=null!=i?i:[],d=null!=d?d:[];const m=null!==(u=t.findIndex(e=>e.key===n))&&void 0!==u?u:0,p=m<=0,h=m>=t.length-1,g=p?null:t[m-1],f=h?null:t[m+1],b=p?i:a.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!p&&o&&o(t[m-1].key),className:s.a.prevLink,disabled:g.disabled},a.a.createElement(c.a,{icon:"arrow-left-alt2"}),a.a.createElement("span",null,g.label)),_=h?d:a.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!h&&o&&o(t[m+1].key),className:s.a.nextLink,disabled:f.disabled},a.a.createElement("span",null,f.label),a.a.createElement(c.a,{icon:"arrow-right-alt2"}));return a.a.createElement(r.b,null,{path:[],left:b,right:_,center:e})}},36:function(e,t,n){"use strict";function o(e,t,n={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(n))}function a(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}))},363:function(e,t,n){},38:function(e,t,n){"use strict";function o(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}))},48:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r}));var o=n(0),a=n.n(o),i=n(4);const s=(e,t)=>Object(i.b)(n=>a.a.createElement(e,Object.assign(Object.assign({},t),n))),r=(e,t)=>Object(i.b)(n=>{const o={};return Object.keys(t).forEach(e=>o[e]=t[e](n)),a.a.createElement(e,Object.assign({},o,n))})},5:function(e,t,n){"use strict";n.d(t,"o",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"j",(function(){return u})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"i",(function(){return h})),n.d(t,"k",(function(){return g})),n.d(t,"g",(function(){return f})),n.d(t,"a",(function(){return b})),n.d(t,"f",(function(){return _})),n.d(t,"h",(function(){return v})),n.d(t,"n",(function(){return E})),n.d(t,"m",(function(){return y})),n.d(t,"l",(function(){return w})),n.d(t,"d",(function(){return O}));var o=n(0),a=n.n(o),i=n(160),s=n(159),r=n(13);let l=0;function c(){return l++}function d(e,t,n){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(n){if(!n(e[o],t[o]))return!1}else if(e[o]!==t[o])return!1;return!0}function u(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(n=>"object"==typeof e[n]?"object"!=typeof t[n]||!u(e[n],t[n]):Array.isArray(e[n])?!Array.isArray(t[n])||!d(e[n],t[n]):e[n]!==t[n]):e===t}function m(e,t,n){return n=null!=n?n:(e,t)=>e===t,e.filter(e=>!t.some(t=>n(e,t)))}function p(e,t,n){return n=null!=n?n:(e,t)=>e===t,e.every(e=>t.some(t=>n(e,t)))&&t.every(t=>e.some(e=>n(t,e)))}function h(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function g(e,t,n=0,i=!1){let s=e.trim();i&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const r=s.split("\n"),l=r.map((e,n)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let s,l=[];for(;null!==(s=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],n=a.a.createElement("a",{href:t,target:"_blank",key:c()},s[0]),o=e.substr(0,s.index),i=e.substr(s.index+s[0].length);l.push(o),l.push(n),e=i}return e.length&&l.push(e),t&&(l=t(l,n)),r.length>1&&l.push(a.a.createElement("br",{key:c()})),a.a.createElement(o.Fragment,{key:c()},l)});return n>0?l.slice(0,n):l}function f(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var b;function _(e,t=b.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function v(e,t=b.MEDIUM){return e.thumbnail?e.thumbnail:_(f(e.permalink),t)}function E(e,t){const n=/(\s+)/g;let o,a=0,i=0,s="";for(;null!==(o=n.exec(e))&&a<t;){const t=o.index+o[1].length;s+=e.substr(i,t-i),i=t,a++}return i<e.length&&(s+=" ..."),s}function y(e){return Object(i.a)(Object(s.a)(e),{addSuffix:!0})}function w(e,t){const n=[];return e.forEach((e,o)=>{const a=o%t;Array.isArray(n[a])?n[a].push(e):n[a]=[e]}),n}function O(e,t){return function e(t){if(t.type===r.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(n=>{e.src=t.url,e.addEventListener("loadeddata",()=>{n({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===r.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===r.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const n=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*n,height:e.height*n}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(b||(b={}))},54:function(e,t,n){e.exports={"name-col":"FeedsList__name-col",nameCol:"FeedsList__name-col","actions-col":"FeedsList__actions-col",actionsCol:"FeedsList__actions-col","actions-cell":"FeedsList__actions-cell",actionsCell:"FeedsList__actions-cell",name:"FeedsList__name layout__text-overflow-ellipsis","meta-list":"FeedsList__meta-list",metaList:"FeedsList__meta-list","meta-info":"FeedsList__meta-info",metaInfo:"FeedsList__meta-info",id:"FeedsList__id FeedsList__meta-info",layout:"FeedsList__layout FeedsList__meta-info","sources-list":"FeedsList__sources-list layout__flex-row",sourcesList:"FeedsList__sources-list layout__flex-row",source:"FeedsList__source layout__text-overflow-ellipsis","no-sources-msg":"FeedsList__no-sources-msg",noSourcesMsg:"FeedsList__no-sources-msg","usages-list":"FeedsList__usages-list layout__flex-column",usagesList:"FeedsList__usages-list layout__flex-column",usage:"FeedsList__usage layout__flex-row layout__text-overflow-ellipsis","usage-link":"FeedsList__usage-link layout__text-overflow-ellipsis",usageLink:"FeedsList__usage-link layout__text-overflow-ellipsis","usage-type":"FeedsList__usage-type",usageType:"FeedsList__usage-type","actions-list":"FeedsList__actions-list",actionsList:"FeedsList__actions-list","usages-cell":"FeedsList__usages-cell",usagesCell:"FeedsList__usages-cell","usages-col":"FeedsList__usages-col",usagesCol:"FeedsList__usages-col","sources-cell":"FeedsList__sources-cell",sourcesCell:"FeedsList__sources-cell","sources-col":"FeedsList__sources-col",sourcesCol:"FeedsList__sources-col"}},559:function(e,t,n){"use strict";n.r(t),n(215);var o=n(31),a=(n(363),n(310)),i=n(1),s=n(48),r=n(0),l=n.n(r),c=n(40),d=n(311),u=n(23),m=n(4),p=n(17);const h=()=>l.a.createElement("div",{className:"admin-loading"},l.a.createElement("div",{className:"admin-loading__perspective"},l.a.createElement("div",{className:"admin-loading__container"},l.a.createElement("img",{src:p.a.image("spotlight-800w.png"),className:"admin-loading__logo",alt:"Spotlight"}))));var g=n(7),f=n(11),b=n(322);const _=Object(m.b)((function({store:e,screensStore:t,toaster:n,titleTemplate:o}){e.load();const a=t=>{var n,o;const a=null!==(o=null!==(n=t.detail.message)&&void 0!==n?n:t.detail.response.data.message)&&void 0!==o?o:null;e.toaster.addToast("feed/fetch_fail",()=>l.a.createElement("div",null,l.a.createElement("p",null,"An error occurred while retrieving the media for this feed. Details:"),a&&l.a.createElement("code",null,a),l.a.createElement("p",null,"If this error persists, kindly"," ",l.a.createElement("a",{href:f.a.resources.supportUrl,target:"_blank"},"contact customer support"),".")),0)};Object(r.useEffect)(()=>(document.addEventListener(g.a.Events.FETCH_FAIL,a),()=>document.removeEventListener(g.a.Events.FETCH_FAIL,a)),[]);const i=l.a.createElement(n);return e.isLoaded?l.a.createElement(c.b,{history:u.a.history},t.screens.map((e,t)=>l.a.createElement(d.a,{key:e.id,when:"screen",is:e.id,isRoot:0===t,render:()=>{const t=()=>l.a.createElement(e.component);return t.displayName=e.title,document.title=o.replace("%s",e.title),l.a.createElement(t)}})),i,l.a.createElement(b.a,null)):l.a.createElement(l.a.Fragment,null,l.a.createElement(h,null),i)}));var v;!function(e){e.NEW_FEED="new",e.EDIT_FEED="edit",e.FEED_LIST="feeds",e.SETTINGS="settings"}(v||(v={}));class E{constructor(e){this.screens=e,this.screens.sort((e,t)=>{var n,o;const a=null!==(n=e.position)&&void 0!==n?n:0,i=null!==(o=t.position)&&void 0!==o?o:0;return Math.sign(a-i)})}get current(){var e;const t=null!==(e=u.a.get("screen"))&&void 0!==e?e:"";return this.screens.find((e,n)=>t===e.id||!t&&0===n)}}var y=n(242),w=n.n(y),O=n(47),S=n(8),k=n(33);const C=Object(i.n)({initialized:!1,list:[]}),N=({navbar:e,className:t,fillPage:n,children:o})=>{const a=l.a.useRef(null);Object(r.useEffect)(()=>{a.current&&(function(){if(!C.initialized){const e=Array.from(document.querySelectorAll(".sli-notice")),t=Array.from(document.querySelectorAll(".fs-notice.fs-slug-spotlight-social-photo-feeds"));C.list=e.concat(t),C.initialized=!0}}(),C.list.forEach(e=>{e.remove(),a.current.appendChild(e)}))},[]);const i=k.a.getExpiringTokenAccounts(),s=Object(S.a)("admin-screen",{"--fillPage":n})+(t?" "+t:"");return l.a.createElement("div",{className:s},e&&l.a.createElement("div",{className:"admin-screen__navbar"},l.a.createElement(e)),l.a.createElement("div",{className:"admin-screen__content"},l.a.createElement("div",{className:"admin-screen__notices",ref:a},i.map(e=>l.a.createElement("div",{key:e.id,className:"notice notice-warning"},l.a.createElement("p",null,"The access token for the ",l.a.createElement("b",null,"@",e.username)," account is about to expire."," ",l.a.createElement("a",{className:"admin-screen__reconnect",onClick:t=>function(e,t){k.a.openAuthWindow(t.type,0,()=>{f.a.restApi.deleteAccountMedia(t.id)}),e.preventDefault()}(t,e)},"Re-connect the account")," ","to keep using it in Spotlight.")))),o))};var L=n(65),P=n(3),T=n(210),A=n.n(T);const x=u.a.at({screen:v.NEW_FEED}),M=()=>{const[e,t]=l.a.useState(!1);return l.a.createElement(L.a,{className:A.a.root,isTransitioning:e},l.a.createElement("div",null,l.a.createElement("h1",null,"Start engaging with your audience"),l.a.createElement(L.a.Thin,null,l.a.createElement("p",null,"Connect with more people by embedding one or more Instagram feeds on this website."),l.a.createElement("p",null,"It only takes 3 steps! Let’s get going!"),l.a.createElement(L.a.StepList,null,l.a.createElement(L.a.Step,{num:1,isDone:P.b.list.length>0},l.a.createElement("span",null,"Connect your Instagram Account")),l.a.createElement(L.a.Step,{num:2},l.a.createElement("span",null,"Design your feed")),l.a.createElement(L.a.Step,{num:3},l.a.createElement("span",null,"Embed it on your site"))))),l.a.createElement("div",{className:A.a.callToAction},l.a.createElement(L.a.HeroButton,{onClick:()=>{t(!0),setTimeout(()=>u.a.history.push(x,{}),L.a.TRANSITION_DURATION)}},P.b.list.length>0?"Design your feed":"Connect your Instagram Account"),l.a.createElement(L.a.HelpMsg,{className:A.a.contactUs},"If you need help at any time,"," ",l.a.createElement("a",{href:f.a.resources.supportUrl,target:"_blank",style:{whiteSpace:"nowrap"}},"contact me here"),".",l.a.createElement("br",null),"- Mark Zahra, Spotlight")))};var I=n(54),B=n.n(I),F=n(9),j=n(6),D=n(196),R=n(120),z=n(26),W=n(27);const U=({toaster:e})=>{const t={cols:{name:B.a.nameCol,sources:B.a.sourcesCol,usages:B.a.usagesCol,actions:B.a.actionsCol},cells:{name:B.a.nameCell,sources:B.a.sourcesCell,usages:B.a.usagesCell,actions:B.a.actionsCell}};return l.a.createElement("div",{className:"feeds-list"},l.a.createElement(R.a,{styleMap:t,cols:[{id:"name",label:"Name",render:e=>{const t=u.a.at({screen:v.EDIT_FEED,id:e.id.toString()});return l.a.createElement("div",null,l.a.createElement(O.a,{to:t,className:B.a.name},e.name?e.name:"(no name)"),l.a.createElement("div",{className:B.a.metaList},l.a.createElement("span",{className:B.a.id},"ID: ",e.id),l.a.createElement("span",{className:B.a.layout},z.a.getName(e.options.layout))))}},{id:"sources",label:"Shows posts from",render:e=>l.a.createElement(G,{feed:e})},{id:"usages",label:"Instances",render:e=>l.a.createElement(H,{feed:e})},{id:"actions",label:"Actions",render:t=>l.a.createElement("div",{className:B.a.actionsList},l.a.createElement(D.a,{feed:t,toaster:e},l.a.createElement(j.a,{type:j.c.SECONDARY,tooltip:"Copy shortcode"},l.a.createElement(F.a,{icon:"editor-code"}))),l.a.createElement(j.a,{type:j.c.DANGER,tooltip:"Delete feed",onClick:()=>(e=>{confirm("Are you sure you want to delete this feed? This cannot be undone.")&&W.a.deleteFeed(e)})(t)},l.a.createElement(F.a,{icon:"trash"})))}],rows:W.a.list}))},G=({feed:e})=>{let t=[];const n=g.a.Options.getSources(e.options);return n.accounts.forEach(e=>{const n=K(e);n&&t.push(n)}),n.tagged.forEach(e=>{const n=K(e,!0);n&&t.push(n)}),n.hashtags.forEach(e=>t.push(l.a.createElement("div",null,"#",e.tag))),0===t.length&&t.push(l.a.createElement("div",{className:B.a.noSourcesMsg},l.a.createElement(F.a,{icon:"warning"}),l.a.createElement("span",null,"Feed has no sources"))),l.a.createElement("div",{className:B.a.sourcesList},t.map((e,t)=>e&&l.a.createElement(q,{key:t},e)))},H=({feed:e})=>l.a.createElement("div",{className:B.a.usagesList},e.usages.map((e,t)=>l.a.createElement("div",{key:t,className:B.a.usage},l.a.createElement("a",{className:B.a.usageLink,href:e.link,target:"_blank"},e.name),l.a.createElement("span",{className:B.a.usageType},"(",e.type,")"))));function K(e,t){return e?l.a.createElement(Y,{account:e,isTagged:t}):null}const Y=({account:e,isTagged:t})=>{const n=t?"tag":e.type===P.a.Type.BUSINESS?"businessman":"admin-users";return l.a.createElement("div",null,l.a.createElement(F.a,{icon:n}),e.username)},q=({children:e})=>l.a.createElement("div",{className:B.a.source},e);var V=Object(m.b)((function({navbar:e,toaster:t}){return l.a.createElement(N,{navbar:e},l.a.createElement("div",{className:w.a.root},W.a.hasFeeds()?l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:w.a.createNewBtn},l.a.createElement(O.a,{to:u.a.at({screen:v.NEW_FEED}),className:"button button-primary button-large"},"Create a new feed")),l.a.createElement(U,{toaster:t})):l.a.createElement(M,null)))})),$=n(324),X=n(339),J=n(325),Q=n.n(J),Z=n(135),ee=n(24),te=n(63),ne=n(18);function oe({when:e,message:t}){return Object(ne.i)(t,e),l.a.createElement(c.a,{when:e,message:t})}const ae="You have unsaved changes. If you leave now, your changes will be lost.";var ie=Object(m.b)((function({navbar:e}){const t=u.a.get("tab"),n=t?f.a.settings.pages.find(e=>t===e.id):f.a.settings.pages[0];return Object(r.useEffect)(()=>()=>{ee.b.isDirty&&u.a.get("screen")!==v.SETTINGS&&ee.b.restore()},[]),l.a.createElement(l.a.Fragment,null,l.a.createElement(N,{navbar:e,className:Q.a.root},n&&l.a.createElement(Z.a,{page:n})),l.a.createElement(c.a,{when:ee.b.isDirty,message:se}),l.a.createElement(oe,{when:ee.b.isDirty,message:ae}))}));function se(e){return Object(te.parse)(e.search).screen===v.SETTINGS||ae}var re=n(154),le=n(327),ce=n.n(le),de=function({url:e,children:t}){return l.a.createElement("a",{className:ce.a.root,href:null!=e?e:f.a.resources.upgradeLocalUrl},null!=t?t:"Upgrade to PRO")},ue=Object(m.b)((function({store:e,right:t,showUpgrade:n,chevron:o,children:a}){n=null!=n?n:null==t;const i=l.a.createElement(re.a.Item,null,e.current.title);return l.a.createElement(re.a,null,l.a.createElement(l.a.Fragment,null,i,o&&l.a.createElement(re.a.Chevron,null),a),t?l.a.createElement(t):n&&l.a.createElement(de,{url:f.a.resources.trialLocalUrl},"Start 14-day PRO trial"))}));class me{constructor(e,t){this.fns=e,this.delay=null!=t?t:1}load(e=null,t){this.numLoaded=0,this.isLoading=!0;const n=()=>{this.numLoaded++,this.numLoaded>=this.fns.length&&setTimeout(()=>{this.isLoading=!1,t&&t()},this.delay)};this.fns.forEach(t=>t(e,n))}}var pe=n(140),he=n(126),ge=n(14),fe=n(197),be=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},_e=W.a.SavedFeed;class ve{constructor(e,t,n){this.isLoaded=!1,this.isGoingFromNewToEdit=!1,this.isPromptingFeedName=!1,this.feed=new _e,this.loader=e,this.toaster=t,this.editorConfig=n,this.isDoingOnboarding=f.a.config.doOnboarding}edit(e){this.isGoingFromNewToEdit||(this.editorConfig.currTab="connect"),this.isGoingFromNewToEdit=!1,this.feed=null,this.feed=new _e(e),this.isEditorDirty=!1}saveFeed(e){const t=null===e.id;return this.isDoingOnboarding=!1,new Promise((n,o)=>{W.a.saveFeed(e).then(e=>{this.toaster.addToast("feed/save/success",Object(s.a)(pe.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,u.a.history.push(u.a.at({screen:v.EDIT_FEED,id:e.id.toString()}),{})),n(e)}).catch(e=>{const t=ge.a.getErrorReason(e);this.toaster.addToast("feed/save/error",Object(s.a)(fe.a,{message:"Failed to save the feed: "+t})),o(t)})})}cancelFeed(){this.isGoingFromNewToEdit=!1,setTimeout(()=>{u.a.history.push(u.a.at({screen:v.FEED_LIST}),{})},10)}saveEditor(e){if(!this.isEditorDirty)return;const t=null===this.feed.id;if(0!==this.feed.name.length||e)return this.isSavingFeed=!0,this.isDoingOnboarding=!1,W.a.saveFeed(this.feed).then(e=>{this.feed=new _e(e),this.isSavingFeed=!1,this.isEditorDirty=!1,this.toaster.addToast("feed/saved",Object(s.a)(pe.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,u.a.history.push(u.a.at({screen:v.EDIT_FEED,id:this.feed.id.toString()}),{}))});this.isPromptingFeedName=!0}cancelEditor(){this.isGoingFromNewToEdit||(this.feed=new _e,this.isEditorDirty=!1,this.isGoingFromNewToEdit=!1)}closeEditor(){this.cancelEditor(),setTimeout(()=>{u.a.history.push(u.a.at({screen:v.FEED_LIST}),{})},10)}onEditorChange(e){e&&_e.setFromObject(this.feed,e),this.isEditorDirty=!0}load(){this.isLoaded||this.loader.load(null,()=>{this.isLoaded=!0,he.a.fetch()})}}be([i.n],ve.prototype,"isLoaded",void 0),be([i.n],ve.prototype,"feed",void 0),be([i.n],ve.prototype,"isSavingFeed",void 0),be([i.n],ve.prototype,"isEditorDirty",void 0),be([i.n],ve.prototype,"editorConfig",void 0),be([i.n],ve.prototype,"isDoingOnboarding",void 0),be([i.n],ve.prototype,"isGoingFromNewToEdit",void 0),be([i.n],ve.prototype,"isPromptingFeedName",void 0),be([i.f],ve.prototype,"edit",null),be([i.f],ve.prototype,"saveEditor",null),be([i.f],ve.prototype,"cancelEditor",null),be([i.f],ve.prototype,"closeEditor",null),be([i.f],ve.prototype,"onEditorChange",null),be([i.f],ve.prototype,"load",null);var Ee=n(211),ye=n.n(Ee),we=n(150),Oe=Object(m.b)((function({store:e}){const t=u.a.get("tab");return l.a.createElement(ue,{store:e,chevron:!0,showUpgrade:!1,right:Se},f.a.settings.pages.map((e,n)=>l.a.createElement(re.a.Link,{key:e.id,linkTo:u.a.with({tab:e.id}),isCurrent:t===e.id||!t&&0===n},e.title)))}));const Se=Object(m.b)((function({}){const e=!ee.b.isDirty;return l.a.createElement("div",{className:ye.a.buttons},l.a.createElement(j.a,{className:ye.a.cancelBtn,type:j.c.DANGER_PILL,size:j.b.LARGE,onClick:()=>ee.b.restore(),disabled:e},"Cancel"),l.a.createElement(we.a,{className:ye.a.saveBtn,onClick:()=>ee.b.save(),isSaving:ee.b.isSaving,tooltip:"Save the settings (Ctrl+S)",disabled:e}))}));var ke=n(176),Ce=n.n(ke),Ne=n(5),Le=n(39);function Pe({}){const e=l.a.useRef(),t=l.a.useRef([]),[n,o]=l.a.useState(0),[a,i]=l.a.useState(!1),[,s]=l.a.useState(),c=()=>{const n=function(e){const t=.4*e.width,n=t/724,o=707*n,a=22*n,i=35*n;return{bounds:e,origin:{x:(e.width-t)/2+o-i/2,y:.5*e.height+a-i/2},scale:n,particleSize:i}}(e.current.getBoundingClientRect());t.current=t.current.map(e=>{const t=e.didSike?1:Math.max(1,1.3-1.3*Math.min(1,e.life/100));return Object.assign(Object.assign({},e),{pos:{x:e.pos.x+e.vel.x*t,y:e.pos.y+e.vel.y*t},life:e.life+1})}).filter(e=>e.life<500&&e.pos.x>=0&&e.pos.y>=0&&e.pos.x+e.size<=n.bounds.width&&e.pos.y+e.size<=n.bounds.height),t.current.length<30&&10*Math.random()>7&&t.current.push((e=>{const t=Math.max(1,4*Math.random()),n=2*Math.random()*Math.PI,o={x:Math.sin(n)*t,y:Math.cos(n)*t};return{pos:Object.assign({},e.origin),vel:o,size:e.particleSize,life:1}})(n)),s(Ne.o)};Object(r.useEffect)(()=>{const e=setInterval(c,25);return()=>clearInterval(e)},[]);const d=function(e){let t=null;return Te.forEach(([n,o])=>{e>=n&&(t=o)}),t}(n);return l.a.createElement("div",{className:Ce.a.root},l.a.createElement("h1",{style:{textAlign:"center"}},"Let's play!"),l.a.createElement("p",null,"Click on as many Spotlight dots as you can. We challenge you to ",l.a.createElement("strong",null,"hit ",100),"!"),l.a.createElement("br",null),l.a.createElement("div",{ref:e,style:Ae.container},n>0&&l.a.createElement("div",{className:Ce.a.score},l.a.createElement("strong",null,"Score"),": ",l.a.createElement("span",null,n)),d&&l.a.createElement("div",{className:Ce.a.message},l.a.createElement("span",{className:Ce.a.messageBubble},d)),t.current.map((e,a)=>l.a.createElement("div",{key:a,onMouseDown:()=>(e=>{const a=t.current[e].didSike?5:1;t.current.splice(e,1),o(n+a)})(a),onMouseEnter:()=>(e=>{const n=t.current[e];if(n.didSike)return;const o=1e3*Math.random();o>100&&o<150&&(n.vel={x:5*Math.sign(-n.vel.x),y:5*Math.sign(-n.vel.y)},n.life=100,n.didSike=!0)})(a),style:Object.assign(Object.assign({},Ae.particle),{top:e.pos.y,left:e.pos.x,width:e.size,height:e.size,backgroundColor:e.didSike?"#ffaa00":"#"+(14492491+65536*e.life+256*e.life+e.life).toString(16)})},e.didSike&&l.a.createElement("span",{style:Ae.sike},"x",5)))),l.a.createElement(Le.a,{title:"Get 20% off Spotlight PRO",isOpen:n>=100&&!a,onClose:()=>i(!0),allowShadeClose:!1},l.a.createElement(Le.a.Content,null,l.a.createElement("div",{style:{textAlign:"center"}},l.a.createElement("p",{style:{display:"inline-block",width:"70%",marginTop:10}},l.a.createElement("strong",{style:{opacity:.7}},"You were just clicking the dot in the logo, weren't you?",l.a.createElement("br",null),"It doesn't matter. You made it a 100!")),l.a.createElement("h1",null,"Get 20% off Spotlight PRO"),l.a.createElement("p",{style:{display:"inline-block",width:"60%"}},"Open up to new opportunities with hashtag feeds, filtering options, visual moderation,"," ","tagged feeds, new layouts, promotions and much more."),l.a.createElement("div",{style:{margin:"10px 0"}},l.a.createElement("a",{href:f.a.resources.upgradeUrl,target:"_blank",style:{width:"100%"}},l.a.createElement(j.a,{type:j.c.PRIMARY,size:j.b.HERO,style:{width:"80%"}},"Get 20% off Spotlight PRO")))))))}const Te=[[10,l.a.createElement("span",null,"You're getting the hang of this!")],[50,l.a.createElement("span",null,"Not bad. You're half way to a 100!")],[120,l.a.createElement("span",null,"Just post a 5-star review already. You're clearly in love with us!")],[150,l.a.createElement("span",null,"Hey, we'd be curious if there were more messages too. But sadly, this is the last one. Good-bye!")],[500,l.a.createElement("span",null,"Error: User has become obsessed with clicking games.")],[1e3,l.a.createElement("span",null,"While the term Easter egg has been used to mean a hidden object for some time, in reference to an Easter egg hunt, it has come to be more commonly used to mean a message, image, or feature hidden in a video game, film, or other, usually electronic, medium. The term used in this manner was coined around 1979 by Steve Wright, the then Director of Software Development in the Atari Consumer Division, to describe a hidden message in the Atari video game Adventure. [Wikipedia]")]],Ae={container:{flex:1,position:"relative",backgroundColor:"#fff",backgroundImage:`url('${p.a.image("spotlight-800w.png")}')`,backgroundPosition:"center 50%",backgroundSize:"40%",backgroundRepeat:"no-repeat",borderRadius:8,marginTop:15,userSelect:"none"},particle:{position:"absolute",backgroundColor:"#dd234b",borderRadius:999,cursor:"pointer",color:"#000",userSelect:"none"},sike:{position:"relative",left:"calc(100% + 5px)",fontSize:"16px",userSelect:"none"}};var xe=n(148),Me=n(153),Ie=n(179),Be=n.n(Ie),Fe=Object(m.b)((function({}){return l.a.createElement("div",{className:Be.a.root})}));Object(m.b)((function({className:e,label:t,children:n}){const o="settings-field-"+Object(Ne.o)();return l.a.createElement("div",{className:Object(S.b)(Be.a.fieldContainer,e)},l.a.createElement("div",{className:Be.a.fieldLabel},l.a.createElement("label",{htmlFor:o},t)),l.a.createElement("div",{className:Be.a.fieldControl},n(o)))}));var je=n(245),De=n.n(je),Re=n(83);function ze({isOpen:e,onAccept:t,onCancel:n}){const[o,a]=l.a.useState("");function i(){t&&t(o)}return l.a.createElement(Re.a,{title:"Feed name",isOpen:e,onCancel:function(){n&&n()},onAccept:i,buttons:["Save","Cancel"]},l.a.createElement("p",{className:De.a.message},"Give this feed a memorable name:"),l.a.createElement("input",{type:"text",className:De.a.input,value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(i(),e.preventDefault(),e.stopPropagation())},autoFocus:!0}))}var We=n(332),Ue=n(145),Ge=n.n(Ue),He=n(71);function Ke({feed:e,onDone:t}){const n=l.a.useRef(),[o,a]=l.a.useState(""),[i,s]=l.a.useState(!1),r=()=>{a(e.name),s(!0)},c=()=>{s(!1),t&&t(o),n.current&&n.current.focus()},d=e=>{switch(e.key){case"Enter":case" ":r()}};return l.a.createElement("div",{className:Ge.a.root},l.a.createElement(He.a,{isOpen:i,onBlur:()=>s(!1),placement:"bottom"},({ref:t})=>l.a.createElement("div",{ref:Object(S.d)(t,n),className:Ge.a.staticContainer,onClick:r,onKeyPress:d,tabIndex:0,role:"button"},l.a.createElement("span",{className:Ge.a.label},e.label),l.a.createElement(F.a,{icon:"edit",className:Ge.a.editIcon})),l.a.createElement(He.b,null,l.a.createElement(He.d,null,l.a.createElement("div",{className:Ge.a.editContainer},l.a.createElement("input",{type:"text",value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{switch(e.key){case"Enter":c();break;case"Escape":s(!1);break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:!0,placeholder:"Feed name"}),l.a.createElement(j.a,{className:Ge.a.doneBtn,type:j.c.PRIMARY,size:j.b.NORMAL,onClick:c},l.a.createElement(F.a,{icon:"yes"})))))))}var Ye=W.a.SavedFeed;function qe({children:e,store:t,feed:n,onSave:o,onCancel:a}){const[i,s,c]=Object(ne.e)(new Ye(n)),[d,u]=l.a.useState(!1),[m,p]=l.a.useState(!1),[h,g]=l.a.useState(!1),f=()=>{if(!d)return;const e=s();if(m||0!==e.name.length){p(!1),g(!0);const n=null===t.feed.id;t.saveFeed(e).then(()=>{o&&o(e),n||(g(!1),u(!1))})}else p(!0)},b=()=>{d&&!confirm("You have unsaved changes. If you leave now, your changes will be lost.")||(u(!1),a&&a(),t.cancelFeed())},_=e=>{if(i.name!==e){const t=new Ye(i);t.name=null!=e?e:"",c(t),u(!0)}},v=l.a.useCallback(e=>{const t=new Ye(i);t.options=Object.assign(Object.assign({},i.options),e),c(t),u(!0)},[]);Object(r.useEffect)(()=>{c(new Ye(n))},[n]),Object(ne.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(f(),e.preventDefault(),e.stopPropagation())},[],[d]);const E=l.a.useMemo(()=>()=>({saveBtn:l.a.createElement(we.a,{key:"admin-editor-save",onClick:f,disabled:!d,isSaving:h}),cancelBtn:l.a.createElement(j.a,{key:"admin-editor-cancel",type:j.c.DANGER_LINK,onClick:b,disabled:!d},"Cancel"),nameField:l.a.createElement(Ke,{key:"admin-editor-feed-name",feed:i,onDone:_})}),[d,h,i,f,b,_]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(We.a,{feedOptions:i.options,config:t.editorConfig,onChange:v},E),e,l.a.createElement(ze,{isOpen:m,onAccept:e=>{_(e),f()},onCancel:()=>{p(!1)}}),l.a.createElement(oe,{when:d&&!h,message:"You have unsaved changes. If you leave now, your changes will be lost."}))}var Ve=W.a.SavedFeed;function $e({store:e}){return e.edit(new Ve),e.editorConfig.currTab="connect",l.a.createElement(qe,{feed:e.feed,store:e})}var Xe=n(22);function Je({store:e}){const t=Ze(),n=W.a.getById(t);return t&&n?(e.feed.id!==t&&e.edit(n),l.a.createElement(qe,{store:e,feed:e.feed})):l.a.createElement(Qe,null)}const Qe=()=>l.a.createElement("div",null,l.a.createElement(Xe.a,{type:Xe.b.ERROR,showIcon:!0},"Feed does not exist.",l.a.createElement(O.a,{to:u.a.with({screen:"feeds"})},"Go back"))),Ze=()=>{let e=u.a.get("id");return e?(e=Array.isArray(e)?e[0]:e,parseInt(e)):null};var et=n(336);const tt={factories:Object(o.c)({"admin/root/component":e=>Object(s.a)(_,{store:e.get("admin/store"),screensStore:e.get("admin/screens/store"),toaster:e.get("admin/toaster/component"),titleTemplate:e.get("admin/title_template")}),"admin/title_template":()=>document.title.replace("Spotlight","%s ‹ Spotlight"),"admin/store":e=>new ve(e.get("admin/loading/loader"),e.get("admin/toaster/store"),e.get("admin/editor/config")),"admin/loading/loader":e=>new me(e.get("admin/loading/functions"),750),"admin/loading/functions":e=>{const t=e.get("admin/toaster/store"),n=e=>n=>{t.addToast("load_error",Object(s.a)(fe.a,{message:n}),0),e()};return[(e,t)=>W.a.loadFeeds().then(t).catch(n(t)),(e,t)=>P.b.loadAccounts().then(t).catch(n(t)),(e,t)=>ee.b.load().then(t).catch(n(t))]},"admin/navbar/component":e=>Object(s.b)(ue,{store:()=>e.get("admin/screens/store"),showUpgrade:()=>!f.a.config.isPro}),"admin/settings/navbar/component":e=>Object(s.b)(Oe,{store:()=>e.get("admin/screens/store")}),"admin/screens/store":e=>new E(e.get("admin/screens")),"admin/screens":e=>[e.get("admin/feeds/screen"),e.get("admin/editor/add_new/screen"),e.get("admin/editor/edit/screen"),e.get("admin/settings/screen")],"admin/feeds/screen":e=>({id:"feeds",title:"Feeds",position:0,component:Object(s.a)(V,{navbar:e.get("admin/navbar/component"),toaster:e.get("admin/toaster/store")})}),"admin/editor/add_new/screen":e=>({id:"new",title:"Add New",position:10,component:Object(s.a)($e,{store:e.get("admin/store")})}),"admin/editor/edit/screen":e=>({id:"edit",title:"Edit",isHidden:()=>!0,component:Object(s.a)(Je,{store:e.get("admin/store")})}),"admin/editor/config":e=>{const t=Object.assign({},f.a.editor.config);return t.tabs=e.get("admin/editor/tabs"),t},"admin/editor/tabs":e=>{const t=e.get("admin/editor/tabs/extender")(f.a.editor.config.tabs);return t.push(e.get("admin/editor/tabs/embed")),t},"admin/editor/tabs/extender":()=>Me.b,"admin/editor/tabs/embed":e=>({key:"embed",label:"Embed",sidebar:Object(s.b)(et.a,{store:()=>e.get("admin/store")})}),"admin/settings/screen":e=>({id:"settings",title:"Settings",position:50,component:e.get("admin/settings/component")}),"admin/settings/component":e=>Object(s.a)(ie,{navbar:e.get("admin/settings/navbar/component")}),"admin/settings/tabs/accounts":()=>({id:"accounts",label:"Manage Accounts",component:xe.a}),"admin/settings/tabs/crons":()=>({id:"crons",label:"Crons",component:Object(s.b)(Z.a,{page:()=>f.a.settings.pages.find(e=>"crons"===e.id)})}),"admin/settings/tabs/advanced":e=>({id:"advanced",label:"Advanced",component:e.get("admin/settings/show_game")?e.get("admin/settings/game/component"):e.get("admin/settings/advanced/component")}),"admin/settings/show_game":()=>!0,"admin/settings/advanced/component":e=>Fe,"admin/settings/game/component":()=>Pe,"admin/toaster/store":e=>new $.a(e.get("admin/toaster/ttl")),"admin/toaster/ttl":()=>5e3,"admin/toaster/component":e=>Object(s.a)(X.a,{store:e.get("admin/toaster/store")})}),extensions:Object(o.c)({"root/children":(e,t)=>[...t,e.get("admin/root/component")],"settings/tabs":(e,t)=>[e.get("admin/settings/tabs/accounts"),e.get("admin/settings/tabs/advanced"),...t]}),run:e=>{const t=e.get("admin/toaster/store");document.addEventListener(ee.a,()=>{t.addToast("sli/settings/saved",Object(s.a)(pe.a,{message:"Settings saved."}))});{const t=e.get("admin/screens/store"),n=document.getElementById("toplevel_page_spotlight-instagram").querySelector("ul.wp-submenu").querySelectorAll("li:not(.wp-submenu-head)"),o=Array.from(n);t.screens.forEach((e,t)=>{const n=0===t,a=e.state||{},s=u.a.fullUrl(Object.assign({screen:e.id},a)),r=u.a.at(Object.assign({screen:e.id},a)),l=o.find(e=>e.querySelector("a").href===s);l&&(l.addEventListener("click",e=>{u.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()}),Object(i.g)(()=>{var t;const o=null!==(t=u.a.get("screen"))&&void 0!==t?t:"",a=e.id===o||!o&&n;l.classList.toggle("current",a)}))})}}},nt=document.getElementById(f.a.config.rootId);if(nt){const e=[a.a,tt].filter(e=>null!==e);nt.classList.add("wp-core-ui-override"),new o.a("admin",nt,e).run()}},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(0),a=n.n(o),i=n(91),s=n.n(i);function r(){return a.a.createElement("div",{className:s.a.root})}},57:function(e,t,n){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},66:function(e,t,n){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},68:function(e,t,n){"use strict";var o=n(0),a=n.n(o),i=n(92),s=n.n(i),r=n(3),l=n(8),c=n(4);t.a=Object(c.b)((function(e){var{account:t,square:n,className:o}=e,i=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["account","square","className"]);const c=r.b.getProfilePicUrl(t),d=Object(l.b)(n?s.a.square:s.a.round,o);return a.a.createElement("img",Object.assign({},i,{className:d,src:r.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}))},69:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(118),s=n.n(i),r=n(11),l=n(8);const c=({className:e,children:t})=>a.a.createElement("a",{className:Object(l.b)(s.a.pill,e),href:r.a.resources.upgradeLocalUrl,target:"_blank",tabIndex:-1},"PRO",t)},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var o=n(37),a=n.n(o),i=n(1),s=n(2),r=n(26),l=n(31),c=n(3),d=n(5),u=n(12),m=n(14),p=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class h{constructor(e=new h.Options,t=s.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=s.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new h.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let n;return()=>{clearTimeout(n),n=setTimeout(()=>{n=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=s.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=s.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,n){return this.cancelFetch(),h.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((o,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};n&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,o&&o()}).catch(e=>{var t;if(a.a.isCancel(e))return null;const n=new h.Events.FetchFailEvent(h.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(n),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}p([i.n],h.prototype,"media",void 0),p([i.n],h.prototype,"canLoadMore",void 0),p([i.n],h.prototype,"stories",void 0),p([i.n],h.prototype,"numLoadedMore",void 0),p([i.n],h.prototype,"options",void 0),p([i.n],h.prototype,"totalMedia",void 0),p([i.n],h.prototype,"mode",void 0),p([i.n],h.prototype,"isLoaded",void 0),p([i.n],h.prototype,"isLoading",void 0),p([i.n],h.prototype,"isLoadingMore",void 0),p([i.f],h.prototype,"reload",void 0),p([i.n],h.prototype,"localMedia",void 0),p([i.n],h.prototype,"numMediaToShow",void 0),p([i.n],h.prototype,"numMediaPerPage",void 0),p([i.n],h.prototype,"mediaCounter",void 0),p([i.h],h.prototype,"_media",null),p([i.h],h.prototype,"_numMediaToShow",null),p([i.h],h.prototype,"_numMediaPerPage",null),p([i.h],h.prototype,"_canLoadMore",null),p([i.f],h.prototype,"loadMore",null),p([i.f],h.prototype,"load",null),p([i.f],h.prototype,"loadMedia",null),function(e){let t,n,o,a,m,h,g,f,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class _{constructor(e={}){_.setFromObject(this,e)}static setFromObject(t,n={}){var o,a,i,l,d,u,m,p,h,g,f,b;return t.accounts=n.accounts?n.accounts.slice():e.DefaultOptions.accounts,t.hashtags=n.hashtags?n.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=n.tagged?n.tagged.slice():e.DefaultOptions.tagged,t.layout=r.a.getById(n.layout).id,t.numColumns=s.a.normalize(n.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=s.a.normalize(n.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=n.mediaType||e.DefaultOptions.mediaType,t.postOrder=n.postOrder||e.DefaultOptions.postOrder,t.numPosts=s.a.normalize(n.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=s.a.normalize(n.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=s.a.normalize(n.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=s.a.normalize(n.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=s.a.normalize(n.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=s.a.normalize(n.imgPadding,e.DefaultOptions.imgPadding),t.textSize=s.a.normalize(n.textSize,e.DefaultOptions.textSize),t.bgColor=n.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=n.hoverInfo?n.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=n.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=n.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=s.a.normalize(n.showHeader,e.DefaultOptions.showHeader),t.headerInfo=s.a.normalize(n.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(o=n.headerAccount)&&void 0!==o?o:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===c.b.getById(t.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:t.headerAccount,t.headerStyle=s.a.normalize(n.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=s.a.normalize(n.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=s.a.normalize(n.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=n.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=n.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=s.a.normalize(n.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(a=n.customProfilePic)&&void 0!==a?a:e.DefaultOptions.customProfilePic,t.customBioText=n.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=n.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=n.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=s.a.normalize(n.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=s.a.normalize(n.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(l=n.captionRemoveDots)&&void 0!==l?l:e.DefaultOptions.captionRemoveDots,t.captionSize=s.a.normalize(n.captionSize,e.DefaultOptions.captionSize),t.captionColor=n.captionColor||e.DefaultOptions.captionColor,t.showLikes=s.a.normalize(n.showLikes,e.DefaultOptions.showLikes),t.showComments=s.a.normalize(n.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=s.a.normalize(n.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(d=n.likesIconColor)&&void 0!==d?d:e.DefaultOptions.likesIconColor,t.commentsIconColor=n.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(u=n.lightboxShowSidebar)&&void 0!==u?u:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=n.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=s.a.normalize(n.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=n.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=n.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=n.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=n.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=s.a.normalize(n.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(p=n.followBtnText)&&void 0!==p?p:e.DefaultOptions.followBtnText,t.followBtnTextColor=n.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=n.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=s.a.normalize(n.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=n.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=n.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=n.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=n.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(h=n.hashtagWhitelistSettings)&&void 0!==h?h:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(g=n.hashtagBlacklistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(f=n.captionWhitelistSettings)&&void 0!==f?f:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=n.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=n.moderation||e.DefaultOptions.moderation,t.moderationMode=n.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=n.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=n.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=c.b.idsToAccounts(e.accounts),n=c.b.idsToAccounts(e.tagged);return{all:t.concat(n),accounts:t,tagged:n}}static getSources(e){return{accounts:c.b.idsToAccounts(e.accounts),tagged:c.b.idsToAccounts(e.tagged),hashtags:c.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,n){const o=e.Options.getSources(t),a=o.accounts.length>0||o.tagged.length>0,i=!n&&o.hashtags.length>0;return a||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}p([i.n],_.prototype,"accounts",void 0),p([i.n],_.prototype,"hashtags",void 0),p([i.n],_.prototype,"tagged",void 0),p([i.n],_.prototype,"layout",void 0),p([i.n],_.prototype,"numColumns",void 0),p([i.n],_.prototype,"highlightFreq",void 0),p([i.n],_.prototype,"mediaType",void 0),p([i.n],_.prototype,"postOrder",void 0),p([i.n],_.prototype,"numPosts",void 0),p([i.n],_.prototype,"linkBehavior",void 0),p([i.n],_.prototype,"feedWidth",void 0),p([i.n],_.prototype,"feedHeight",void 0),p([i.n],_.prototype,"feedPadding",void 0),p([i.n],_.prototype,"imgPadding",void 0),p([i.n],_.prototype,"textSize",void 0),p([i.n],_.prototype,"bgColor",void 0),p([i.n],_.prototype,"textColorHover",void 0),p([i.n],_.prototype,"bgColorHover",void 0),p([i.n],_.prototype,"hoverInfo",void 0),p([i.n],_.prototype,"showHeader",void 0),p([i.n],_.prototype,"headerInfo",void 0),p([i.n],_.prototype,"headerAccount",void 0),p([i.n],_.prototype,"headerStyle",void 0),p([i.n],_.prototype,"headerTextSize",void 0),p([i.n],_.prototype,"headerPhotoSize",void 0),p([i.n],_.prototype,"headerTextColor",void 0),p([i.n],_.prototype,"headerBgColor",void 0),p([i.n],_.prototype,"headerPadding",void 0),p([i.n],_.prototype,"customBioText",void 0),p([i.n],_.prototype,"customProfilePic",void 0),p([i.n],_.prototype,"includeStories",void 0),p([i.n],_.prototype,"storiesInterval",void 0),p([i.n],_.prototype,"showCaptions",void 0),p([i.n],_.prototype,"captionMaxLength",void 0),p([i.n],_.prototype,"captionRemoveDots",void 0),p([i.n],_.prototype,"captionSize",void 0),p([i.n],_.prototype,"captionColor",void 0),p([i.n],_.prototype,"showLikes",void 0),p([i.n],_.prototype,"showComments",void 0),p([i.n],_.prototype,"lcIconSize",void 0),p([i.n],_.prototype,"likesIconColor",void 0),p([i.n],_.prototype,"commentsIconColor",void 0),p([i.n],_.prototype,"lightboxShowSidebar",void 0),p([i.n],_.prototype,"numLightboxComments",void 0),p([i.n],_.prototype,"showLoadMoreBtn",void 0),p([i.n],_.prototype,"loadMoreBtnText",void 0),p([i.n],_.prototype,"loadMoreBtnTextColor",void 0),p([i.n],_.prototype,"loadMoreBtnBgColor",void 0),p([i.n],_.prototype,"autoload",void 0),p([i.n],_.prototype,"showFollowBtn",void 0),p([i.n],_.prototype,"followBtnText",void 0),p([i.n],_.prototype,"followBtnTextColor",void 0),p([i.n],_.prototype,"followBtnBgColor",void 0),p([i.n],_.prototype,"followBtnLocation",void 0),p([i.n],_.prototype,"hashtagWhitelist",void 0),p([i.n],_.prototype,"hashtagBlacklist",void 0),p([i.n],_.prototype,"captionWhitelist",void 0),p([i.n],_.prototype,"captionBlacklist",void 0),p([i.n],_.prototype,"hashtagWhitelistSettings",void 0),p([i.n],_.prototype,"hashtagBlacklistSettings",void 0),p([i.n],_.prototype,"captionWhitelistSettings",void 0),p([i.n],_.prototype,"captionBlacklistSettings",void 0),p([i.n],_.prototype,"moderation",void 0),p([i.n],_.prototype,"moderationMode",void 0),p([i.n],_.prototype,"promotionEnabled",void 0),e.Options=_;class v{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.k)(Object(d.n)(t,this.captionMaxLength)):t}static compute(t){const n=t.options,o=t.mode,a=new v({accounts:c.b.filterExisting(n.accounts),tagged:c.b.filterExisting(n.tagged),hashtags:n.hashtags.filter(e=>e.tag.length>0),layout:r.a.getById(n.layout),numColumns:s.a.get(n.numColumns,o,!0),highlightFreq:s.a.get(n.highlightFreq,o,!0),numPosts:s.a.get(n.numPosts,o,!0),linkBehavior:s.a.get(n.linkBehavior,o,!0),bgColor:Object(u.a)(n.bgColor),textColorHover:Object(u.a)(n.textColorHover),bgColorHover:Object(u.a)(n.bgColorHover),hoverInfo:n.hoverInfo,showHeader:s.a.get(n.showHeader,o,!0),headerInfo:s.a.get(n.headerInfo,o,!0),headerStyle:s.a.get(n.headerStyle,o,!0),headerTextColor:Object(u.a)(n.headerTextColor),headerBgColor:Object(u.a)(n.headerBgColor),headerPadding:s.a.get(n.headerPadding,o,!0),includeStories:n.includeStories,storiesInterval:n.storiesInterval,showCaptions:s.a.get(n.showCaptions,o,!0),captionMaxLength:s.a.get(n.captionMaxLength,o,!0),captionRemoveDots:n.captionRemoveDots,captionColor:Object(u.a)(n.captionColor),showLikes:s.a.get(n.showLikes,o,!0),showComments:s.a.get(n.showComments,o,!0),likesIconColor:Object(u.a)(n.likesIconColor),commentsIconColor:Object(u.a)(n.commentsIconColor),lightboxShowSidebar:n.lightboxShowSidebar,numLightboxComments:n.numLightboxComments,showLoadMoreBtn:s.a.get(n.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(u.a)(n.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(n.loadMoreBtnBgColor),loadMoreBtnText:n.loadMoreBtnText,showFollowBtn:s.a.get(n.showFollowBtn,o,!0),autoload:n.autoload,followBtnLocation:s.a.get(n.followBtnLocation,o,!0),followBtnTextColor:Object(u.a)(n.followBtnTextColor),followBtnBgColor:Object(u.a)(n.followBtnBgColor),followBtnText:n.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=Math.max(a.numColumns,1),t.mode!==s.a.Mode.DESKTOP&&(a.numColumns=a.numColumns<1?s.a.get(n.numColumns,s.a.Mode.DESKTOP):a.numColumns),a.numPosts=parseInt(a.numPosts+""),(a.numPosts<1||isNaN(a.numPosts))&&(a.numPosts=1),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=n.headerAccount&&a.allAccounts.includes(n.headerAccount)?c.b.getById(n.headerAccount):c.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=n.customProfilePic.length?n.customProfilePic:c.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showLoadMoreBtn=a.showLoadMoreBtn&&t.canLoadMore,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=n.customBioText.trim().length>0?n.customBioText:null!==a.account?c.b.getBioText(a.account):"";a.bioText=Object(d.k)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(n.feedWidth,o,"auto"),a.feedHeight=this.normalizeCssSize(n.feedHeight,o,"auto"),a.feedPadding=this.normalizeCssSize(n.feedPadding,o,"0"),a.imgPadding=this.normalizeCssSize(n.imgPadding,o,"0"),a.textSize=this.normalizeCssSize(n.textSize,o,"inherit"),a.headerTextSize=this.normalizeCssSize(n.headerTextSize,o,"inherit"),a.headerPhotoSize=this.normalizeCssSize(n.headerPhotoSize,o,"50px"),a.captionSize=this.normalizeCssSize(n.captionSize,o,"inherit"),a.lcIconSize=this.normalizeCssSize(n.lcIconSize,o,"inherit"),a.buttonPadding=Math.max(10,s.a.get(n.imgPadding,o))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static normalizeCssSize(e,t,n=null){const o=s.a.get(e,t);return o?o+"px":n}}e.ComputedOptions=v,e.HashtagSorting=Object(l.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(n=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(o=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(a=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(m=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(h=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(g=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(f=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:n.ALL,postOrder:a.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:o.LIGHTBOX,phone:o.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[m.LIKES_COMMENTS,m.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[g.PROFILE_PIC,g.BIO]},headerAccount:null,headerStyle:{desktop:h.NORMAL,phone:h.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:f.HEADER,phone:f.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(h||(h={}))},76:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return l}));var o=n(7),a=n(14),i=n(5);class s{constructor(e=!1,t=!1){this.incModeration=!1,this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.incModeration=e,this.incFilters=t}fetchMedia(e,t){if(null!==this.prevOptions&&!this.isCacheInvalid(e))return Promise.resolve(this.media);const n=Object.assign({},e.options,{moderation:this.incModeration?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.incFilters?e.options.hashtagBlacklist:[],hashtagWhitelist:this.incFilters?e.options.hashtagWhitelist:[],captionBlacklist:this.incFilters?e.options.captionBlacklist:[],captionWhitelist:this.incFilters?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.incFilters&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.incFilters&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.incFilters&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.incFilters&&e.options.captionWhitelistSettings});return t&&t(),a.a.getFeedMedia(n).then(t=>(this.prevOptions=new o.a.Options(e.options),this.media=t.data.media,this.media))}isCacheInvalid(e){const t=e.options,n=this.prevOptions;if(Object(i.e)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(!Object(i.c)(t.accounts,n.accounts))return!0;if(!Object(i.c)(t.tagged,n.tagged))return!0;if(!Object(i.c)(t.hashtags,n.hashtags,i.i))return!0;if(this.incModeration){if(t.moderationMode!==n.moderationMode)return!0;if(!Object(i.c)(t.moderation,n.moderation))return!0}if(this.incFilters){if(t.captionWhitelistSettings!==n.captionWhitelistSettings||t.captionBlacklistSettings!==n.captionBlacklistSettings||t.hashtagWhitelistSettings!==n.hashtagWhitelistSettings||t.hashtagBlacklistSettings!==n.hashtagBlacklistSettings)return!0;if(!Object(i.c)(t.captionWhitelist,n.captionWhitelist))return!0;if(!Object(i.c)(t.captionBlacklist,n.captionBlacklist))return!0;if(!Object(i.c)(t.hashtagWhitelist,n.hashtagWhitelist))return!0;if(!Object(i.c)(t.hashtagBlacklist,n.hashtagBlacklist))return!0}return!1}}const r=new s(!0,!0),l=new s(!1,!0)},8:function(e,t,n){"use strict";function o(...e){return e.filter(e=>!!e).join(" ")}function a(e){return o(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let n=Object.getOwnPropertyNames(t).map(n=>t[n]?e+n:null);return e+" "+n.filter(e=>!!e).join(" ")}function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return s}))},86:function(e,t,n){e.exports={root:"GenericNavbar__root",list:"GenericNavbar__list","left-list":"GenericNavbar__left-list GenericNavbar__list",leftList:"GenericNavbar__left-list GenericNavbar__list",item:"GenericNavbar__item","center-list":"GenericNavbar__center-list GenericNavbar__list",centerList:"GenericNavbar__center-list GenericNavbar__list","right-list":"GenericNavbar__right-list GenericNavbar__list",rightList:"GenericNavbar__right-list GenericNavbar__list","path-list":"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",pathList:"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",logo:"GenericNavbar__logo","path-segment":"GenericNavbar__path-segment",pathSegment:"GenericNavbar__path-segment",separator:"GenericNavbar__separator GenericNavbar__item"}},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n.n(o),i=n(8);const s=e=>{var{icon:t,className:n}=e,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["icon","className"]);return a.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,n)},o))}},90:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n(0),a=n.n(o),i=n(57),s=n.n(i),r=n(13),l=n(5),c=n(56),d=n(8);function u(e){var{media:t,className:n}=e,i=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["media","className"]);const u=a.a.useRef(),[m,p]=a.a.useState(0),[h,g]=a.a.useState(!0);if(Object(o.useEffect)(()=>{u.current&&p(u.current.getBoundingClientRect().width)},[]),t.url&&t.url.length>0){const e=t.type===r.a.Type.ALBUM&&t.children.length>0?t.children[0]:t,o=Object(l.g)(e.permalink),m=Object(l.f)(o,l.a.SMALL),p=Object(l.f)(o,l.a.MEDIUM),f=Object(l.f)(o,l.a.LARGE);return a.a.createElement("div",Object.assign({className:Object(d.b)(s.a.root,n)},i),a.a.createElement("img",{ref:u,className:s.a.image,src:p,srcSet:`${m} 150w, ${p} 320w, ${f} 600w, ${t.url} 1000w`,onLoad:function(){g(!1)},loading:"lazy",alt:t.caption}),h&&a.a.createElement(c.a,null))}return a.a.createElement("div",{className:s.a.notAvailable},a.a.createElement("span",null,"Thumbnail not available"))}},91:function(e,t,n){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},92:function(e,t,n){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},93:function(e,t,n){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}},97:function(e,t,n){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}}},[[559,0,1,2,3]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[4],{0:function(t,n){t.exports=e},10:function(e,t,n){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},102:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var o=n(0),a=n.n(o),i=n(39),s=n(10),r=n.n(s),l=n(4),c=n(3),d=n(567),u=n(565),m=n(44),p=n(121),h=n(109),g=n(33),f=n(6),b=n(22),_=n(11),v=n(68),E=Object(l.b)((function({account:e,onUpdate:t}){const[n,o]=a.a.useState(!1),[i,s]=a.a.useState(""),[l,E]=a.a.useState(!1),y=e.type===c.a.Type.PERSONAL,w=c.b.getBioText(e),O=()=>{e.customBio=i,E(!0),g.a.updateAccount(e).then(()=>{o(!1),E(!1),t&&t()})},S=n=>{e.customProfilePicUrl=n,E(!0),g.a.updateAccount(e).then(()=>{E(!1),t&&t()})};return a.a.createElement("div",{className:r.a.root},a.a.createElement("div",{className:r.a.container},a.a.createElement("div",{className:r.a.infoColumn},a.a.createElement("a",{href:c.b.getProfileUrl(e),target:"_blank",className:r.a.username},"@",e.username),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Spotlight ID:"),e.id),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"User ID:"),e.userId),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Type:"),e.type),!n&&a.a.createElement("div",{className:r.a.row},a.a.createElement("div",null,a.a.createElement("span",{className:r.a.label},"Bio:"),a.a.createElement("a",{className:r.a.editBioLink,onClick:()=>{s(c.b.getBioText(e)),o(!0)}},"Edit bio"),a.a.createElement("pre",{className:r.a.bio},w.length>0?w:"(No bio)"))),n&&a.a.createElement("div",{className:r.a.row},a.a.createElement("textarea",{className:r.a.bioEditor,value:i,onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(O(),e.preventDefault(),e.stopPropagation())},rows:4}),a.a.createElement("div",{className:r.a.bioFooter},a.a.createElement("div",{className:r.a.bioEditingControls},l&&a.a.createElement("span",null,"Please wait ...")),a.a.createElement("div",{className:r.a.bioEditingControls},a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.DANGER,disabled:l,onClick:()=>{e.customBio="",E(!0),g.a.updateAccount(e).then(()=>{o(!1),E(!1),t&&t()})}},"Reset"),a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.SECONDARY,disabled:l,onClick:()=>{o(!1)}},"Cancel"),a.a.createElement(f.a,{className:r.a.bioEditingButton,type:f.c.PRIMARY,disabled:l,onClick:O},"Save"))))),a.a.createElement("div",{className:r.a.picColumn},a.a.createElement("div",null,a.a.createElement(v.a,{account:e,className:r.a.profilePic})),a.a.createElement(p.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),n=h.a.media.attachment(t).attributes.url;S(n)}},({open:e})=>a.a.createElement(f.a,{type:f.c.SECONDARY,className:r.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&a.a.createElement("a",{className:r.a.resetCustomPic,onClick:()=>{S("")}},"Reset profile picture"))),y&&a.a.createElement("div",{className:r.a.personalInfoMessage},a.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",a.a.createElement("a",{href:_.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),a.a.createElement(m.a,{label:"View access token",stealth:!0},a.a.createElement("div",{className:r.a.row},e.accessToken&&a.a.createElement("div",null,a.a.createElement("p",null,a.a.createElement("span",{className:r.a.label},"Expires on:"),a.a.createElement("span",null,e.accessToken.expiry?Object(d.a)(Object(u.a)(e.accessToken.expiry),"PPPP"):"Unknown")),a.a.createElement("pre",{className:r.a.accessToken},e.accessToken.code)))))}));function y({isOpen:e,onClose:t,onUpdate:n,account:o}){return a.a.createElement(i.a,{isOpen:e,title:"Account details",icon:"admin-users",onClose:t},a.a.createElement(i.a.Content,null,a.a.createElement(E,{account:o,onUpdate:n})))}},108:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var o=n(0),a=n.n(o),i=n(4),s=n(26),r=n(7);const l=Object(i.b)(({feed:e})=>{const t=s.a.getById(e.options.layout),n=r.a.ComputedOptions.compute(e);return a.a.createElement("div",{className:"feed"},a.a.createElement(t.component,{feed:e,options:n}))})},111:function(e,t,n){e.exports={root:"SettingsPage__root layout__flex-column",content:"SettingsPage__content","group-list":"SettingsPage__group-list layout__flex-column",groupList:"SettingsPage__group-list layout__flex-column"}},118:function(e,t,n){e.exports={pill:"ProPill__pill"}},12:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));const o=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},124:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(86),s=n.n(i),r=n(17);function l({children:e,pathStyle:t}){let{path:n,left:o,right:i,center:r}=e;return n=null!=n?n:[],o=null!=o?o:[],i=null!=i?i:[],r=null!=r?r:[],a.a.createElement("div",{className:s.a.root},a.a.createElement("div",{className:s.a.leftList},a.a.createElement("div",{className:s.a.pathList},n.map((e,n)=>a.a.createElement(m,{key:n,style:t},a.a.createElement("div",{className:s.a.item},e)))),a.a.createElement("div",{className:s.a.leftList},a.a.createElement(d,null,o))),a.a.createElement("div",{className:s.a.centerList},a.a.createElement(d,null,r)),a.a.createElement("div",{className:s.a.rightList},a.a.createElement(d,null,i)))}function c(){return a.a.createElement("div",{className:s.a.logo},a.a.createElement("img",{src:r.a.image("spotlight-favicon.png"),alt:"Spotlight"}))}function d({children:e}){const t=Array.isArray(e)?e:[e];return a.a.createElement(a.a.Fragment,null,t.map((e,t)=>a.a.createElement(u,{key:t},e)))}function u({children:e}){return a.a.createElement("div",{className:s.a.item},e)}function m({children:e,style:t}){return a.a.createElement("div",{className:s.a.pathSegment},e,a.a.createElement(p,{style:t}))}function p({style:e}){if("none"===e)return null;const t="chevron"===e?"M0 0 L100 50 L0 100":"M50 0 L50 100";return a.a.createElement("div",{className:s.a.separator},a.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},a.a.createElement("path",{d:t,fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))}},126:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(1),i=n(11);n(14),function(e){e.list=Object(a.n)([]),e.fetch=function(){return i.a.restApi.getNotifications().then(t=>{"object"==typeof t&&Array.isArray(t.data)&&e.list.push(...t.data)}).catch(e=>{})}}(o||(o={}))},13:function(e,t,n){"use strict";var o;n.d(t,"a",(function(){return o})),function(e){let t,n;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(n=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let n=[];for(;e.length;)n.push(e.splice(0,t));if(n.length>0){const e=n.length-1;for(;n[e].length<t;)n[e].push({})}return n},e.isFromHashtag=e=>e.source.type===n.Type.POPULAR_HASHTAG||e.source.type===n.Type.RECENT_HASHTAG}(o||(o={}))},135:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var o=n(0),a=n.n(o),i=n(111),s=n.n(i),r=n(24),l=n(97),c=n.n(l),d=n(66),u=n.n(d),m=n(4),p=n(5),h=n(123),g=Object(m.b)((function({field:e}){const t="settings-field-"+Object(p.p)(),n=!e.label||e.fullWidth;return a.a.createElement("div",{className:u.a.root},e.label&&a.a.createElement("div",{className:u.a.label},a.a.createElement("label",{htmlFor:t},e.label)),a.a.createElement("div",{className:u.a.container},a.a.createElement("div",{className:n?u.a.controlFullWidth:u.a.controlPartialWidth},a.a.createElement(e.component,{id:t})),e.tooltip&&a.a.createElement("div",{className:u.a.tooltip},a.a.createElement(h.a,null,e.tooltip))))}));function f({group:e}){return a.a.createElement("div",{className:c.a.root},e.title.length>0&&a.a.createElement("h1",{className:c.a.title},e.title),e.component&&a.a.createElement("div",{className:c.a.content},a.a.createElement(e.component)),a.a.createElement("div",{className:c.a.fieldList},e.fields.map(e=>a.a.createElement(g,{field:e,key:e.id}))))}var b=n(18);function _({page:e}){return Object(b.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(r.b.save(),e.preventDefault(),e.stopPropagation())}),a.a.createElement("article",{className:s.a.root},e.component&&a.a.createElement("div",{className:s.a.content},a.a.createElement(e.component)),e.groups&&a.a.createElement("div",{className:s.a.groupList},e.groups.map(e=>a.a.createElement(f,{key:e.id,group:e}))))}},14:function(e,t,n){"use strict";var o=n(37),a=n.n(o),i=n(17),s=n(38);const r=i.a.config.restApi.baseUrl,l={};i.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=a.a.create({baseURL:r,headers:l}),d={config:i.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,n=0,o)=>{const i=o?new a.a.CancelToken(o):void 0;return c.post("/media/fetch",{options:e,num:n,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(s.b)(t)}};t.a=d},145:function(e,t,n){e.exports={root:"FeedNameField__root layout__flex-row",container:"FeedNameField__container layout__flex-row","edit-container":"FeedNameField__edit-container FeedNameField__container layout__flex-row",editContainer:"FeedNameField__edit-container FeedNameField__container layout__flex-row","static-container":"FeedNameField__static-container FeedNameField__container layout__flex-row",staticContainer:"FeedNameField__static-container FeedNameField__container layout__flex-row","edit-icon":"FeedNameField__edit-icon dashicons__dashicon-normal",editIcon:"FeedNameField__edit-icon dashicons__dashicon-normal",label:"FeedNameField__label","done-btn":"FeedNameField__done-btn",doneBtn:"FeedNameField__done-btn"}},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));const o={value:"link",label:"Link",getIcon:()=>"admin-links",getPopupLinkText:(e,t)=>"string"==typeof t.linkText&&t.linkText.length>0?t.linkText:a.getDefaultLinkText(t),isValid:(e,t)=>t.linkType&&("url"===t.linkType&&t.url&&t.url.length>0||t.postId>0&&t.postUrl&&t.postUrl.length>0),getMediaUrl:(e,t)=>"url"===t.linkType?t.url:t.postUrl,onMediaClick:(e,t)=>{let n=o.getMediaUrl(e,t);return!!n&&(window.open(n,t.newTab?"_blank":"_self"),!0)}};var a;t.b=o,function(e){e.getDefaultLinkText=function(e){switch(e.linkType){case"product":return"Buy it now";case"post":return"Read the article";case"page":return"Learn more";default:return"Visit link"}}}(a||(a={}))},148:function(e,t,n){"use strict";var o=n(0),a=n.n(o),i=n(125),s=n(20),r=n.n(s),l=n(4),c=n(47),d=n(3),u=n(6),m=n(9),p=n(120),h=n(27),g=n(23),f=n(33),b=n(102),_=n(68),v=n(11),E=n(83),y=Object(l.b)((function({accounts:e,showDelete:t,onDeleteError:n}){e=null!=e?e:[];const[o,i]=a.a.useState(!1),[s,l]=a.a.useState(null),[y,w]=a.a.useState(!1),[O,S]=a.a.useState(),[C,k]=a.a.useState(!1),N=e=>()=>{l(e),i(!0)},L=e=>()=>{f.a.openAuthWindow(e.type,0,()=>{v.a.restApi.deleteAccountMedia(e.id)})},P=e=>()=>{S(e),w(!0)},T={cols:{username:r.a.usernameCol,type:r.a.typeCol,usages:r.a.usagesCol,actions:r.a.actionsCol},cells:{username:r.a.usernameCell,type:r.a.typeCell,usages:r.a.usagesCell,actions:r.a.actionsCell}};return a.a.createElement("div",{className:"accounts-list"},a.a.createElement(p.a,{styleMap:T,rows:e,cols:[{id:"username",label:"Username",render:e=>a.a.createElement("div",null,a.a.createElement(_.a,{account:e,className:r.a.profilePic}),a.a.createElement("a",{className:r.a.username,onClick:N(e)},e.username))},{id:"type",label:"Type",render:e=>a.a.createElement("span",{className:r.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>a.a.createElement("span",{className:r.a.usages},e.usages.map((e,t)=>!!h.a.getById(e)&&a.a.createElement(c.a,{key:t,to:g.a.at({screen:"edit",id:e.toString()})},h.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&a.a.createElement("div",{className:r.a.actionsList},a.a.createElement(u.a,{className:r.a.action,type:u.c.SECONDARY,tooltip:"Account info",onClick:N(e)},a.a.createElement(m.a,{icon:"info"})),a.a.createElement(u.a,{className:r.a.action,type:u.c.SECONDARY,tooltip:"Reconnect account",onClick:L(e)},a.a.createElement(m.a,{icon:"image-rotate"})),a.a.createElement(u.a,{className:r.a.actions,type:u.c.DANGER,tooltip:"Remove account",onClick:P(e)},a.a.createElement(m.a,{icon:"trash"})))}]}),a.a.createElement(b.a,{isOpen:o,onClose:()=>i(!1),account:s}),O&&a.a.createElement(E.a,{isOpen:y,title:"Are you sure?",buttons:[C?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:C,cancelDisabled:C,onAccept:()=>{k(!0),f.a.deleteAccount(O.id).catch(()=>{n&&n("An error occurred while trying to remove the account.")}).finally(()=>k(!1))},onCancel:()=>{S(null),w(!1)}},a.a.createElement("p",null,"Are you sure you want to delete"," ",a.a.createElement("span",{style:{fontWeight:"bold"}},O.username),"?"," ","This will also delete all saved media associated with this account."),O.type===d.a.Type.BUSINESS&&1===d.b.getBusinessAccounts().length&&a.a.createElement("p",null,a.a.createElement("b",null,"Note:")," Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work.")))})),w=n(22),O=n(122),S=n(93),C=n.n(S);t.a=Object(l.b)((function(){const[e,t]=a.a.useState("");return d.b.hasAccounts()?a.a.createElement("div",{className:C.a.root},e.length>0&&a.a.createElement(w.a,{type:w.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>t("")},e),a.a.createElement("div",{className:C.a.connectBtn},a.a.createElement(i.a,null)),a.a.createElement(y,{accounts:d.b.list,showDelete:!0,onDeleteError:t})):a.a.createElement(O.a,null)}))},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));const o=(e,t)=>e.startsWith(t)?e:t+e,a=e=>{return(t=e,"#",t.startsWith("#")?t.substr("#".length):t).split(/\s/).map((e,t)=>t>0?e[0].toUpperCase()+e.substr(1):e).join("").replace(/\W/gi,"");var t}},17:function(e,t,n){"use strict";let o;t.a=o={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${o.config.imagesUrl}/${e}`}},176:function(e,t,n){e.exports={root:"SpotlightGame__root layout__flex-column","game-text":"SpotlightGame__game-text",gameText:"SpotlightGame__game-text",score:"SpotlightGame__score SpotlightGame__game-text",message:"SpotlightGame__message SpotlightGame__game-text","message-bubble":"SpotlightGame__message-bubble",messageBubble:"SpotlightGame__message-bubble"}},179:function(e,t,n){e.exports={"field-container":"AdvancedSettings__field-container layout__flex-row",fieldContainer:"AdvancedSettings__field-container layout__flex-row","field-element":"AdvancedSettings__field-element",fieldElement:"AdvancedSettings__field-element","field-label":"AdvancedSettings__field-label AdvancedSettings__field-element",fieldLabel:"AdvancedSettings__field-label AdvancedSettings__field-element","field-control":"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column",fieldControl:"AdvancedSettings__field-control AdvancedSettings__field-element layout__flex-column","field-centered":"AdvancedSettings__field-centered",fieldCentered:"AdvancedSettings__field-centered"}},18:function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return u})),n.d(t,"g",(function(){return m})),n.d(t,"i",(function(){return p})),n.d(t,"h",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"j",(function(){return b})),n.d(t,"f",(function(){return _}));var o=n(0),a=n.n(o),i=n(40),s=n(36);function r(e){const[t,n]=a.a.useState(e),o=a.a.useRef(t);return[t,()=>o.current,e=>n(o.current=e)]}function l(e,t,n=[]){function a(o){!e.current||e.current.contains(o.target)||n.some(e=>e&&e.current&&e.current.contains(o.target))||t(o)}Object(o.useEffect)(()=>(document.addEventListener("mousedown",a),document.addEventListener("touchend",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchend",a)}))}function c(e,t){Object(o.useEffect)(()=>{const n=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",n),()=>document.removeEventListener("keyup",n)},e)}function d(e,t,n=100){const[i,s]=a.a.useState(e);return Object(o.useEffect)(()=>{let o=null;return e===t?o=setTimeout(()=>s(t),n):s(!t),()=>{null!==o&&clearTimeout(o)}},[e]),[i,s]}function u(e){const[t,n]=a.a.useState(Object(s.b)()),i=()=>{const t=Object(s.b)();n(t),e&&e(t)};return Object(o.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function m(){return new URLSearchParams(Object(i.e)().search)}function p(e,t){const n=n=>{if(t)return(n||window.event).returnValue=e,e};Object(o.useEffect)(()=>(window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)),[t])}function h(e,t){const n=a.a.useRef(!1);return Object(o.useEffect)(()=>{n.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),n.current=!1)},[n.current]),()=>n.current=!0}function g(e,t,n,a=[],i=[]){Object(o.useEffect)(()=>(a.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,n),()=>e.removeEventListener(t,n)),i)}function f(e,t,n=[],o=[]){g(document,e,t,n,o)}function b(e,t,n=[],o=[]){g(window,e,t,n,o)}function _(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}n(38)},180:function(e,t,n){e.exports={label:"TabNavbar__label",tab:"TabNavbar__tab",current:"TabNavbar__current TabNavbar__tab",disabled:"TabNavbar__disabled TabNavbar__tab"}},2:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(1),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};!function(e){class t{constructor(e,t,n){this.prop=e,this.name=t,this.icon=n}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class n{constructor(e,t,n){this.desktop=e,this.tablet=t,this.phone=n}get(e,t){return o(this,e,t)}set(e,t){s(this,t,e)}with(e,t){const o=r(this,t,e);return new n(o.desktop,o.tablet,o.phone)}}function o(e,t,n=!1){if(!e)return;const o=e[t.prop];return!n||""!==o&&null!=o&&""!==o?o:e.desktop}function s(e,t,n){return e[n.prop]=t,e}function r(e,t,n){return s({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,n)}i([a.n],n.prototype,"desktop",void 0),i([a.n],n.prototype,"tablet",void 0),i([a.n],n.prototype,"phone",void 0),e.Value=n,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(n){const o=e.MODES.findIndex(e=>e===n);return void 0===o?t.DESKTOP:e.MODES[(o+1)%e.MODES.length]},e.get=o,e.set=s,e.withValue=r,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new n(t.all,t.all,t.all):new n(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new n(e.desktop,e.tablet,e.phone):new n(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(o||(o={}))},20:function(e,t,n){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-list":"AccountsList__actions-list layout__flex-row",actionsList:"AccountsList__actions-list layout__flex-row",action:"AccountsList__action"}},210:function(e,t,n){e.exports={"contact-us":"FeedsOnboarding__contact-us",contactUs:"FeedsOnboarding__contact-us","call-to-action":"FeedsOnboarding__call-to-action",callToAction:"FeedsOnboarding__call-to-action"}},211:function(e,t,n){e.exports={buttons:"SettingsNavbar__buttons layout__flex-row","cancel-btn":"SettingsNavbar__cancel-btn",cancelBtn:"SettingsNavbar__cancel-btn"}},212:function(e,t,n){e.exports={"menu-link":"PageMenuNavbar__menu-link",menuLink:"PageMenuNavbar__menu-link","menu-ref":"PageMenuNavbar__menu-ref",menuRef:"PageMenuNavbar__menu-ref","arrow-down":"PageMenuNavbar__arrow-down",arrowDown:"PageMenuNavbar__arrow-down"}},23:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(1),a=n(63),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(a.parse)(e.search),this.unListen=null,this.listeners=[],Object(o.o)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(a.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=null){var n;return null!==(n=this.parsed[e])&&void 0!==n?n:t}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(a.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(n=>{e[n]&&0===e[n].length?delete t[n]:t[n]=e[n]}),t}}i([o.n],s.prototype,"path",void 0),i([o.n],s.prototype,"parsed",void 0),i([o.h],s.prototype,"_path",null);const r=new s},242:function(e,t,n){e.exports={"create-new-btn":"FeedsScreen__create-new-btn",createNewBtn:"FeedsScreen__create-new-btn"}},245:function(e,t,n){e.exports={message:"FeedNamePrompt__message",input:"FeedNamePrompt__input"}},246:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n.n(o),i=n(36);function s({breakpoints:e,children:t}){const[n,s]=a.a.useState(1/0),r=a.a.useCallback(()=>{const t=Object(i.b)();s(()=>e.reduce((e,n)=>t.width<=n&&n<e?n:e,1/0))},[e]);return Object(o.useEffect)(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[]),t(n)}},247:function(e,t,n){e.exports={"arrow-link":"WizardNavbar__arrow-link",arrowLink:"WizardNavbar__arrow-link","prev-link":"WizardNavbar__prev-link WizardNavbar__arrow-link",prevLink:"WizardNavbar__prev-link WizardNavbar__arrow-link","next-link":"WizardNavbar__next-link WizardNavbar__arrow-link",nextLink:"WizardNavbar__next-link WizardNavbar__arrow-link"}},26:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));class o{static getById(e){const t=o.list.find(t=>t.id===e);return!t&&o.list.length>0?o.list[0]:t}static getName(e){const t=o.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){o.list.push(e)}}o.list=[]},28:function(e,t,n){"use strict";var o=n(1),a=n(76),i=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(){this.types=[],this.focusSidebar=0,this.mediaStore=a.a}get selectedMedia(){return"number"==typeof this.selectedIdx?this.mediaStore.media[this.selectedIdx]:void 0}nextPost(){this.selectedIdx<this.mediaStore.media.length-1&&this.selectedIdx++}addPromotionType(e){this.types.push(e)}getPromotionType(e){return this.types.find(t=>t.value===e)}getMediaPromo(e,t){var n;const o=t.options.promotions.hasOwnProperty(e.id)?t.options.promotions[e.id]:void 0;if(!o)return[{},null];const a=this.getPromotionType(o.type);return a?[null!==(n=o.data)&&void 0!==n?n:{},a]:[{},null]}executeMediaClick(e,t){const[n,o]=this.getMediaPromo(e,t);return!(null===o||!o.isValid(e,n)||"function"!=typeof o.onMediaClick)&&o.onMediaClick(e,n)}getLinkText(e,t){var n,o;const[a,i]=this.getMediaPromo(e,t);return null!==i&&i.isValid(e,a)?{text:i.getPopupLinkText&&null!==(n=i.getPopupLinkText(e,a))&&void 0!==n?n:null,url:i.getMediaUrl&&null!==(o=i.getMediaUrl(e,a))&&void 0!==o?o:null}:{text:null,url:null}}}i([o.n],s.prototype,"selectedIdx",void 0),i([o.n],s.prototype,"focusSidebar",void 0),i([Object(o.h)({keepAlive:!0})],s.prototype,"selectedMedia",null),i([o.f],s.prototype,"nextPost",null),t.a=new s},3:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var o,a=n(14),i=n(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(o||(o={}));const s=Object(i.n)([]),r="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=e=>s.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===o.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return s.replace(t),s}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:s,DEFAULT_PROFILE_PIC:r,getById:l,getByUsername:e=>s.find(t=>t.username===e),hasAccounts:()=>s.length>0,filterExisting:e=>e.filter(e=>void 0!==l(e)),idsToAccounts:e=>e.map(e=>l(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>s.filter(e=>e.type===o.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:r,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return a.a.getAccounts().then(d).catch(e=>{throw a.a.getErrorReason(e)})},loadFromResponse:d}},30:function(e,n){e.exports=t},31:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return m}));var o=n(0),a=n.n(o),i=n(30),s=n.n(i),r=n(4);class l{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let n=this.cache.get(e);if(void 0===n){n=t(this);let o=this.extensions.get(e);o&&o.forEach(e=>n=e(this,n)),this.cache.set(e,n)}return n}has(e){return this.factories.has(e)}}class c{constructor(e,t,n){this.key=e,this.mount=t,this.modules=n,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=m({root:()=>null,"root/children":()=>[]});this.container=new l(e,this.modules);const t=this.container.get("root/children").map((e,t)=>a.a.createElement(e,{key:t})),n=a.a.createElement(r.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),s.a.render(n,this.mount)})}}function d(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function m(e){return new Map(Object.entries(e))}},325:function(e,t,n){},327:function(e,t,n){e.exports={root:"ProUpgradeBtn__root"}},333:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n(0),a=n.n(o),i=n(212),s=n.n(i),r=n(124),l=n(6),c=n(9),d=n(71);function u({pages:e,current:t,onChangePage:n,showNavArrows:o,hideMenuArrow:i,children:d}){var u,p;const{path:h,right:g}=d,f=null!==(u=e.findIndex(e=>e.key===t))&&void 0!==u?u:0,b=null!==(p=e[f].label)&&void 0!==p?p:"",_=f<=0,v=f>=e.length-1,E=_?null:e[f-1],y=v?null:e[f+1];let w=[];return o&&w.push(a.a.createElement(l.a,{type:l.c.PILL,onClick:()=>!_&&n&&n(e[f-1].key),disabled:_||E.disabled},a.a.createElement(c.a,{icon:"arrow-left-alt2"}))),w.push(a.a.createElement(m,{pages:e,current:t,onClickPage:e=>n&&n(e)},a.a.createElement("span",null,b),!i&&a.a.createElement(c.a,{icon:"arrow-down-alt2",className:s.a.arrowDown}))),o&&w.push(a.a.createElement(l.a,{type:l.c.PILL,onClick:()=>!v&&n&&n(e[f+1].key),disabled:v||y.disabled},a.a.createElement(c.a,{icon:"arrow-right-alt2"}))),a.a.createElement(r.b,{pathStyle:h.length>1?"line":"none"},{path:h,right:g,center:w})}function m({pages:e,current:t,onClickPage:n,children:o}){const[i,r]=a.a.useState(!1),l=()=>r(!0),c=()=>r(!1);return a.a.createElement(d.a,{isOpen:i,onBlur:c,placement:"bottom-start",refClassName:s.a.menuRef},({ref:e})=>a.a.createElement("a",{ref:e,className:s.a.menuLink,onClick:l},o),a.a.createElement(d.b,null,e.map(e=>{return a.a.createElement(d.c,{key:e.key,disabled:e.disabled,active:e.key===t,onClick:(o=e.key,()=>{n&&n(o),c()})},e.label);var o})))}},334:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(180),s=n.n(i),r=n(124),l=n(18);function c({children:{path:e,tabs:t,right:n},current:o,onClickTab:i}){return a.a.createElement(r.b,{pathStyle:"chevron"},{path:e,right:n,left:t.map(e=>{return a.a.createElement(d,{tab:e,key:e.key,isCurrent:e.key===o,onClick:(t=e.key,()=>i&&i(t))});var t})})}function d({tab:e,isCurrent:t,onClick:n}){return a.a.createElement("a",{key:e.key,role:"button",tabIndex:0,className:e.disabled?s.a.disabled:t?s.a.current:s.a.tab,onClick:n,onKeyDown:Object(l.f)(n)},a.a.createElement("span",{className:s.a.label},e.label))}},335:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n(0),a=n.n(o),i=n(247),s=n.n(i),r=n(124),l=n(6),c=n(9);function d({children:e,steps:t,current:n,onChangeStep:o,firstStep:i,lastStep:d}){var u;i=null!=i?i:[],d=null!=d?d:[];const m=null!==(u=t.findIndex(e=>e.key===n))&&void 0!==u?u:0,p=m<=0,h=m>=t.length-1,g=p?null:t[m-1],f=h?null:t[m+1],b=p?i:a.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!p&&o&&o(t[m-1].key),className:s.a.prevLink,disabled:g.disabled},a.a.createElement(c.a,{icon:"arrow-left-alt2"}),a.a.createElement("span",null,g.label)),_=h?d:a.a.createElement(l.a,{type:l.c.LINK,onClick:()=>!h&&o&&o(t[m+1].key),className:s.a.nextLink,disabled:f.disabled},a.a.createElement("span",null,f.label),a.a.createElement(c.a,{icon:"arrow-right-alt2"}));return a.a.createElement(r.b,null,{path:[],left:b,right:_,center:e})}},36:function(e,t,n){"use strict";function o(e,t,n={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(n))}function a(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return i}))},363:function(e,t,n){},38:function(e,t,n){"use strict";function o(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}))},48:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r}));var o=n(0),a=n.n(o),i=n(4);const s=(e,t)=>Object(i.b)(n=>a.a.createElement(e,Object.assign(Object.assign({},t),n))),r=(e,t)=>Object(i.b)(n=>{const o={};return Object.keys(t).forEach(e=>o[e]=t[e](n)),a.a.createElement(e,Object.assign({},o,n))})},5:function(e,t,n){"use strict";n.d(t,"p",(function(){return c})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"k",(function(){return m})),n.d(t,"f",(function(){return p})),n.d(t,"d",(function(){return h})),n.d(t,"j",(function(){return g})),n.d(t,"l",(function(){return f})),n.d(t,"h",(function(){return b})),n.d(t,"a",(function(){return _})),n.d(t,"g",(function(){return v})),n.d(t,"i",(function(){return E})),n.d(t,"o",(function(){return y})),n.d(t,"n",(function(){return w})),n.d(t,"m",(function(){return O})),n.d(t,"e",(function(){return S}));var o=n(0),a=n.n(o),i=n(160),s=n(159),r=n(13);let l=0;function c(){return l++}function d(e,t){return Object.getOwnPropertyNames(t).forEach(n=>{"object"!=typeof t[n]||Array.isArray(t[n])?e[n]=t[n]:("object"!=typeof e[n]&&(e[n]={}),d(e[n],t[n]))}),e}function u(e,t,n){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;++o)if(n){if(!n(e[o],t[o]))return!1}else if(e[o]!==t[o])return!1;return!0}function m(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(n=>"object"==typeof e[n]?"object"!=typeof t[n]||!m(e[n],t[n]):Array.isArray(e[n])?!Array.isArray(t[n])||!u(e[n],t[n]):e[n]!==t[n]):e===t}function p(e,t,n){return n=null!=n?n:(e,t)=>e===t,e.filter(e=>!t.some(t=>n(e,t)))}function h(e,t,n){return n=null!=n?n:(e,t)=>e===t,e.every(e=>t.some(t=>n(e,t)))&&t.every(t=>e.some(e=>n(t,e)))}function g(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function f(e,t,n=0,i=!1){let s=e.trim();i&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const r=s.split("\n"),l=r.map((e,n)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let s,l=[];for(;null!==(s=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],n=a.a.createElement("a",{href:t,target:"_blank",key:c()},s[0]),o=e.substr(0,s.index),i=e.substr(s.index+s[0].length);l.push(o),l.push(n),e=i}return e.length&&l.push(e),t&&(l=t(l,n)),r.length>1&&l.push(a.a.createElement("br",{key:c()})),a.a.createElement(o.Fragment,{key:c()},l)});return n>0?l.slice(0,n):l}function b(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var _;function v(e,t=_.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function E(e,t=_.MEDIUM){return e.thumbnail?e.thumbnail:v(b(e.permalink),t)}function y(e,t){const n=/(\s+)/g;let o,a=0,i=0,s="";for(;null!==(o=n.exec(e))&&a<t;){const t=o.index+o[1].length;s+=e.substr(i,t-i),i=t,a++}return i<e.length&&(s+=" ..."),s}function w(e){return Object(i.a)(Object(s.a)(e),{addSuffix:!0})}function O(e,t){const n=[];return e.forEach((e,o)=>{const a=o%t;Array.isArray(n[a])?n[a].push(e):n[a]=[e]}),n}function S(e,t){return function e(t){if(t.type===r.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(n=>{e.src=t.url,e.addEventListener("loadeddata",()=>{n({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===r.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===r.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const n=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*n,height:e.height*n}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(_||(_={}))},54:function(e,t,n){e.exports={"name-col":"FeedsList__name-col",nameCol:"FeedsList__name-col","actions-col":"FeedsList__actions-col",actionsCol:"FeedsList__actions-col","actions-cell":"FeedsList__actions-cell",actionsCell:"FeedsList__actions-cell",name:"FeedsList__name layout__text-overflow-ellipsis","meta-list":"FeedsList__meta-list",metaList:"FeedsList__meta-list","meta-info":"FeedsList__meta-info",metaInfo:"FeedsList__meta-info",id:"FeedsList__id FeedsList__meta-info",layout:"FeedsList__layout FeedsList__meta-info","sources-list":"FeedsList__sources-list layout__flex-row",sourcesList:"FeedsList__sources-list layout__flex-row",source:"FeedsList__source layout__text-overflow-ellipsis","no-sources-msg":"FeedsList__no-sources-msg",noSourcesMsg:"FeedsList__no-sources-msg","usages-list":"FeedsList__usages-list layout__flex-column",usagesList:"FeedsList__usages-list layout__flex-column",usage:"FeedsList__usage layout__flex-row layout__text-overflow-ellipsis","usage-link":"FeedsList__usage-link layout__text-overflow-ellipsis",usageLink:"FeedsList__usage-link layout__text-overflow-ellipsis","usage-type":"FeedsList__usage-type",usageType:"FeedsList__usage-type","actions-list":"FeedsList__actions-list",actionsList:"FeedsList__actions-list","usages-cell":"FeedsList__usages-cell",usagesCell:"FeedsList__usages-cell","usages-col":"FeedsList__usages-col",usagesCol:"FeedsList__usages-col","sources-cell":"FeedsList__sources-cell",sourcesCell:"FeedsList__sources-cell","sources-col":"FeedsList__sources-col",sourcesCol:"FeedsList__sources-col"}},559:function(e,t,n){"use strict";n.r(t),n(215);var o=n(31),a=(n(363),n(310)),i=n(1),s=n(48),r=n(0),l=n.n(r),c=n(40),d=n(311),u=n(23),m=n(4),p=n(17);const h=()=>l.a.createElement("div",{className:"admin-loading"},l.a.createElement("div",{className:"admin-loading__perspective"},l.a.createElement("div",{className:"admin-loading__container"},l.a.createElement("img",{src:p.a.image("spotlight-800w.png"),className:"admin-loading__logo",alt:"Spotlight"}))));var g=n(7),f=n(11),b=n(322);const _=Object(m.b)((function({store:e,screensStore:t,toaster:n,titleTemplate:o}){e.load();const a=t=>{var n,o;const a=null!==(o=null!==(n=t.detail.message)&&void 0!==n?n:t.detail.response.data.message)&&void 0!==o?o:null;e.toaster.addToast("feed/fetch_fail",()=>l.a.createElement("div",null,l.a.createElement("p",null,"An error occurred while retrieving the media for this feed. Details:"),a&&l.a.createElement("code",null,a),l.a.createElement("p",null,"If this error persists, kindly"," ",l.a.createElement("a",{href:f.a.resources.supportUrl,target:"_blank"},"contact customer support"),".")),0)};Object(r.useEffect)(()=>(document.addEventListener(g.a.Events.FETCH_FAIL,a),()=>document.removeEventListener(g.a.Events.FETCH_FAIL,a)),[]);const i=l.a.createElement(n);return e.isLoaded?l.a.createElement(c.b,{history:u.a.history},t.screens.map((e,t)=>l.a.createElement(d.a,{key:e.id,when:"screen",is:e.id,isRoot:0===t,render:()=>{const t=()=>l.a.createElement(e.component);return t.displayName=e.title,document.title=o.replace("%s",e.title),l.a.createElement(t)}})),i,l.a.createElement(b.a,null)):l.a.createElement(l.a.Fragment,null,l.a.createElement(h,null),i)}));var v;!function(e){e.NEW_FEED="new",e.EDIT_FEED="edit",e.FEED_LIST="feeds",e.SETTINGS="settings"}(v||(v={}));class E{constructor(e){this.screens=e,this.screens.sort((e,t)=>{var n,o;const a=null!==(n=e.position)&&void 0!==n?n:0,i=null!==(o=t.position)&&void 0!==o?o:0;return Math.sign(a-i)})}get current(){var e;const t=null!==(e=u.a.get("screen"))&&void 0!==e?e:"";return this.screens.find((e,n)=>t===e.id||!t&&0===n)}}var y=n(242),w=n.n(y),O=n(47),S=n(8),C=n(33);const k=Object(i.n)({initialized:!1,list:[]}),N=({navbar:e,className:t,fillPage:n,children:o})=>{const a=l.a.useRef(null);Object(r.useEffect)(()=>{a.current&&(function(){if(!k.initialized){const e=Array.from(document.querySelectorAll(".sli-notice")),t=Array.from(document.querySelectorAll(".fs-notice.fs-slug-spotlight-social-photo-feeds"));k.list=e.concat(t),k.initialized=!0}}(),k.list.forEach(e=>{e.remove(),a.current.appendChild(e)}))},[]);const i=C.a.getExpiringTokenAccounts(),s=Object(S.a)("admin-screen",{"--fillPage":n})+(t?" "+t:"");return l.a.createElement("div",{className:s},e&&l.a.createElement("div",{className:"admin-screen__navbar"},l.a.createElement(e)),l.a.createElement("div",{className:"admin-screen__content"},l.a.createElement("div",{className:"admin-screen__notices",ref:a},i.map(e=>l.a.createElement("div",{key:e.id,className:"notice notice-warning"},l.a.createElement("p",null,"The access token for the ",l.a.createElement("b",null,"@",e.username)," account is about to expire."," ",l.a.createElement("a",{className:"admin-screen__reconnect",onClick:t=>function(e,t){C.a.openAuthWindow(t.type,0,()=>{f.a.restApi.deleteAccountMedia(t.id)}),e.preventDefault()}(t,e)},"Re-connect the account")," ","to keep using it in Spotlight.")))),o))};var L=n(65),P=n(3),T=n(210),A=n.n(T);const x=u.a.at({screen:v.NEW_FEED}),M=()=>{const[e,t]=l.a.useState(!1);return l.a.createElement(L.a,{className:A.a.root,isTransitioning:e},l.a.createElement("div",null,l.a.createElement("h1",null,"Start engaging with your audience"),l.a.createElement(L.a.Thin,null,l.a.createElement("p",null,"Connect with more people by embedding one or more Instagram feeds on this website."),l.a.createElement("p",null,"It only takes 3 steps! Let’s get going!"),l.a.createElement(L.a.StepList,null,l.a.createElement(L.a.Step,{num:1,isDone:P.b.list.length>0},l.a.createElement("span",null,"Connect your Instagram Account")),l.a.createElement(L.a.Step,{num:2},l.a.createElement("span",null,"Design your feed")),l.a.createElement(L.a.Step,{num:3},l.a.createElement("span",null,"Embed it on your site"))))),l.a.createElement("div",{className:A.a.callToAction},l.a.createElement(L.a.HeroButton,{onClick:()=>{t(!0),setTimeout(()=>u.a.history.push(x,{}),L.a.TRANSITION_DURATION)}},P.b.list.length>0?"Design your feed":"Connect your Instagram Account"),l.a.createElement(L.a.HelpMsg,{className:A.a.contactUs},"If you need help at any time,"," ",l.a.createElement("a",{href:f.a.resources.supportUrl,target:"_blank",style:{whiteSpace:"nowrap"}},"contact me here"),".",l.a.createElement("br",null),"- Mark Zahra, Spotlight")))};var I=n(54),B=n.n(I),F=n(9),j=n(6),D=n(196),R=n(120),z=n(26),W=n(27);const U=({toaster:e})=>{const t={cols:{name:B.a.nameCol,sources:B.a.sourcesCol,usages:B.a.usagesCol,actions:B.a.actionsCol},cells:{name:B.a.nameCell,sources:B.a.sourcesCell,usages:B.a.usagesCell,actions:B.a.actionsCell}};return l.a.createElement("div",{className:"feeds-list"},l.a.createElement(R.a,{styleMap:t,cols:[{id:"name",label:"Name",render:e=>{const t=u.a.at({screen:v.EDIT_FEED,id:e.id.toString()});return l.a.createElement("div",null,l.a.createElement(O.a,{to:t,className:B.a.name},e.name?e.name:"(no name)"),l.a.createElement("div",{className:B.a.metaList},l.a.createElement("span",{className:B.a.id},"ID: ",e.id),l.a.createElement("span",{className:B.a.layout},z.a.getName(e.options.layout))))}},{id:"sources",label:"Shows posts from",render:e=>l.a.createElement(G,{feed:e})},{id:"usages",label:"Instances",render:e=>l.a.createElement(H,{feed:e})},{id:"actions",label:"Actions",render:t=>l.a.createElement("div",{className:B.a.actionsList},l.a.createElement(D.a,{feed:t,toaster:e},l.a.createElement(j.a,{type:j.c.SECONDARY,tooltip:"Copy shortcode"},l.a.createElement(F.a,{icon:"editor-code"}))),l.a.createElement(j.a,{type:j.c.DANGER,tooltip:"Delete feed",onClick:()=>(e=>{confirm("Are you sure you want to delete this feed? This cannot be undone.")&&W.a.deleteFeed(e)})(t)},l.a.createElement(F.a,{icon:"trash"})))}],rows:W.a.list}))},G=({feed:e})=>{let t=[];const n=g.a.Options.getSources(e.options);return n.accounts.forEach(e=>{const n=K(e);n&&t.push(n)}),n.tagged.forEach(e=>{const n=K(e,!0);n&&t.push(n)}),n.hashtags.forEach(e=>t.push(l.a.createElement("div",null,"#",e.tag))),0===t.length&&t.push(l.a.createElement("div",{className:B.a.noSourcesMsg},l.a.createElement(F.a,{icon:"warning"}),l.a.createElement("span",null,"Feed has no sources"))),l.a.createElement("div",{className:B.a.sourcesList},t.map((e,t)=>e&&l.a.createElement(q,{key:t},e)))},H=({feed:e})=>l.a.createElement("div",{className:B.a.usagesList},e.usages.map((e,t)=>l.a.createElement("div",{key:t,className:B.a.usage},l.a.createElement("a",{className:B.a.usageLink,href:e.link,target:"_blank"},e.name),l.a.createElement("span",{className:B.a.usageType},"(",e.type,")"))));function K(e,t){return e?l.a.createElement(Y,{account:e,isTagged:t}):null}const Y=({account:e,isTagged:t})=>{const n=t?"tag":e.type===P.a.Type.BUSINESS?"businessman":"admin-users";return l.a.createElement("div",null,l.a.createElement(F.a,{icon:n}),e.username)},q=({children:e})=>l.a.createElement("div",{className:B.a.source},e);var V=Object(m.b)((function({navbar:e,toaster:t}){return l.a.createElement(N,{navbar:e},l.a.createElement("div",{className:w.a.root},W.a.hasFeeds()?l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:w.a.createNewBtn},l.a.createElement(O.a,{to:u.a.at({screen:v.NEW_FEED}),className:"button button-primary button-large"},"Create a new feed")),l.a.createElement(U,{toaster:t})):l.a.createElement(M,null)))})),$=n(324),X=n(339),J=n(325),Q=n.n(J),Z=n(135),ee=n(24),te=n(63),ne=n(18);function oe({when:e,message:t}){return Object(ne.i)(t,e),l.a.createElement(c.a,{when:e,message:t})}const ae="You have unsaved changes. If you leave now, your changes will be lost.";var ie=Object(m.b)((function({navbar:e}){const t=u.a.get("tab"),n=t?f.a.settings.pages.find(e=>t===e.id):f.a.settings.pages[0];return Object(r.useEffect)(()=>()=>{ee.b.isDirty&&u.a.get("screen")!==v.SETTINGS&&ee.b.restore()},[]),l.a.createElement(l.a.Fragment,null,l.a.createElement(N,{navbar:e,className:Q.a.root},n&&l.a.createElement(Z.a,{page:n})),l.a.createElement(c.a,{when:ee.b.isDirty,message:se}),l.a.createElement(oe,{when:ee.b.isDirty,message:ae}))}));function se(e){return Object(te.parse)(e.search).screen===v.SETTINGS||ae}var re=n(154),le=n(327),ce=n.n(le),de=function({url:e,children:t}){return l.a.createElement("a",{className:ce.a.root,href:null!=e?e:f.a.resources.upgradeLocalUrl},null!=t?t:"Upgrade to PRO")},ue=Object(m.b)((function({store:e,right:t,showUpgrade:n,chevron:o,children:a}){n=null!=n?n:null==t;const i=l.a.createElement(re.a.Item,null,e.current.title);return l.a.createElement(re.a,null,l.a.createElement(l.a.Fragment,null,i,o&&l.a.createElement(re.a.Chevron,null),a),t?l.a.createElement(t):n&&l.a.createElement(de,{url:f.a.resources.trialLocalUrl},"Start 14-day PRO trial"))}));class me{constructor(e,t){this.fns=e,this.delay=null!=t?t:1}load(e=null,t){this.numLoaded=0,this.isLoading=!0;const n=()=>{this.numLoaded++,this.numLoaded>=this.fns.length&&setTimeout(()=>{this.isLoading=!1,t&&t()},this.delay)};this.fns.forEach(t=>t(e,n))}}var pe=n(140),he=n(126),ge=n(14),fe=n(197),be=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s},_e=W.a.SavedFeed;class ve{constructor(e,t,n){this.isLoaded=!1,this.isGoingFromNewToEdit=!1,this.isPromptingFeedName=!1,this.feed=new _e,this.loader=e,this.toaster=t,this.editorConfig=n,this.isDoingOnboarding=f.a.config.doOnboarding}edit(e){this.isGoingFromNewToEdit||(this.editorConfig.currTab="connect"),this.isGoingFromNewToEdit=!1,this.feed=null,this.feed=new _e(e),this.isEditorDirty=!1}saveFeed(e){const t=null===e.id;return this.isDoingOnboarding=!1,new Promise((n,o)=>{W.a.saveFeed(e).then(e=>{this.toaster.addToast("feed/save/success",Object(s.a)(pe.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,u.a.history.push(u.a.at({screen:v.EDIT_FEED,id:e.id.toString()}),{})),n(e)}).catch(e=>{const t=ge.a.getErrorReason(e);this.toaster.addToast("feed/save/error",Object(s.a)(fe.a,{message:"Failed to save the feed: "+t})),o(t)})})}cancelFeed(){this.isGoingFromNewToEdit=!1,setTimeout(()=>{u.a.history.push(u.a.at({screen:v.FEED_LIST}),{})},10)}saveEditor(e){if(!this.isEditorDirty)return;const t=null===this.feed.id;if(0!==this.feed.name.length||e)return this.isSavingFeed=!0,this.isDoingOnboarding=!1,W.a.saveFeed(this.feed).then(e=>{this.feed=new _e(e),this.isSavingFeed=!1,this.isEditorDirty=!1,this.toaster.addToast("feed/saved",Object(s.a)(pe.a,{message:"Feed saved."})),t&&(this.isGoingFromNewToEdit=!0,u.a.history.push(u.a.at({screen:v.EDIT_FEED,id:this.feed.id.toString()}),{}))});this.isPromptingFeedName=!0}cancelEditor(){this.isGoingFromNewToEdit||(this.feed=new _e,this.isEditorDirty=!1,this.isGoingFromNewToEdit=!1)}closeEditor(){this.cancelEditor(),setTimeout(()=>{u.a.history.push(u.a.at({screen:v.FEED_LIST}),{})},10)}onEditorChange(e){e&&_e.setFromObject(this.feed,e),this.isEditorDirty=!0}load(){this.isLoaded||this.loader.load(null,()=>{this.isLoaded=!0,he.a.fetch()})}}be([i.n],ve.prototype,"isLoaded",void 0),be([i.n],ve.prototype,"feed",void 0),be([i.n],ve.prototype,"isSavingFeed",void 0),be([i.n],ve.prototype,"isEditorDirty",void 0),be([i.n],ve.prototype,"editorConfig",void 0),be([i.n],ve.prototype,"isDoingOnboarding",void 0),be([i.n],ve.prototype,"isGoingFromNewToEdit",void 0),be([i.n],ve.prototype,"isPromptingFeedName",void 0),be([i.f],ve.prototype,"edit",null),be([i.f],ve.prototype,"saveEditor",null),be([i.f],ve.prototype,"cancelEditor",null),be([i.f],ve.prototype,"closeEditor",null),be([i.f],ve.prototype,"onEditorChange",null),be([i.f],ve.prototype,"load",null);var Ee=n(211),ye=n.n(Ee),we=n(150),Oe=Object(m.b)((function({store:e}){const t=u.a.get("tab");return l.a.createElement(ue,{store:e,chevron:!0,showUpgrade:!1,right:Se},f.a.settings.pages.map((e,n)=>l.a.createElement(re.a.Link,{key:e.id,linkTo:u.a.with({tab:e.id}),isCurrent:t===e.id||!t&&0===n},e.title)))}));const Se=Object(m.b)((function({}){const e=!ee.b.isDirty;return l.a.createElement("div",{className:ye.a.buttons},l.a.createElement(j.a,{className:ye.a.cancelBtn,type:j.c.DANGER_PILL,size:j.b.LARGE,onClick:()=>ee.b.restore(),disabled:e},"Cancel"),l.a.createElement(we.a,{className:ye.a.saveBtn,onClick:()=>ee.b.save(),isSaving:ee.b.isSaving,tooltip:"Save the settings (Ctrl+S)",disabled:e}))}));var Ce=n(176),ke=n.n(Ce),Ne=n(5),Le=n(39);function Pe({}){const e=l.a.useRef(),t=l.a.useRef([]),[n,o]=l.a.useState(0),[a,i]=l.a.useState(!1),[,s]=l.a.useState(),c=()=>{const n=function(e){const t=.4*e.width,n=t/724,o=707*n,a=22*n,i=35*n;return{bounds:e,origin:{x:(e.width-t)/2+o-i/2,y:.5*e.height+a-i/2},scale:n,particleSize:i}}(e.current.getBoundingClientRect());t.current=t.current.map(e=>{const t=e.didSike?1:Math.max(1,1.3-1.3*Math.min(1,e.life/100));return Object.assign(Object.assign({},e),{pos:{x:e.pos.x+e.vel.x*t,y:e.pos.y+e.vel.y*t},life:e.life+1})}).filter(e=>e.life<500&&e.pos.x>=0&&e.pos.y>=0&&e.pos.x+e.size<=n.bounds.width&&e.pos.y+e.size<=n.bounds.height),t.current.length<30&&10*Math.random()>7&&t.current.push((e=>{const t=Math.max(1,4*Math.random()),n=2*Math.random()*Math.PI,o={x:Math.sin(n)*t,y:Math.cos(n)*t};return{pos:Object.assign({},e.origin),vel:o,size:e.particleSize,life:1}})(n)),s(Ne.p)};Object(r.useEffect)(()=>{const e=setInterval(c,25);return()=>clearInterval(e)},[]);const d=function(e){let t=null;return Te.forEach(([n,o])=>{e>=n&&(t=o)}),t}(n);return l.a.createElement("div",{className:ke.a.root},l.a.createElement("h1",{style:{textAlign:"center"}},"Let's play!"),l.a.createElement("p",null,"Click on as many Spotlight dots as you can. We challenge you to ",l.a.createElement("strong",null,"hit ",100),"!"),l.a.createElement("br",null),l.a.createElement("div",{ref:e,style:Ae.container},n>0&&l.a.createElement("div",{className:ke.a.score},l.a.createElement("strong",null,"Score"),": ",l.a.createElement("span",null,n)),d&&l.a.createElement("div",{className:ke.a.message},l.a.createElement("span",{className:ke.a.messageBubble},d)),t.current.map((e,a)=>l.a.createElement("div",{key:a,onMouseDown:()=>(e=>{const a=t.current[e].didSike?5:1;t.current.splice(e,1),o(n+a)})(a),onMouseEnter:()=>(e=>{const n=t.current[e];if(n.didSike)return;const o=1e3*Math.random();o>100&&o<150&&(n.vel={x:5*Math.sign(-n.vel.x),y:5*Math.sign(-n.vel.y)},n.life=100,n.didSike=!0)})(a),style:Object.assign(Object.assign({},Ae.particle),{top:e.pos.y,left:e.pos.x,width:e.size,height:e.size,backgroundColor:e.didSike?"#ffaa00":"#"+(14492491+65536*e.life+256*e.life+e.life).toString(16)})},e.didSike&&l.a.createElement("span",{style:Ae.sike},"x",5)))),l.a.createElement(Le.a,{title:"Get 20% off Spotlight PRO",isOpen:n>=100&&!a,onClose:()=>i(!0),allowShadeClose:!1},l.a.createElement(Le.a.Content,null,l.a.createElement("div",{style:{textAlign:"center"}},l.a.createElement("p",{style:{display:"inline-block",width:"70%",marginTop:10}},l.a.createElement("strong",{style:{opacity:.7}},"You were just clicking the dot in the logo, weren't you?",l.a.createElement("br",null),"It doesn't matter. You made it a 100!")),l.a.createElement("h1",null,"Get 20% off Spotlight PRO"),l.a.createElement("p",{style:{display:"inline-block",width:"60%"}},"Open up to new opportunities with hashtag feeds, filtering options, visual moderation,"," ","tagged feeds, new layouts, promotions and much more."),l.a.createElement("div",{style:{margin:"10px 0"}},l.a.createElement("a",{href:f.a.resources.upgradeUrl,target:"_blank",style:{width:"100%"}},l.a.createElement(j.a,{type:j.c.PRIMARY,size:j.b.HERO,style:{width:"80%"}},"Get 20% off Spotlight PRO")))))))}const Te=[[10,l.a.createElement("span",null,"You're getting the hang of this!")],[50,l.a.createElement("span",null,"Not bad. You're half way to a 100!")],[120,l.a.createElement("span",null,"Just post a 5-star review already. You're clearly in love with us!")],[150,l.a.createElement("span",null,"Hey, we'd be curious if there were more messages too. But sadly, this is the last one. Good-bye!")],[500,l.a.createElement("span",null,"Error: User has become obsessed with clicking games.")],[1e3,l.a.createElement("span",null,"While the term Easter egg has been used to mean a hidden object for some time, in reference to an Easter egg hunt, it has come to be more commonly used to mean a message, image, or feature hidden in a video game, film, or other, usually electronic, medium. The term used in this manner was coined around 1979 by Steve Wright, the then Director of Software Development in the Atari Consumer Division, to describe a hidden message in the Atari video game Adventure. [Wikipedia]")]],Ae={container:{flex:1,position:"relative",backgroundColor:"#fff",backgroundImage:`url('${p.a.image("spotlight-800w.png")}')`,backgroundPosition:"center 50%",backgroundSize:"40%",backgroundRepeat:"no-repeat",borderRadius:8,marginTop:15,userSelect:"none"},particle:{position:"absolute",backgroundColor:"#dd234b",borderRadius:999,cursor:"pointer",color:"#000",userSelect:"none"},sike:{position:"relative",left:"calc(100% + 5px)",fontSize:"16px",userSelect:"none"}};var xe=n(148),Me=n(153),Ie=n(179),Be=n.n(Ie),Fe=Object(m.b)((function({}){return l.a.createElement("div",{className:Be.a.root})}));Object(m.b)((function({className:e,label:t,children:n}){const o="settings-field-"+Object(Ne.p)();return l.a.createElement("div",{className:Object(S.b)(Be.a.fieldContainer,e)},l.a.createElement("div",{className:Be.a.fieldLabel},l.a.createElement("label",{htmlFor:o},t)),l.a.createElement("div",{className:Be.a.fieldControl},n(o)))}));var je=n(245),De=n.n(je),Re=n(83);function ze({isOpen:e,onAccept:t,onCancel:n}){const[o,a]=l.a.useState("");function i(){t&&t(o)}return l.a.createElement(Re.a,{title:"Feed name",isOpen:e,onCancel:function(){n&&n()},onAccept:i,buttons:["Save","Cancel"]},l.a.createElement("p",{className:De.a.message},"Give this feed a memorable name:"),l.a.createElement("input",{type:"text",className:De.a.input,value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(i(),e.preventDefault(),e.stopPropagation())},autoFocus:!0}))}var We=n(332),Ue=n(145),Ge=n.n(Ue),He=n(71);function Ke({feed:e,onDone:t}){const n=l.a.useRef(),[o,a]=l.a.useState(""),[i,s]=l.a.useState(!1),r=()=>{a(e.name),s(!0)},c=()=>{s(!1),t&&t(o),n.current&&n.current.focus()},d=e=>{switch(e.key){case"Enter":case" ":r()}};return l.a.createElement("div",{className:Ge.a.root},l.a.createElement(He.a,{isOpen:i,onBlur:()=>s(!1),placement:"bottom"},({ref:t})=>l.a.createElement("div",{ref:Object(S.d)(t,n),className:Ge.a.staticContainer,onClick:r,onKeyPress:d,tabIndex:0,role:"button"},l.a.createElement("span",{className:Ge.a.label},e.label),l.a.createElement(F.a,{icon:"edit",className:Ge.a.editIcon})),l.a.createElement(He.b,null,l.a.createElement(He.d,null,l.a.createElement("div",{className:Ge.a.editContainer},l.a.createElement("input",{type:"text",value:o,onChange:e=>{a(e.target.value)},onKeyDown:e=>{switch(e.key){case"Enter":c();break;case"Escape":s(!1);break;default:return}e.preventDefault(),e.stopPropagation()},autoFocus:!0,placeholder:"Feed name"}),l.a.createElement(j.a,{className:Ge.a.doneBtn,type:j.c.PRIMARY,size:j.b.NORMAL,onClick:c},l.a.createElement(F.a,{icon:"yes"})))))))}var Ye=W.a.SavedFeed;function qe({children:e,store:t,feed:n,onSave:o,onCancel:a}){const[i,s,c]=Object(ne.e)(new Ye(n)),[d,u]=l.a.useState(!1),[m,p]=l.a.useState(!1),[h,g]=l.a.useState(!1),f=()=>{if(!d)return;const e=s();if(m||0!==e.name.length){p(!1),g(!0);const n=null===t.feed.id;t.saveFeed(e).then(()=>{o&&o(e),n||(g(!1),u(!1))})}else p(!0)},b=()=>{d&&!confirm("You have unsaved changes. If you leave now, your changes will be lost.")||(u(!1),a&&a(),t.cancelFeed())},_=e=>{const t=s();if(t.name!==e){const n=new Ye(t);n.name=null!=e?e:"",c(n),u(!0)}},v=l.a.useCallback(e=>{const t=new Ye(s());Object(Ne.b)(t.options,e),c(t),u(!0)},[]);Object(r.useEffect)(()=>{c(new Ye(n))},[n]),Object(ne.d)("keydown",e=>{e.key&&"s"===e.key.toLowerCase()&&e.ctrlKey&&(f(),e.preventDefault(),e.stopPropagation())},[],[d]);const E=l.a.useMemo(()=>()=>({saveBtn:l.a.createElement(we.a,{key:"admin-editor-save",onClick:f,disabled:!d,isSaving:h}),cancelBtn:l.a.createElement(j.a,{key:"admin-editor-cancel",type:j.c.DANGER_LINK,onClick:b,disabled:!d},"Cancel"),nameField:l.a.createElement(Ke,{key:"admin-editor-feed-name",feed:i,onDone:_})}),[d,h,i,f,b,_]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(We.a,{feedOptions:i.options,config:t.editorConfig,onChange:v},E),e,l.a.createElement(ze,{isOpen:m,onAccept:e=>{_(e),f()},onCancel:()=>{p(!1)}}),l.a.createElement(oe,{when:d&&!h,message:"You have unsaved changes. If you leave now, your changes will be lost."}))}var Ve=W.a.SavedFeed;function $e({store:e}){return e.edit(new Ve),e.editorConfig.currTab="connect",l.a.createElement(qe,{feed:e.feed,store:e})}var Xe=n(22);function Je({store:e}){const t=Ze(),n=W.a.getById(t);return t&&n?(e.feed.id!==t&&e.edit(n),l.a.createElement(qe,{store:e,feed:e.feed})):l.a.createElement(Qe,null)}const Qe=()=>l.a.createElement("div",null,l.a.createElement(Xe.a,{type:Xe.b.ERROR,showIcon:!0},"Feed does not exist.",l.a.createElement(O.a,{to:u.a.with({screen:"feeds"})},"Go back"))),Ze=()=>{let e=u.a.get("id");return e?(e=Array.isArray(e)?e[0]:e,parseInt(e)):null};var et=n(336);const tt={factories:Object(o.c)({"admin/root/component":e=>Object(s.a)(_,{store:e.get("admin/store"),screensStore:e.get("admin/screens/store"),toaster:e.get("admin/toaster/component"),titleTemplate:e.get("admin/title_template")}),"admin/title_template":()=>document.title.replace("Spotlight","%s ‹ Spotlight"),"admin/store":e=>new ve(e.get("admin/loading/loader"),e.get("admin/toaster/store"),e.get("admin/editor/config")),"admin/loading/loader":e=>new me(e.get("admin/loading/functions"),750),"admin/loading/functions":e=>{const t=e.get("admin/toaster/store"),n=e=>n=>{t.addToast("load_error",Object(s.a)(fe.a,{message:n}),0),e()};return[(e,t)=>W.a.loadFeeds().then(t).catch(n(t)),(e,t)=>P.b.loadAccounts().then(t).catch(n(t)),(e,t)=>ee.b.load().then(t).catch(n(t))]},"admin/navbar/component":e=>Object(s.b)(ue,{store:()=>e.get("admin/screens/store"),showUpgrade:()=>!f.a.config.isPro}),"admin/settings/navbar/component":e=>Object(s.b)(Oe,{store:()=>e.get("admin/screens/store")}),"admin/screens/store":e=>new E(e.get("admin/screens")),"admin/screens":e=>[e.get("admin/feeds/screen"),e.get("admin/editor/add_new/screen"),e.get("admin/editor/edit/screen"),e.get("admin/settings/screen")],"admin/feeds/screen":e=>({id:"feeds",title:"Feeds",position:0,component:Object(s.a)(V,{navbar:e.get("admin/navbar/component"),toaster:e.get("admin/toaster/store")})}),"admin/editor/add_new/screen":e=>({id:"new",title:"Add New",position:10,component:Object(s.a)($e,{store:e.get("admin/store")})}),"admin/editor/edit/screen":e=>({id:"edit",title:"Edit",isHidden:()=>!0,component:Object(s.a)(Je,{store:e.get("admin/store")})}),"admin/editor/config":e=>{const t=Object.assign({},f.a.editor.config);return t.tabs=e.get("admin/editor/tabs"),t},"admin/editor/tabs":e=>{const t=e.get("admin/editor/tabs/extender")(f.a.editor.config.tabs);return t.push(e.get("admin/editor/tabs/embed")),t},"admin/editor/tabs/extender":()=>Me.b,"admin/editor/tabs/embed":e=>({key:"embed",label:"Embed",sidebar:Object(s.b)(et.a,{store:()=>e.get("admin/store")})}),"admin/settings/screen":e=>({id:"settings",title:"Settings",position:50,component:e.get("admin/settings/component")}),"admin/settings/component":e=>Object(s.a)(ie,{navbar:e.get("admin/settings/navbar/component")}),"admin/settings/tabs/accounts":()=>({id:"accounts",label:"Manage Accounts",component:xe.a}),"admin/settings/tabs/crons":()=>({id:"crons",label:"Crons",component:Object(s.b)(Z.a,{page:()=>f.a.settings.pages.find(e=>"crons"===e.id)})}),"admin/settings/tabs/advanced":e=>({id:"advanced",label:"Advanced",component:e.get("admin/settings/show_game")?e.get("admin/settings/game/component"):e.get("admin/settings/advanced/component")}),"admin/settings/show_game":()=>!0,"admin/settings/advanced/component":e=>Fe,"admin/settings/game/component":()=>Pe,"admin/toaster/store":e=>new $.a(e.get("admin/toaster/ttl")),"admin/toaster/ttl":()=>5e3,"admin/toaster/component":e=>Object(s.a)(X.a,{store:e.get("admin/toaster/store")})}),extensions:Object(o.c)({"root/children":(e,t)=>[...t,e.get("admin/root/component")],"settings/tabs":(e,t)=>[e.get("admin/settings/tabs/accounts"),e.get("admin/settings/tabs/advanced"),...t]}),run:e=>{const t=e.get("admin/toaster/store");document.addEventListener(ee.a,()=>{t.addToast("sli/settings/saved",Object(s.a)(pe.a,{message:"Settings saved."}))});{const t=e.get("admin/screens/store"),n=document.getElementById("toplevel_page_spotlight-instagram").querySelector("ul.wp-submenu").querySelectorAll("li:not(.wp-submenu-head)"),o=Array.from(n);t.screens.forEach((e,t)=>{const n=0===t,a=e.state||{},s=u.a.fullUrl(Object.assign({screen:e.id},a)),r=u.a.at(Object.assign({screen:e.id},a)),l=o.find(e=>e.querySelector("a").href===s);l&&(l.addEventListener("click",e=>{u.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()}),Object(i.g)(()=>{var t;const o=null!==(t=u.a.get("screen"))&&void 0!==t?t:"",a=e.id===o||!o&&n;l.classList.toggle("current",a)}))})}}},nt=document.getElementById(f.a.config.rootId);if(nt){const e=[a.a,tt].filter(e=>null!==e);nt.classList.add("wp-core-ui-override"),new o.a("admin",nt,e).run()}},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(0),a=n.n(o),i=n(91),s=n.n(i);function r(){return a.a.createElement("div",{className:s.a.root})}},57:function(e,t,n){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},66:function(e,t,n){e.exports={root:"SettingsField__root layout__flex-column",label:"SettingsField__label layout__flex-column",container:"SettingsField__container layout__flex-row",control:"SettingsField__control layout__flex-column","control-partial-width":"SettingsField__control-partial-width SettingsField__control layout__flex-column",controlPartialWidth:"SettingsField__control-partial-width SettingsField__control layout__flex-column","control-full-width":"SettingsField__control-full-width SettingsField__control layout__flex-column",controlFullWidth:"SettingsField__control-full-width SettingsField__control layout__flex-column",tooltip:"SettingsField__tooltip layout__flex-column"}},68:function(e,t,n){"use strict";var o=n(0),a=n.n(o),i=n(92),s=n.n(i),r=n(3),l=n(8),c=n(4);t.a=Object(c.b)((function(e){var{account:t,square:n,className:o}=e,i=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["account","square","className"]);const c=r.b.getProfilePicUrl(t),d=Object(l.b)(n?s.a.square:s.a.round,o);return a.a.createElement("img",Object.assign({},i,{className:d,src:r.b.DEFAULT_PROFILE_PIC,srcSet:c+" 1x",alt:t.username+" profile picture"}))}))},69:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(0),a=n.n(o),i=n(118),s=n.n(i),r=n(11),l=n(8);const c=({className:e,children:t})=>a.a.createElement("a",{className:Object(l.b)(s.a.pill,e),href:r.a.resources.upgradeLocalUrl,target:"_blank",tabIndex:-1},"PRO",t)},7:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var o=n(37),a=n.n(o),i=n(1),s=n(2),r=n(26),l=n(31),c=n(3),d=n(5),u=n(12),m=n(14),p=function(e,t,n,o){var a,i=arguments.length,s=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,o);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,n,s):a(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};class h{constructor(e=new h.Options,t=s.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=s.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new h.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let n;return()=>{clearTimeout(n),n=setTimeout(()=>{n=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=s.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=s.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,n){return this.cancelFetch(),h.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((o,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};n&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,o&&o()}).catch(e=>{var t;if(a.a.isCancel(e))return null;const n=new h.Events.FetchFailEvent(h.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(n),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}p([i.n],h.prototype,"media",void 0),p([i.n],h.prototype,"canLoadMore",void 0),p([i.n],h.prototype,"stories",void 0),p([i.n],h.prototype,"numLoadedMore",void 0),p([i.n],h.prototype,"options",void 0),p([i.n],h.prototype,"totalMedia",void 0),p([i.n],h.prototype,"mode",void 0),p([i.n],h.prototype,"isLoaded",void 0),p([i.n],h.prototype,"isLoading",void 0),p([i.n],h.prototype,"isLoadingMore",void 0),p([i.f],h.prototype,"reload",void 0),p([i.n],h.prototype,"localMedia",void 0),p([i.n],h.prototype,"numMediaToShow",void 0),p([i.n],h.prototype,"numMediaPerPage",void 0),p([i.n],h.prototype,"mediaCounter",void 0),p([i.h],h.prototype,"_media",null),p([i.h],h.prototype,"_numMediaToShow",null),p([i.h],h.prototype,"_numMediaPerPage",null),p([i.h],h.prototype,"_canLoadMore",null),p([i.f],h.prototype,"loadMore",null),p([i.f],h.prototype,"load",null),p([i.f],h.prototype,"loadMedia",null),function(e){let t,n,o,a,m,h,g,f,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class _{constructor(e={}){_.setFromObject(this,e)}static setFromObject(t,n={}){var o,a,i,l,d,u,m,p,h,g,f,b;return t.accounts=n.accounts?n.accounts.slice():e.DefaultOptions.accounts,t.hashtags=n.hashtags?n.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=n.tagged?n.tagged.slice():e.DefaultOptions.tagged,t.layout=r.a.getById(n.layout).id,t.numColumns=s.a.normalize(n.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=s.a.normalize(n.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=n.mediaType||e.DefaultOptions.mediaType,t.postOrder=n.postOrder||e.DefaultOptions.postOrder,t.numPosts=s.a.normalize(n.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=s.a.normalize(n.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=s.a.normalize(n.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=s.a.normalize(n.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=s.a.normalize(n.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=s.a.normalize(n.imgPadding,e.DefaultOptions.imgPadding),t.textSize=s.a.normalize(n.textSize,e.DefaultOptions.textSize),t.bgColor=n.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=n.hoverInfo?n.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=n.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=n.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=s.a.normalize(n.showHeader,e.DefaultOptions.showHeader),t.headerInfo=s.a.normalize(n.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(o=n.headerAccount)&&void 0!==o?o:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===c.b.getById(t.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:t.headerAccount,t.headerStyle=s.a.normalize(n.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=s.a.normalize(n.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=s.a.normalize(n.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=n.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=n.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=s.a.normalize(n.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(a=n.customProfilePic)&&void 0!==a?a:e.DefaultOptions.customProfilePic,t.customBioText=n.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=n.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=n.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=s.a.normalize(n.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=s.a.normalize(n.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(l=n.captionRemoveDots)&&void 0!==l?l:e.DefaultOptions.captionRemoveDots,t.captionSize=s.a.normalize(n.captionSize,e.DefaultOptions.captionSize),t.captionColor=n.captionColor||e.DefaultOptions.captionColor,t.showLikes=s.a.normalize(n.showLikes,e.DefaultOptions.showLikes),t.showComments=s.a.normalize(n.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=s.a.normalize(n.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(d=n.likesIconColor)&&void 0!==d?d:e.DefaultOptions.likesIconColor,t.commentsIconColor=n.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(u=n.lightboxShowSidebar)&&void 0!==u?u:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=n.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=s.a.normalize(n.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=n.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=n.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=n.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=n.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=s.a.normalize(n.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(p=n.followBtnText)&&void 0!==p?p:e.DefaultOptions.followBtnText,t.followBtnTextColor=n.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=n.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=s.a.normalize(n.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=n.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=n.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=n.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=n.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(h=n.hashtagWhitelistSettings)&&void 0!==h?h:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(g=n.hashtagBlacklistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(f=n.captionWhitelistSettings)&&void 0!==f?f:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=n.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=n.moderation||e.DefaultOptions.moderation,t.moderationMode=n.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=n.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=n.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=c.b.idsToAccounts(e.accounts),n=c.b.idsToAccounts(e.tagged);return{all:t.concat(n),accounts:t,tagged:n}}static getSources(e){return{accounts:c.b.idsToAccounts(e.accounts),tagged:c.b.idsToAccounts(e.tagged),hashtags:c.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,n){const o=e.Options.getSources(t),a=o.accounts.length>0||o.tagged.length>0,i=!n&&o.hashtags.length>0;return a||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}p([i.n],_.prototype,"accounts",void 0),p([i.n],_.prototype,"hashtags",void 0),p([i.n],_.prototype,"tagged",void 0),p([i.n],_.prototype,"layout",void 0),p([i.n],_.prototype,"numColumns",void 0),p([i.n],_.prototype,"highlightFreq",void 0),p([i.n],_.prototype,"mediaType",void 0),p([i.n],_.prototype,"postOrder",void 0),p([i.n],_.prototype,"numPosts",void 0),p([i.n],_.prototype,"linkBehavior",void 0),p([i.n],_.prototype,"feedWidth",void 0),p([i.n],_.prototype,"feedHeight",void 0),p([i.n],_.prototype,"feedPadding",void 0),p([i.n],_.prototype,"imgPadding",void 0),p([i.n],_.prototype,"textSize",void 0),p([i.n],_.prototype,"bgColor",void 0),p([i.n],_.prototype,"textColorHover",void 0),p([i.n],_.prototype,"bgColorHover",void 0),p([i.n],_.prototype,"hoverInfo",void 0),p([i.n],_.prototype,"showHeader",void 0),p([i.n],_.prototype,"headerInfo",void 0),p([i.n],_.prototype,"headerAccount",void 0),p([i.n],_.prototype,"headerStyle",void 0),p([i.n],_.prototype,"headerTextSize",void 0),p([i.n],_.prototype,"headerPhotoSize",void 0),p([i.n],_.prototype,"headerTextColor",void 0),p([i.n],_.prototype,"headerBgColor",void 0),p([i.n],_.prototype,"headerPadding",void 0),p([i.n],_.prototype,"customBioText",void 0),p([i.n],_.prototype,"customProfilePic",void 0),p([i.n],_.prototype,"includeStories",void 0),p([i.n],_.prototype,"storiesInterval",void 0),p([i.n],_.prototype,"showCaptions",void 0),p([i.n],_.prototype,"captionMaxLength",void 0),p([i.n],_.prototype,"captionRemoveDots",void 0),p([i.n],_.prototype,"captionSize",void 0),p([i.n],_.prototype,"captionColor",void 0),p([i.n],_.prototype,"showLikes",void 0),p([i.n],_.prototype,"showComments",void 0),p([i.n],_.prototype,"lcIconSize",void 0),p([i.n],_.prototype,"likesIconColor",void 0),p([i.n],_.prototype,"commentsIconColor",void 0),p([i.n],_.prototype,"lightboxShowSidebar",void 0),p([i.n],_.prototype,"numLightboxComments",void 0),p([i.n],_.prototype,"showLoadMoreBtn",void 0),p([i.n],_.prototype,"loadMoreBtnText",void 0),p([i.n],_.prototype,"loadMoreBtnTextColor",void 0),p([i.n],_.prototype,"loadMoreBtnBgColor",void 0),p([i.n],_.prototype,"autoload",void 0),p([i.n],_.prototype,"showFollowBtn",void 0),p([i.n],_.prototype,"followBtnText",void 0),p([i.n],_.prototype,"followBtnTextColor",void 0),p([i.n],_.prototype,"followBtnBgColor",void 0),p([i.n],_.prototype,"followBtnLocation",void 0),p([i.n],_.prototype,"hashtagWhitelist",void 0),p([i.n],_.prototype,"hashtagBlacklist",void 0),p([i.n],_.prototype,"captionWhitelist",void 0),p([i.n],_.prototype,"captionBlacklist",void 0),p([i.n],_.prototype,"hashtagWhitelistSettings",void 0),p([i.n],_.prototype,"hashtagBlacklistSettings",void 0),p([i.n],_.prototype,"captionWhitelistSettings",void 0),p([i.n],_.prototype,"captionBlacklistSettings",void 0),p([i.n],_.prototype,"moderation",void 0),p([i.n],_.prototype,"moderationMode",void 0),p([i.n],_.prototype,"promotionEnabled",void 0),e.Options=_;class v{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.l)(Object(d.o)(t,this.captionMaxLength)):t}static compute(t){const n=t.options,o=t.mode,a=new v({accounts:c.b.filterExisting(n.accounts),tagged:c.b.filterExisting(n.tagged),hashtags:n.hashtags.filter(e=>e.tag.length>0),layout:r.a.getById(n.layout),numColumns:s.a.get(n.numColumns,o,!0),highlightFreq:s.a.get(n.highlightFreq,o,!0),numPosts:s.a.get(n.numPosts,o,!0),linkBehavior:s.a.get(n.linkBehavior,o,!0),bgColor:Object(u.a)(n.bgColor),textColorHover:Object(u.a)(n.textColorHover),bgColorHover:Object(u.a)(n.bgColorHover),hoverInfo:n.hoverInfo,showHeader:s.a.get(n.showHeader,o,!0),headerInfo:s.a.get(n.headerInfo,o,!0),headerStyle:s.a.get(n.headerStyle,o,!0),headerTextColor:Object(u.a)(n.headerTextColor),headerBgColor:Object(u.a)(n.headerBgColor),headerPadding:s.a.get(n.headerPadding,o,!0),includeStories:n.includeStories,storiesInterval:n.storiesInterval,showCaptions:s.a.get(n.showCaptions,o,!0),captionMaxLength:s.a.get(n.captionMaxLength,o,!0),captionRemoveDots:n.captionRemoveDots,captionColor:Object(u.a)(n.captionColor),showLikes:s.a.get(n.showLikes,o,!0),showComments:s.a.get(n.showComments,o,!0),likesIconColor:Object(u.a)(n.likesIconColor),commentsIconColor:Object(u.a)(n.commentsIconColor),lightboxShowSidebar:n.lightboxShowSidebar,numLightboxComments:n.numLightboxComments,showLoadMoreBtn:s.a.get(n.showLoadMoreBtn,o,!0),loadMoreBtnTextColor:Object(u.a)(n.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(n.loadMoreBtnBgColor),loadMoreBtnText:n.loadMoreBtnText,showFollowBtn:s.a.get(n.showFollowBtn,o,!0),autoload:n.autoload,followBtnLocation:s.a.get(n.followBtnLocation,o,!0),followBtnTextColor:Object(u.a)(n.followBtnTextColor),followBtnBgColor:Object(u.a)(n.followBtnBgColor),followBtnText:n.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=Math.max(a.numColumns,1),t.mode!==s.a.Mode.DESKTOP&&(a.numColumns=a.numColumns<1?s.a.get(n.numColumns,s.a.Mode.DESKTOP):a.numColumns),a.numPosts=parseInt(a.numPosts+""),(a.numPosts<1||isNaN(a.numPosts))&&(a.numPosts=1),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=n.headerAccount&&a.allAccounts.includes(n.headerAccount)?c.b.getById(n.headerAccount):c.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=n.customProfilePic.length?n.customProfilePic:c.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showLoadMoreBtn=a.showLoadMoreBtn&&t.canLoadMore,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=n.customBioText.trim().length>0?n.customBioText:null!==a.account?c.b.getBioText(a.account):"";a.bioText=Object(d.l)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(n.feedWidth,o,"auto"),a.feedHeight=this.normalizeCssSize(n.feedHeight,o,"auto"),a.feedPadding=this.normalizeCssSize(n.feedPadding,o,"0"),a.imgPadding=this.normalizeCssSize(n.imgPadding,o,"0"),a.textSize=this.normalizeCssSize(n.textSize,o,"inherit"),a.headerTextSize=this.normalizeCssSize(n.headerTextSize,o,"inherit"),a.headerPhotoSize=this.normalizeCssSize(n.headerPhotoSize,o,"50px"),a.captionSize=this.normalizeCssSize(n.captionSize,o,"inherit"),a.lcIconSize=this.normalizeCssSize(n.lcIconSize,o,"inherit"),a.buttonPadding=Math.max(10,s.a.get(n.imgPadding,o))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static normalizeCssSize(e,t,n=null){const o=s.a.get(e,t);return o?o+"px":n}}e.ComputedOptions=v,e.HashtagSorting=Object(l.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(n=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(o=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(a=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(m=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(h=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(g=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(f=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:n.ALL,postOrder:a.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:o.LIGHTBOX,phone:o.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[m.LIKES_COMMENTS,m.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[g.PROFILE_PIC,g.BIO]},headerAccount:null,headerStyle:{desktop:h.NORMAL,phone:h.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:f.HEADER,phone:f.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(h||(h={}))},76:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return l}));var o=n(7),a=n(14),i=n(5);class s{constructor(e=!1,t=!1){this.incModeration=!1,this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.incModeration=e,this.incFilters=t}fetchMedia(e,t){if(null!==this.prevOptions&&!this.isCacheInvalid(e))return Promise.resolve(this.media);const n=Object.assign({},e.options,{moderation:this.incModeration?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.incFilters?e.options.hashtagBlacklist:[],hashtagWhitelist:this.incFilters?e.options.hashtagWhitelist:[],captionBlacklist:this.incFilters?e.options.captionBlacklist:[],captionWhitelist:this.incFilters?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.incFilters&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.incFilters&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.incFilters&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.incFilters&&e.options.captionWhitelistSettings});return t&&t(),a.a.getFeedMedia(n).then(t=>(this.prevOptions=new o.a.Options(e.options),this.media=t.data.media,this.media))}isCacheInvalid(e){const t=e.options,n=this.prevOptions;if(Object(i.f)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(!Object(i.d)(t.accounts,n.accounts))return!0;if(!Object(i.d)(t.tagged,n.tagged))return!0;if(!Object(i.d)(t.hashtags,n.hashtags,i.j))return!0;if(this.incModeration){if(t.moderationMode!==n.moderationMode)return!0;if(!Object(i.d)(t.moderation,n.moderation))return!0}if(this.incFilters){if(t.captionWhitelistSettings!==n.captionWhitelistSettings||t.captionBlacklistSettings!==n.captionBlacklistSettings||t.hashtagWhitelistSettings!==n.hashtagWhitelistSettings||t.hashtagBlacklistSettings!==n.hashtagBlacklistSettings)return!0;if(!Object(i.d)(t.captionWhitelist,n.captionWhitelist))return!0;if(!Object(i.d)(t.captionBlacklist,n.captionBlacklist))return!0;if(!Object(i.d)(t.hashtagWhitelist,n.hashtagWhitelist))return!0;if(!Object(i.d)(t.hashtagBlacklist,n.hashtagBlacklist))return!0}return!1}}const r=new s(!0,!0),l=new s(!1,!0)},8:function(e,t,n){"use strict";function o(...e){return e.filter(e=>!!e).join(" ")}function a(e){return o(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let n=Object.getOwnPropertyNames(t).map(n=>t[n]?e+n:null);return e+" "+n.filter(e=>!!e).join(" ")}function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i})),n.d(t,"d",(function(){return s}))},86:function(e,t,n){e.exports={root:"GenericNavbar__root",list:"GenericNavbar__list","left-list":"GenericNavbar__left-list GenericNavbar__list",leftList:"GenericNavbar__left-list GenericNavbar__list",item:"GenericNavbar__item","center-list":"GenericNavbar__center-list GenericNavbar__list",centerList:"GenericNavbar__center-list GenericNavbar__list","right-list":"GenericNavbar__right-list GenericNavbar__list",rightList:"GenericNavbar__right-list GenericNavbar__list","path-list":"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",pathList:"GenericNavbar__path-list GenericNavbar__left-list GenericNavbar__list",logo:"GenericNavbar__logo","path-segment":"GenericNavbar__path-segment",pathSegment:"GenericNavbar__path-segment",separator:"GenericNavbar__separator GenericNavbar__item"}},9:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(0),a=n.n(o),i=n(8);const s=e=>{var{icon:t,className:n}=e,o=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["icon","className"]);return a.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,n)},o))}},90:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n(0),a=n.n(o),i=n(57),s=n.n(i),r=n(13),l=n(5),c=n(56),d=n(8);function u(e){var{media:t,className:n}=e,i=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)t.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(n[o[a]]=e[o[a]])}return n}(e,["media","className"]);const u=a.a.useRef(),[m,p]=a.a.useState(0),[h,g]=a.a.useState(!0);if(Object(o.useEffect)(()=>{u.current&&p(u.current.getBoundingClientRect().width)},[]),t.url&&t.url.length>0){const e=t.type===r.a.Type.ALBUM&&t.children.length>0?t.children[0]:t,o=Object(l.h)(e.permalink),m=Object(l.g)(o,l.a.SMALL),p=Object(l.g)(o,l.a.MEDIUM),f=Object(l.g)(o,l.a.LARGE);return a.a.createElement("div",Object.assign({className:Object(d.b)(s.a.root,n)},i),a.a.createElement("img",{ref:u,className:s.a.image,src:p,srcSet:`${m} 150w, ${p} 320w, ${f} 600w, ${t.url} 1000w`,onLoad:function(){g(!1)},loading:"lazy",alt:t.caption}),h&&a.a.createElement(c.a,null))}return a.a.createElement("div",{className:s.a.notAvailable},a.a.createElement("span",null,"Thumbnail not available"))}},91:function(e,t,n){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}},92:function(e,t,n){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},93:function(e,t,n){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}},97:function(e,t,n){e.exports={root:"SettingsGroup__root layout__flex-column",title:"SettingsGroup__title",content:"SettingsGroup__content","field-list":"SettingsGroup__field-list layout__flex-column",fieldList:"SettingsGroup__field-list layout__flex-column"}}},[[559,0,1,2,3]]])}));
ui/dist/admin-common.js CHANGED
@@ -1 +1 @@
1
- (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[2],{105:function(e,t,n){e.exports={table:"Table__table theme__subtle-drop-shadow theme__slightly-rounded",header:"Table__header",footer:"Table__footer",cell:"Table__cell","col-heading":"Table__col-heading Table__cell",colHeading:"Table__col-heading Table__cell",row:"Table__row","align-left":"Table__align-left",alignLeft:"Table__align-left","align-right":"Table__align-right",alignRight:"Table__align-right","align-center":"Table__align-center",alignCenter:"Table__align-center"}},109:function(e,t,n){"use strict";t.a=wp},11:function(e,t,n){"use strict";var a=n(14),o=n(0),r=n.n(o),s=n(24),c=n(148),i=n(4),l=n(70),u=n(114),m=n.n(u),p=n(71),d=n(9);function b(e){var{type:t,unit:n,units:a,value:o,onChange:s}=e,c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["type","unit","units","value","onChange"]);const[i,l]=r.a.useState(!1),u=Array.isArray(a)&&a.length,b=()=>l(e=>!e),_=e=>{switch(e.key){case" ":case"Enter":b();break;default:return}e.preventDefault(),e.stopPropagation()};return(null==o||isNaN(o))&&(o=""),r.a.createElement("div",{className:m.a.root},r.a.createElement("input",Object.assign({},c,{className:m.a.input,type:null!=t?t:"text",value:o,onChange:e=>s&&s(e.currentTarget.value,n)})),r.a.createElement("div",{className:m.a.unitContainer},u&&r.a.createElement(p.a,{isOpen:i,onBlur:()=>l(!1)},({ref:e})=>r.a.createElement("div",{ref:e,className:m.a.unitSelector,role:"button",onClick:b,onKeyDown:_,tabIndex:0},r.a.createElement("span",{className:m.a.currentUnit},n),r.a.createElement(d.a,{icon:"arrow-down-alt2",className:i?m.a.menuChevronOpen:m.a.menuChevron})),a.map(e=>r.a.createElement(p.c,{key:e,onClick:()=>(s&&s(o,e),void l(!1))},e))),!u&&r.a.createElement("div",{className:m.a.unitStatic},r.a.createElement("span",null,n))))}var _=n(44),f=n(239),g=n.n(f),h=n(6),v=[{id:"accounts",title:"Accounts",component:c.a},{id:"config",title:"Configuration",groups:[{id:"importing",title:"Import options",fields:[{id:"importerInterval",label:"Check for new posts",component:Object(i.b)(({id:e})=>r.a.createElement(l.a,{id:e,width:250,value:s.b.values.importerInterval,options:y.config.cronScheduleOptions,onChange:e=>s.b.values.importerInterval=e.value}))}]},{id:"cleaner",title:"Optimization",component:()=>r.a.createElement("div",null,r.a.createElement(_.a,{label:"What is this?",stealth:!0},r.a.createElement("div",null,r.a.createElement("p",null,"Spotlight imports all Instagram posts that can be displayed in your feed, even "," ",'those hidden behind a "Load more" button. The posts furthest down the list may'," ","therefore rarely be seen."),r.a.createElement("p",null,"To improve your site’s performance, you can choose to delete these unseen posts"," ","after a set period of time. Once a site visitor requests those posts, they will"," ","be re-imported.")))),fields:[{id:"cleanerAgeLimit",label:"Delete unseen posts after",component:Object(i.b)(({id:e})=>{const t=s.b.values.cleanerAgeLimit.split(" "),n=parseInt(t[0]),a=t[1];return r.a.createElement(b,{id:e,units:["days","hours","minutes"],value:n,unit:a,type:"number",onChange:(e,t)=>s.b.values.cleanerAgeLimit=e+" "+t})})},{id:"cleanerInterval",label:"Run optimization",component:Object(i.b)(({id:e})=>r.a.createElement(l.a,{id:e,width:250,value:s.b.values.cleanerInterval,options:y.config.cronScheduleOptions,onChange:e=>s.b.values.cleanerInterval=e.value}))}]}]},{id:"tools",title:"Tools",groups:[{id:"cache",title:"Cache",fields:[{id:"clearCache",label:"If you are experiencing issues, clearing the plugin's cache may help.",component:function({}){const[e,t]=r.a.useState(!1),[n,a]=r.a.useState(!1);return r.a.createElement("div",{className:g.a.root},r.a.createElement(h.a,{disabled:e,onClick:()=>{t(!0),y.restApi.clearCache().finally(()=>{a(!0),setTimeout(()=>{a(!1),t(!1)},3e3)})}},n?"Done!":e?"Please wait ...":"Clear the cache"),r.a.createElement("a",{href:y.resources.cacheDocsUrl,target:"_blank",className:g.a.docLink},"What's this?"))}}]}]}],E=n(98);a.a.driver.interceptors.request.use(e=>(e.headers["X-WP-Nonce"]=SliAdminCommonL10n.restApi.wpNonce,e),e=>Promise.reject(e));var y=t.a={config:{rootId:"spotlight-instagram-admin",adminUrl:SliAdminCommonL10n.adminUrl,restApi:SliAdminCommonL10n.restApi,doOnboarding:"1"==SliAdminCommonL10n.doOnboarding,cronSchedules:SliAdminCommonL10n.cronSchedules,cronScheduleOptions:SliAdminCommonL10n.cronSchedules.map(e=>({value:e.key,label:e.display})),postTypes:SliAdminCommonL10n.postTypes,isPro:!1},resources:{upgradeUrl:"https://spotlightwp.com/pricing/",upgradeLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing",trialUrl:"https://spotlightwp.com/pricing/",trialLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing&billing_cycle=annual&trial=true",proComingSoonUrl:"https://spotlightwp.com/pro-coming-soon/",supportUrl:"https://spotlightwp.com/support/",customPersonalInfoUrl:"https://docs.spotlightwp.com/article/624-custom-profile-photo-and-bio-text",businessAccounts:"https://docs.spotlightwp.com/article/555-how-to-switch-to-a-business-account",cacheDocsUrl:"https://docs.spotlightwp.com/article/639-cache",promoTypesSurvey:"https://spotlightwp.com/survey-promote/",accessTokenDocUrl:""},editor:{config:{showProOptions:!0,isPro:!1,tabs:E.b,currTab:"connect"}},restApi:{config:SliAdminCommonL10n.restApi,saveFeed:e=>a.a.driver.post("/feeds"+(e.id?"/"+e.id:""),{feed:e}),deleteFeed:e=>a.a.driver.delete("/feeds/"+e),connectPersonal:e=>a.a.driver.post("/connect",{accessToken:e}),connectBusiness:(e,t)=>a.a.driver.post("/connect",{accessToken:e,userId:t}),updateAccount:e=>a.a.driver.post("/accounts",e),deleteAccount:e=>a.a.driver.delete("/accounts/"+e),deleteAccountMedia:e=>a.a.driver.delete("/account_media/"+e),searchPosts:(e,t)=>a.a.driver.get(`/search_posts?search=${e}&type=${t}`),getSettings:()=>a.a.driver.get("/settings"),saveSettings:e=>a.a.driver.patch("/settings",{settings:e}),getNotifications:()=>a.a.driver.get("/notifications"),clearCache:()=>a.a.driver.post("/clear_cache")},settings:{pages:v}}},112:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(95),s=n(151);const c=e=>{const t=Object.assign(Object.assign({},e),{value:e.value?e.value.map(e=>Object(s.a)(e,"#")):[],sanitize:s.b});return o.a.createElement(r.a,Object.assign({},t))}},114:function(e,t,n){e.exports={root:"UnitField__root layout__flex-row",input:"UnitField__input","unit-container":"UnitField__unit-container layout__flex-column",unitContainer:"UnitField__unit-container layout__flex-column","unit-bubble":"UnitField__unit-bubble",unitBubble:"UnitField__unit-bubble","unit-static":"UnitField__unit-static UnitField__unit-bubble layout__flex-column",unitStatic:"UnitField__unit-static UnitField__unit-bubble layout__flex-column","unit-selector":"UnitField__unit-selector UnitField__unit-bubble layout__flex-row",unitSelector:"UnitField__unit-selector UnitField__unit-bubble layout__flex-row","current-unit":"UnitField__current-unit",currentUnit:"UnitField__current-unit","menu-chevron":"UnitField__menu-chevron",menuChevron:"UnitField__menu-chevron","menu-chevron-open":"UnitField__menu-chevron-open UnitField__menu-chevron",menuChevronOpen:"UnitField__menu-chevron-open UnitField__menu-chevron","unit-list":"UnitField__unit-list layout__flex-column layout__z-highest",unitList:"UnitField__unit-list layout__flex-column layout__z-highest","unit-option":"UnitField__unit-option",unitOption:"UnitField__unit-option","unit-selected":"UnitField__unit-selected UnitField__unit-option",unitSelected:"UnitField__unit-selected UnitField__unit-option"}},120:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(8),s=n(105),c=n.n(s);function i({cols:e,rows:t,footerCols:n,styleMap:a}){return a=null!=a?a:{cols:{},cells:{}},o.a.createElement("table",{className:c.a.table},o.a.createElement("thead",{className:c.a.header},o.a.createElement(u,{cols:e,styleMap:a})),o.a.createElement("tbody",null,t.map((t,n)=>o.a.createElement(l,{key:n,row:t,cols:e,styleMap:a}))),n&&o.a.createElement("tfoot",{className:c.a.footer},o.a.createElement(u,{cols:e,styleMap:a})))}function l({row:e,cols:t,styleMap:n}){return o.a.createElement("tr",{className:c.a.row},t.map(t=>o.a.createElement("td",{key:t.id,className:Object(r.b)(c.a.cell,m(t),n.cells[t.id])},t.render(e))))}function u({cols:e,styleMap:t}){return o.a.createElement("tr",null,e.map(e=>{const n=Object(r.b)(c.a.colHeading,m(e),t.cols[e.id]);return o.a.createElement("th",{key:e.id,className:n},e.label)}))}function m(e){return"center"===e.align?c.a.alignCenter:"right"===e.align?c.a.alignRight:c.a.alignLeft}},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(109),s=n(5);const c=({id:e,value:t,title:n,button:a,mediaType:c,multiple:i,children:l,onOpen:u,onClose:m,onSelect:p})=>{e=null!=e?e:"wp-media-"+Object(s.o)(),c=null!=c?c:"image",a=null!=a?a:"Select";const d=o.a.useRef();d.current||(d.current=r.a.media({id:e,title:n,library:{type:c},button:{text:a},multiple:i}));const b=()=>{const e=d.current.state().get("selection").first();p&&p(e)};return m&&d.current.on("close",m),d.current.on("open",()=>{if(t){const e="object"==typeof t?t:r.a.media.attachment(t);e.fetch(),d.current.state().get("selection").add(e?[e]:[])}u&&u()}),d.current.on("insert",b),d.current.on("select",b),l({open:()=>d.current.open()})}},123:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(174),s=n.n(r),c=n(9),i=n(191);function l({maxWidth:e,children:t}){e=null!=e?e:200;const[n,a]=o.a.useState(!1),r=()=>a(!0),l=()=>a(!1),u={content:s.a.tooltipContent,container:s.a.tooltipContainer};return o.a.createElement("div",{className:s.a.root},o.a.createElement(i.a,{visible:n,theme:u},({ref:e})=>o.a.createElement("span",{ref:e,className:s.a.icon,style:{opacity:n?1:.7},onMouseEnter:r,onMouseLeave:l},o.a.createElement(c.a,{icon:"info"})),o.a.createElement("div",{style:{maxWidth:e+"px"}},t)))}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(312),s=n.n(r),c=n(6),i=n(9),l=n(208),u=n(39);function m({isOpen:e,onClose:t,onConnect:n,beforeConnect:a}){return o.a.createElement(u.a,{title:"Connect an Instagram account",isOpen:e,width:650,onClose:t},o.a.createElement(u.a.Content,null,o.a.createElement(l.a,{onConnect:n,beforeConnect:e=>{a&&a(e),t()}})))}function p({children:e,onConnect:t,beforeConnect:n}){const[a,r]=o.a.useState(!1);return o.a.createElement(o.a.Fragment,null,o.a.createElement(c.a,{className:s.a.root,size:c.b.HERO,type:c.c.SECONDARY,onClick:()=>r(!0)},o.a.createElement(i.a,{icon:"instagram"}),null!=e?e:o.a.createElement("span",null,"Connect more Instagram accounts")),o.a.createElement(m,{isOpen:a,onClose:()=>{r(!1)},onConnect:t,beforeConnect:n}))}},127:function(e,t,n){"use strict";t.a={Sizes:{WIDE:1200,LARGE:1180,MEDIUM:960,SMALL:782,NARROW:600,ALL:[1200,1180,960,782,600]}}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);function r(e){return o.a.createElement("p",null,e.message)}},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(244),o=n.n(a),r=n(0),s=n.n(r),c=n(6),i=n(8);function l({className:e,content:t,tooltip:n,onClick:a,disabled:r,isSaving:l}){return t=null!=t?t:e=>e?"Saving ...":"Save",n=null!=n?n:"Save",s.a.createElement(c.a,{className:Object(i.b)(o.a.root,e),type:c.c.PRIMARY,size:c.b.LARGE,tooltip:n,onClick:()=>a&&a(),disabled:r},l&&s.a.createElement("div",{className:o.a.savingOverlay}),t(l))}},153:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(0),r=n.n(o),s=n(198),c=n(3),i=n(199),l=n(96),u=n(7),m=n(55),p=n(60),d=n(50),b=n(103),_=n(95),f=n(104),g=n(112),h=n(98),v=n(200),E=n(201),y=n(202),O=n(205),N=n(207),C=u.a.HoverInfo,w=u.a.HeaderInfo;!function(e){e.FILTER="filter",e.MODERATE="moderate",e.PROMOTE="promote"}(a||(a={})),t.b=function(e){const t=e.slice();t.find(e=>e.key===h.a.CONNECT).groups.push({id:"tagged",label:"Show posts where these accounts are tagged",isOpen:!0,isFakePro:!0,fields:[{component:s.a,isFakePro:!0,props:()=>({value:[],accounts:c.b.getBusinessAccounts()})}]},{id:"hashtags",label:"Show posts with these hashtags",isOpen:!0,isFakePro:!0,fields:[{component:i.a,isFakePro:!0,props:()=>({value:[]})}]});const n=t.find(e=>e.key===h.a.DESIGN);n.groups.find(e=>"feed"===e.id).fields.splice(3,0,{label:"Types of posts",component:l.a,isFakePro:!0,props:()=>({options:[{value:u.a.MediaType.ALL,label:"All posts"},{value:u.a.MediaType.PHOTOS,label:"Photos Only"},{value:u.a.MediaType.VIDEOS,label:"Videos Only"}]})});const o=n.groups.find(e=>"appearance"===e.id);o.fields.push({label:"Hover text color",component:m.a,isFakePro:!0},{label:"Hover background color",component:m.a,isFakePro:!0});const T=o.fields.find(e=>"hoverInfo"===e.option);{const e=T.props;T.props=(t,n)=>{const a=e(t,n);return a.options.push({value:C.CAPTION,label:"Caption",isFakePro:!0},{value:C.USERNAME,label:"Username",isFakePro:!0},{value:C.DATE,label:"Date",isFakePro:!0}),a}}const A=n.groups.find(e=>"header"===e.id);A.fields.splice(2,0,{label:"Header style",component:l.a,isResponsive:!0,isFakePro:!0,props:()=>({options:[{value:u.a.HeaderStyle.NORMAL,label:"Normal"},{value:u.a.HeaderStyle.CENTERED,label:"Centered"},{value:u.a.HeaderStyle.BOXED,label:"Boxed"}]})}),A.fields.push({label:"Include stories",component:p.a,isFakePro:!0},{label:"Stories interval time",component:d.a,isFakePro:!0,props:()=>({value:5,unit:"sec"})});const k=A.fields.find(e=>"headerInfo"===e.option);{const e=k.props;k.props=(t,n)=>{const a=e(t,n);return a.options.push({value:w.MEDIA_COUNT,label:"Media count",isFakePro:!0},{value:w.FOLLOWERS,label:"Follower count",isFakePro:!0}),a}}return n.groups.find(e=>"loadMoreBtn"===e.id).fields.push({label:"Autoload",component:p.a,isFakePro:!0}),n.groups.splice(4,0,{id:"lightbox",label:"Popup box",isFakePro:!0,isOpen:!1,fields:[{label:"Show sidebar",component:p.a},{label:"Number of comments",component:d.a,props:()=>({value:5,placeholder:"No comments"})}]},{id:"captions",label:"Captions",isFakePro:!0,isOpen:!1,fields:[{label:"Show captions",isResponsive:!0,component:p.a},{label:"Caption max length",isResponsive:!0,isFakePro:!0,component:d.a,props:()=>({unit:"words",placeholder:"No limit"})},{label:"Caption text size",isResponsive:!0,component:d.a,props:()=>({unit:"px",placeholder:"Theme default"})},{label:"Caption text color",component:m.a},{label:"Remove dot lines",component:p.a,help:()=>r.a.createElement("p",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",r.a.createElement("code",null,"."),", ",r.a.createElement("code",null,"•"),", ",r.a.createElement("code",null,"*"),", etc.")}]},{id:"likesComments",label:"Likes & comments",isFakePro:!0,isOpen:!1,fields:[{label:"Show likes icon",isResponsive:!0,component:p.a},{label:"Likes icon color",component:m.a},{label:"Show comments icon",isResponsive:!0,component:p.a},{label:"Comments icon color",component:m.a},{label:"Icon size",isResponsive:!0,component:d.a,props:()=>({value:20,unit:"px"})}]}),t.push({key:a.FILTER,label:"Filter",isFakePro:!0,sidebar:E.a,groups:[{id:"captionFilters",label:"Caption filtering",isOpen:!0,isFakePro:!0,fields:[{component:b.a,props:()=>({component:_.a,label:"Only show posts with these words or phrases"})},{component:f.a},{component:b.a,props:()=>({bordered:!0,component:_.a,label:"Hide posts with these words or phrases"})},{component:f.a}]},{id:"hashtagFilters",label:"Hashtag filtering",isOpen:!0,isFakePro:!0,fields:[{component:b.a,props:()=>({component:g.a,label:"Only show posts with these hashtags"})},{component:f.a},{component:b.a,props:()=>({bordered:!0,component:g.a,label:"Hide posts with these hashtags"})},{component:f.a}]}]},{key:a.MODERATE,label:"Moderate",isFakePro:!0,sidebar:v.a,viewport:y.a},{key:a.PROMOTE,label:"Promote",isFakePro:!0,sidebar:O.a,viewport:N.a}),t}},154:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var a=n(80),o=n.n(a),r=n(0),s=n.n(r),c=n(47),i=n(8),l=n(69),u=n(17),m=n(126),p=n(4),d=n(326),b=n.n(d),_=n(71),f=n(175),g=n.n(f),h=n(160),v=n(565),E=n(23),y=n(63);function O({notification:e}){const t=s.a.useRef();return Object(r.useEffect)(()=>{if(!t.current)return;const e=t.current.getElementsByTagName("a");for(let t=0;t<e.length;++t){const n=e.item(t);if("true"===n.getAttribute("data-sli-link"))continue;const a=n.getAttribute("href");if("string"!=typeof a||!a.startsWith("app://"))continue;const o=Object(y.parse)(a.substr("app://".length)),r=E.a.at(o),s=E.a.fullUrl(o);n.setAttribute("href",s),n.setAttribute("data-sli-link","true"),n.addEventListener("click",e=>{E.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()})}},[t.current]),s.a.createElement("article",{className:g.a.root},e.title&&e.title.length&&s.a.createElement("header",{className:g.a.title},e.title),s.a.createElement("main",{ref:t,className:g.a.content,dangerouslySetInnerHTML:{__html:e.content}}),e.date&&s.a.createElement("footer",{className:g.a.date},Object(h.a)(Object(v.a)(e.date),{addSuffix:!0})))}function N({isOpen:e,onBlur:t,children:n}){return s.a.createElement(_.a,{isOpen:e,onBlur:t,placement:"bottom-start",className:b.a.menu},n,s.a.createElement(_.b,null,m.a.list.map(e=>s.a.createElement(O,{key:e.id,notification:e}))))}var C,w=n(18);function T({children:e}){return s.a.createElement("div",{className:o.a.root},s.a.createElement(T.Item,null,s.a.createElement(T.Logo,null)),s.a.createElement(T.Chevron,null),s.a.createElement("div",{className:o.a.leftContainer},e[0]),e[1]&&s.a.createElement("div",{className:o.a.rightContainer},e[1]))}(C=T||(T={})).Logo=Object(p.b)((function(){const[e,t]=s.a.useState(!1),n=()=>t(!0),a=Object(w.f)(n),r=({ref:e})=>s.a.createElement("div",{ref:e,className:o.a.logo,role:"button",onClick:n,onKeyPress:a,tabIndex:0},s.a.createElement("img",{className:o.a.logoImage,src:u.a.image("spotlight-favicon.png"),alt:"Spotlight",loading:"eager"}),m.a.list.length>0&&s.a.createElement("div",{className:o.a.notificationCount},m.a.list.length));return 0===m.a.list.length?r({ref:void 0}):s.a.createElement(N,{isOpen:e,onBlur:()=>t(!1)},r)})),C.Item=({children:e})=>s.a.createElement("div",{className:o.a.item},e),C.Link=({linkTo:e,onClick:t,isCurrent:n,isDisabled:a,children:r})=>{const l=Object(i.c)({[o.a.link]:!0,[o.a.current]:n,[o.a.disabled]:a}),u=e=>{"Enter"!==e.key&&" "!==e.key||e.currentTarget.click()},m=a?-1:0;return s.a.createElement(C.Item,null,e?s.a.createElement(c.a,{to:e,className:l,role:"button",onKeyPress:u,tabIndex:m},r):s.a.createElement("div",{className:l,role:"button",onClick:()=>!a&&t&&t(),onKeyPress:u,tabIndex:m},r))},C.ProPill=()=>s.a.createElement("div",{className:o.a.proPill},s.a.createElement(l.a,null)),C.Chevron=()=>s.a.createElement("div",{className:o.a.chevron},s.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},s.a.createElement("path",{d:"M0 0 L100 50 L0 100",fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))},155:function(e,t,n){e.exports={message:"Message__message",shaking:"Message__shaking","shake-animation":"Message__shake-animation",shakeAnimation:"Message__shake-animation",icon:"Message__icon",content:"Message__content","dismiss-btn":"Message__dismiss-btn",dismissBtn:"Message__dismiss-btn",success:"Message__success Message__message",info:"Message__info Message__message",warning:"Message__warning Message__message","pro-tip":"Message__pro-tip Message__message",proTip:"Message__pro-tip Message__message",error:"Message__error Message__message"}},156:function(e,t,n){e.exports={primaryColor:"#007cba",secondaryColor:"#d04186",tertiaryColor:"#d82442",lightColor:"#f5f5f5",lightColor2:"#e6e7e8",lightColor3:"#e1e2e3",shadowColor:"rgba(20,25,60,.32)",washedColor:"#eaf0f4"}},157:function(e,t,n){e.exports={root:"Toast__root","fade-in-animation":"Toast__fade-in-animation",fadeInAnimation:"Toast__fade-in-animation","root-fading-out":"Toast__root-fading-out Toast__root",rootFadingOut:"Toast__root-fading-out Toast__root","fade-out-animation":"Toast__fade-out-animation",fadeOutAnimation:"Toast__fade-out-animation",content:"Toast__content","dismiss-icon":"Toast__dismiss-icon",dismissIcon:"Toast__dismiss-icon","dismiss-btn":"Toast__dismiss-btn Toast__dismiss-icon",dismissBtn:"Toast__dismiss-btn Toast__dismiss-icon"}},172:function(e,t,n){e.exports={root:"Tooltip__root layout__z-highest",container:"Tooltip__container","container-top":"Tooltip__container-top Tooltip__container",containerTop:"Tooltip__container-top Tooltip__container","container-bottom":"Tooltip__container-bottom Tooltip__container",containerBottom:"Tooltip__container-bottom Tooltip__container","container-left":"Tooltip__container-left Tooltip__container",containerLeft:"Tooltip__container-left Tooltip__container","container-right":"Tooltip__container-right Tooltip__container",containerRight:"Tooltip__container-right Tooltip__container",content:"Tooltip__content",arrow:"Tooltip__arrow","arrow-top":"Tooltip__arrow-top Tooltip__arrow",arrowTop:"Tooltip__arrow-top Tooltip__arrow","arrow-bottom":"Tooltip__arrow-bottom Tooltip__arrow",arrowBottom:"Tooltip__arrow-bottom Tooltip__arrow","arrow-left":"Tooltip__arrow-left Tooltip__arrow",arrowLeft:"Tooltip__arrow-left Tooltip__arrow","arrow-right":"Tooltip__arrow-right Tooltip__arrow",arrowRight:"Tooltip__arrow-right Tooltip__arrow"}},174:function(e,t,n){e.exports={root:"HelpTooltip__root layout__flex-column",tooltip:"HelpTooltip__tooltip layout__z-high","tooltip-container":"HelpTooltip__tooltip-container",tooltipContainer:"HelpTooltip__tooltip-container","tooltip-content":"HelpTooltip__tooltip-content",tooltipContent:"HelpTooltip__tooltip-content",icon:"HelpTooltip__icon"}},175:function(e,t,n){e.exports={root:"Notification__root",text:"Notification__text",title:"Notification__title Notification__text",content:"Notification__content Notification__text",date:"Notification__date"}},191:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(172),s=n.n(r),c=n(142),i=n(249),l=n(250),u=n(11),m=n(8);function p({visible:e,delay:t,placement:n,theme:r,children:p}){r=null!=r?r:{},n=n||"bottom";const[b,_]=o.a.useState(!1),f={preventOverflow:{boundariesElement:document.getElementById(u.a.config.rootId),padding:5}};Object(a.useEffect)(()=>{const n=setTimeout(()=>_(e),e?t:1);return()=>clearTimeout(n)},[e]);const g=d("container",n),h=d("arrow",n),v=Object(m.b)(s.a[g],r.container,r[g]),E=Object(m.b)(s.a[h],r.arrow,r[h]);return o.a.createElement(c.c,null,o.a.createElement(i.a,null,e=>p[0](e)),o.a.createElement(l.a,{placement:n,modifiers:f,positionFixed:!0},({ref:e,style:t,placement:n,arrowProps:a})=>b?o.a.createElement("div",{ref:e,className:Object(m.b)(s.a.root,r.root),style:t,tabIndex:-1},o.a.createElement("div",{className:v,"data-placement":n},o.a.createElement("div",{className:Object(m.b)(s.a.content,r.content)},p[1]),o.a.createElement("div",{className:E,ref:a.ref,style:a.style,"data-placement":n}))):null))}function d(e,t){switch(t){case"top":case"top-start":case"top-end":return e+"Top";case"bottom":case"bottom-start":case"bottom-end":return e+"Bottom";case"left":case"left-start":case"left-end":return e+"Left";case"right":case"right-start":case"right-end":return e+"Right";default:return e}}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(323),s=n.n(r),c=n(140);const i=({feed:e,onCopy:t,toaster:n,children:a})=>o.a.createElement(s.a,{text:`[instagram feed="${e.id}"]`,onCopy:()=>{n&&n.addToast("feeds/shortcode/copied",()=>o.a.createElement(c.a,{message:"Copied shortcode to clipboard."})),t&&t()}},a)},197:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(328),s=n.n(r);function c({message:e}){return o.a.createElement("pre",{className:s.a.content},e)}},203:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(557);const r=({size:e})=>{const t=(e=null!=e?e:24)+"px",n={width:t,height:t,boxShadow:`${.25*e+"px"} 0 0 ${.375*e+"px"} #999 inset`};return o.a.createElement("span",{className:"loading-spinner",style:n})}},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a=n(0),o=n.n(a),r=n(84),s=n.n(r),c=n(33),i=n(3),l=n(39),u=n(6),m=n(9),p=n(85),d=n.n(p),b=n(44),_=n(11);function f({isColumn:e,onConnectPersonal:t,onConnectBusiness:n}){const[r,s]=o.a.useState(!1),[c,i]=o.a.useState(""),[l,m]=o.a.useState(""),[p,_]=o.a.useState(!1);Object(a.useEffect)(()=>{_(c.length>145&&!c.trimLeft().startsWith("IG"))},[c]);const f=o.a.createElement("div",{className:d.a.helpMessage},!1),g=o.a.createElement("div",{className:d.a.buttonContainer},e&&f,o.a.createElement(u.a,{className:d.a.button,onClick:()=>{p?n(c,l):t(c)},type:u.c.PRIMARY,disabled:0===c.length&&(0===l.length||!p)},"Connect"));return o.a.createElement("div",{className:e?d.a.column:d.a.row},o.a.createElement(b.a,{label:"Connect using an access token (for developers)",stealth:!0,isOpen:r,onClick:()=>s(!r)},o.a.createElement("div",{className:d.a.content},o.a.createElement("label",{className:d.a.label,htmlFor:"manual-connect-access-token"},o.a.createElement("div",null,"Enter your Instagram or Facebook access token")),o.a.createElement("div",{className:d.a.bottom},o.a.createElement("input",{id:"manual-connect-access-token",type:"text",value:c,onChange:e=>i(e.target.value),placeholder:"Your access token"}),!p&&g)),p&&o.a.createElement("div",{className:d.a.content},o.a.createElement("label",{className:d.a.label,htmlFor:"manual-connect-user-id"},o.a.createElement("div",null,"This access token is for a ",o.a.createElement("strong",null,"Business")," account."," ","Enter the user ID:")),o.a.createElement("div",{className:d.a.bottom},o.a.createElement("input",{id:"manual-connect-user-id",type:"text",value:l,onChange:e=>m(e.target.value),placeholder:"Enter the user ID"}),p&&g)),!e&&f))}function g({onConnect:e,beforeConnect:t,useColumns:n,showPrompt:a}){a=null==a||a,e||(e=()=>{});const r=e=>{c.a.State.connectSuccess&&t&&t(e)};return o.a.createElement("div",{className:s.a.root},a&&o.a.createElement("p",{className:s.a.promptMsg},"Choose the type of account to connect:"),o.a.createElement("div",{className:n?s.a.typesColumns:s.a.typesRows},o.a.createElement("div",{className:s.a.type},o.a.createElement(u.a,{type:u.c.PRIMARY,size:u.b.HERO,onClick:()=>c.a.openAuthWindow(i.a.Type.PERSONAL,l.a.ANIMATION_DELAY,r).then(e).catch(()=>{})},"Connect your Personal account"),o.a.createElement("div",{className:s.a.capabilities},o.a.createElement(h,null,"Connects directly through Instagram"),o.a.createElement(h,null,"Show posts from your account"))),o.a.createElement("div",{className:s.a.type},o.a.createElement(u.a,{type:u.c.SECONDARY,size:u.b.HERO,onClick:()=>c.a.openAuthWindow(i.a.Type.BUSINESS,l.a.ANIMATION_DELAY,r).then(e).catch(()=>{})},"Connect your Business account"),o.a.createElement("div",{className:s.a.capabilities},o.a.createElement(h,null,"Connects through your Facebook page"),o.a.createElement(h,null,"Show posts from your account"),o.a.createElement(h,null,"Show posts where you are tagged"),o.a.createElement(h,null,"Show posts with a specific hashtag from all across Instagram"),o.a.createElement("div",{className:s.a.businessLearnMore},o.a.createElement(m.a,{icon:"editor-help"}),o.a.createElement("a",{href:_.a.resources.businessAccounts,target:"_blank"},"Learn more about Business accounts"))))),o.a.createElement("div",{className:s.a.connectAccessToken},o.a.createElement(f,{isColumn:n,onConnectPersonal:t=>c.a.manualConnectPersonal(t,l.a.ANIMATION_DELAY,r).then(e),onConnectBusiness:(t,n)=>c.a.manualConnectBusiness(t,n,l.a.ANIMATION_DELAY,r).then(e)})))}const h=e=>{var{children:t}=e,n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children"]);return o.a.createElement("div",Object.assign({className:s.a.capability},n),o.a.createElement(m.a,{icon:"yes"}),o.a.createElement("div",null,t))}},209:function(e,t,n){e.exports={root:"ModalPrompt__root",button:"ModalPrompt__button"}},22:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u}));var a,o=n(0),r=n.n(o),s=n(155),c=n.n(s),i=n(8),l=n(9);!function(e){e.SUCCESS="success",e.INFO="info",e.PRO_TIP="pro-tip",e.WARNING="warning",e.ERROR="error"}(a||(a={}));const u=({children:e,type:t,showIcon:n,shake:a,isDismissible:o,onDismiss:s})=>{const[u,p]=r.a.useState(!1),d=Object(i.b)(c.a[t],a?c.a.shaking:null);return u?null:r.a.createElement("div",{className:d},n?r.a.createElement("div",null,r.a.createElement(l.a,{className:c.a.icon,icon:m(t)})):null,r.a.createElement("div",{className:c.a.content},e),o?r.a.createElement("button",{className:c.a.dismissBtn,onClick:()=>{o&&(p(!0),s&&s())}},r.a.createElement(l.a,{icon:"no"})):null)};function m(e){switch(e){case a.SUCCESS:return"yes-alt";case a.PRO_TIP:return"lightbulb";case a.ERROR:case a.WARNING:return"warning";case a.INFO:default:return"info"}}},239:function(e,t,n){e.exports={root:"ClearCacheButton__root layout__flex-row","doc-link":"ClearCacheButton__doc-link",docLink:"ClearCacheButton__doc-link"}},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(1),o=n(11),r=n(5),s=n(14);let c;t.b=c=a.n.object({values:Object(a.n)({}),original:{},isDirty:!1,isSaving:!1,save:Object(a.f)(()=>{if(c.isDirty)return c.isSaving=!0,o.a.restApi.saveSettings(c.values).then(e=>{c.fromResponse(e),document.dispatchEvent(new l(i))}).finally(()=>c.isSaving=!1)}),load:Object(a.f)(()=>o.a.restApi.getSettings().then(e=>c.fromResponse(e)).catch(e=>{throw s.a.getErrorReason(e)})),restore:Object(a.f)(()=>{Object.assign(c.values,c.original),c.isDirty=!1}),fromResponse:e=>{if("object"!=typeof e||void 0===e.data)throw"Spotlight encountered a problem while trying to load your settings. Kindly contact customer support for assistance.";c.original=e.data,c.restore()}}),Object(a.g)(()=>{c.isDirty=!Object(r.j)(c.original,c.values)});const i="sli/settings/saved";class l extends CustomEvent{constructor(e,t={}){super(e,t)}}},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(271);const r=({children:e})=>o.a.createElement("div",{className:"button-group"},e)},243:function(e,t,n){e.exports={root:"Toaster__root layout__z-highest",container:"Toaster__container"}},244:function(e,t,n){e.exports={root:"SaveButton__root","saving-overlay":"SaveButton__saving-overlay layout__fill-parent",savingOverlay:"SaveButton__saving-overlay layout__fill-parent","saving-animation":"SaveButton__saving-animation",savingAnimation:"SaveButton__saving-animation"}},27:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(1),r=n(7),s=n(14),c=n(11),i=function(e,t,n,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};!function(e){class t{constructor(e={}){t.setFromObject(this,e)}static setFromObject(e,t={}){var n,a,o,s;e.id=null!==(n=t.id)&&void 0!==n?n:null,e.name=null!==(a=t.name)&&void 0!==a?a:"",e.usages=null!==(o=t.usages)&&void 0!==o?o:[],e.options=r.a.Options.setFromObject(null!==(s=e.options)&&void 0!==s?s:new r.a.Options,t.options)}get label(){return this.name.length>0?this.name:this.id?"(no name)":"New Feed"}}function n(n){if("object"!=typeof n||!Array.isArray(n.data))throw"Spotlight encountered a problem trying to load your feeds. Kindly contact customer support for assistance.";e.list.replace(n.data.map(e=>new t(e)))}i([o.n],t.prototype,"id",void 0),i([o.n],t.prototype,"name",void 0),i([o.n],t.prototype,"usages",void 0),i([o.n],t.prototype,"options",void 0),i([o.h],t.prototype,"label",null),e.SavedFeed=t,e.list=Object(o.n)([]),e.loadFeeds=()=>s.a.getFeeds().then(n).catch(e=>{throw s.a.getErrorReason(e)}),e.getById=t=>(t="string"==typeof t?parseInt(t):t)?e.list.find(e=>e.id==t):void 0,e.hasFeeds=()=>e.list.length>0,e.create=function(n,a){const o=new t({id:null,name:l(n),options:a});return e.list.push(o),o},e.saveFeed=function(n){return c.a.restApi.saveFeed(n).then(a=>{const o=new t(a.data.feed);if(null===n.id)e.list.push(o);else{const t=e.list.findIndex(e=>e.id===n.id);e.list[t]=o}return o})},e.deleteFeed=function(t){const n=null!==t.id?e.list.findIndex(e=>e.id===t.id):e.list.findIndex(e=>e===t);return n>=0&&e.list.splice(n,1),null!==t.id?c.a.restApi.deleteFeed(t.id).catch(e=>{}):new Promise(e=>e())};const a=new RegExp("([\\w\\s]+)\\s?\\((\\d+)\\)?");function l(t){const n=u(t)[0],a=e.list.map(e=>u(e.name)).filter(e=>e[0]===n),o=a.reduce((e,t)=>Math.max(e,t[1]),1);return a.length>0?`${n} (${o+1})`:t.trim()}function u(e){e=e.trim();const t=a.exec(e);return t?[t[1].trim(),parseInt(t[2])]:[e,0]}}(a||(a={}))},271:function(e,t,n){},272:function(e,t,n){},307:function(e,t,n){},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(31),o=n(72),r=n(23);const s={factories:Object(a.c)({"router/history":()=>Object(o.a)(),"router/store":e=>r.a.useHistory(e.get("router/history"))}),run:e=>{e.get("router/store")}}},311:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(18);function o({when:e,is:t,isRoot:n,render:o}){const r=Object(a.g)().get(e);return r===t||!t&&!r||n&&!r?o():null}},312:function(e,t,n){e.exports={root:"ConnectAccountButton__root"}},317:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(8),s=(n(384),function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n});const c=e=>{var{className:t,unit:n}=e,a=s(e,["className","unit"]);const c=Object(r.b)("unit-input__field",t);return o.a.createElement("div",{className:"unit-input"},o.a.createElement("input",Object.assign({},a,{className:c})),o.a.createElement("div",{className:"unit-input__unit"},o.a.createElement("span",null,n)))}},318:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(319),s=(n(272),n(18)),c=n(12),i=n(142),l=n(249),u=n(250),m=n(8),p=n(11);const d=({id:e,value:t,disableAlpha:n,onChange:a})=>{t=null!=t?t:"#fff";const[d,b]=o.a.useState(!1),_=o.a.useRef(),f=o.a.useRef(),g=()=>b(!1),h=()=>b(e=>!e);Object(s.b)(_,g,[f]),Object(s.c)([_,f],g),Object(s.d)("keydown",e=>{"Escape"===e.key&&d&&(g(),e.preventDefault(),e.stopPropagation())},[d]);const v=e=>a&&a(e),E={preventOverflow:{boundariesElement:document.getElementById(p.a.config.rootId),padding:5}};return o.a.createElement(i.c,null,o.a.createElement(l.a,null,({ref:n})=>o.a.createElement("button",{ref:Object(m.d)(_,n),id:e,className:"color-picker",onClick:h},o.a.createElement("span",{className:"color-picker__preview",style:{backgroundColor:Object(c.a)(t)}}))),o.a.createElement(u.a,{placement:"bottom-end",positionFixed:!0,modifiers:E},({ref:e,style:a})=>d&&o.a.createElement("div",{className:"color-picker__popper",ref:Object(m.d)(f,e),style:a},o.a.createElement(r.ChromePicker,{color:t,onChange:v,disableAlpha:n}))))}},322:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(3),s=n(83),c=n(102),i=n(33),l=n(4),u=n(11);t.a=Object(l.b)((function({}){Object(a.useEffect)(()=>{const e=e=>{const a=e.detail.account;n||m||a.type!==r.a.Type.PERSONAL||a.customBio.length||a.customProfilePicUrl.length||(t(a),l(!0))};return document.addEventListener(i.a.ACCOUNT_CONNECTED_EVENT,e),()=>document.removeEventListener(i.a.ACCOUNT_CONNECTED_EVENT,e)},[]);const[e,t]=o.a.useState(null),[n,l]=o.a.useState(!1),[m,p]=o.a.useState(!1),d=()=>{i.a.State.connectedId=null};return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{title:"You've successfully connected your account!",buttons:["Yes","No, maybe later"],isOpen:n,onAccept:()=>{l(!1),p(!0)},onCancel:()=>{l(!1),d()}},o.a.createElement("p",null,"One more thing ..."),o.a.createElement("p",null,"Instagram doesn't provide the profile photo and bio text for Personal accounts."," ","Would you like to set a custom photo and a custom bio in Spotlight to match your Instagram profile?"),o.a.createElement("p",null,o.a.createElement("a",{href:u.a.resources.customPersonalInfoUrl,target:"_blank"},"What's this about?"))),o.a.createElement(c.a,{isOpen:m,onClose:()=>{p(!1),d()},account:e}))}))},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(1),o=n(5),r=function(e,t,n,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(e){this.ttl=e,this.toasts=new Array}addToast(e,t,n){this.toasts.push({key:e+Object(o.o)(),component:t,ttl:n})}removeToast(e){const t=this.toasts.findIndex(t=>t.key===e);t>-1&&this.toasts.splice(t,1)}}r([a.n],s.prototype,"toasts",void 0),r([a.f],s.prototype,"addToast",null),r([a.f],s.prototype,"removeToast",null)},326:function(e,t,n){e.exports={menu:"NotificationMenu__menu"}},328:function(e,t,n){e.exports={content:"ErrorToast__content"}},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(3),r=n(36),s=n(11),c=n(1),i=n(566),l=n(564),u=n(565);!function(e){let t=null,n=null;e.State=window.SliAccountManagerState=Object(c.n)({accessToken:null,connectSuccess:!1,connectedId:null});const a=Object(i.a)(new Date,{days:7});function m(t,n,a){a&&a(e.State.connectedId),setTimeout(()=>o.b.loadAccounts().then(()=>{const t=o.b.getById(e.State.connectedId),a=new d(e.ACCOUNT_CONNECTED_EVENT,t);document.dispatchEvent(a),n(e.State.connectedId)}),t)}function p(e){return e.type===o.a.Type.BUSINESS&&e.accessToken.expiry&&Object(l.a)(a,Object(u.a)(e.accessToken.expiry))}e.manualConnectPersonal=function(t,n=0,a){return new Promise((o,r)=>{e.State.connectSuccess=!1,s.a.restApi.connectPersonal(t).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(n,o,a)}).catch(r)})},e.manualConnectBusiness=function(t,n,a=0,o){return new Promise((r,c)=>{e.State.connectSuccess=!1,s.a.restApi.connectBusiness(t,n).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,m(a,r,o)}).catch(c)})},e.openAuthWindow=function(a,c=0,i){return new Promise((l,u)=>{if(e.State.connectedId=null,null==t||t.closed){const e=Object(r.a)(700,800),n=a===o.a.Type.PERSONAL?s.a.restApi.config.personalAuthUrl:s.a.restApi.config.businessAuthUrl;t=Object(r.c)(n,"_blank",Object.assign({dependent:"yes",resizable:"yes",toolbar:"no",location:"no",scrollbars:"no"},e))}else t.focus();null==t||t.closed||(n=setInterval(()=>{t&&!t.closed||(clearInterval(n),null===e.State.connectedId?u&&u():m(c,l,i))},500))})},e.updateAccount=function(e){return s.a.restApi.updateAccount(e)},e.deleteAccount=function(e){return s.a.restApi.deleteAccount(e).then(o.b.loadFromResponse)},e.getExpiringTokenAccounts=function(){return o.b.list.filter(p)},e.isTokenExpiring=p,e.ACCOUNT_CONNECTED_EVENT="sli/account/connected";class d extends CustomEvent{constructor(e,t){super(e,{detail:{account:t}})}}e.AccountConnectedEvent=d}(a||(a={}))},330:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(39),s=n(150),c=n(24),i=n(135),l=n(11),u=n(4);t.a=Object(u.b)((function({isOpen:e,onClose:t,onSave:n}){return o.a.createElement(r.a,{title:"Global filters",isOpen:e,onClose:()=>{c.b.isDirty&&!confirm("You have unsaved changes. If you close the window now, your settings will not be saved. Click OK to close anyway.")||t()}},o.a.createElement(r.a.Content,null,o.a.createElement(i.a,{page:l.a.settings.pages.find(e=>"filters"===e.id)})),o.a.createElement(r.a.Footer,null,o.a.createElement(s.a,{disabled:!c.b.isDirty,isSaving:c.b.isSaving,onClick:()=>{c.b.save().then(()=>{n&&n()})}})))}))},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(8);n(556);const s=({name:e,className:t,disabled:n,value:a,onChange:s,options:c})=>{const i=e=>{!n&&e.target.checked&&s&&s(e.target.value)},l=Object(r.b)(Object(r.a)("radio-group",{"--disabled":n}),t);return o.a.createElement("div",{className:l},c.map((t,n)=>o.a.createElement("label",{className:"radio-group__option",key:n},o.a.createElement("input",{type:"radio",name:e,value:t.value,checked:a===t.value,onChange:i}),o.a.createElement("span",null,t.label))))}},339:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(9),s=n(157),c=n.n(s);function i({children:e,ttl:t,onExpired:n}){t=null!=t?t:0;const[s,i]=o.a.useState(!1);let l=o.a.useRef(),u=o.a.useRef();const m=()=>{t>0&&(l.current=setTimeout(d,t))},p=()=>{clearTimeout(l.current)},d=()=>{i(!0),u.current=setTimeout(b,200)},b=()=>{n&&n()};Object(a.useEffect)(()=>(m(),()=>{p(),clearTimeout(u.current)}),[]);const _=s?c.a.rootFadingOut:c.a.root;return o.a.createElement("div",{className:_,onMouseOver:p,onMouseOut:m},o.a.createElement("div",{className:c.a.content},e),o.a.createElement("button",{className:c.a.dismissBtn,onClick:()=>{p(),d()}},o.a.createElement(r.a,{icon:"no-alt",className:c.a.dismissIcon})))}var l=n(243),u=n.n(l),m=n(4);t.a=Object(m.b)((function({store:e}){return o.a.createElement("div",{className:u.a.root},o.a.createElement("div",{className:u.a.container},e.toasts.map(t=>{var n;return o.a.createElement(i,{key:t.key,ttl:null!==(n=t.ttl)&&void 0!==n?n:e.ttl,onExpired:()=>{return n=t.key,void e.removeToast(n);var n}},o.a.createElement(t.component))})))}))},380:function(e,t,n){},381:function(e,t,n){},382:function(e,t,n){},383:function(e,t,n){},384:function(e,t,n){},39:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(30),s=n.n(r),c=n(8),i=(n(380),n(18)),l=n(6),u=n(9);function m({children:e,className:t,isOpen:n,icon:r,title:l,width:u,height:p,onClose:d,allowShadeClose:b,focusChild:_,portalTo:f}){const g=o.a.useRef(),[h]=Object(i.a)(n,!1,m.ANIMATION_DELAY);if(Object(i.d)("keydown",e=>{"Escape"===e.key&&(d&&d(),e.preventDefault(),e.stopPropagation())},[],[d]),Object(a.useEffect)(()=>{g&&g.current&&n&&(null!=_?_:g).current.focus()},[]),!h)return null;const v={width:u=null!=u?u:600,height:p},E=Object(c.b)("modal",n?"modal--open":null,n?null:"modal--close",t,"wp-core-ui-override");b=null==b||b;const y=o.a.createElement("div",{className:E},o.a.createElement("div",{className:"modal__shade",tabIndex:-1,onClick:()=>{b&&d&&d()}}),o.a.createElement("div",{ref:g,className:"modal__container",style:v,tabIndex:-1},l?o.a.createElement(m.Header,null,o.a.createElement("h1",null,o.a.createElement(m.Icon,{icon:r}),l),o.a.createElement(m.CloseBtn,{onClick:d})):null,e));return s.a.createPortal(y,null!=f?f:document.body)}!function(e){e.ANIMATION_DELAY=120,e.CloseBtn=({onClick:e})=>o.a.createElement(l.a,{className:"modal__close-btn",type:l.c.NONE,onClick:e,tooltip:"Close"},o.a.createElement("span",{className:"dashicons dashicons-no-alt"})),e.Icon=({icon:e})=>e?o.a.createElement(u.a,{icon:e,className:"modal__icon"}):null,e.Header=({children:e})=>o.a.createElement("div",{className:"modal__header"},e),e.Content=({children:e})=>o.a.createElement("div",{className:"modal__scroller"},o.a.createElement("div",{className:"modal__content"},e)),e.Footer=({children:e})=>o.a.createElement("div",{className:"modal__footer"},e)}(m||(m={}))},44:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(8),s=(n(381),n(9));const c=o.a.forwardRef(({label:e,className:t,isOpen:n,showIcon:a,disabled:c,stealth:i,fitted:l,hideOnly:u,onClick:m,children:p},d)=>{u=null!=u&&u,a=null==a||a,c=null!=c&&c;const[b,_]=o.a.useState(!1),f=void 0!==n;f||(n=b);const g=()=>{c||(f||_(!n),m&&m())},h=Object(r.a)("spoiler",{"--open":n,"--disabled":c,"--fitted":l,"--stealth":i}),v=Object(r.b)(h,t),E=n?"arrow-up-alt2":"arrow-down-alt2",y=Array.isArray(e)?e.map((e,t)=>o.a.createElement(o.a.Fragment,{key:t},e)):"string"==typeof e?o.a.createElement("span",null,e):e;return o.a.createElement("div",{ref:d,className:v},o.a.createElement("div",{className:"spoiler__header",onClick:g,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||g()},role:"button",tabIndex:0},o.a.createElement("div",{className:"spoiler__label"},y),a&&o.a.createElement(s.a,{icon:E,className:"spoiler__icon"})),(n||u)&&o.a.createElement("div",{className:"spoiler__content"},p))})},548:function(e,t,n){},556:function(e,t,n){},557:function(e,t,n){},6:function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return u}));var a,o,r=n(0),s=n.n(r),c=n(8),i=n(191),l=(n(271),n(5));!function(e){e[e.PRIMARY=0]="PRIMARY",e[e.SECONDARY=1]="SECONDARY",e[e.TOGGLE=2]="TOGGLE",e[e.LINK=3]="LINK",e[e.PILL=4]="PILL",e[e.DANGER=5]="DANGER",e[e.DANGER_LINK=6]="DANGER_LINK",e[e.DANGER_PILL=7]="DANGER_PILL",e[e.NONE=8]="NONE"}(a||(a={})),function(e){e[e.SMALL=0]="SMALL",e[e.NORMAL=1]="NORMAL",e[e.LARGE=2]="LARGE",e[e.HERO=3]="HERO"}(o||(o={}));const u=s.a.forwardRef((e,t)=>{let{children:n,className:r,type:u,size:m,active:p,tooltip:d,tooltipPlacement:b,onClick:_,linkTo:f}=e,g=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children","className","type","size","active","tooltip","tooltipPlacement","onClick","linkTo"]);u=null!=u?u:a.SECONDARY,m=null!=m?m:o.NORMAL,b=null!=b?b:"bottom";const[h,v]=s.a.useState(!1),E=()=>v(!0),y=()=>v(!1),O=Object(c.b)(r,u!==a.NONE?"button":null,u===a.PRIMARY?"button-primary":null,u===a.SECONDARY?"button-secondary":null,u===a.LINK?"button-secondary button-tertiary":null,u===a.PILL?"button-secondary button-tertiary button-pill":null,u===a.TOGGLE?"button-toggle":null,u===a.TOGGLE&&p?"button-primary button-active":null,u!==a.TOGGLE||p?null:"button-secondary",u===a.DANGER?"button-secondary button-danger":null,u===a.DANGER_LINK?"button-tertiary button-danger":null,u===a.DANGER_PILL?"button-tertiary button-danger button-danger-pill":null,m===o.SMALL?"button-small":null,m===o.LARGE?"button-large":null,m===o.HERO?"button-hero":null),N=e=>{_&&_(e)};let C="button";if("string"==typeof f?(C="a",g.href=f):g.type="button",g.tabIndex=0,!d)return s.a.createElement(C,Object.assign({ref:t,className:O,onClick:N},g),n);const w="string"==typeof d,T="btn-tooltip-"+Object(l.o)(),A=w?d:s.a.createElement(d,{id:T});return s.a.createElement(i.a,{visible:h&&!e.disabled,placement:b,delay:300},({ref:e})=>s.a.createElement(C,Object.assign({ref:t?Object(c.d)(e,t):e,className:O,onClick:N,onMouseEnter:E,onMouseLeave:y},g),n),A)})},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(8),s=n(6),c=(n(382),n(9)),i=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};function l(e){var{className:t,children:n,isTransitioning:a}=e,s=i(e,["className","children","isTransitioning"]);const c=Object(r.a)("onboarding",{"--transitioning":a});return o.a.createElement("div",Object.assign({className:Object(r.b)(c,t)},s),Array.isArray(n)?n.map((e,t)=>o.a.createElement("div",{key:t},e)):n)}!function(e){e.TRANSITION_DURATION=200,e.Thin=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__thin",t)},a),n)},e.HelpMsg=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__help-msg",t)},a),n)},e.ProTip=({children:t})=>o.a.createElement(e.HelpMsg,null,o.a.createElement("div",{className:"onboarding__pro-tip"},o.a.createElement("span",null,o.a.createElement(c.a,{icon:"lightbulb"}),o.a.createElement("strong",null,"Pro tip!")),t)),e.StepList=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("ul",Object.assign({className:Object(r.b)("onboarding__steps",t)},a),n)},e.Step=e=>{var{isDone:t,num:n,className:a,children:s}=e,c=i(e,["isDone","num","className","children"]);return o.a.createElement("li",Object.assign({className:Object(r.b)(t?"onboarding__done":null,a)},c),o.a.createElement("strong",null,"Step ",n,":")," ",s)},e.HeroButton=e=>{var t,{className:n,children:a}=e,c=i(e,["className","children"]);return o.a.createElement(s.a,Object.assign({type:null!==(t=c.type)&&void 0!==t?t:s.c.PRIMARY,size:s.b.HERO,className:Object(r.b)("onboarding__hero-button",n)},c),a)}}(l||(l={}))},70:function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(316),s=n(192),c=n(315),i=n(156),l=n.n(i),u=n(8);const m=(e={})=>({option:(e,t)=>Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"24px"}),menu:(e,t)=>Object.assign(Object.assign({},e),{margin:"6px 0",boxShadow:"0 2px 8px "+l.a.shadowColor,overflow:"hidden"}),menuList:(e,t)=>({padding:"0px"}),control:(e,t)=>{let n=Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"2",minHeight:"40px"});return t.isFocused&&(n.borderColor=l.a.primaryColor,n.boxShadow="0 0 0 1px "+l.a.primaryColor),n},valueContainer:(e,t)=>Object.assign(Object.assign({},e),{paddingTop:0,paddingBottom:0,paddingRight:0}),container:(t,n)=>Object.assign(Object.assign({},t),{width:e.width||"100%"}),multiValue:(e,t)=>Object.assign(Object.assign({},e),{padding:"0 6px"}),input:(e,t)=>Object.assign(Object.assign({},e),{outline:"0 transparent !important",border:"0 transparent !important",boxShadow:"0 0 0 transparent !important"}),indicatorSeparator:(e,t)=>Object.assign(Object.assign({},e),{margin:"0",backgroundColor:"transparent"})}),p=o.a.forwardRef((e,t)=>{var n;const a=(null!==(n=e.options)&&void 0!==n?n:[]).find(t=>t.value===e.value);e=Object.assign(Object.assign({},e),{id:void 0,className:Object(u.b)("react-select",e.className),classNamePrefix:"react-select",inputId:e.id,menuPosition:"fixed"});const i=m(e),p=e.isCreatable?s.a:e.async?c.a:r.a;return o.a.createElement(p,Object.assign({},e,{ref:t,isSearchable:e.isCreatable,value:a,styles:i,theme:e=>Object.assign(Object.assign({},e),{borderRadius:3,colors:Object.assign(Object.assign({},e.colors),{primary:l.a.primaryColor,primary25:l.a.washedColor})}),menuPlacement:"auto",menuShouldScrollIntoView:!0}))})},71:function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return _}));var a=n(0),o=n.n(a),r=n(142),s=n(249),c=n(250),i=n(18),l=n(11),u=(n(383),n(8));const m=({children:e,className:t,refClassName:n,isOpen:a,onBlur:m,placement:d,modifiers:b,useVisibility:_})=>{d=null!=d?d:"bottom-end",_=null!=_&&_;const f=o.a.useRef(),g=a||_,h=!a&&_,v=Object.assign({preventOverflow:{boundariesElement:document.getElementById(l.a.config.rootId),padding:5}},b),E=()=>{m()},y=e=>{switch(e.key){case"ArrowDown":break;case"Escape":E();break;default:return}e.preventDefault(),e.stopPropagation()};return Object(i.b)(f,E,[f]),Object(i.c)([f],E),o.a.createElement("div",{ref:f,className:Object(u.b)("menu__ref",n)},o.a.createElement(r.c,null,o.a.createElement(s.a,null,t=>e[0](t)),o.a.createElement(c.a,{placement:d,positionFixed:!0,modifiers:v},({ref:n,style:a,placement:r})=>g?o.a.createElement("div",{ref:n,className:"menu",style:p(a,h),"data-placement":r,onKeyDown:y},o.a.createElement("div",{className:"menu__container"+(t?" "+t:"")},e[1])):null)))};function p(e,t){return Object.assign(Object.assign({},e),{opacity:1,pointerEvents:"all",visibility:t?"hidden":"visible"})}const d=({children:e,onClick:t,disabled:n,active:a})=>{const r=Object(u.a)("menu__item",{"--disabled":n,"--active":a});return o.a.createElement("div",{className:r},o.a.createElement("button",{onClick:()=>!a&&!n&&t&&t()},e))},b=({children:e})=>e,_=({children:e})=>o.a.createElement("div",{className:"menu__static"},e)},80:function(e,t,n){e.exports={root:"Navbar__root layout__flex-row",container:"Navbar__container layout__flex-row","left-container":"Navbar__left-container Navbar__container layout__flex-row",leftContainer:"Navbar__left-container Navbar__container layout__flex-row","right-container":"Navbar__right-container Navbar__container layout__flex-row",rightContainer:"Navbar__right-container Navbar__container layout__flex-row",child:"Navbar__child",item:"Navbar__item Navbar__child",disabled:"Navbar__disabled",chevron:"Navbar__chevron Navbar__child",logo:"Navbar__logo","logo-image":"Navbar__logo-image",logoImage:"Navbar__logo-image","notification-count":"Navbar__notification-count",notificationCount:"Navbar__notification-count",link:"Navbar__link","pro-pill":"Navbar__pro-pill",proPill:"Navbar__pro-pill",current:"Navbar__current","button-container":"Navbar__button-container layout__flex-row",buttonContainer:"Navbar__button-container layout__flex-row"}},83:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(209),s=n.n(r),c=n(39),i=n(6);function l({children:e,title:t,buttons:n,onAccept:a,onCancel:r,isOpen:l,okDisabled:u,cancelDisabled:m}){n=null!=n?n:["OK","Cancel"];const p=()=>r&&r();return o.a.createElement(c.a,{isOpen:l,title:t,onClose:p,className:s.a.root},o.a.createElement(c.a.Content,null,"string"==typeof e?o.a.createElement("p",null,e):e),o.a.createElement(c.a.Footer,null,o.a.createElement(i.a,{className:s.a.button,type:i.c.SECONDARY,onClick:p,disabled:m},n[1]),o.a.createElement(i.a,{className:s.a.button,type:i.c.PRIMARY,onClick:()=>a&&a(),disabled:u},n[0])))}},84:function(e,t,n){e.exports={root:"ConnectAccount__root","prompt-msg":"ConnectAccount__prompt-msg",promptMsg:"ConnectAccount__prompt-msg",types:"ConnectAccount__types",type:"ConnectAccount__type","types-rows":"ConnectAccount__types-rows ConnectAccount__types",typesRows:"ConnectAccount__types-rows ConnectAccount__types","types-columns":"ConnectAccount__types-columns ConnectAccount__types",typesColumns:"ConnectAccount__types-columns ConnectAccount__types",capabilities:"ConnectAccount__capabilities",capability:"ConnectAccount__capability","business-learn-more":"ConnectAccount__business-learn-more",businessLearnMore:"ConnectAccount__business-learn-more","connect-access-token":"ConnectAccount__connect-access-token",connectAccessToken:"ConnectAccount__connect-access-token"}},85:function(e,t,n){e.exports={root:"ConnectAccessToken__root",row:"ConnectAccessToken__row ConnectAccessToken__root",content:"ConnectAccessToken__content",label:"ConnectAccessToken__label",bottom:"ConnectAccessToken__bottom","button-container":"ConnectAccessToken__button-container",buttonContainer:"ConnectAccessToken__button-container",button:"ConnectAccessToken__button","help-message":"ConnectAccessToken__help-message",helpMessage:"ConnectAccessToken__help-message",column:"ConnectAccessToken__column ConnectAccessToken__root"}},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(192),s=n(22),c=n(70);const i={DropdownIndicator:null},l=e=>({label:e,value:e}),u=({id:e,value:t,onChange:n,sanitize:u,autoFocus:m,message:p})=>{const[d,b]=o.a.useState(""),[_,f]=o.a.useState(-1),[g,h]=o.a.useState();Object(a.useEffect)(()=>{h(p)},[p]);const v=(t=Array.isArray(t)?t:[]).map(e=>l(e)),E=e=>{if(!n)return;let t=-1;e=e?e.map(e=>e&&u?u(e.value):e.value).filter((e,n,a)=>{const o=a.indexOf(e);return o!==n?(t=o,!1):!!e}):[],f(t),-1===t&&n(e)},y=Object(c.b)();return o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{inputId:e,className:"react-select",classNamePrefix:"react-select",components:i,inputValue:d,isClearable:!1,isMulti:!0,menuIsOpen:!1,onChange:E,onInputChange:e=>{b(e)},onKeyDown:e=>{if(d)switch(e.key){case",":case"Enter":case"Tab":b(""),E([...v,l(d)]),e.preventDefault()}},placeholder:"Type something and press enter...",value:v,autoFocus:m,styles:y}),_<0||0===v.length?null:o.a.createElement(s.a,{type:s.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},o.a.createElement("code",null,v[_].label)," is already in the list"),g?o.a.createElement(s.a,{type:s.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},g):null)};var m=n(4);const p=Object(m.b)(e=>{const[t,n]=o.a.useState("");e.exclude&&0===e.exclude.length&&t.length>0&&n("");let a=void 0;if(t.length>0){const n="%s",r=e.excludeMsg.indexOf("%s"),s=e.excludeMsg.substring(0,r),c=e.excludeMsg.substring(r+n.length);a=o.a.createElement(o.a.Fragment,null,s,o.a.createElement("code",null,t),c)}const r=Object.assign(Object.assign({},e),{message:a,onChange:t=>{const a=t.findIndex(t=>e.exclude.includes(t));a>-1?n(t[a]):e.onChange(t)}});return o.a.createElement(u,Object.assign({},r))})}}]);
1
+ (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[2],{105:function(e,t,n){e.exports={table:"Table__table theme__subtle-drop-shadow theme__slightly-rounded",header:"Table__header",footer:"Table__footer",cell:"Table__cell","col-heading":"Table__col-heading Table__cell",colHeading:"Table__col-heading Table__cell",row:"Table__row","align-left":"Table__align-left",alignLeft:"Table__align-left","align-right":"Table__align-right",alignRight:"Table__align-right","align-center":"Table__align-center",alignCenter:"Table__align-center"}},109:function(e,t,n){"use strict";t.a=wp},11:function(e,t,n){"use strict";var a=n(14),o=n(0),r=n.n(o),s=n(24),c=n(148),i=n(4),l=n(70),u=n(114),p=n.n(u),m=n(71),d=n(9);function b(e){var{type:t,unit:n,units:a,value:o,onChange:s}=e,c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["type","unit","units","value","onChange"]);const[i,l]=r.a.useState(!1),u=Array.isArray(a)&&a.length,b=()=>l(e=>!e),_=e=>{switch(e.key){case" ":case"Enter":b();break;default:return}e.preventDefault(),e.stopPropagation()};return(null==o||isNaN(o))&&(o=""),r.a.createElement("div",{className:p.a.root},r.a.createElement("input",Object.assign({},c,{className:p.a.input,type:null!=t?t:"text",value:o,onChange:e=>s&&s(e.currentTarget.value,n)})),r.a.createElement("div",{className:p.a.unitContainer},u&&r.a.createElement(m.a,{isOpen:i,onBlur:()=>l(!1)},({ref:e})=>r.a.createElement("div",{ref:e,className:p.a.unitSelector,role:"button",onClick:b,onKeyDown:_,tabIndex:0},r.a.createElement("span",{className:p.a.currentUnit},n),r.a.createElement(d.a,{icon:"arrow-down-alt2",className:i?p.a.menuChevronOpen:p.a.menuChevron})),a.map(e=>r.a.createElement(m.c,{key:e,onClick:()=>(s&&s(o,e),void l(!1))},e))),!u&&r.a.createElement("div",{className:p.a.unitStatic},r.a.createElement("span",null,n))))}var _=n(44),f=n(239),g=n.n(f),h=n(6),v=[{id:"accounts",title:"Accounts",component:c.a},{id:"config",title:"Configuration",groups:[{id:"importing",title:"Import options",fields:[{id:"importerInterval",label:"Check for new posts",component:Object(i.b)(({id:e})=>r.a.createElement(l.a,{id:e,width:250,value:s.b.values.importerInterval,options:y.config.cronScheduleOptions,onChange:e=>s.b.values.importerInterval=e.value}))}]},{id:"cleaner",title:"Optimization",component:()=>r.a.createElement("div",null,r.a.createElement(_.a,{label:"What is this?",stealth:!0},r.a.createElement("div",null,r.a.createElement("p",null,"Spotlight imports all Instagram posts that can be displayed in your feed, even "," ",'those hidden behind a "Load more" button. The posts furthest down the list may'," ","therefore rarely be seen."),r.a.createElement("p",null,"To improve your site’s performance, you can choose to delete these unseen posts"," ","after a set period of time. Once a site visitor requests those posts, they will"," ","be re-imported.")))),fields:[{id:"cleanerAgeLimit",label:"Delete unseen posts after",component:Object(i.b)(({id:e})=>{const t=s.b.values.cleanerAgeLimit.split(" "),n=parseInt(t[0]),a=t[1];return r.a.createElement(b,{id:e,units:["days","hours","minutes"],value:n,unit:a,type:"number",onChange:(e,t)=>s.b.values.cleanerAgeLimit=e+" "+t})})},{id:"cleanerInterval",label:"Run optimization",component:Object(i.b)(({id:e})=>r.a.createElement(l.a,{id:e,width:250,value:s.b.values.cleanerInterval,options:y.config.cronScheduleOptions,onChange:e=>s.b.values.cleanerInterval=e.value}))}]}]},{id:"tools",title:"Tools",groups:[{id:"cache",title:"Cache",fields:[{id:"clearCache",label:"If you are experiencing issues, clearing the plugin's cache may help.",component:function({}){const[e,t]=r.a.useState(!1),[n,a]=r.a.useState(!1);return r.a.createElement("div",{className:g.a.root},r.a.createElement(h.a,{disabled:e,onClick:()=>{t(!0),y.restApi.clearCache().finally(()=>{a(!0),setTimeout(()=>{a(!1),t(!1)},3e3)})}},n?"Done!":e?"Please wait ...":"Clear the cache"),r.a.createElement("a",{href:y.resources.cacheDocsUrl,target:"_blank",className:g.a.docLink},"What's this?"))}}]}]}],E=n(98);a.a.driver.interceptors.request.use(e=>(e.headers["X-WP-Nonce"]=SliAdminCommonL10n.restApi.wpNonce,e),e=>Promise.reject(e));var y=t.a={config:{rootId:"spotlight-instagram-admin",adminUrl:SliAdminCommonL10n.adminUrl,restApi:SliAdminCommonL10n.restApi,doOnboarding:"1"==SliAdminCommonL10n.doOnboarding,cronSchedules:SliAdminCommonL10n.cronSchedules,cronScheduleOptions:SliAdminCommonL10n.cronSchedules.map(e=>({value:e.key,label:e.display})),postTypes:SliAdminCommonL10n.postTypes,isPro:!1},resources:{upgradeUrl:"https://spotlightwp.com/pricing/",upgradeLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing",trialUrl:"https://spotlightwp.com/pricing/",trialLocalUrl:SliAdminCommonL10n.adminUrl+"admin.php?page=spotlight-instagram-pricing&billing_cycle=annual&trial=true",proComingSoonUrl:"https://spotlightwp.com/pro-coming-soon/",supportUrl:"https://spotlightwp.com/support/",customPersonalInfoUrl:"https://docs.spotlightwp.com/article/624-custom-profile-photo-and-bio-text",businessAccounts:"https://docs.spotlightwp.com/article/555-how-to-switch-to-a-business-account",cacheDocsUrl:"https://docs.spotlightwp.com/article/639-cache",promoTypesSurvey:"https://spotlightwp.com/survey-promote/",accessTokenDocUrl:""},editor:{config:{showProOptions:!0,isPro:!1,tabs:E.b,currTab:"connect"}},restApi:{config:SliAdminCommonL10n.restApi,saveFeed:e=>a.a.driver.post("/feeds"+(e.id?"/"+e.id:""),{feed:e}),deleteFeed:e=>a.a.driver.delete("/feeds/"+e),connectPersonal:e=>a.a.driver.post("/connect",{accessToken:e}),connectBusiness:(e,t)=>a.a.driver.post("/connect",{accessToken:e,userId:t}),updateAccount:e=>a.a.driver.post("/accounts",e),deleteAccount:e=>a.a.driver.delete("/accounts/"+e),deleteAccountMedia:e=>a.a.driver.delete("/account_media/"+e),searchPosts:(e,t)=>a.a.driver.get(`/search_posts?search=${e}&type=${t}`),getSettings:()=>a.a.driver.get("/settings"),saveSettings:e=>a.a.driver.patch("/settings",{settings:e}),getNotifications:()=>a.a.driver.get("/notifications"),clearCache:()=>a.a.driver.post("/clear_cache")},settings:{pages:v}}},112:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(95),s=n(151);const c=e=>{const t=Object.assign(Object.assign({},e),{value:e.value?e.value.map(e=>Object(s.a)(e,"#")):[],sanitize:s.b});return o.a.createElement(r.a,Object.assign({},t))}},114:function(e,t,n){e.exports={root:"UnitField__root layout__flex-row",input:"UnitField__input","unit-container":"UnitField__unit-container layout__flex-column",unitContainer:"UnitField__unit-container layout__flex-column","unit-bubble":"UnitField__unit-bubble",unitBubble:"UnitField__unit-bubble","unit-static":"UnitField__unit-static UnitField__unit-bubble layout__flex-column",unitStatic:"UnitField__unit-static UnitField__unit-bubble layout__flex-column","unit-selector":"UnitField__unit-selector UnitField__unit-bubble layout__flex-row",unitSelector:"UnitField__unit-selector UnitField__unit-bubble layout__flex-row","current-unit":"UnitField__current-unit",currentUnit:"UnitField__current-unit","menu-chevron":"UnitField__menu-chevron",menuChevron:"UnitField__menu-chevron","menu-chevron-open":"UnitField__menu-chevron-open UnitField__menu-chevron",menuChevronOpen:"UnitField__menu-chevron-open UnitField__menu-chevron","unit-list":"UnitField__unit-list layout__flex-column layout__z-highest",unitList:"UnitField__unit-list layout__flex-column layout__z-highest","unit-option":"UnitField__unit-option",unitOption:"UnitField__unit-option","unit-selected":"UnitField__unit-selected UnitField__unit-option",unitSelected:"UnitField__unit-selected UnitField__unit-option"}},120:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(8),s=n(105),c=n.n(s);function i({cols:e,rows:t,footerCols:n,styleMap:a}){return a=null!=a?a:{cols:{},cells:{}},o.a.createElement("table",{className:c.a.table},o.a.createElement("thead",{className:c.a.header},o.a.createElement(u,{cols:e,styleMap:a})),o.a.createElement("tbody",null,t.map((t,n)=>o.a.createElement(l,{key:n,row:t,cols:e,styleMap:a}))),n&&o.a.createElement("tfoot",{className:c.a.footer},o.a.createElement(u,{cols:e,styleMap:a})))}function l({row:e,cols:t,styleMap:n}){return o.a.createElement("tr",{className:c.a.row},t.map(t=>o.a.createElement("td",{key:t.id,className:Object(r.b)(c.a.cell,p(t),n.cells[t.id])},t.render(e))))}function u({cols:e,styleMap:t}){return o.a.createElement("tr",null,e.map(e=>{const n=Object(r.b)(c.a.colHeading,p(e),t.cols[e.id]);return o.a.createElement("th",{key:e.id,className:n},e.label)}))}function p(e){return"center"===e.align?c.a.alignCenter:"right"===e.align?c.a.alignRight:c.a.alignLeft}},121:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(109),s=n(5);const c=({id:e,value:t,title:n,button:a,mediaType:c,multiple:i,children:l,onOpen:u,onClose:p,onSelect:m})=>{e=null!=e?e:"wp-media-"+Object(s.p)(),c=null!=c?c:"image",a=null!=a?a:"Select";const d=o.a.useRef();d.current||(d.current=r.a.media({id:e,title:n,library:{type:c},button:{text:a},multiple:i}));const b=()=>{const e=d.current.state().get("selection").first();m&&m(e)};return p&&d.current.on("close",p),d.current.on("open",()=>{if(t){const e="object"==typeof t?t:r.a.media.attachment(t);e.fetch(),d.current.state().get("selection").add(e?[e]:[])}u&&u()}),d.current.on("insert",b),d.current.on("select",b),l({open:()=>d.current.open()})}},123:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(174),s=n.n(r),c=n(9),i=n(191);function l({maxWidth:e,children:t}){e=null!=e?e:200;const[n,a]=o.a.useState(!1),r=()=>a(!0),l=()=>a(!1),u={content:s.a.tooltipContent,container:s.a.tooltipContainer};return o.a.createElement("div",{className:s.a.root},o.a.createElement(i.a,{visible:n,theme:u},({ref:e})=>o.a.createElement("span",{ref:e,className:s.a.icon,style:{opacity:n?1:.7},onMouseEnter:r,onMouseLeave:l},o.a.createElement(c.a,{icon:"info"})),o.a.createElement("div",{style:{maxWidth:e+"px"}},t)))}},125:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(312),s=n.n(r),c=n(6),i=n(9),l=n(208),u=n(39);function p({isOpen:e,onClose:t,onConnect:n,beforeConnect:a}){return o.a.createElement(u.a,{title:"Connect an Instagram account",isOpen:e,width:650,onClose:t},o.a.createElement(u.a.Content,null,o.a.createElement(l.a,{onConnect:n,beforeConnect:e=>{a&&a(e),t()}})))}function m({children:e,onConnect:t,beforeConnect:n}){const[a,r]=o.a.useState(!1);return o.a.createElement(o.a.Fragment,null,o.a.createElement(c.a,{className:s.a.root,size:c.b.HERO,type:c.c.SECONDARY,onClick:()=>r(!0)},o.a.createElement(i.a,{icon:"instagram"}),null!=e?e:o.a.createElement("span",null,"Connect more Instagram accounts")),o.a.createElement(p,{isOpen:a,onClose:()=>{r(!1)},onConnect:t,beforeConnect:n}))}},127:function(e,t,n){"use strict";t.a={Sizes:{WIDE:1200,LARGE:1180,MEDIUM:960,SMALL:782,NARROW:600,ALL:[1200,1180,960,782,600]}}},140:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);function r(e){return o.a.createElement("p",null,e.message)}},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(244),o=n.n(a),r=n(0),s=n.n(r),c=n(6),i=n(8);function l({className:e,content:t,tooltip:n,onClick:a,disabled:r,isSaving:l}){return t=null!=t?t:e=>e?"Saving ...":"Save",n=null!=n?n:"Save",s.a.createElement(c.a,{className:Object(i.b)(o.a.root,e),type:c.c.PRIMARY,size:c.b.LARGE,tooltip:n,onClick:()=>a&&a(),disabled:r},l&&s.a.createElement("div",{className:o.a.savingOverlay}),t(l))}},153:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(0),r=n.n(o),s=n(198),c=n(3),i=n(199),l=n(96),u=n(7),p=n(55),m=n(60),d=n(50),b=n(103),_=n(95),f=n(104),g=n(112),h=n(98),v=n(200),E=n(201),y=n(202),O=n(205),N=n(207),C=u.a.HoverInfo,w=u.a.HeaderInfo;!function(e){e.FILTER="filter",e.MODERATE="moderate",e.PROMOTE="promote"}(a||(a={})),t.b=function(e){const t=e.slice();t.find(e=>e.key===h.a.CONNECT).groups.push({id:"tagged",label:"Show posts where these accounts are tagged",isOpen:!0,isFakePro:!0,fields:[{component:s.a,isFakePro:!0,props:()=>({value:[],accounts:c.b.getBusinessAccounts()})}]},{id:"hashtags",label:"Show posts with these hashtags",isOpen:!0,isFakePro:!0,fields:[{component:i.a,isFakePro:!0,props:()=>({value:[]})}]});const n=t.find(e=>e.key===h.a.DESIGN);n.groups.find(e=>"feed"===e.id).fields.splice(3,0,{label:"Types of posts",component:l.a,isFakePro:!0,props:()=>({options:[{value:u.a.MediaType.ALL,label:"All posts"},{value:u.a.MediaType.PHOTOS,label:"Photos Only"},{value:u.a.MediaType.VIDEOS,label:"Videos Only"}]})});const o=n.groups.find(e=>"appearance"===e.id);o.fields.push({label:"Hover text color",component:p.a,isFakePro:!0},{label:"Hover background color",component:p.a,isFakePro:!0});const T=o.fields.find(e=>"hoverInfo"===e.option);{const e=T.props;T.props=(t,n)=>{const a=e(t,n);return a.options.push({value:C.CAPTION,label:"Caption",isFakePro:!0},{value:C.USERNAME,label:"Username",isFakePro:!0},{value:C.DATE,label:"Date",isFakePro:!0}),a}}const A=n.groups.find(e=>"header"===e.id);A.fields.splice(2,0,{label:"Header style",component:l.a,isResponsive:!0,isFakePro:!0,props:()=>({options:[{value:u.a.HeaderStyle.NORMAL,label:"Normal"},{value:u.a.HeaderStyle.CENTERED,label:"Centered"},{value:u.a.HeaderStyle.BOXED,label:"Boxed"}]})}),A.fields.push({label:"Include stories",component:m.a,isFakePro:!0},{label:"Stories interval time",component:d.a,isFakePro:!0,props:()=>({value:5,unit:"sec"})});const k=A.fields.find(e=>"headerInfo"===e.option);{const e=k.props;k.props=(t,n)=>{const a=e(t,n);return a.options.push({value:w.MEDIA_COUNT,label:"Media count",isFakePro:!0},{value:w.FOLLOWERS,label:"Follower count",isFakePro:!0}),a}}return n.groups.find(e=>"loadMoreBtn"===e.id).fields.push({label:"Autoload",component:m.a,isFakePro:!0}),n.groups.splice(4,0,{id:"lightbox",label:"Popup box",isFakePro:!0,isOpen:!1,fields:[{label:"Show sidebar",component:m.a},{label:"Number of comments",component:d.a,props:()=>({value:5,placeholder:"No comments"})}]},{id:"captions",label:"Captions",isFakePro:!0,isOpen:!1,fields:[{label:"Show captions",isResponsive:!0,component:m.a},{label:"Caption max length",isResponsive:!0,isFakePro:!0,component:d.a,props:()=>({unit:"words",placeholder:"No limit"})},{label:"Caption text size",isResponsive:!0,component:d.a,props:()=>({unit:"px",placeholder:"Theme default"})},{label:"Caption text color",component:p.a},{label:"Remove dot lines",component:m.a,help:()=>r.a.createElement("p",null,'Enable this option to remove lines in captions that are only "dots", such as'," ",r.a.createElement("code",null,"."),", ",r.a.createElement("code",null,"•"),", ",r.a.createElement("code",null,"*"),", etc.")}]},{id:"likesComments",label:"Likes & comments",isFakePro:!0,isOpen:!1,fields:[{label:"Show likes icon",isResponsive:!0,component:m.a},{label:"Likes icon color",component:p.a},{label:"Show comments icon",isResponsive:!0,component:m.a},{label:"Comments icon color",component:p.a},{label:"Icon size",isResponsive:!0,component:d.a,props:()=>({value:20,unit:"px"})}]}),t.push({key:a.FILTER,label:"Filter",isFakePro:!0,sidebar:E.a,groups:[{id:"captionFilters",label:"Caption filtering",isOpen:!0,isFakePro:!0,fields:[{component:b.a,props:()=>({component:_.a,label:"Only show posts with these words or phrases"})},{component:f.a},{component:b.a,props:()=>({bordered:!0,component:_.a,label:"Hide posts with these words or phrases"})},{component:f.a}]},{id:"hashtagFilters",label:"Hashtag filtering",isOpen:!0,isFakePro:!0,fields:[{component:b.a,props:()=>({component:g.a,label:"Only show posts with these hashtags"})},{component:f.a},{component:b.a,props:()=>({bordered:!0,component:g.a,label:"Hide posts with these hashtags"})},{component:f.a}]}]},{key:a.MODERATE,label:"Moderate",isFakePro:!0,sidebar:v.a,viewport:y.a},{key:a.PROMOTE,label:"Promote",isFakePro:!0,sidebar:O.a,viewport:N.a}),t}},154:function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var a=n(80),o=n.n(a),r=n(0),s=n.n(r),c=n(47),i=n(8),l=n(69),u=n(17),p=n(126),m=n(4),d=n(326),b=n.n(d),_=n(71),f=n(175),g=n.n(f),h=n(160),v=n(565),E=n(23),y=n(63);function O({notification:e}){const t=s.a.useRef();return Object(r.useEffect)(()=>{if(!t.current)return;const e=t.current.getElementsByTagName("a");for(let t=0;t<e.length;++t){const n=e.item(t);if("true"===n.getAttribute("data-sli-link"))continue;const a=n.getAttribute("href");if("string"!=typeof a||!a.startsWith("app://"))continue;const o=Object(y.parse)(a.substr("app://".length)),r=E.a.at(o),s=E.a.fullUrl(o);n.setAttribute("href",s),n.setAttribute("data-sli-link","true"),n.addEventListener("click",e=>{E.a.history.push(r,{}),e.preventDefault(),e.stopPropagation()})}},[t.current]),s.a.createElement("article",{className:g.a.root},e.title&&e.title.length&&s.a.createElement("header",{className:g.a.title},e.title),s.a.createElement("main",{ref:t,className:g.a.content,dangerouslySetInnerHTML:{__html:e.content}}),e.date&&s.a.createElement("footer",{className:g.a.date},Object(h.a)(Object(v.a)(e.date),{addSuffix:!0})))}function N({isOpen:e,onBlur:t,children:n}){return s.a.createElement(_.a,{isOpen:e,onBlur:t,placement:"bottom-start",className:b.a.menu},n,s.a.createElement(_.b,null,p.a.list.map(e=>s.a.createElement(O,{key:e.id,notification:e}))))}var C,w=n(18);function T({children:e}){return s.a.createElement("div",{className:o.a.root},s.a.createElement(T.Item,null,s.a.createElement(T.Logo,null)),s.a.createElement(T.Chevron,null),s.a.createElement("div",{className:o.a.leftContainer},e[0]),e[1]&&s.a.createElement("div",{className:o.a.rightContainer},e[1]))}(C=T||(T={})).Logo=Object(m.b)((function(){const[e,t]=s.a.useState(!1),n=()=>t(!0),a=Object(w.f)(n),r=({ref:e})=>s.a.createElement("div",{ref:e,className:o.a.logo,role:"button",onClick:n,onKeyPress:a,tabIndex:0},s.a.createElement("img",{className:o.a.logoImage,src:u.a.image("spotlight-favicon.png"),alt:"Spotlight",loading:"eager"}),p.a.list.length>0&&s.a.createElement("div",{className:o.a.notificationCount},p.a.list.length));return 0===p.a.list.length?r({ref:void 0}):s.a.createElement(N,{isOpen:e,onBlur:()=>t(!1)},r)})),C.Item=({children:e})=>s.a.createElement("div",{className:o.a.item},e),C.Link=({linkTo:e,onClick:t,isCurrent:n,isDisabled:a,children:r})=>{const l=Object(i.c)({[o.a.link]:!0,[o.a.current]:n,[o.a.disabled]:a}),u=e=>{"Enter"!==e.key&&" "!==e.key||e.currentTarget.click()},p=a?-1:0;return s.a.createElement(C.Item,null,e?s.a.createElement(c.a,{to:e,className:l,role:"button",onKeyPress:u,tabIndex:p},r):s.a.createElement("div",{className:l,role:"button",onClick:()=>!a&&t&&t(),onKeyPress:u,tabIndex:p},r))},C.ProPill=()=>s.a.createElement("div",{className:o.a.proPill},s.a.createElement(l.a,null)),C.Chevron=()=>s.a.createElement("div",{className:o.a.chevron},s.a.createElement("svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",preserveAspectRatio:"none"},s.a.createElement("path",{d:"M0 0 L100 50 L0 100",fill:"none",stroke:"currentcolor",strokeLinejoin:"bevel"})))},155:function(e,t,n){e.exports={message:"Message__message",shaking:"Message__shaking","shake-animation":"Message__shake-animation",shakeAnimation:"Message__shake-animation",icon:"Message__icon",content:"Message__content","dismiss-btn":"Message__dismiss-btn",dismissBtn:"Message__dismiss-btn",success:"Message__success Message__message",info:"Message__info Message__message",warning:"Message__warning Message__message","pro-tip":"Message__pro-tip Message__message",proTip:"Message__pro-tip Message__message",error:"Message__error Message__message"}},156:function(e,t,n){e.exports={primaryColor:"#007cba",secondaryColor:"#d04186",tertiaryColor:"#d82442",lightColor:"#f5f5f5",lightColor2:"#e6e7e8",lightColor3:"#e1e2e3",shadowColor:"rgba(20,25,60,.32)",washedColor:"#eaf0f4"}},157:function(e,t,n){e.exports={root:"Toast__root","fade-in-animation":"Toast__fade-in-animation",fadeInAnimation:"Toast__fade-in-animation","root-fading-out":"Toast__root-fading-out Toast__root",rootFadingOut:"Toast__root-fading-out Toast__root","fade-out-animation":"Toast__fade-out-animation",fadeOutAnimation:"Toast__fade-out-animation",content:"Toast__content","dismiss-icon":"Toast__dismiss-icon",dismissIcon:"Toast__dismiss-icon","dismiss-btn":"Toast__dismiss-btn Toast__dismiss-icon",dismissBtn:"Toast__dismiss-btn Toast__dismiss-icon"}},172:function(e,t,n){e.exports={root:"Tooltip__root layout__z-highest",container:"Tooltip__container","container-top":"Tooltip__container-top Tooltip__container",containerTop:"Tooltip__container-top Tooltip__container","container-bottom":"Tooltip__container-bottom Tooltip__container",containerBottom:"Tooltip__container-bottom Tooltip__container","container-left":"Tooltip__container-left Tooltip__container",containerLeft:"Tooltip__container-left Tooltip__container","container-right":"Tooltip__container-right Tooltip__container",containerRight:"Tooltip__container-right Tooltip__container",content:"Tooltip__content",arrow:"Tooltip__arrow","arrow-top":"Tooltip__arrow-top Tooltip__arrow",arrowTop:"Tooltip__arrow-top Tooltip__arrow","arrow-bottom":"Tooltip__arrow-bottom Tooltip__arrow",arrowBottom:"Tooltip__arrow-bottom Tooltip__arrow","arrow-left":"Tooltip__arrow-left Tooltip__arrow",arrowLeft:"Tooltip__arrow-left Tooltip__arrow","arrow-right":"Tooltip__arrow-right Tooltip__arrow",arrowRight:"Tooltip__arrow-right Tooltip__arrow"}},174:function(e,t,n){e.exports={root:"HelpTooltip__root layout__flex-column",tooltip:"HelpTooltip__tooltip layout__z-high","tooltip-container":"HelpTooltip__tooltip-container",tooltipContainer:"HelpTooltip__tooltip-container","tooltip-content":"HelpTooltip__tooltip-content",tooltipContent:"HelpTooltip__tooltip-content",icon:"HelpTooltip__icon"}},175:function(e,t,n){e.exports={root:"Notification__root",text:"Notification__text",title:"Notification__title Notification__text",content:"Notification__content Notification__text",date:"Notification__date"}},191:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(172),s=n.n(r),c=n(142),i=n(249),l=n(250),u=n(11),p=n(8);function m({visible:e,delay:t,placement:n,theme:r,children:m}){r=null!=r?r:{},n=n||"bottom";const[b,_]=o.a.useState(!1),f={preventOverflow:{boundariesElement:document.getElementById(u.a.config.rootId),padding:5}};Object(a.useEffect)(()=>{const n=setTimeout(()=>_(e),e?t:1);return()=>clearTimeout(n)},[e]);const g=d("container",n),h=d("arrow",n),v=Object(p.b)(s.a[g],r.container,r[g]),E=Object(p.b)(s.a[h],r.arrow,r[h]);return o.a.createElement(c.c,null,o.a.createElement(i.a,null,e=>m[0](e)),o.a.createElement(l.a,{placement:n,modifiers:f,positionFixed:!0},({ref:e,style:t,placement:n,arrowProps:a})=>b?o.a.createElement("div",{ref:e,className:Object(p.b)(s.a.root,r.root),style:t,tabIndex:-1},o.a.createElement("div",{className:v,"data-placement":n},o.a.createElement("div",{className:Object(p.b)(s.a.content,r.content)},m[1]),o.a.createElement("div",{className:E,ref:a.ref,style:a.style,"data-placement":n}))):null))}function d(e,t){switch(t){case"top":case"top-start":case"top-end":return e+"Top";case"bottom":case"bottom-start":case"bottom-end":return e+"Bottom";case"left":case"left-start":case"left-end":return e+"Left";case"right":case"right-start":case"right-end":return e+"Right";default:return e}}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(0),o=n.n(a),r=n(323),s=n.n(r),c=n(140);const i=({feed:e,onCopy:t,toaster:n,children:a})=>o.a.createElement(s.a,{text:`[instagram feed="${e.id}"]`,onCopy:()=>{n&&n.addToast("feeds/shortcode/copied",()=>o.a.createElement(c.a,{message:"Copied shortcode to clipboard."})),t&&t()}},a)},197:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(328),s=n.n(r);function c({message:e}){return o.a.createElement("pre",{className:s.a.content},e)}},203:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(557);const r=({size:e})=>{const t=(e=null!=e?e:24)+"px",n={width:t,height:t,boxShadow:`${.25*e+"px"} 0 0 ${.375*e+"px"} #999 inset`};return o.a.createElement("span",{className:"loading-spinner",style:n})}},208:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var a=n(0),o=n.n(a),r=n(84),s=n.n(r),c=n(33),i=n(3),l=n(39),u=n(6),p=n(9),m=n(85),d=n.n(m),b=n(44),_=n(11);function f({isColumn:e,onConnectPersonal:t,onConnectBusiness:n}){const[r,s]=o.a.useState(!1),[c,i]=o.a.useState(""),[l,p]=o.a.useState(""),[m,_]=o.a.useState(!1);Object(a.useEffect)(()=>{_(c.length>145&&!c.trimLeft().startsWith("IG"))},[c]);const f=o.a.createElement("div",{className:d.a.helpMessage},!1),g=o.a.createElement("div",{className:d.a.buttonContainer},e&&f,o.a.createElement(u.a,{className:d.a.button,onClick:()=>{m?n(c,l):t(c)},type:u.c.PRIMARY,disabled:0===c.length&&(0===l.length||!m)},"Connect"));return o.a.createElement("div",{className:e?d.a.column:d.a.row},o.a.createElement(b.a,{label:"Connect using an access token (for developers)",stealth:!0,isOpen:r,onClick:()=>s(!r)},o.a.createElement("div",{className:d.a.content},o.a.createElement("label",{className:d.a.label,htmlFor:"manual-connect-access-token"},o.a.createElement("div",null,"Enter your Instagram or Facebook access token")),o.a.createElement("div",{className:d.a.bottom},o.a.createElement("input",{id:"manual-connect-access-token",type:"text",value:c,onChange:e=>i(e.target.value),placeholder:"Your access token"}),!m&&g)),m&&o.a.createElement("div",{className:d.a.content},o.a.createElement("label",{className:d.a.label,htmlFor:"manual-connect-user-id"},o.a.createElement("div",null,"This access token is for a ",o.a.createElement("strong",null,"Business")," account."," ","Enter the user ID:")),o.a.createElement("div",{className:d.a.bottom},o.a.createElement("input",{id:"manual-connect-user-id",type:"text",value:l,onChange:e=>p(e.target.value),placeholder:"Enter the user ID"}),m&&g)),!e&&f))}function g({onConnect:e,beforeConnect:t,useColumns:n,showPrompt:a}){a=null==a||a,e||(e=()=>{});const r=e=>{c.a.State.connectSuccess&&t&&t(e)};return o.a.createElement("div",{className:s.a.root},a&&o.a.createElement("p",{className:s.a.promptMsg},"Choose the type of account to connect:"),o.a.createElement("div",{className:n?s.a.typesColumns:s.a.typesRows},o.a.createElement("div",{className:s.a.type},o.a.createElement(u.a,{type:u.c.PRIMARY,size:u.b.HERO,onClick:()=>c.a.openAuthWindow(i.a.Type.PERSONAL,l.a.ANIMATION_DELAY,r).then(e).catch(()=>{})},"Connect your Personal account"),o.a.createElement("div",{className:s.a.capabilities},o.a.createElement(h,null,"Connects directly through Instagram"),o.a.createElement(h,null,"Show posts from your account"))),o.a.createElement("div",{className:s.a.type},o.a.createElement(u.a,{type:u.c.SECONDARY,size:u.b.HERO,onClick:()=>c.a.openAuthWindow(i.a.Type.BUSINESS,l.a.ANIMATION_DELAY,r).then(e).catch(()=>{})},"Connect your Business account"),o.a.createElement("div",{className:s.a.capabilities},o.a.createElement(h,null,"Connects through your Facebook page"),o.a.createElement(h,null,"Show posts from your account"),o.a.createElement(h,null,"Show posts where you are tagged"),o.a.createElement(h,null,"Show posts with a specific hashtag from all across Instagram"),o.a.createElement("div",{className:s.a.businessLearnMore},o.a.createElement(p.a,{icon:"editor-help"}),o.a.createElement("a",{href:_.a.resources.businessAccounts,target:"_blank"},"Learn more about Business accounts"))))),o.a.createElement("div",{className:s.a.connectAccessToken},o.a.createElement(f,{isColumn:n,onConnectPersonal:t=>c.a.manualConnectPersonal(t,l.a.ANIMATION_DELAY,r).then(e),onConnectBusiness:(t,n)=>c.a.manualConnectBusiness(t,n,l.a.ANIMATION_DELAY,r).then(e)})))}const h=e=>{var{children:t}=e,n=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children"]);return o.a.createElement("div",Object.assign({className:s.a.capability},n),o.a.createElement(p.a,{icon:"yes"}),o.a.createElement("div",null,t))}},209:function(e,t,n){e.exports={root:"ModalPrompt__root",button:"ModalPrompt__button"}},22:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return u}));var a,o=n(0),r=n.n(o),s=n(155),c=n.n(s),i=n(8),l=n(9);!function(e){e.SUCCESS="success",e.INFO="info",e.PRO_TIP="pro-tip",e.WARNING="warning",e.ERROR="error"}(a||(a={}));const u=({children:e,type:t,showIcon:n,shake:a,isDismissible:o,onDismiss:s})=>{const[u,m]=r.a.useState(!1),d=Object(i.b)(c.a[t],a?c.a.shaking:null);return u?null:r.a.createElement("div",{className:d},n?r.a.createElement("div",null,r.a.createElement(l.a,{className:c.a.icon,icon:p(t)})):null,r.a.createElement("div",{className:c.a.content},e),o?r.a.createElement("button",{className:c.a.dismissBtn,onClick:()=>{o&&(m(!0),s&&s())}},r.a.createElement(l.a,{icon:"no"})):null)};function p(e){switch(e){case a.SUCCESS:return"yes-alt";case a.PRO_TIP:return"lightbulb";case a.ERROR:case a.WARNING:return"warning";case a.INFO:default:return"info"}}},239:function(e,t,n){e.exports={root:"ClearCacheButton__root layout__flex-row","doc-link":"ClearCacheButton__doc-link",docLink:"ClearCacheButton__doc-link"}},24:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var a=n(1),o=n(11),r=n(5),s=n(14);let c;t.b=c=a.n.object({values:Object(a.n)({}),original:{},isDirty:!1,isSaving:!1,save:Object(a.f)(()=>{if(c.isDirty)return c.isSaving=!0,o.a.restApi.saveSettings(c.values).then(e=>{c.fromResponse(e),document.dispatchEvent(new l(i))}).finally(()=>c.isSaving=!1)}),load:Object(a.f)(()=>o.a.restApi.getSettings().then(e=>c.fromResponse(e)).catch(e=>{throw s.a.getErrorReason(e)})),restore:Object(a.f)(()=>{Object.assign(c.values,c.original),c.isDirty=!1}),fromResponse:e=>{if("object"!=typeof e||void 0===e.data)throw"Spotlight encountered a problem while trying to load your settings. Kindly contact customer support for assistance.";c.original=e.data,c.restore()}}),Object(a.g)(()=>{c.isDirty=!Object(r.k)(c.original,c.values)});const i="sli/settings/saved";class l extends CustomEvent{constructor(e,t={}){super(e,t)}}},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var a=n(0),o=n.n(a);n(271);const r=({children:e})=>o.a.createElement("div",{className:"button-group"},e)},243:function(e,t,n){e.exports={root:"Toaster__root layout__z-highest",container:"Toaster__container"}},244:function(e,t,n){e.exports={root:"SaveButton__root","saving-overlay":"SaveButton__saving-overlay layout__fill-parent",savingOverlay:"SaveButton__saving-overlay layout__fill-parent","saving-animation":"SaveButton__saving-animation",savingAnimation:"SaveButton__saving-animation"}},27:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(1),r=n(7),s=n(14),c=n(11),i=function(e,t,n,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};!function(e){class t{constructor(e={}){t.setFromObject(this,null!=e?e:{})}static setFromObject(e,t={}){var n,a,o;e.id=null!==(n=t.id)&&void 0!==n?n:null,e.name=null!==(a=t.name)&&void 0!==a?a:"",e.usages=null!==(o=t.usages)&&void 0!==o?o:[],e.options=r.a.Options.setFromObject(new r.a.Options(e.options),t.options)}get label(){return this.name.length>0?this.name:this.id?"(no name)":"New Feed"}}function n(n){if("object"!=typeof n||!Array.isArray(n.data))throw"Spotlight encountered a problem trying to load your feeds. Kindly contact customer support for assistance.";e.list.replace(n.data.map(e=>new t(e)))}i([o.n],t.prototype,"id",void 0),i([o.n],t.prototype,"name",void 0),i([o.n],t.prototype,"usages",void 0),i([o.n],t.prototype,"options",void 0),i([o.h],t.prototype,"label",null),e.SavedFeed=t,e.list=Object(o.n)([]),e.loadFeeds=()=>s.a.getFeeds().then(n).catch(e=>{throw s.a.getErrorReason(e)}),e.getById=t=>(t="string"==typeof t?parseInt(t):t)?e.list.find(e=>e.id==t):void 0,e.hasFeeds=()=>e.list.length>0,e.create=function(n,a){const o=new t({id:null,name:l(n),options:a});return e.list.push(o),o},e.saveFeed=function(n){return c.a.restApi.saveFeed(n).then(a=>{const o=new t(a.data.feed);if(null===n.id)e.list.push(o);else{const t=e.list.findIndex(e=>e.id===n.id);e.list[t]=o}return o})},e.deleteFeed=function(t){const n=null!==t.id?e.list.findIndex(e=>e.id===t.id):e.list.findIndex(e=>e===t);return n>=0&&e.list.splice(n,1),null!==t.id?c.a.restApi.deleteFeed(t.id).catch(e=>{}):new Promise(e=>e())};const a=new RegExp("([\\w\\s]+)\\s?\\((\\d+)\\)?");function l(t){const n=u(t)[0],a=e.list.map(e=>u(e.name)).filter(e=>e[0]===n),o=a.reduce((e,t)=>Math.max(e,t[1]),1);return a.length>0?`${n} (${o+1})`:t.trim()}function u(e){e=e.trim();const t=a.exec(e);return t?[t[1].trim(),parseInt(t[2])]:[e,0]}}(a||(a={}))},271:function(e,t,n){},272:function(e,t,n){},307:function(e,t,n){},310:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(31),o=n(72),r=n(23);const s={factories:Object(a.c)({"router/history":()=>Object(o.a)(),"router/store":e=>r.a.useHistory(e.get("router/history"))}),run:e=>{e.get("router/store")}}},311:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var a=n(18);function o({when:e,is:t,isRoot:n,render:o}){const r=Object(a.g)().get(e);return r===t||!t&&!r||n&&!r?o():null}},312:function(e,t,n){e.exports={root:"ConnectAccountButton__root"}},317:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(8),s=(n(384),function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n});const c=e=>{var{className:t,unit:n}=e,a=s(e,["className","unit"]);const c=Object(r.b)("unit-input__field",t);return o.a.createElement("div",{className:"unit-input"},o.a.createElement("input",Object.assign({},a,{className:c})),o.a.createElement("div",{className:"unit-input__unit"},o.a.createElement("span",null,n)))}},318:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var a=n(0),o=n.n(a),r=n(319),s=(n(272),n(18)),c=n(12),i=n(142),l=n(249),u=n(250),p=n(8),m=n(11);const d=({id:e,value:t,disableAlpha:n,onChange:a})=>{t=null!=t?t:"#fff";const[d,b]=o.a.useState(!1),_=o.a.useRef(),f=o.a.useRef(),g=()=>b(!1),h=()=>b(e=>!e);Object(s.b)(_,g,[f]),Object(s.c)([_,f],g),Object(s.d)("keydown",e=>{"Escape"===e.key&&d&&(g(),e.preventDefault(),e.stopPropagation())},[d]);const v=e=>a&&a(e),E={preventOverflow:{boundariesElement:document.getElementById(m.a.config.rootId),padding:5}};return o.a.createElement(i.c,null,o.a.createElement(l.a,null,({ref:n})=>o.a.createElement("button",{ref:Object(p.d)(_,n),id:e,className:"color-picker",onClick:h},o.a.createElement("span",{className:"color-picker__preview",style:{backgroundColor:Object(c.a)(t)}}))),o.a.createElement(u.a,{placement:"bottom-end",positionFixed:!0,modifiers:E},({ref:e,style:a})=>d&&o.a.createElement("div",{className:"color-picker__popper",ref:Object(p.d)(f,e),style:a},o.a.createElement(r.ChromePicker,{color:t,onChange:v,disableAlpha:n}))))}},322:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(3),s=n(83),c=n(102),i=n(33),l=n(4),u=n(11);t.a=Object(l.b)((function({}){Object(a.useEffect)(()=>{const e=e=>{const a=e.detail.account;n||p||a.type!==r.a.Type.PERSONAL||a.customBio.length||a.customProfilePicUrl.length||(t(a),l(!0))};return document.addEventListener(i.a.ACCOUNT_CONNECTED_EVENT,e),()=>document.removeEventListener(i.a.ACCOUNT_CONNECTED_EVENT,e)},[]);const[e,t]=o.a.useState(null),[n,l]=o.a.useState(!1),[p,m]=o.a.useState(!1),d=()=>{i.a.State.connectedId=null};return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{title:"You've successfully connected your account!",buttons:["Yes","No, maybe later"],isOpen:n,onAccept:()=>{l(!1),m(!0)},onCancel:()=>{l(!1),d()}},o.a.createElement("p",null,"One more thing ..."),o.a.createElement("p",null,"Instagram doesn't provide the profile photo and bio text for Personal accounts."," ","Would you like to set a custom photo and a custom bio in Spotlight to match your Instagram profile?"),o.a.createElement("p",null,o.a.createElement("a",{href:u.a.resources.customPersonalInfoUrl,target:"_blank"},"What's this about?"))),o.a.createElement(c.a,{isOpen:p,onClose:()=>{m(!1),d()},account:e}))}))},324:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(1),o=n(5),r=function(e,t,n,a){var o,r=arguments.length,s=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s};class s{constructor(e){this.ttl=e,this.toasts=new Array}addToast(e,t,n){this.toasts.push({key:e+Object(o.p)(),component:t,ttl:n})}removeToast(e){const t=this.toasts.findIndex(t=>t.key===e);t>-1&&this.toasts.splice(t,1)}}r([a.n],s.prototype,"toasts",void 0),r([a.f],s.prototype,"addToast",null),r([a.f],s.prototype,"removeToast",null)},326:function(e,t,n){e.exports={menu:"NotificationMenu__menu"}},328:function(e,t,n){e.exports={content:"ErrorToast__content"}},33:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var a,o=n(3),r=n(36),s=n(11),c=n(1),i=n(566),l=n(564),u=n(565);!function(e){let t=null,n=null;e.State=window.SliAccountManagerState=Object(c.n)({accessToken:null,connectSuccess:!1,connectedId:null});const a=Object(i.a)(new Date,{days:7});function p(t,n,a){a&&a(e.State.connectedId),setTimeout(()=>o.b.loadAccounts().then(()=>{const t=o.b.getById(e.State.connectedId),a=new d(e.ACCOUNT_CONNECTED_EVENT,t);document.dispatchEvent(a),n(e.State.connectedId)}),t)}function m(e){return e.type===o.a.Type.BUSINESS&&e.accessToken&&e.accessToken.expiry&&Object(l.a)(a,Object(u.a)(e.accessToken.expiry))}e.manualConnectPersonal=function(t,n=0,a){return new Promise((o,r)=>{e.State.connectSuccess=!1,s.a.restApi.connectPersonal(t).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,p(n,o,a)}).catch(r)})},e.manualConnectBusiness=function(t,n,a=0,o){return new Promise((r,c)=>{e.State.connectSuccess=!1,s.a.restApi.connectBusiness(t,n).then(t=>{e.State.connectSuccess=!0,e.State.connectedId=t.data.accountId,p(a,r,o)}).catch(c)})},e.openAuthWindow=function(a,c=0,i){return new Promise((l,u)=>{if(e.State.connectedId=null,null==t||t.closed){const e=Object(r.a)(700,800),n=a===o.a.Type.PERSONAL?s.a.restApi.config.personalAuthUrl:s.a.restApi.config.businessAuthUrl;t=Object(r.c)(n,"_blank",Object.assign({dependent:"yes",resizable:"yes",toolbar:"no",location:"no",scrollbars:"no"},e))}else t.focus();null==t||t.closed||(n=setInterval(()=>{t&&!t.closed||(clearInterval(n),null===e.State.connectedId?u&&u():p(c,l,i))},500))})},e.updateAccount=function(e){return s.a.restApi.updateAccount(e)},e.deleteAccount=function(e){return s.a.restApi.deleteAccount(e).then(o.b.loadFromResponse)},e.getExpiringTokenAccounts=function(){return o.b.list.filter(m)},e.isTokenExpiring=m,e.ACCOUNT_CONNECTED_EVENT="sli/account/connected";class d extends CustomEvent{constructor(e,t){super(e,{detail:{account:t}})}}e.AccountConnectedEvent=d}(a||(a={}))},330:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(39),s=n(150),c=n(24),i=n(135),l=n(11),u=n(4);t.a=Object(u.b)((function({isOpen:e,onClose:t,onSave:n}){return o.a.createElement(r.a,{title:"Global filters",isOpen:e,onClose:()=>{c.b.isDirty&&!confirm("You have unsaved changes. If you close the window now, your settings will not be saved. Click OK to close anyway.")||t()}},o.a.createElement(r.a.Content,null,o.a.createElement(i.a,{page:l.a.settings.pages.find(e=>"filters"===e.id)})),o.a.createElement(r.a.Footer,null,o.a.createElement(s.a,{disabled:!c.b.isDirty,isSaving:c.b.isSaving,onClick:()=>{c.b.save().then(()=>{n&&n()})}})))}))},331:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var a=n(0),o=n.n(a),r=n(8);n(556);const s=({name:e,className:t,disabled:n,value:a,onChange:s,options:c})=>{const i=e=>{!n&&e.target.checked&&s&&s(e.target.value)},l=Object(r.b)(Object(r.a)("radio-group",{"--disabled":n}),t);return o.a.createElement("div",{className:l},c.map((t,n)=>o.a.createElement("label",{className:"radio-group__option",key:n},o.a.createElement("input",{type:"radio",name:e,value:t.value,checked:a===t.value,onChange:i}),o.a.createElement("span",null,t.label))))}},339:function(e,t,n){"use strict";var a=n(0),o=n.n(a),r=n(9),s=n(157),c=n.n(s);function i({children:e,ttl:t,onExpired:n}){t=null!=t?t:0;const[s,i]=o.a.useState(!1);let l=o.a.useRef(),u=o.a.useRef();const p=()=>{t>0&&(l.current=setTimeout(d,t))},m=()=>{clearTimeout(l.current)},d=()=>{i(!0),u.current=setTimeout(b,200)},b=()=>{n&&n()};Object(a.useEffect)(()=>(p(),()=>{m(),clearTimeout(u.current)}),[]);const _=s?c.a.rootFadingOut:c.a.root;return o.a.createElement("div",{className:_,onMouseOver:m,onMouseOut:p},o.a.createElement("div",{className:c.a.content},e),o.a.createElement("button",{className:c.a.dismissBtn,onClick:()=>{m(),d()}},o.a.createElement(r.a,{icon:"no-alt",className:c.a.dismissIcon})))}var l=n(243),u=n.n(l),p=n(4);t.a=Object(p.b)((function({store:e}){return o.a.createElement("div",{className:u.a.root},o.a.createElement("div",{className:u.a.container},e.toasts.map(t=>{var n;return o.a.createElement(i,{key:t.key,ttl:null!==(n=t.ttl)&&void 0!==n?n:e.ttl,onExpired:()=>{return n=t.key,void e.removeToast(n);var n}},o.a.createElement(t.component))})))}))},380:function(e,t,n){},381:function(e,t,n){},382:function(e,t,n){},383:function(e,t,n){},384:function(e,t,n){},39:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var a=n(0),o=n.n(a),r=n(30),s=n.n(r),c=n(8),i=(n(380),n(18)),l=n(6),u=n(9);function p({children:e,className:t,isOpen:n,icon:r,title:l,width:u,height:m,onClose:d,allowShadeClose:b,focusChild:_,portalTo:f}){const g=o.a.useRef(),[h]=Object(i.a)(n,!1,p.ANIMATION_DELAY);if(Object(i.d)("keydown",e=>{"Escape"===e.key&&(d&&d(),e.preventDefault(),e.stopPropagation())},[],[d]),Object(a.useEffect)(()=>{g&&g.current&&n&&(null!=_?_:g).current.focus()},[]),!h)return null;const v={width:u=null!=u?u:600,height:m},E=Object(c.b)("modal",n?"modal--open":null,n?null:"modal--close",t,"wp-core-ui-override");b=null==b||b;const y=o.a.createElement("div",{className:E},o.a.createElement("div",{className:"modal__shade",tabIndex:-1,onClick:()=>{b&&d&&d()}}),o.a.createElement("div",{ref:g,className:"modal__container",style:v,tabIndex:-1},l?o.a.createElement(p.Header,null,o.a.createElement("h1",null,o.a.createElement(p.Icon,{icon:r}),l),o.a.createElement(p.CloseBtn,{onClick:d})):null,e));return s.a.createPortal(y,null!=f?f:document.body)}!function(e){e.ANIMATION_DELAY=120,e.CloseBtn=({onClick:e})=>o.a.createElement(l.a,{className:"modal__close-btn",type:l.c.NONE,onClick:e,tooltip:"Close"},o.a.createElement("span",{className:"dashicons dashicons-no-alt"})),e.Icon=({icon:e})=>e?o.a.createElement(u.a,{icon:e,className:"modal__icon"}):null,e.Header=({children:e})=>o.a.createElement("div",{className:"modal__header"},e),e.Content=({children:e})=>o.a.createElement("div",{className:"modal__scroller"},o.a.createElement("div",{className:"modal__content"},e)),e.Footer=({children:e})=>o.a.createElement("div",{className:"modal__footer"},e)}(p||(p={}))},44:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(0),o=n.n(a),r=n(8),s=(n(381),n(9));const c=o.a.forwardRef(({label:e,className:t,isOpen:n,showIcon:a,disabled:c,stealth:i,fitted:l,hideOnly:u,onClick:p,children:m},d)=>{u=null!=u&&u,a=null==a||a,c=null!=c&&c;const[b,_]=o.a.useState(!1),f=void 0!==n;f||(n=b);const g=()=>{c||(f||_(!n),p&&p())},h=Object(r.a)("spoiler",{"--open":n,"--disabled":c,"--fitted":l,"--stealth":i}),v=Object(r.b)(h,t),E=n?"arrow-up-alt2":"arrow-down-alt2",y=Array.isArray(e)?e.map((e,t)=>o.a.createElement(o.a.Fragment,{key:t},e)):"string"==typeof e?o.a.createElement("span",null,e):e;return o.a.createElement("div",{ref:d,className:v},o.a.createElement("div",{className:"spoiler__header",onClick:g,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||g()},role:"button",tabIndex:0},o.a.createElement("div",{className:"spoiler__label"},y),a&&o.a.createElement(s.a,{icon:E,className:"spoiler__icon"})),(n||u)&&o.a.createElement("div",{className:"spoiler__content"},m))})},548:function(e,t,n){},556:function(e,t,n){},557:function(e,t,n){},6:function(e,t,n){"use strict";n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return u}));var a,o,r=n(0),s=n.n(r),c=n(8),i=n(191),l=(n(271),n(5));!function(e){e[e.PRIMARY=0]="PRIMARY",e[e.SECONDARY=1]="SECONDARY",e[e.TOGGLE=2]="TOGGLE",e[e.LINK=3]="LINK",e[e.PILL=4]="PILL",e[e.DANGER=5]="DANGER",e[e.DANGER_LINK=6]="DANGER_LINK",e[e.DANGER_PILL=7]="DANGER_PILL",e[e.NONE=8]="NONE"}(a||(a={})),function(e){e[e.SMALL=0]="SMALL",e[e.NORMAL=1]="NORMAL",e[e.LARGE=2]="LARGE",e[e.HERO=3]="HERO"}(o||(o={}));const u=s.a.forwardRef((e,t)=>{let{children:n,className:r,type:u,size:p,active:m,tooltip:d,tooltipPlacement:b,onClick:_,linkTo:f}=e,g=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n}(e,["children","className","type","size","active","tooltip","tooltipPlacement","onClick","linkTo"]);u=null!=u?u:a.SECONDARY,p=null!=p?p:o.NORMAL,b=null!=b?b:"bottom";const[h,v]=s.a.useState(!1),E=()=>v(!0),y=()=>v(!1),O=Object(c.b)(r,u!==a.NONE?"button":null,u===a.PRIMARY?"button-primary":null,u===a.SECONDARY?"button-secondary":null,u===a.LINK?"button-secondary button-tertiary":null,u===a.PILL?"button-secondary button-tertiary button-pill":null,u===a.TOGGLE?"button-toggle":null,u===a.TOGGLE&&m?"button-primary button-active":null,u!==a.TOGGLE||m?null:"button-secondary",u===a.DANGER?"button-secondary button-danger":null,u===a.DANGER_LINK?"button-tertiary button-danger":null,u===a.DANGER_PILL?"button-tertiary button-danger button-danger-pill":null,p===o.SMALL?"button-small":null,p===o.LARGE?"button-large":null,p===o.HERO?"button-hero":null),N=e=>{_&&_(e)};let C="button";if("string"==typeof f?(C="a",g.href=f):g.type="button",g.tabIndex=0,!d)return s.a.createElement(C,Object.assign({ref:t,className:O,onClick:N},g),n);const w="string"==typeof d,T="btn-tooltip-"+Object(l.p)(),A=w?d:s.a.createElement(d,{id:T});return s.a.createElement(i.a,{visible:h&&!e.disabled,placement:b,delay:300},({ref:e})=>s.a.createElement(C,Object.assign({ref:t?Object(c.d)(e,t):e,className:O,onClick:N,onMouseEnter:E,onMouseLeave:y},g),n),A)})},65:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(8),s=n(6),c=(n(382),n(9)),i=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(n[a[o]]=e[a[o]])}return n};function l(e){var{className:t,children:n,isTransitioning:a}=e,s=i(e,["className","children","isTransitioning"]);const c=Object(r.a)("onboarding",{"--transitioning":a});return o.a.createElement("div",Object.assign({className:Object(r.b)(c,t)},s),Array.isArray(n)?n.map((e,t)=>o.a.createElement("div",{key:t},e)):n)}!function(e){e.TRANSITION_DURATION=200,e.Thin=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__thin",t)},a),n)},e.HelpMsg=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("div",Object.assign({className:Object(r.b)("onboarding__help-msg",t)},a),n)},e.ProTip=({children:t})=>o.a.createElement(e.HelpMsg,null,o.a.createElement("div",{className:"onboarding__pro-tip"},o.a.createElement("span",null,o.a.createElement(c.a,{icon:"lightbulb"}),o.a.createElement("strong",null,"Pro tip!")),t)),e.StepList=e=>{var{className:t,children:n}=e,a=i(e,["className","children"]);return o.a.createElement("ul",Object.assign({className:Object(r.b)("onboarding__steps",t)},a),n)},e.Step=e=>{var{isDone:t,num:n,className:a,children:s}=e,c=i(e,["isDone","num","className","children"]);return o.a.createElement("li",Object.assign({className:Object(r.b)(t?"onboarding__done":null,a)},c),o.a.createElement("strong",null,"Step ",n,":")," ",s)},e.HeroButton=e=>{var t,{className:n,children:a}=e,c=i(e,["className","children"]);return o.a.createElement(s.a,Object.assign({type:null!==(t=c.type)&&void 0!==t?t:s.c.PRIMARY,size:s.b.HERO,className:Object(r.b)("onboarding__hero-button",n)},c),a)}}(l||(l={}))},70:function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(316),s=n(192),c=n(315),i=n(156),l=n.n(i),u=n(8);const p=(e={})=>({option:(e,t)=>Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"24px"}),menu:(e,t)=>Object.assign(Object.assign({},e),{margin:"6px 0",boxShadow:"0 2px 8px "+l.a.shadowColor,overflow:"hidden"}),menuList:(e,t)=>({padding:"0px"}),control:(e,t)=>{let n=Object.assign(Object.assign({},e),{cursor:"pointer",lineHeight:"2",minHeight:"40px"});return t.isFocused&&(n.borderColor=l.a.primaryColor,n.boxShadow="0 0 0 1px "+l.a.primaryColor),n},valueContainer:(e,t)=>Object.assign(Object.assign({},e),{paddingTop:0,paddingBottom:0,paddingRight:0}),container:(t,n)=>Object.assign(Object.assign({},t),{width:e.width||"100%"}),multiValue:(e,t)=>Object.assign(Object.assign({},e),{padding:"0 6px"}),input:(e,t)=>Object.assign(Object.assign({},e),{outline:"0 transparent !important",border:"0 transparent !important",boxShadow:"0 0 0 transparent !important"}),indicatorSeparator:(e,t)=>Object.assign(Object.assign({},e),{margin:"0",backgroundColor:"transparent"})}),m=o.a.forwardRef((e,t)=>{var n;const a=(null!==(n=e.options)&&void 0!==n?n:[]).find(t=>t.value===e.value);e=Object.assign(Object.assign({},e),{id:void 0,className:Object(u.b)("react-select",e.className),classNamePrefix:"react-select",inputId:e.id,menuPosition:"fixed"});const i=p(e),m=e.isCreatable?s.a:e.async?c.a:r.a;return o.a.createElement(m,Object.assign({},e,{ref:t,isSearchable:e.isCreatable,value:a,styles:i,theme:e=>Object.assign(Object.assign({},e),{borderRadius:3,colors:Object.assign(Object.assign({},e.colors),{primary:l.a.primaryColor,primary25:l.a.washedColor})}),menuPlacement:"auto",menuShouldScrollIntoView:!0}))})},71:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return _}));var a=n(0),o=n.n(a),r=n(142),s=n(249),c=n(250),i=n(18),l=n(11),u=(n(383),n(8));const p=({children:e,className:t,refClassName:n,isOpen:a,onBlur:p,placement:d,modifiers:b,useVisibility:_})=>{d=null!=d?d:"bottom-end",_=null!=_&&_;const f=o.a.useRef(),g=a||_,h=!a&&_,v=Object.assign({preventOverflow:{boundariesElement:document.getElementById(l.a.config.rootId),padding:5}},b),E=()=>{p()},y=e=>{switch(e.key){case"ArrowDown":break;case"Escape":E();break;default:return}e.preventDefault(),e.stopPropagation()};return Object(i.b)(f,E,[f]),Object(i.c)([f],E),o.a.createElement("div",{ref:f,className:Object(u.b)("menu__ref",n)},o.a.createElement(r.c,null,o.a.createElement(s.a,null,t=>e[0](t)),o.a.createElement(c.a,{placement:d,positionFixed:!0,modifiers:v},({ref:n,style:a,placement:r})=>g?o.a.createElement("div",{ref:n,className:"menu",style:m(a,h),"data-placement":r,onKeyDown:y},o.a.createElement("div",{className:"menu__container"+(t?" "+t:"")},e[1])):null)))};function m(e,t){return Object.assign(Object.assign({},e),{opacity:1,pointerEvents:"all",visibility:t?"hidden":"visible"})}const d=({children:e,onClick:t,disabled:n,active:a})=>{const r=Object(u.a)("menu__item",{"--disabled":n,"--active":a});return o.a.createElement("div",{className:r},o.a.createElement("button",{onClick:()=>!a&&!n&&t&&t()},e))},b=({children:e})=>e,_=({children:e})=>o.a.createElement("div",{className:"menu__static"},e)},80:function(e,t,n){e.exports={root:"Navbar__root layout__flex-row",container:"Navbar__container layout__flex-row","left-container":"Navbar__left-container Navbar__container layout__flex-row",leftContainer:"Navbar__left-container Navbar__container layout__flex-row","right-container":"Navbar__right-container Navbar__container layout__flex-row",rightContainer:"Navbar__right-container Navbar__container layout__flex-row",child:"Navbar__child",item:"Navbar__item Navbar__child",disabled:"Navbar__disabled",chevron:"Navbar__chevron Navbar__child",logo:"Navbar__logo","logo-image":"Navbar__logo-image",logoImage:"Navbar__logo-image","notification-count":"Navbar__notification-count",notificationCount:"Navbar__notification-count",link:"Navbar__link","pro-pill":"Navbar__pro-pill",proPill:"Navbar__pro-pill",current:"Navbar__current","button-container":"Navbar__button-container layout__flex-row",buttonContainer:"Navbar__button-container layout__flex-row"}},83:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(0),o=n.n(a),r=n(209),s=n.n(r),c=n(39),i=n(6);function l({children:e,title:t,buttons:n,onAccept:a,onCancel:r,isOpen:l,okDisabled:u,cancelDisabled:p}){n=null!=n?n:["OK","Cancel"];const m=()=>r&&r();return o.a.createElement(c.a,{isOpen:l,title:t,onClose:m,className:s.a.root},o.a.createElement(c.a.Content,null,"string"==typeof e?o.a.createElement("p",null,e):e),o.a.createElement(c.a.Footer,null,o.a.createElement(i.a,{className:s.a.button,type:i.c.SECONDARY,onClick:m,disabled:p},n[1]),o.a.createElement(i.a,{className:s.a.button,type:i.c.PRIMARY,onClick:()=>a&&a(),disabled:u},n[0])))}},84:function(e,t,n){e.exports={root:"ConnectAccount__root","prompt-msg":"ConnectAccount__prompt-msg",promptMsg:"ConnectAccount__prompt-msg",types:"ConnectAccount__types",type:"ConnectAccount__type","types-rows":"ConnectAccount__types-rows ConnectAccount__types",typesRows:"ConnectAccount__types-rows ConnectAccount__types","types-columns":"ConnectAccount__types-columns ConnectAccount__types",typesColumns:"ConnectAccount__types-columns ConnectAccount__types",capabilities:"ConnectAccount__capabilities",capability:"ConnectAccount__capability","business-learn-more":"ConnectAccount__business-learn-more",businessLearnMore:"ConnectAccount__business-learn-more","connect-access-token":"ConnectAccount__connect-access-token",connectAccessToken:"ConnectAccount__connect-access-token"}},85:function(e,t,n){e.exports={root:"ConnectAccessToken__root",row:"ConnectAccessToken__row ConnectAccessToken__root",content:"ConnectAccessToken__content",label:"ConnectAccessToken__label",bottom:"ConnectAccessToken__bottom","button-container":"ConnectAccessToken__button-container",buttonContainer:"ConnectAccessToken__button-container",button:"ConnectAccessToken__button","help-message":"ConnectAccessToken__help-message",helpMessage:"ConnectAccessToken__help-message",column:"ConnectAccessToken__column ConnectAccessToken__root"}},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var a=n(0),o=n.n(a),r=n(192),s=n(22),c=n(70);const i={DropdownIndicator:null},l=e=>({label:e,value:e}),u=({id:e,value:t,onChange:n,sanitize:u,autoFocus:p,message:m})=>{const[d,b]=o.a.useState(""),[_,f]=o.a.useState(-1),[g,h]=o.a.useState();Object(a.useEffect)(()=>{h(m)},[m]);const v=(t=Array.isArray(t)?t:[]).map(e=>l(e)),E=e=>{if(!n)return;let t=-1;e=e?e.map(e=>e&&u?u(e.value):e.value).filter((e,n,a)=>{const o=a.indexOf(e);return o!==n?(t=o,!1):!!e}):[],f(t),-1===t&&n(e)},y=Object(c.b)();return o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{inputId:e,className:"react-select",classNamePrefix:"react-select",components:i,inputValue:d,isClearable:!1,isMulti:!0,menuIsOpen:!1,onChange:E,onInputChange:e=>{b(e)},onKeyDown:e=>{if(d)switch(e.key){case",":case"Enter":case"Tab":b(""),E([...v,l(d)]),e.preventDefault()}},placeholder:"Type something and press enter...",value:v,autoFocus:p,styles:y}),_<0||0===v.length?null:o.a.createElement(s.a,{type:s.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},o.a.createElement("code",null,v[_].label)," is already in the list"),g?o.a.createElement(s.a,{type:s.b.WARNING,shake:!0,showIcon:!0,isDismissible:!0},g):null)};var p=n(4);const m=Object(p.b)(e=>{const[t,n]=o.a.useState("");e.exclude&&0===e.exclude.length&&t.length>0&&n("");let a=void 0;if(t.length>0){const n="%s",r=e.excludeMsg.indexOf("%s"),s=e.excludeMsg.substring(0,r),c=e.excludeMsg.substring(r+n.length);a=o.a.createElement(o.a.Fragment,null,s,o.a.createElement("code",null,t),c)}const r=Object.assign(Object.assign({},e),{message:a,onChange:t=>{const a=t.findIndex(t=>e.exclude.includes(t));a>-1?n(t[a]):e.onChange(t)}});return o.a.createElement(u,Object.assign({},r))})}}]);
ui/dist/common.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[6],{0:function(t,o){t.exports=e},110:function(e,t,o){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));const a=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},13:function(e,t,o){"use strict";var a;o.d(t,"a",(function(){return a})),function(e){let t,o;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(o=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===o.Type.POPULAR_HASHTAG||e.source.type===o.Type.RECENT_HASHTAG}(a||(a={}))},131:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(137),r=o.n(i),l=o(4),s=o(5);t.a=Object(l.b)((function({media:e,options:t,full:o}){if(!t.showCaptions||!e.type)return null;const a={color:t.captionColor,fontSize:t.captionSize},i=o?0:1,l=e.caption?e.caption:"",c=t.captionMaxLength?Object(s.n)(l,t.captionMaxLength):l,d=Object(s.k)(c,void 0,i,t.captionRemoveDots),u=o?r.a.full:r.a.preview;return n.a.createElement("div",{className:u,style:a},d)}))},132:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(110),r=o.n(i),l=o(4),s=o(13),c=o(9);t.a=Object(l.b)((function({media:e,options:t}){if(!e.type||e.source.type===s.a.Source.Type.PERSONAL_ACCOUNT)return null;const o={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},a=Object.assign(Object.assign({},o),{color:t.likesIconColor}),i=Object.assign(Object.assign({},o),{color:t.commentsIconColor}),l={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&n.a.createElement("div",{className:r.a.root},t.showLikes&&n.a.createElement("div",{className:r.a.icon,style:a},n.a.createElement(c.a,{icon:"heart",style:l}),n.a.createElement("span",null,e.likesCount)),t.showComments&&n.a.createElement("div",{className:r.a.icon,style:i},n.a.createElement(c.a,{icon:"admin-comments",style:l}),n.a.createElement("span",null,e.commentsCount)))}))},134:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(78),r=o.n(i),l=o(4),s=o(15),c=o.n(s),d=o(30),u=o.n(d),m=o(13),h=o(5),p=o(9),g=o(62),_=o.n(g),b=o(8),f=o(3);const y=({comment:e,className:t})=>{const o=e.username?n.a.createElement("a",{key:-1,href:f.b.getUsernameUrl(e.username),target:"_blank",className:_.a.username},e.username):null,a=o?(e,t)=>t>0?e:[o,...e]:void 0,i=Object(h.k)(e.text,a),r=1===e.likeCount?"like":"likes";return n.a.createElement("div",{className:Object(b.b)(_.a.root,t)},n.a.createElement("div",{className:_.a.content},n.a.createElement("div",{key:e.id,className:_.a.text},i)),n.a.createElement("div",{className:_.a.metaList},n.a.createElement("div",{className:_.a.date},Object(h.m)(e.timestamp)),e.likeCount>0&&n.a.createElement("div",{className:_.a.likeCount},`${e.likeCount} ${r}`)))};var v=o(169),x=o.n(v),M=o(138),L=o.n(M);function w(e){var{url:t,caption:o,size:a}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["url","caption","size"]);const[r,l]=n.a.useState(!1),s={width:a.width+"px",height:a.height+"px"};return n.a.createElement("img",Object.assign({style:s,className:r?L.a.image:L.a.loading,src:t,alt:o,loading:"eager",onLoad:()=>l(!0)},i))}var O=o(53),E=o.n(O);function S(e){var{album:t,autoplayVideos:o,size:a}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["album","autoplayVideos","size"]);const r=n.a.useRef(),[l,s]=n.a.useState(0),c={transform:`translateX(${100*-l}%)`},d=t.length-1,u={width:a.width+"px",height:a.height+"px"};return n.a.createElement("div",{className:E.a.root,style:u},n.a.createElement("div",{className:E.a.strip,style:c},t.map((e,t)=>n.a.createElement("div",{key:e.id,className:E.a.frame,ref:t>0?void 0:r},n.a.createElement(P,Object.assign({media:e,size:a,autoplayVideos:o},i))))),n.a.createElement("div",{className:E.a.controls},n.a.createElement("div",null,l>0&&n.a.createElement("div",{className:E.a.prevButton,onClick:()=>s(Math.max(l-1,0)),role:"button"},n.a.createElement(p.a,{icon:"arrow-left-alt2"}))),n.a.createElement("div",null,l<d&&n.a.createElement("div",{className:E.a.nextButton,onClick:()=>s(Math.min(l+1,d)),role:"button"},n.a.createElement(p.a,{icon:"arrow-right-alt2"})))),n.a.createElement("div",{className:E.a.indicatorList},t.map((e,t)=>n.a.createElement("div",{key:t,className:t===l?E.a.indicatorCurrent:E.a.indicator}))))}var C=o(58),k=o.n(C),B=o(56);function T(e){var{src:t,thumbnailUrl:o,size:i,autoPlay:r,onGetMetaData:l}=e,s=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["src","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=n.a.useRef(),d=n.a.useRef(),[u,m]=n.a.useState(!r),[h,g]=n.a.useState(!1),[_,b]=n.a.useState(r);Object(a.useEffect)(()=>{r?u&&m(!1):u||m(!0),_&&b(r)},[t]),Object(a.useEffect)(()=>{g(!1)},[o]),Object(a.useEffect)(()=>{if(d.current){const e=()=>b(!0),t=()=>b(!1);return d.current.addEventListener("play",e),d.current.addEventListener("pause",t),()=>{d.current.removeEventListener("play",e),d.current.removeEventListener("pause",t)}}},[d.current]);const f={width:i.width+"px",height:i.height+"px"};return n.a.createElement("div",{className:k.a.root,style:f},n.a.createElement("img",{ref:c,src:o,key:o,className:u?k.a.thumbnail:k.a.thumbnailHidden,width:i.width,height:i.height,onLoad:()=>g(!0),alt:""}),n.a.createElement("video",Object.assign({ref:d,className:u?k.a.videoHidden:k.a.video,src:t,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&d.current.play()}},s),n.a.createElement("source",{src:t}),"Your browser does not support videos"),u&&!h&&n.a.createElement(B.a,null),n.a.createElement("div",{className:_?k.a.controlPlaying:k.a.controlPaused,onClick:()=>{d.current&&(u?(m(!1),d.current.currentTime=0,d.current.play()):d.current.paused?d.current.play():d.current.pause())}},n.a.createElement(p.a,{className:k.a.playButton,icon:"controls-play"})))}function P({media:e,size:t,autoplayVideos:o}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return n.a.createElement(w,{url:e.url,size:t,caption:e.caption});case m.a.Type.VIDEO:const a=Object(h.h)(e,h.a.LARGE);return n.a.createElement(T,{src:e.url,size:t,thumbnailUrl:a,autoPlay:o});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return n.a.createElement(S,{album:e.children,size:t,autoplayVideos:o})}const a={width:t.width,height:t.height};return n.a.createElement("div",{className:x.a.notAvailable,style:a},n.a.createElement("span",null,"Media is not available"))}var I=o(18),N=o(28);const A=new Map;function j({feed:e,mediaList:t,current:o,options:i,onClose:r}){var l,s;const d=t.length-1,[g,_]=n.a.useState(o),b=n.a.useRef(g),v=e=>{_(e),b.current=e;const o=t[b.current];A.has(o.id)?S(A.get(o.id)):(M(!0),Object(h.d)(o,{width:600,height:600}).then(e=>{S(e),A.set(o.id,e)}))},[x,M]=n.a.useState(!1),[L,w]=n.a.useState(function(){const e=window.innerWidth<1080?window.innerWidth/1080*600:600;return{width:e,height:e}}()),[O,E]=n.a.useState(!1),S=e=>{w(e),M(!1),E(e.width+435>=window.innerWidth)};Object(a.useEffect)(()=>{v(o)},[o]),Object(I.j)("resize",()=>{const e=t[b.current];if(A.has(e.id)){let t=A.get(e.id);S(t)}});const C=t[g],k=C.comments?C.comments.slice(0,i.numLightboxComments):[],T=N.a.getLinkText(C,e),j=null!==T.text&&null!==T.url;C.caption&&C.caption.length&&k.splice(0,0,{id:C.id,text:C.caption,timestamp:C.timestamp,username:C.username});let H=null,D=null,F=null;switch(C.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:H="@"+C.username,D=f.b.getUsernameUrl(C.username);const e=f.b.getByUsername(C.username);F=e?f.b.getProfilePicUrl(e):null;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:H="#"+C.source.name,D="https://instagram.com/explore/tags/"+C.source.name}const z={fontSize:i.textSize},R=e=>{v(Math.max(0,b.current-1)),e.stopPropagation(),e.preventDefault()},U=e=>{v(Math.min(d,b.current+1)),e.stopPropagation(),e.preventDefault()},W=e=>{r&&r(),e.stopPropagation(),e.preventDefault()};{Object(a.useEffect)(()=>(document.body.addEventListener("keydown",e),()=>document.body.removeEventListener("keydown",e)),[]);const e=e=>{switch(e.key){case"ArrowRight":U(e);break;case"ArrowLeft":R(e);break;case"Escape":W(e)}}}const G={width:L.width+"px",height:L.height+"px"},V=n.a.createElement("div",{style:z,className:c.a.root,tabIndex:-1},n.a.createElement("div",{className:c.a.shade,onClick:W}),x&&n.a.createElement("div",{className:c.a.loadingSkeleton,style:G}),!x&&n.a.createElement("div",{className:O?c.a.wrapVertical:c.a.wrap},n.a.createElement("div",{className:c.a.container,role:"dialog"},n.a.createElement("div",{className:c.a.frame},x?n.a.createElement(B.a,null):n.a.createElement(P,{key:C.id,media:C,size:L})),e.options.lightboxShowSidebar&&n.a.createElement("div",{className:c.a.sidebar},n.a.createElement("div",{className:c.a.sidebarHeader},F&&n.a.createElement("a",{href:D,target:"_blank",className:c.a.sidebarHeaderPicLink},n.a.createElement("img",{className:c.a.sidebarHeaderPic,src:F,alt:null!=H?H:""})),H&&n.a.createElement("div",{className:c.a.sidebarSourceName},n.a.createElement("a",{href:D,target:"_blank"},H))),n.a.createElement("div",{className:c.a.sidebarScroller},k.length>0&&n.a.createElement("div",{className:c.a.sidebarCommentList},k.map((e,t)=>n.a.createElement(y,{key:t,comment:e,className:c.a.sidebarComment})))),n.a.createElement("div",{className:c.a.sidebarFooter},n.a.createElement("div",{className:c.a.sidebarInfo},C.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT&&n.a.createElement("div",{className:c.a.sidebarNumLikes},n.a.createElement("span",null,C.likesCount)," ",n.a.createElement("span",null,"likes")),C.timestamp&&n.a.createElement("div",{className:c.a.sidebarDate},Object(h.m)(C.timestamp))),n.a.createElement("div",{className:c.a.sidebarIgLink},n.a.createElement("a",{href:null!==(l=T.url)&&void 0!==l?l:C.permalink,target:"_blank"},n.a.createElement(p.a,{icon:j?"external":"instagram"}),n.a.createElement("span",null,null!==(s=T.text)&&void 0!==s?s:"View on Instagram")))))),g>0&&n.a.createElement("div",{className:c.a.prevButtonContainer},n.a.createElement("div",{className:c.a.prevButton,onClick:R,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"arrow-left-alt",className:c.a.buttonIcon}))),g<t.length-1&&n.a.createElement("div",{className:c.a.nextButtonContainer},n.a.createElement("div",{className:c.a.nextButton,onClick:U,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"arrow-right-alt",className:c.a.buttonIcon})))),n.a.createElement("div",{className:c.a.closeButton,onClick:W,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"no-alt",className:c.a.buttonIcon})));return u.a.createPortal(V,document.body)}var H=o(7),D=o(35),F=o.n(D),z=o(139),R=o.n(z);const U=Object(l.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,o={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return n.a.createElement("a",{href:t,target:"__blank",className:R.a.link},n.a.createElement("button",{className:R.a.button,style:o},e.followBtnText))});var W=o(29),G=o.n(W),V=o(160),$=o(159),K=Object(l.b)((function({stories:e,options:t,onClose:o}){const[i,r]=n.a.useState(0),l=e.length-1,[s,c]=n.a.useState(0),[d,h]=n.a.useState(0);Object(a.useEffect)(()=>{0!==s&&c(0)},[i]);const g=i<l,_=i>0,b=()=>o&&o(),f=()=>i<l?r(i+1):b(),y=()=>r(e=>Math.max(e-1,0)),v=e[i],x="https://instagram.com/"+t.account.username,M=v.type===m.a.Type.VIDEO?d:t.storiesInterval;Object(I.d)("keydown",e=>{switch(e.key){case"Escape":b();break;case"ArrowLeft":y();break;case"ArrowRight":f();break;default:return}e.preventDefault(),e.stopPropagation()});const L=n.a.createElement("div",{className:G.a.root},n.a.createElement("div",{className:G.a.container},n.a.createElement("div",{className:G.a.header},n.a.createElement("a",{href:x,target:"_blank"},n.a.createElement("img",{className:G.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),n.a.createElement("a",{href:x,className:G.a.username,target:"_blank"},t.account.username),n.a.createElement("div",{className:G.a.date},Object(V.a)(Object($.a)(v.timestamp),{addSuffix:!0}))),n.a.createElement("div",{className:G.a.progress},e.map((e,t)=>n.a.createElement(q,{key:e.id,duration:M,animate:t===i,isDone:t<i}))),n.a.createElement("div",{className:G.a.content},_&&n.a.createElement("div",{className:G.a.prevButton,onClick:y,role:"button"},n.a.createElement(p.a,{icon:"arrow-left-alt2"})),n.a.createElement("div",{className:G.a.media},n.a.createElement(X,{key:v.id,media:v,imgDuration:t.storiesInterval,onGetDuration:h,onEnd:()=>g?f():b()})),g&&n.a.createElement("div",{className:G.a.nextButton,onClick:f,role:"button"},n.a.createElement(p.a,{icon:"arrow-right-alt2"})),n.a.createElement("div",{className:G.a.closeButton,onClick:b,role:"button"},n.a.createElement(p.a,{icon:"no-alt"})))));return u.a.createPortal(L,document.body)}));function q({animate:e,isDone:t,duration:o}){const a=e?G.a.progressOverlayAnimating:t?G.a.progressOverlayDone:G.a.progressOverlay,i={animationDuration:o+"s"};return n.a.createElement("div",{className:G.a.progressSegment},n.a.createElement("div",{className:a,style:i}))}function X({media:e,imgDuration:t,onGetDuration:o,onEnd:a}){return e.type===m.a.Type.VIDEO?n.a.createElement(J,{media:e,onEnd:a,onGetDuration:o}):n.a.createElement(Y,{media:e,onEnd:a,duration:t})}function Y({media:e,duration:t,onEnd:o}){const[i,r]=n.a.useState(!1);return Object(a.useEffect)(()=>{const e=i?setTimeout(o,1e3*t):null;return()=>clearTimeout(e)},[e,i]),n.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function J({media:e,onEnd:t,onGetDuration:o}){const a=n.a.useRef(),i=Object(h.h)(e,h.a.LARGE);return n.a.createElement("video",{ref:a,src:e.url,poster:i,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>o(a.current.duration),onEnded:t},n.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var Q=Object(l.b)((function({feed:e,options:t}){const[o,a]=n.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,l=e.stories.filter(e=>e.username===i.username),s=l.length>0,c=t.headerInfo.includes(H.a.HeaderInfo.MEDIA_COUNT),d=t.headerInfo.includes(H.a.HeaderInfo.FOLLOWERS)&&i.type!=f.a.Type.PERSONAL,u=t.headerInfo.includes(H.a.HeaderInfo.PROFILE_PIC),m=t.includeStories&&s,h=t.headerStyle===H.a.HeaderStyle.BOXED,p={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},g=m?"button":void 0,_={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:m?"pointer":"normal"},b=t.showFollowBtn&&(t.followBtnLocation===H.a.FollowBtnLocation.HEADER||t.followBtnLocation===H.a.FollowBtnLocation.BOTH),y={justifyContent:t.showBio&&h?"flex-start":"center"},v=n.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),x=m&&s?F.a.profilePicWithStories:F.a.profilePic;return n.a.createElement("div",{className:Z(t.headerStyle),style:p},n.a.createElement("div",{className:F.a.leftContainer},u&&n.a.createElement("div",{className:x,style:_,role:g,onClick:()=>{m&&a(0)}},m?v:n.a.createElement("a",{href:r,target:"_blank"},v)),n.a.createElement("div",{className:F.a.info},n.a.createElement("div",{className:F.a.username},n.a.createElement("a",{href:r,target:"_blank"},n.a.createElement("span",null,"@"),n.a.createElement("span",null,i.username))),t.showBio&&n.a.createElement("div",{className:F.a.bio},t.bioText),(c||d)&&n.a.createElement("div",{className:F.a.counterList},c&&n.a.createElement("div",{className:F.a.counter},n.a.createElement("span",null,i.mediaCount)," posts"),d&&n.a.createElement("div",{className:F.a.counter},n.a.createElement("span",null,i.followersCount)," followers")))),n.a.createElement("div",{className:F.a.rightContainer},b&&n.a.createElement("div",{className:F.a.followButton,style:y},n.a.createElement(U,{options:t}))),m&&null!==o&&n.a.createElement(K,{stories:l,options:t,onClose:()=>{a(null)}}))}));function Z(e){switch(e){case H.a.HeaderStyle.NORMAL:return F.a.normalStyle;case H.a.HeaderStyle.CENTERED:return F.a.centeredStyle;case H.a.HeaderStyle.BOXED:return F.a.boxedStyle;default:return}}var ee=o(170),te=o.n(ee);const oe=Object(l.b)(({feed:e,options:t})=>{const o=n.a.useRef(),a=Object(I.h)(o,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return n.a.createElement("button",{ref:o,className:te.a.root,style:i,onClick:()=>{a(),e.loadMore()}},e.isLoading?n.a.createElement("span",null,"Loading ..."):n.a.createElement("span",null,e.options.loadMoreBtnText))});t.a=Object(l.b)((function({children:e,feed:t,options:o}){const[a,i]=n.a.useState(null),l={width:o.feedWidth,height:o.feedHeight,fontSize:o.textSize},s={backgroundColor:o.bgColor,padding:o.feedPadding},c={marginBottom:o.imgPadding},d={marginTop:o.buttonPadding},u=o.showHeader&&n.a.createElement("div",{style:c},n.a.createElement(Q,{feed:t,options:o})),m=o.showLoadMoreBtn&&n.a.createElement("div",{className:r.a.loadMoreBtn,style:d},n.a.createElement(oe,{feed:t,options:o})),h=o.showFollowBtn&&(o.followBtnLocation===H.a.FollowBtnLocation.BOTTOM||o.followBtnLocation===H.a.FollowBtnLocation.BOTH)&&n.a.createElement("div",{className:r.a.followBtn,style:d},n.a.createElement(U,{options:o})),p=new Array(o.numPosts).fill(r.a.fakeMedia);return n.a.createElement("div",{className:r.a.root,style:l},n.a.createElement("div",{className:r.a.wrapper,style:s},e({mediaList:t.media,openMedia:function(e){const a=t.media[e];if(!t.options.promotionEnabled||!N.a.executeMediaClick(a,t))switch(o.linkBehavior){case H.a.LinkBehavior.LIGHTBOX:return void i(e);case H.a.LinkBehavior.NEW_TAB:return void window.open(a.permalink,"_blank");case H.a.LinkBehavior.SELF:return void window.open(a.permalink,"_self")}},header:u,loadMoreBtn:m,followBtn:h,loadingMedia:p})),null!==a&&n.a.createElement(j,{feed:t,mediaList:t.media,current:a,options:o,onClose:()=>i(null)}))}))},136:function(e,t,o){"use strict";var a=o(77),n=o.n(a),i=o(0),r=o.n(i),l=o(13),s=o(4),c=o(41),d=o.n(c),u=o(159),m=o(568),h=o(567),p=o(7),g=o(9),_=o(5),b=Object(s.b)((function({options:e,media:t}){var o;const a=r.a.useRef(),[n,s]=r.a.useState(null);Object(i.useEffect)(()=>{a.current&&s(a.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===p.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==l.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===l.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const b=e.hoverInfo.some(e=>e===p.a.HoverInfo.CAPTION),f=e.hoverInfo.some(e=>e===p.a.HoverInfo.USERNAME),y=e.hoverInfo.some(e=>e===p.a.HoverInfo.DATE),v=e.hoverInfo.some(e=>e===p.a.HoverInfo.INSTA_LINK),x=null!==(o=t.caption)&&void 0!==o?o:"",M=t.timestamp?Object(u.a)(t.timestamp):null,L=t.timestamp?Object(m.a)(M).toString():null,w=t.timestamp?Object(h.a)(M,"HH:mm - do MMM yyyy"):null,O=t.timestamp?Object(_.m)(t.timestamp):null,E={color:e.textColorHover,backgroundColor:e.bgColorHover};let S=null;if(null!==n){const e=Math.sqrt(1.3*(n+30)),o=Math.sqrt(1.6*n+100),a=Math.max(e,8)+"px",i=Math.max(o,8)+"px",l={fontSize:a},s={fontSize:a,width:a,height:a},u={fontSize:i,width:i,height:i};S=r.a.createElement("div",{className:d.a.rows},r.a.createElement("div",{className:d.a.topRow},f&&t.username&&r.a.createElement("div",{className:d.a.username},r.a.createElement("a",{href:"https://instagram.com/"+t.username,target:"_blank"},"@",t.username)),b&&t.caption&&r.a.createElement("div",{className:d.a.caption},x)),r.a.createElement("div",{className:d.a.middleRow},c&&r.a.createElement("div",{className:d.a.counterList},r.a.createElement("span",{className:d.a.likesCount,style:l},r.a.createElement(g.a,{icon:"heart",style:s})," ",t.likesCount),r.a.createElement("span",{className:d.a.commentsCount,style:l},r.a.createElement(g.a,{icon:"admin-comments",style:s})," ",t.commentsCount))),r.a.createElement("div",{className:d.a.bottomRow},y&&t.timestamp&&r.a.createElement("div",{className:d.a.date},r.a.createElement("time",{dateTime:L,title:w},O)),v&&r.a.createElement("a",{className:d.a.igLinkIcon,href:t.permalink,title:x,target:"_blank",style:u,onClick:e=>e.stopPropagation()},r.a.createElement(g.a,{icon:"instagram",style:u}))))}return r.a.createElement("div",{ref:a,className:d.a.root,style:E},S)})),f=o(17),y=o(90);t.a=Object(s.b)((function({media:e,options:t,forceOverlay:o,onClick:a}){const[i,s]=r.a.useState(!1),c=function(e){switch(e.type){case l.a.Type.IMAGE:return n.a.imageTypeIcon;case l.a.Type.VIDEO:return n.a.videoTypeIcon;case l.a.Type.ALBUM:return n.a.albumTypeIcon;default:return}}(e),d={backgroundImage:`url(${f.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:n.a.root,onClick:e=>{a&&a(e)},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},r.a.createElement(y.a,{media:e}),r.a.createElement("div",{className:c,style:d}),(i||o)&&r.a.createElement("div",{className:n.a.overlay},r.a.createElement(b,{media:e,options:t}))))}))},137:function(e,t,o){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},138:function(e,t,o){e.exports={image:"MediaLightboxImage__image MediaLightboxObject__media",loading:"MediaLightboxImage__loading MediaLightboxObject__media MediaLightboxObject__loading-animation"}},139:function(e,t,o){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},14:function(e,t,o){"use strict";var a=o(37),n=o.n(a),i=o(17),r=o(38);const l=i.a.config.restApi.baseUrl,s={};i.a.config.restApi.authToken&&(s["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=n.a.create({baseURL:l,headers:s}),d={config:i.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,a)=>{const i=a?new n.a.CancelToken(a):void 0;return c.post("/media/fetch",{options:e,num:o,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(r.b)(t)}};t.a=d},15:function(e,t,o){e.exports={root:"MediaLightbox__root layout__fill-parent layout__z-higher layout__flex-row layout__flex-center layout__no-overflow",shade:"MediaLightbox__shade layout__fill-parent layout__z-low","loading-skeleton":"MediaLightbox__loading-skeleton layout__z-high",loadingSkeleton:"MediaLightbox__loading-skeleton layout__z-high",wrap:"MediaLightbox__wrap","wrap-vertical":"MediaLightbox__wrap-vertical MediaLightbox__wrap layout__z-high",wrapVertical:"MediaLightbox__wrap-vertical MediaLightbox__wrap layout__z-high",container:"MediaLightbox__container layout__flex-row",sidebar:"MediaLightbox__sidebar layout__flex-column layout__scroll-y","sidebar-element":"MediaLightbox__sidebar-element",sidebarElement:"MediaLightbox__sidebar-element",frame:"MediaLightbox__frame layout__flex-column layout__flex-center","nav-button-container":"MediaLightbox__nav-button-container layout__flex-column layout__flex-center",navButtonContainer:"MediaLightbox__nav-button-container layout__flex-column layout__flex-center","next-button-container":"MediaLightbox__next-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",nextButtonContainer:"MediaLightbox__next-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center","prev-button-container":"MediaLightbox__prev-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",prevButtonContainer:"MediaLightbox__prev-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",button:"MediaLightbox__button layout__z-low","button-icon":"MediaLightbox__button-icon",buttonIcon:"MediaLightbox__button-icon","close-button":"MediaLightbox__close-button MediaLightbox__button layout__z-low",closeButton:"MediaLightbox__close-button MediaLightbox__button layout__z-low","next-button":"MediaLightbox__next-button MediaLightbox__button layout__z-low",nextButton:"MediaLightbox__next-button MediaLightbox__button layout__z-low","prev-button":"MediaLightbox__prev-button MediaLightbox__button layout__z-low",prevButton:"MediaLightbox__prev-button MediaLightbox__button layout__z-low","sidebar-element-bordered":"MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarElementBordered:"MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element","sidebar-header":"MediaLightbox__sidebar-header MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element layout__flex-row",sidebarHeader:"MediaLightbox__sidebar-header MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element layout__flex-row","sidebar-header-pic":"MediaLightbox__sidebar-header-pic",sidebarHeaderPic:"MediaLightbox__sidebar-header-pic","sidebar-header-pic-link":"MediaLightbox__sidebar-header-pic-link MediaLightbox__sidebar-header-pic",sidebarHeaderPicLink:"MediaLightbox__sidebar-header-pic-link MediaLightbox__sidebar-header-pic","sidebar-scroller":"MediaLightbox__sidebar-scroller layout__scroll-y",sidebarScroller:"MediaLightbox__sidebar-scroller layout__scroll-y","sidebar-comment-list":"MediaLightbox__sidebar-comment-list MediaLightbox__sidebar-element layout__flex-column",sidebarCommentList:"MediaLightbox__sidebar-comment-list MediaLightbox__sidebar-element layout__flex-column","sidebar-comment":"MediaLightbox__sidebar-comment",sidebarComment:"MediaLightbox__sidebar-comment","sidebar-source-name":"MediaLightbox__sidebar-source-name",sidebarSourceName:"MediaLightbox__sidebar-source-name","sidebar-footer":"MediaLightbox__sidebar-footer layout__flex-column",sidebarFooter:"MediaLightbox__sidebar-footer layout__flex-column","sidebar-info":"MediaLightbox__sidebar-info layout__flex-column MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarInfo:"MediaLightbox__sidebar-info layout__flex-column MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element","sidebar-info-line":"MediaLightbox__sidebar-info-line",sidebarInfoLine:"MediaLightbox__sidebar-info-line","sidebar-num-likes":"MediaLightbox__sidebar-num-likes MediaLightbox__sidebar-info-line",sidebarNumLikes:"MediaLightbox__sidebar-num-likes MediaLightbox__sidebar-info-line","sidebar-date":"MediaLightbox__sidebar-date MediaLightbox__sidebar-info-line",sidebarDate:"MediaLightbox__sidebar-date MediaLightbox__sidebar-info-line","sidebar-ig-link":"MediaLightbox__sidebar-ig-link MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarIgLink:"MediaLightbox__sidebar-ig-link MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element"}},168:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(49),r=o.n(i),l=o(4),s=o(136),c=o(131),d=o(132),u=o(134),m=o(8),h=o(5);t.a=Object(l.b)((function({feed:e,options:t,cellClassName:o}){o=null!=o?o:()=>{};const a={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`};return n.a.createElement(u.a,{feed:e,options:t},({mediaList:i,openMedia:l,header:u,loadMoreBtn:p,followBtn:g,loadingMedia:_})=>n.a.createElement("div",{className:r.a.root},u,(!e.isLoading||e.isLoadingMore)&&n.a.createElement("div",{className:r.a.grid,style:a},e.media.length?i.map((e,a)=>n.a.createElement("div",{key:`${a}-${e.id}`,className:Object(m.b)(r.a.cell,o(e,a))},n.a.createElement("div",{className:r.a.cellContent},n.a.createElement("div",{className:r.a.mediaContainer},n.a.createElement(s.a,{media:e,onClick:()=>l(a),options:t})),n.a.createElement("div",{className:r.a.mediaMeta},n.a.createElement(c.a,{options:t,media:e}),n.a.createElement(d.a,{options:t,media:e}))))):null,e.isLoadingMore&&_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(h.o)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),e.isLoading&&!e.isLoadingMore&&n.a.createElement("div",{className:r.a.grid,style:a},_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(h.o)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),n.a.createElement("div",{className:r.a.buttonList},p,g)))}))},169:function(e,t,o){e.exports={media:"MediaLightboxObject__media","not-available":"MediaLightboxObject__not-available MediaLightboxObject__media",notAvailable:"MediaLightboxObject__not-available MediaLightboxObject__media","loading-animation":"MediaLightboxObject__loading-animation",loadingAnimation:"MediaLightboxObject__loading-animation",loading:"MediaLightboxObject__loading"}},17:function(e,t,o){"use strict";let a;t.a=a={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${a.config.imagesUrl}/${e}`}},170:function(e,t,o){e.exports={root:"LoadMoreButton__root feed__feed-button"}},18:function(e,t,o){"use strict";o.d(t,"e",(function(){return l})),o.d(t,"b",(function(){return s})),o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return d})),o.d(t,"k",(function(){return u})),o.d(t,"g",(function(){return m})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return p})),o.d(t,"d",(function(){return _})),o.d(t,"j",(function(){return b})),o.d(t,"f",(function(){return f}));var a=o(0),n=o.n(a),i=o(40),r=o(36);function l(e){const[t,o]=n.a.useState(e),a=n.a.useRef(t);return[t,()=>a.current,e=>o(a.current=e)]}function s(e,t,o=[]){function n(a){!e.current||e.current.contains(a.target)||o.some(e=>e&&e.current&&e.current.contains(a.target))||t(a)}Object(a.useEffect)(()=>(document.addEventListener("mousedown",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchend",n)}))}function c(e,t){Object(a.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function d(e,t,o=100){const[i,r]=n.a.useState(e);return Object(a.useEffect)(()=>{let a=null;return e===t?a=setTimeout(()=>r(t),o):r(!t),()=>{null!==a&&clearTimeout(a)}},[e]),[i,r]}function u(e){const[t,o]=n.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(a.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function m(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){const o=o=>{if(t)return(o||window.event).returnValue=e,e};Object(a.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[t])}function p(e,t){const o=n.a.useRef(!1);return Object(a.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function g(e,t,o,n=[],i=[]){Object(a.useEffect)(()=>(n.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function _(e,t,o=[],a=[]){g(document,e,t,o,a)}function b(e,t,o=[],a=[]){g(window,e,t,o,a)}function f(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}o(38)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(1),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return a(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const a=l(this,t,e);return new o(a.desktop,a.tablet,a.phone)}}function a(e,t,o=!1){if(!e)return;const a=e[t.prop];return!o||""!==a&&null!=a&&""!==a?a:e.desktop}function r(e,t,o){return e[o.prop]=t,e}function l(e,t,o){return r({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,o)}i([n.n],o.prototype,"desktop",void 0),i([n.n],o.prototype,"tablet",void 0),i([n.n],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const a=e.MODES.findIndex(e=>e===o);return void 0===a?t.DESKTOP:e.MODES[(a+1)%e.MODES.length]},e.get=a,e.set=r,e.withValue=l,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(a||(a={}))},26:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));class a{static getById(e){const t=a.list.find(t=>t.id===e);return!t&&a.list.length>0?a.list[0]:t}static getName(e){const t=a.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){a.list.push(e)}}a.list=[]},28:function(e,t,o){"use strict";var a=o(1),n=o(76),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class r{constructor(){this.types=[],this.focusSidebar=0,this.mediaStore=n.a}get selectedMedia(){return"number"==typeof this.selectedIdx?this.mediaStore.media[this.selectedIdx]:void 0}nextPost(){this.selectedIdx<this.mediaStore.media.length-1&&this.selectedIdx++}addPromotionType(e){this.types.push(e)}getPromotionType(e){return this.types.find(t=>t.value===e)}getMediaPromo(e,t){var o;const a=t.options.promotions.hasOwnProperty(e.id)?t.options.promotions[e.id]:void 0;if(!a)return[{},null];const n=this.getPromotionType(a.type);return n?[null!==(o=a.data)&&void 0!==o?o:{},n]:[{},null]}executeMediaClick(e,t){const[o,a]=this.getMediaPromo(e,t);return!(null===a||!a.isValid(e,o)||"function"!=typeof a.onMediaClick)&&a.onMediaClick(e,o)}getLinkText(e,t){var o,a;const[n,i]=this.getMediaPromo(e,t);return null!==i&&i.isValid(e,n)?{text:i.getPopupLinkText&&null!==(o=i.getPopupLinkText(e,n))&&void 0!==o?o:null,url:i.getMediaUrl&&null!==(a=i.getMediaUrl(e,n))&&void 0!==a?a:null}:{text:null,url:null}}}i([a.n],r.prototype,"selectedIdx",void 0),i([a.n],r.prototype,"focusSidebar",void 0),i([Object(a.h)({keepAlive:!0})],r.prototype,"selectedMedia",null),i([a.f],r.prototype,"nextPost",null),t.a=new r},29:function(e,t,o){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(14),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(a||(a={}));const r=Object(i.n)([]),l="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",s=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===a.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return r.replace(t),r}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:l,getById:s,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==s(e)),idsToAccounts:e=>e.map(e=>s(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>r.filter(e=>e.type===a.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:l,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return n.a.getAccounts().then(d).catch(e=>{throw n.a.getErrorReason(e)})},loadFromResponse:d}},30:function(e,o){e.exports=t},31:function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"c",(function(){return m}));var a=o(0),n=o.n(a),i=o(30),r=o.n(i),l=o(4);class s{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let o=this.cache.get(e);if(void 0===o){o=t(this);let a=this.extensions.get(e);a&&a.forEach(e=>o=e(this,o)),this.cache.set(e,o)}return o}has(e){return this.factories.has(e)}}class c{constructor(e,t,o){this.key=e,this.mount=t,this.modules=o,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=m({root:()=>null,"root/children":()=>[]});this.container=new s(e,this.modules);const t=this.container.get("root/children").map((e,t)=>n.a.createElement(e,{key:t})),o=n.a.createElement(l.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),r.a.render(o,this.mount)})}}function d(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function m(e){return new Map(Object.entries(e))}},342:function(e,t,o){"use strict";o.r(t);var a=o(26),n=o(17),i=o(168);a.a.addLayout({id:"grid",name:"Grid",img:n.a.image("grid-layout.png"),component:i.a})},35:function(e,t,o){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},36:function(e,t,o){"use strict";function a(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function n(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},38:function(e,t,o){"use strict";function a(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function n(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}))},41:function(e,t,o){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},49:function(e,t,o){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},5:function(e,t,o){"use strict";o.d(t,"o",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"j",(function(){return u})),o.d(t,"e",(function(){return m})),o.d(t,"c",(function(){return h})),o.d(t,"i",(function(){return p})),o.d(t,"k",(function(){return g})),o.d(t,"g",(function(){return _})),o.d(t,"a",(function(){return b})),o.d(t,"f",(function(){return f})),o.d(t,"h",(function(){return y})),o.d(t,"n",(function(){return v})),o.d(t,"m",(function(){return x})),o.d(t,"l",(function(){return M})),o.d(t,"d",(function(){return L}));var a=o(0),n=o.n(a),i=o(160),r=o(159),l=o(13);let s=0;function c(){return s++}function d(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;++a)if(o){if(!o(e[a],t[a]))return!1}else if(e[a]!==t[a])return!1;return!0}function u(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(o=>"object"==typeof e[o]?"object"!=typeof t[o]||!u(e[o],t[o]):Array.isArray(e[o])?!Array.isArray(t[o])||!d(e[o],t[o]):e[o]!==t[o]):e===t}function m(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function p(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function g(e,t,o=0,i=!1){let r=e.trim();i&&(r=r.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=r.split("\n"),s=l.map((e,o)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let r,s=[];for(;null!==(r=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+r[1],o=n.a.createElement("a",{href:t,target:"_blank",key:c()},r[0]),a=e.substr(0,r.index),i=e.substr(r.index+r[0].length);s.push(a),s.push(o),e=i}return e.length&&s.push(e),t&&(s=t(s,o)),l.length>1&&s.push(n.a.createElement("br",{key:c()})),n.a.createElement(a.Fragment,{key:c()},s)});return o>0?s.slice(0,o):s}function _(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var b;function f(e,t=b.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function y(e,t=b.MEDIUM){return e.thumbnail?e.thumbnail:f(_(e.permalink),t)}function v(e,t){const o=/(\s+)/g;let a,n=0,i=0,r="";for(;null!==(a=o.exec(e))&&n<t;){const t=a.index+a[1].length;r+=e.substr(i,t-i),i=t,n++}return i<e.length&&(r+=" ..."),r}function x(e){return Object(i.a)(Object(r.a)(e),{addSuffix:!0})}function M(e,t){const o=[];return e.forEach((e,a)=>{const n=a%t;Array.isArray(o[n])?o[n].push(e):o[n]=[e]}),o}function L(e,t){return function e(t){if(t.type===l.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(o=>{e.src=t.url,e.addEventListener("loadeddata",()=>{o({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===l.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===l.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const o=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*o,height:e.height*o}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(b||(b={}))},53:function(e,t,o){e.exports={root:"MediaLightboxAlbum__root",strip:"MediaLightboxAlbum__strip layout__flex-row",frame:"MediaLightboxAlbum__frame",controls:"MediaLightboxAlbum__controls layout__fill-parent layout__flex-row","nav-button":"MediaLightboxAlbum__nav-button",navButton:"MediaLightboxAlbum__nav-button","next-button":"MediaLightboxAlbum__next-button MediaLightboxAlbum__nav-button",nextButton:"MediaLightboxAlbum__next-button MediaLightboxAlbum__nav-button","prev-button":"MediaLightboxAlbum__prev-button MediaLightboxAlbum__nav-button",prevButton:"MediaLightboxAlbum__prev-button MediaLightboxAlbum__nav-button","indicator-list":"MediaLightboxAlbum__indicator-list layout__flex-row",indicatorList:"MediaLightboxAlbum__indicator-list layout__flex-row",indicator:"MediaLightboxAlbum__indicator","indicator-current":"MediaLightboxAlbum__indicator-current MediaLightboxAlbum__indicator",indicatorCurrent:"MediaLightboxAlbum__indicator-current MediaLightboxAlbum__indicator"}},56:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var a=o(0),n=o.n(a),i=o(91),r=o.n(i);function l(){return n.a.createElement("div",{className:r.a.root})}},57:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},58:function(e,t,o){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},62:function(e,t,o){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},7:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var a=o(37),n=o.n(a),i=o(1),r=o(2),l=o(26),s=o(31),c=o(3),d=o(5),u=o(12),m=o(14),h=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class p{constructor(e=new p.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new p.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=r.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=r.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),p.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((a,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,a&&a()}).catch(e=>{var t;if(n.a.isCancel(e))return null;const o=new p.Events.FetchFailEvent(p.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}h([i.n],p.prototype,"media",void 0),h([i.n],p.prototype,"canLoadMore",void 0),h([i.n],p.prototype,"stories",void 0),h([i.n],p.prototype,"numLoadedMore",void 0),h([i.n],p.prototype,"options",void 0),h([i.n],p.prototype,"totalMedia",void 0),h([i.n],p.prototype,"mode",void 0),h([i.n],p.prototype,"isLoaded",void 0),h([i.n],p.prototype,"isLoading",void 0),h([i.n],p.prototype,"isLoadingMore",void 0),h([i.f],p.prototype,"reload",void 0),h([i.n],p.prototype,"localMedia",void 0),h([i.n],p.prototype,"numMediaToShow",void 0),h([i.n],p.prototype,"numMediaPerPage",void 0),h([i.n],p.prototype,"mediaCounter",void 0),h([i.h],p.prototype,"_media",null),h([i.h],p.prototype,"_numMediaToShow",null),h([i.h],p.prototype,"_numMediaPerPage",null),h([i.h],p.prototype,"_canLoadMore",null),h([i.f],p.prototype,"loadMore",null),h([i.f],p.prototype,"load",null),h([i.f],p.prototype,"loadMedia",null),function(e){let t,o,a,n,m,p,g,_,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class f{constructor(e={}){f.setFromObject(this,e)}static setFromObject(t,o={}){var a,n,i,s,d,u,m,h,p,g,_,b;return t.accounts=o.accounts?o.accounts.slice():e.DefaultOptions.accounts,t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=o.tagged?o.tagged.slice():e.DefaultOptions.tagged,t.layout=l.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(a=o.headerAccount)&&void 0!==a?a:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===c.b.getById(t.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(n=o.customProfilePic)&&void 0!==n?n:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(s=o.captionRemoveDots)&&void 0!==s?s:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(d=o.likesIconColor)&&void 0!==d?d:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(u=o.lightboxShowSidebar)&&void 0!==u?u:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=o.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(h=o.followBtnText)&&void 0!==h?h:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(p=o.hashtagWhitelistSettings)&&void 0!==p?p:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(g=o.hashtagBlacklistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(_=o.captionWhitelistSettings)&&void 0!==_?_:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=o.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=o.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=o.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=c.b.idsToAccounts(e.accounts),o=c.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:c.b.idsToAccounts(e.accounts),tagged:c.b.idsToAccounts(e.tagged),hashtags:c.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,o){const a=e.Options.getSources(t),n=a.accounts.length>0||a.tagged.length>0,i=!o&&a.hashtags.length>0;return n||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}h([i.n],f.prototype,"accounts",void 0),h([i.n],f.prototype,"hashtags",void 0),h([i.n],f.prototype,"tagged",void 0),h([i.n],f.prototype,"layout",void 0),h([i.n],f.prototype,"numColumns",void 0),h([i.n],f.prototype,"highlightFreq",void 0),h([i.n],f.prototype,"mediaType",void 0),h([i.n],f.prototype,"postOrder",void 0),h([i.n],f.prototype,"numPosts",void 0),h([i.n],f.prototype,"linkBehavior",void 0),h([i.n],f.prototype,"feedWidth",void 0),h([i.n],f.prototype,"feedHeight",void 0),h([i.n],f.prototype,"feedPadding",void 0),h([i.n],f.prototype,"imgPadding",void 0),h([i.n],f.prototype,"textSize",void 0),h([i.n],f.prototype,"bgColor",void 0),h([i.n],f.prototype,"textColorHover",void 0),h([i.n],f.prototype,"bgColorHover",void 0),h([i.n],f.prototype,"hoverInfo",void 0),h([i.n],f.prototype,"showHeader",void 0),h([i.n],f.prototype,"headerInfo",void 0),h([i.n],f.prototype,"headerAccount",void 0),h([i.n],f.prototype,"headerStyle",void 0),h([i.n],f.prototype,"headerTextSize",void 0),h([i.n],f.prototype,"headerPhotoSize",void 0),h([i.n],f.prototype,"headerTextColor",void 0),h([i.n],f.prototype,"headerBgColor",void 0),h([i.n],f.prototype,"headerPadding",void 0),h([i.n],f.prototype,"customBioText",void 0),h([i.n],f.prototype,"customProfilePic",void 0),h([i.n],f.prototype,"includeStories",void 0),h([i.n],f.prototype,"storiesInterval",void 0),h([i.n],f.prototype,"showCaptions",void 0),h([i.n],f.prototype,"captionMaxLength",void 0),h([i.n],f.prototype,"captionRemoveDots",void 0),h([i.n],f.prototype,"captionSize",void 0),h([i.n],f.prototype,"captionColor",void 0),h([i.n],f.prototype,"showLikes",void 0),h([i.n],f.prototype,"showComments",void 0),h([i.n],f.prototype,"lcIconSize",void 0),h([i.n],f.prototype,"likesIconColor",void 0),h([i.n],f.prototype,"commentsIconColor",void 0),h([i.n],f.prototype,"lightboxShowSidebar",void 0),h([i.n],f.prototype,"numLightboxComments",void 0),h([i.n],f.prototype,"showLoadMoreBtn",void 0),h([i.n],f.prototype,"loadMoreBtnText",void 0),h([i.n],f.prototype,"loadMoreBtnTextColor",void 0),h([i.n],f.prototype,"loadMoreBtnBgColor",void 0),h([i.n],f.prototype,"autoload",void 0),h([i.n],f.prototype,"showFollowBtn",void 0),h([i.n],f.prototype,"followBtnText",void 0),h([i.n],f.prototype,"followBtnTextColor",void 0),h([i.n],f.prototype,"followBtnBgColor",void 0),h([i.n],f.prototype,"followBtnLocation",void 0),h([i.n],f.prototype,"hashtagWhitelist",void 0),h([i.n],f.prototype,"hashtagBlacklist",void 0),h([i.n],f.prototype,"captionWhitelist",void 0),h([i.n],f.prototype,"captionBlacklist",void 0),h([i.n],f.prototype,"hashtagWhitelistSettings",void 0),h([i.n],f.prototype,"hashtagBlacklistSettings",void 0),h([i.n],f.prototype,"captionWhitelistSettings",void 0),h([i.n],f.prototype,"captionBlacklistSettings",void 0),h([i.n],f.prototype,"moderation",void 0),h([i.n],f.prototype,"moderationMode",void 0),h([i.n],f.prototype,"promotionEnabled",void 0),e.Options=f;class y{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.k)(Object(d.n)(t,this.captionMaxLength)):t}static compute(t){const o=t.options,a=t.mode,n=new y({accounts:c.b.filterExisting(o.accounts),tagged:c.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(e=>e.tag.length>0),layout:l.a.getById(o.layout),numColumns:r.a.get(o.numColumns,a,!0),highlightFreq:r.a.get(o.highlightFreq,a,!0),numPosts:r.a.get(o.numPosts,a,!0),linkBehavior:r.a.get(o.linkBehavior,a,!0),bgColor:Object(u.a)(o.bgColor),textColorHover:Object(u.a)(o.textColorHover),bgColorHover:Object(u.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:r.a.get(o.showHeader,a,!0),headerInfo:r.a.get(o.headerInfo,a,!0),headerStyle:r.a.get(o.headerStyle,a,!0),headerTextColor:Object(u.a)(o.headerTextColor),headerBgColor:Object(u.a)(o.headerBgColor),headerPadding:r.a.get(o.headerPadding,a,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:r.a.get(o.showCaptions,a,!0),captionMaxLength:r.a.get(o.captionMaxLength,a,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(u.a)(o.captionColor),showLikes:r.a.get(o.showLikes,a,!0),showComments:r.a.get(o.showComments,a,!0),likesIconColor:Object(u.a)(o.likesIconColor),commentsIconColor:Object(u.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:r.a.get(o.showLoadMoreBtn,a,!0),loadMoreBtnTextColor:Object(u.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:r.a.get(o.showFollowBtn,a,!0),autoload:o.autoload,followBtnLocation:r.a.get(o.followBtnLocation,a,!0),followBtnTextColor:Object(u.a)(o.followBtnTextColor),followBtnBgColor:Object(u.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=Math.max(n.numColumns,1),t.mode!==r.a.Mode.DESKTOP&&(n.numColumns=n.numColumns<1?r.a.get(o.numColumns,r.a.Mode.DESKTOP):n.numColumns),n.numPosts=parseInt(n.numPosts+""),(n.numPosts<1||isNaN(n.numPosts))&&(n.numPosts=1),n.allAccounts=n.accounts.concat(n.tagged.filter(e=>!n.accounts.includes(e))),n.allAccounts.length>0&&(n.account=o.headerAccount&&n.allAccounts.includes(o.headerAccount)?c.b.getById(o.headerAccount):c.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:c.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showLoadMoreBtn=n.showLoadMoreBtn&&t.canLoadMore,n.showBio=n.headerInfo.some(t=>t===e.HeaderInfo.BIO),n.showBio){const e=o.customBioText.trim().length>0?o.customBioText:null!==n.account?c.b.getBioText(n.account):"";n.bioText=Object(d.k)(e),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(o.feedWidth,a,"auto"),n.feedHeight=this.normalizeCssSize(o.feedHeight,a,"auto"),n.feedPadding=this.normalizeCssSize(o.feedPadding,a,"0"),n.imgPadding=this.normalizeCssSize(o.imgPadding,a,"0"),n.textSize=this.normalizeCssSize(o.textSize,a,"inherit"),n.headerTextSize=this.normalizeCssSize(o.headerTextSize,a,"inherit"),n.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,a,"50px"),n.captionSize=this.normalizeCssSize(o.captionSize,a,"inherit"),n.lcIconSize=this.normalizeCssSize(o.lcIconSize,a,"inherit"),n.buttonPadding=Math.max(10,r.a.get(o.imgPadding,a))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static normalizeCssSize(e,t,o=null){const a=r.a.get(e,t);return a?a+"px":o}}e.ComputedOptions=y,e.HashtagSorting=Object(s.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(o=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(a=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(n=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(m=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(p=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(g=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(_=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:n.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:a.LIGHTBOX,phone:a.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[m.LIKES_COMMENTS,m.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[g.PROFILE_PIC,g.BIO]},headerAccount:null,headerStyle:{desktop:p.NORMAL,phone:p.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:_.HEADER,phone:_.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(p||(p={}))},76:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return s}));var a=o(7),n=o(14),i=o(5);class r{constructor(e=!1,t=!1){this.incModeration=!1,this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.incModeration=e,this.incFilters=t}fetchMedia(e,t){if(null!==this.prevOptions&&!this.isCacheInvalid(e))return Promise.resolve(this.media);const o=Object.assign({},e.options,{moderation:this.incModeration?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.incFilters?e.options.hashtagBlacklist:[],hashtagWhitelist:this.incFilters?e.options.hashtagWhitelist:[],captionBlacklist:this.incFilters?e.options.captionBlacklist:[],captionWhitelist:this.incFilters?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.incFilters&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.incFilters&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.incFilters&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.incFilters&&e.options.captionWhitelistSettings});return t&&t(),n.a.getFeedMedia(o).then(t=>(this.prevOptions=new a.a.Options(e.options),this.media=t.data.media,this.media))}isCacheInvalid(e){const t=e.options,o=this.prevOptions;if(Object(i.e)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(!Object(i.c)(t.accounts,o.accounts))return!0;if(!Object(i.c)(t.tagged,o.tagged))return!0;if(!Object(i.c)(t.hashtags,o.hashtags,i.i))return!0;if(this.incModeration){if(t.moderationMode!==o.moderationMode)return!0;if(!Object(i.c)(t.moderation,o.moderation))return!0}if(this.incFilters){if(t.captionWhitelistSettings!==o.captionWhitelistSettings||t.captionBlacklistSettings!==o.captionBlacklistSettings||t.hashtagWhitelistSettings!==o.hashtagWhitelistSettings||t.hashtagBlacklistSettings!==o.hashtagBlacklistSettings)return!0;if(!Object(i.c)(t.captionWhitelist,o.captionWhitelist))return!0;if(!Object(i.c)(t.captionBlacklist,o.captionBlacklist))return!0;if(!Object(i.c)(t.hashtagWhitelist,o.hashtagWhitelist))return!0;if(!Object(i.c)(t.hashtagBlacklist,o.hashtagBlacklist))return!0}return!1}}const l=new r(!0,!0),s=new r(!1,!0)},77:function(e,t,o){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},78:function(e,t,o){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},8:function(e,t,o){"use strict";function a(...e){return e.filter(e=>!!e).join(" ")}function n(e){return a(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}function r(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return i})),o.d(t,"d",(function(){return r}))},9:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var a=o(0),n=o.n(a),i=o(8);const r=e=>{var{icon:t,className:o}=e,a=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["icon","className"]);return n.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},a))}},90:function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var a=o(0),n=o.n(a),i=o(57),r=o.n(i),l=o(13),s=o(5),c=o(56),d=o(8);function u(e){var{media:t,className:o}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["media","className"]);const u=n.a.useRef(),[m,h]=n.a.useState(0),[p,g]=n.a.useState(!0);if(Object(a.useEffect)(()=>{u.current&&h(u.current.getBoundingClientRect().width)},[]),t.url&&t.url.length>0){const e=t.type===l.a.Type.ALBUM&&t.children.length>0?t.children[0]:t,a=Object(s.g)(e.permalink),m=Object(s.f)(a,s.a.SMALL),h=Object(s.f)(a,s.a.MEDIUM),_=Object(s.f)(a,s.a.LARGE);return n.a.createElement("div",Object.assign({className:Object(d.b)(r.a.root,o)},i),n.a.createElement("img",{ref:u,className:r.a.image,src:h,srcSet:`${m} 150w, ${h} 320w, ${_} 600w, ${t.url} 1000w`,onLoad:function(){g(!1)},loading:"lazy",alt:t.caption}),p&&n.a.createElement(c.a,null))}return n.a.createElement("div",{className:r.a.notAvailable},n.a.createElement("span",null,"Thumbnail not available"))}},91:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}}},[[342,0,1]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[6],{0:function(t,o){t.exports=e},110:function(e,t,o){e.exports={root:"MediaTileIcons__root layout__flex-row",icon:"MediaTileIcons__icon"}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));const a=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},13:function(e,t,o){"use strict";var a;o.d(t,"a",(function(){return a})),function(e){let t,o;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(o=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===o.Type.POPULAR_HASHTAG||e.source.type===o.Type.RECENT_HASHTAG}(a||(a={}))},131:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(137),r=o.n(i),l=o(4),s=o(5);t.a=Object(l.b)((function({media:e,options:t,full:o}){if(!t.showCaptions||!e.type)return null;const a={color:t.captionColor,fontSize:t.captionSize},i=o?0:1,l=e.caption?e.caption:"",c=t.captionMaxLength?Object(s.o)(l,t.captionMaxLength):l,d=Object(s.l)(c,void 0,i,t.captionRemoveDots),u=o?r.a.full:r.a.preview;return n.a.createElement("div",{className:u,style:a},d)}))},132:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(110),r=o.n(i),l=o(4),s=o(13),c=o(9);t.a=Object(l.b)((function({media:e,options:t}){if(!e.type||e.source.type===s.a.Source.Type.PERSONAL_ACCOUNT)return null;const o={fontSize:t.lcIconSize,lineHeight:t.lcIconSize},a=Object.assign(Object.assign({},o),{color:t.likesIconColor}),i=Object.assign(Object.assign({},o),{color:t.commentsIconColor}),l={fontSize:t.lcIconSize,width:t.lcIconSize,height:t.lcIconSize};return t.showLcIcons&&n.a.createElement("div",{className:r.a.root},t.showLikes&&n.a.createElement("div",{className:r.a.icon,style:a},n.a.createElement(c.a,{icon:"heart",style:l}),n.a.createElement("span",null,e.likesCount)),t.showComments&&n.a.createElement("div",{className:r.a.icon,style:i},n.a.createElement(c.a,{icon:"admin-comments",style:l}),n.a.createElement("span",null,e.commentsCount)))}))},134:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(78),r=o.n(i),l=o(4),s=o(15),c=o.n(s),d=o(30),u=o.n(d),m=o(13),h=o(5),p=o(9),g=o(62),_=o.n(g),b=o(8),f=o(3);const y=({comment:e,className:t})=>{const o=e.username?n.a.createElement("a",{key:-1,href:f.b.getUsernameUrl(e.username),target:"_blank",className:_.a.username},e.username):null,a=o?(e,t)=>t>0?e:[o,...e]:void 0,i=Object(h.l)(e.text,a),r=1===e.likeCount?"like":"likes";return n.a.createElement("div",{className:Object(b.b)(_.a.root,t)},n.a.createElement("div",{className:_.a.content},n.a.createElement("div",{key:e.id,className:_.a.text},i)),n.a.createElement("div",{className:_.a.metaList},n.a.createElement("div",{className:_.a.date},Object(h.n)(e.timestamp)),e.likeCount>0&&n.a.createElement("div",{className:_.a.likeCount},`${e.likeCount} ${r}`)))};var v=o(169),x=o.n(v),M=o(138),L=o.n(M);function w(e){var{url:t,caption:o,size:a}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["url","caption","size"]);const[r,l]=n.a.useState(!1),s={width:a.width+"px",height:a.height+"px"};return n.a.createElement("img",Object.assign({style:s,className:r?L.a.image:L.a.loading,src:t,alt:o,loading:"eager",onLoad:()=>l(!0)},i))}var O=o(53),E=o.n(O);function S(e){var{album:t,autoplayVideos:o,size:a}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["album","autoplayVideos","size"]);const r=n.a.useRef(),[l,s]=n.a.useState(0),c={transform:`translateX(${100*-l}%)`},d=t.length-1,u={width:a.width+"px",height:a.height+"px"};return n.a.createElement("div",{className:E.a.root,style:u},n.a.createElement("div",{className:E.a.strip,style:c},t.map((e,t)=>n.a.createElement("div",{key:e.id,className:E.a.frame,ref:t>0?void 0:r},n.a.createElement(P,Object.assign({media:e,size:a,autoplayVideos:o},i))))),n.a.createElement("div",{className:E.a.controls},n.a.createElement("div",null,l>0&&n.a.createElement("div",{className:E.a.prevButton,onClick:()=>s(Math.max(l-1,0)),role:"button"},n.a.createElement(p.a,{icon:"arrow-left-alt2"}))),n.a.createElement("div",null,l<d&&n.a.createElement("div",{className:E.a.nextButton,onClick:()=>s(Math.min(l+1,d)),role:"button"},n.a.createElement(p.a,{icon:"arrow-right-alt2"})))),n.a.createElement("div",{className:E.a.indicatorList},t.map((e,t)=>n.a.createElement("div",{key:t,className:t===l?E.a.indicatorCurrent:E.a.indicator}))))}var C=o(58),B=o.n(C),k=o(56);function T(e){var{src:t,thumbnailUrl:o,size:i,autoPlay:r,onGetMetaData:l}=e,s=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["src","thumbnailUrl","size","autoPlay","onGetMetaData"]);const c=n.a.useRef(),d=n.a.useRef(),[u,m]=n.a.useState(!r),[h,g]=n.a.useState(!1),[_,b]=n.a.useState(r);Object(a.useEffect)(()=>{r?u&&m(!1):u||m(!0),_&&b(r)},[t]),Object(a.useEffect)(()=>{g(!1)},[o]),Object(a.useEffect)(()=>{if(d.current){const e=()=>b(!0),t=()=>b(!1);return d.current.addEventListener("play",e),d.current.addEventListener("pause",t),()=>{d.current.removeEventListener("play",e),d.current.removeEventListener("pause",t)}}},[d.current]);const f={width:i.width+"px",height:i.height+"px"};return n.a.createElement("div",{className:B.a.root,style:f},n.a.createElement("img",{ref:c,src:o,key:o,className:u?B.a.thumbnail:B.a.thumbnailHidden,width:i.width,height:i.height,onLoad:()=>g(!0),alt:""}),n.a.createElement("video",Object.assign({ref:d,className:u?B.a.videoHidden:B.a.video,src:t,autoPlay:r,controls:!1,playsInline:!0,loop:!0,onCanPlay:()=>{r&&d.current.play()}},s),n.a.createElement("source",{src:t}),"Your browser does not support videos"),u&&!h&&n.a.createElement(k.a,null),n.a.createElement("div",{className:_?B.a.controlPlaying:B.a.controlPaused,onClick:()=>{d.current&&(u?(m(!1),d.current.currentTime=0,d.current.play()):d.current.paused?d.current.play():d.current.pause())}},n.a.createElement(p.a,{className:B.a.playButton,icon:"controls-play"})))}function P({media:e,size:t,autoplayVideos:o}){if(e.url&&e.url.length>0)switch(e.type){case m.a.Type.IMAGE:return n.a.createElement(w,{url:e.url,size:t,caption:e.caption});case m.a.Type.VIDEO:const a=Object(h.i)(e,h.a.LARGE);return n.a.createElement(T,{src:e.url,size:t,thumbnailUrl:a,autoPlay:o});case m.a.Type.ALBUM:if(e.children&&e.children.length>0)return n.a.createElement(S,{album:e.children,size:t,autoplayVideos:o})}const a={width:t.width,height:t.height};return n.a.createElement("div",{className:x.a.notAvailable,style:a},n.a.createElement("span",null,"Media is not available"))}var I=o(18),N=o(28);const A=new Map;function j({feed:e,mediaList:t,current:o,options:i,onClose:r}){var l,s;const d=t.length-1,[g,_]=n.a.useState(o),b=n.a.useRef(g),v=e=>{_(e),b.current=e;const o=t[b.current];A.has(o.id)?S(A.get(o.id)):(M(!0),Object(h.e)(o,{width:600,height:600}).then(e=>{S(e),A.set(o.id,e)}))},[x,M]=n.a.useState(!1),[L,w]=n.a.useState(function(){const e=window.innerWidth<1080?window.innerWidth/1080*600:600;return{width:e,height:e}}()),[O,E]=n.a.useState(!1),S=e=>{w(e),M(!1),E(e.width+435>=window.innerWidth)};Object(a.useEffect)(()=>{v(o)},[o]),Object(I.j)("resize",()=>{const e=t[b.current];if(A.has(e.id)){let t=A.get(e.id);S(t)}});const C=t[g],B=C.comments?C.comments.slice(0,i.numLightboxComments):[],T=N.a.getLinkText(C,e),j=null!==T.text&&null!==T.url;C.caption&&C.caption.length&&B.splice(0,0,{id:C.id,text:C.caption,timestamp:C.timestamp,username:C.username});let H=null,D=null,F=null;switch(C.source.type){case m.a.Source.Type.PERSONAL_ACCOUNT:case m.a.Source.Type.BUSINESS_ACCOUNT:case m.a.Source.Type.TAGGED_ACCOUNT:H="@"+C.username,D=f.b.getUsernameUrl(C.username);const e=f.b.getByUsername(C.username);F=e?f.b.getProfilePicUrl(e):null;break;case m.a.Source.Type.RECENT_HASHTAG:case m.a.Source.Type.POPULAR_HASHTAG:H="#"+C.source.name,D="https://instagram.com/explore/tags/"+C.source.name}const z={fontSize:i.textSize},R=e=>{v(Math.max(0,b.current-1)),e.stopPropagation(),e.preventDefault()},U=e=>{v(Math.min(d,b.current+1)),e.stopPropagation(),e.preventDefault()},W=e=>{r&&r(),e.stopPropagation(),e.preventDefault()};{Object(a.useEffect)(()=>(document.body.addEventListener("keydown",e),()=>document.body.removeEventListener("keydown",e)),[]);const e=e=>{switch(e.key){case"ArrowRight":U(e);break;case"ArrowLeft":R(e);break;case"Escape":W(e)}}}const G={width:L.width+"px",height:L.height+"px"},V=n.a.createElement("div",{style:z,className:c.a.root,tabIndex:-1},n.a.createElement("div",{className:c.a.shade,onClick:W}),x&&n.a.createElement("div",{className:c.a.loadingSkeleton,style:G}),!x&&n.a.createElement("div",{className:O?c.a.wrapVertical:c.a.wrap},n.a.createElement("div",{className:c.a.container,role:"dialog"},n.a.createElement("div",{className:c.a.frame},x?n.a.createElement(k.a,null):n.a.createElement(P,{key:C.id,media:C,size:L})),e.options.lightboxShowSidebar&&n.a.createElement("div",{className:c.a.sidebar},n.a.createElement("div",{className:c.a.sidebarHeader},F&&n.a.createElement("a",{href:D,target:"_blank",className:c.a.sidebarHeaderPicLink},n.a.createElement("img",{className:c.a.sidebarHeaderPic,src:F,alt:null!=H?H:""})),H&&n.a.createElement("div",{className:c.a.sidebarSourceName},n.a.createElement("a",{href:D,target:"_blank"},H))),n.a.createElement("div",{className:c.a.sidebarScroller},B.length>0&&n.a.createElement("div",{className:c.a.sidebarCommentList},B.map((e,t)=>n.a.createElement(y,{key:t,comment:e,className:c.a.sidebarComment})))),n.a.createElement("div",{className:c.a.sidebarFooter},n.a.createElement("div",{className:c.a.sidebarInfo},C.source.type!==m.a.Source.Type.PERSONAL_ACCOUNT&&n.a.createElement("div",{className:c.a.sidebarNumLikes},n.a.createElement("span",null,C.likesCount)," ",n.a.createElement("span",null,"likes")),C.timestamp&&n.a.createElement("div",{className:c.a.sidebarDate},Object(h.n)(C.timestamp))),n.a.createElement("div",{className:c.a.sidebarIgLink},n.a.createElement("a",{href:null!==(l=T.url)&&void 0!==l?l:C.permalink,target:"_blank"},n.a.createElement(p.a,{icon:j?"external":"instagram"}),n.a.createElement("span",null,null!==(s=T.text)&&void 0!==s?s:"View on Instagram")))))),g>0&&n.a.createElement("div",{className:c.a.prevButtonContainer},n.a.createElement("div",{className:c.a.prevButton,onClick:R,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"arrow-left-alt",className:c.a.buttonIcon}))),g<t.length-1&&n.a.createElement("div",{className:c.a.nextButtonContainer},n.a.createElement("div",{className:c.a.nextButton,onClick:U,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"arrow-right-alt",className:c.a.buttonIcon})))),n.a.createElement("div",{className:c.a.closeButton,onClick:W,role:"button",tabIndex:0},n.a.createElement(p.a,{icon:"no-alt",className:c.a.buttonIcon})));return u.a.createPortal(V,document.body)}var H=o(7),D=o(35),F=o.n(D),z=o(139),R=o.n(z);const U=Object(l.b)(({options:e})=>{const t="https://instagram.com/"+e.account.username,o={color:e.followBtnTextColor,backgroundColor:e.followBtnBgColor};return n.a.createElement("a",{href:t,target:"__blank",className:R.a.link},n.a.createElement("button",{className:R.a.button,style:o},e.followBtnText))});var W=o(29),G=o.n(W),V=o(160),$=o(159),K=Object(l.b)((function({stories:e,options:t,onClose:o}){const[i,r]=n.a.useState(0),l=e.length-1,[s,c]=n.a.useState(0),[d,h]=n.a.useState(0);Object(a.useEffect)(()=>{0!==s&&c(0)},[i]);const g=i<l,_=i>0,b=()=>o&&o(),f=()=>i<l?r(i+1):b(),y=()=>r(e=>Math.max(e-1,0)),v=e[i],x="https://instagram.com/"+t.account.username,M=v.type===m.a.Type.VIDEO?d:t.storiesInterval;Object(I.d)("keydown",e=>{switch(e.key){case"Escape":b();break;case"ArrowLeft":y();break;case"ArrowRight":f();break;default:return}e.preventDefault(),e.stopPropagation()});const L=n.a.createElement("div",{className:G.a.root},n.a.createElement("div",{className:G.a.container},n.a.createElement("div",{className:G.a.header},n.a.createElement("a",{href:x,target:"_blank"},n.a.createElement("img",{className:G.a.profilePicture,src:t.profilePhotoUrl,alt:t.account.username})),n.a.createElement("a",{href:x,className:G.a.username,target:"_blank"},t.account.username),n.a.createElement("div",{className:G.a.date},Object(V.a)(Object($.a)(v.timestamp),{addSuffix:!0}))),n.a.createElement("div",{className:G.a.progress},e.map((e,t)=>n.a.createElement(q,{key:e.id,duration:M,animate:t===i,isDone:t<i}))),n.a.createElement("div",{className:G.a.content},_&&n.a.createElement("div",{className:G.a.prevButton,onClick:y,role:"button"},n.a.createElement(p.a,{icon:"arrow-left-alt2"})),n.a.createElement("div",{className:G.a.media},n.a.createElement(X,{key:v.id,media:v,imgDuration:t.storiesInterval,onGetDuration:h,onEnd:()=>g?f():b()})),g&&n.a.createElement("div",{className:G.a.nextButton,onClick:f,role:"button"},n.a.createElement(p.a,{icon:"arrow-right-alt2"})),n.a.createElement("div",{className:G.a.closeButton,onClick:b,role:"button"},n.a.createElement(p.a,{icon:"no-alt"})))));return u.a.createPortal(L,document.body)}));function q({animate:e,isDone:t,duration:o}){const a=e?G.a.progressOverlayAnimating:t?G.a.progressOverlayDone:G.a.progressOverlay,i={animationDuration:o+"s"};return n.a.createElement("div",{className:G.a.progressSegment},n.a.createElement("div",{className:a,style:i}))}function X({media:e,imgDuration:t,onGetDuration:o,onEnd:a}){return e.type===m.a.Type.VIDEO?n.a.createElement(J,{media:e,onEnd:a,onGetDuration:o}):n.a.createElement(Y,{media:e,onEnd:a,duration:t})}function Y({media:e,duration:t,onEnd:o}){const[i,r]=n.a.useState(!1);return Object(a.useEffect)(()=>{const e=i?setTimeout(o,1e3*t):null;return()=>clearTimeout(e)},[e,i]),n.a.createElement("img",{src:e.url,onLoad:()=>r(!0),loading:"eager",alt:""})}function J({media:e,onEnd:t,onGetDuration:o}){const a=n.a.useRef(),i=Object(h.i)(e,h.a.LARGE);return n.a.createElement("video",{ref:a,src:e.url,poster:i,autoPlay:!0,controls:!1,playsInline:!0,loop:!1,onCanPlay:()=>o(a.current.duration),onEnded:t},n.a.createElement("source",{src:e.url}),"Your browser does not support embedded videos")}var Q=Object(l.b)((function({feed:e,options:t}){const[o,a]=n.a.useState(null),i=t.account,r="https://instagram.com/"+i.username,l=e.stories.filter(e=>e.username===i.username),s=l.length>0,c=t.headerInfo.includes(H.a.HeaderInfo.MEDIA_COUNT),d=t.headerInfo.includes(H.a.HeaderInfo.FOLLOWERS)&&i.type!=f.a.Type.PERSONAL,u=t.headerInfo.includes(H.a.HeaderInfo.PROFILE_PIC),m=t.includeStories&&s,h=t.headerStyle===H.a.HeaderStyle.BOXED,p={fontSize:t.headerTextSize,color:t.headerTextColor,backgroundColor:t.headerBgColor,padding:t.headerPadding},g=m?"button":void 0,_={width:t.headerPhotoSize,height:t.headerPhotoSize,cursor:m?"pointer":"normal"},b=t.showFollowBtn&&(t.followBtnLocation===H.a.FollowBtnLocation.HEADER||t.followBtnLocation===H.a.FollowBtnLocation.BOTH),y={justifyContent:t.showBio&&h?"flex-start":"center"},v=n.a.createElement("img",{src:t.profilePhotoUrl,alt:i.username}),x=m&&s?F.a.profilePicWithStories:F.a.profilePic;return n.a.createElement("div",{className:Z(t.headerStyle),style:p},n.a.createElement("div",{className:F.a.leftContainer},u&&n.a.createElement("div",{className:x,style:_,role:g,onClick:()=>{m&&a(0)}},m?v:n.a.createElement("a",{href:r,target:"_blank"},v)),n.a.createElement("div",{className:F.a.info},n.a.createElement("div",{className:F.a.username},n.a.createElement("a",{href:r,target:"_blank"},n.a.createElement("span",null,"@"),n.a.createElement("span",null,i.username))),t.showBio&&n.a.createElement("div",{className:F.a.bio},t.bioText),(c||d)&&n.a.createElement("div",{className:F.a.counterList},c&&n.a.createElement("div",{className:F.a.counter},n.a.createElement("span",null,i.mediaCount)," posts"),d&&n.a.createElement("div",{className:F.a.counter},n.a.createElement("span",null,i.followersCount)," followers")))),n.a.createElement("div",{className:F.a.rightContainer},b&&n.a.createElement("div",{className:F.a.followButton,style:y},n.a.createElement(U,{options:t}))),m&&null!==o&&n.a.createElement(K,{stories:l,options:t,onClose:()=>{a(null)}}))}));function Z(e){switch(e){case H.a.HeaderStyle.NORMAL:return F.a.normalStyle;case H.a.HeaderStyle.CENTERED:return F.a.centeredStyle;case H.a.HeaderStyle.BOXED:return F.a.boxedStyle;default:return}}var ee=o(170),te=o.n(ee);const oe=Object(l.b)(({feed:e,options:t})=>{const o=n.a.useRef(),a=Object(I.h)(o,{block:"end",inline:"nearest"}),i={color:t.loadMoreBtnTextColor,backgroundColor:t.loadMoreBtnBgColor};return n.a.createElement("button",{ref:o,className:te.a.root,style:i,onClick:()=>{a(),e.loadMore()}},e.isLoading?n.a.createElement("span",null,"Loading ..."):n.a.createElement("span",null,e.options.loadMoreBtnText))});t.a=Object(l.b)((function({children:e,feed:t,options:o}){const[a,i]=n.a.useState(null),l={width:o.feedWidth,height:o.feedHeight,fontSize:o.textSize},s={backgroundColor:o.bgColor,padding:o.feedPadding},c={marginBottom:o.imgPadding},d={marginTop:o.buttonPadding},u=o.showHeader&&n.a.createElement("div",{style:c},n.a.createElement(Q,{feed:t,options:o})),m=o.showLoadMoreBtn&&n.a.createElement("div",{className:r.a.loadMoreBtn,style:d},n.a.createElement(oe,{feed:t,options:o})),h=o.showFollowBtn&&(o.followBtnLocation===H.a.FollowBtnLocation.BOTTOM||o.followBtnLocation===H.a.FollowBtnLocation.BOTH)&&n.a.createElement("div",{className:r.a.followBtn,style:d},n.a.createElement(U,{options:o})),p=new Array(o.numPosts).fill(r.a.fakeMedia);return n.a.createElement("div",{className:r.a.root,style:l},n.a.createElement("div",{className:r.a.wrapper,style:s},e({mediaList:t.media,openMedia:function(e){const a=t.media[e];if(!t.options.promotionEnabled||!N.a.executeMediaClick(a,t))switch(o.linkBehavior){case H.a.LinkBehavior.LIGHTBOX:return void i(e);case H.a.LinkBehavior.NEW_TAB:return void window.open(a.permalink,"_blank");case H.a.LinkBehavior.SELF:return void window.open(a.permalink,"_self")}},header:u,loadMoreBtn:m,followBtn:h,loadingMedia:p})),null!==a&&n.a.createElement(j,{feed:t,mediaList:t.media,current:a,options:o,onClose:()=>i(null)}))}))},136:function(e,t,o){"use strict";var a=o(77),n=o.n(a),i=o(0),r=o.n(i),l=o(13),s=o(4),c=o(41),d=o.n(c),u=o(159),m=o(568),h=o(567),p=o(7),g=o(9),_=o(5),b=Object(s.b)((function({options:e,media:t}){var o;const a=r.a.useRef(),[n,s]=r.a.useState(null);Object(i.useEffect)(()=>{a.current&&s(a.current.getBoundingClientRect().width)},[]);let c=e.hoverInfo.some(e=>e===p.a.HoverInfo.LIKES_COMMENTS);c=c&&(t.source.type!==l.a.Source.Type.PERSONAL_ACCOUNT||t.source.type===l.a.Source.Type.PERSONAL_ACCOUNT&&t.likesCount+t.commentsCount>0);const b=e.hoverInfo.some(e=>e===p.a.HoverInfo.CAPTION),f=e.hoverInfo.some(e=>e===p.a.HoverInfo.USERNAME),y=e.hoverInfo.some(e=>e===p.a.HoverInfo.DATE),v=e.hoverInfo.some(e=>e===p.a.HoverInfo.INSTA_LINK),x=null!==(o=t.caption)&&void 0!==o?o:"",M=t.timestamp?Object(u.a)(t.timestamp):null,L=t.timestamp?Object(m.a)(M).toString():null,w=t.timestamp?Object(h.a)(M,"HH:mm - do MMM yyyy"):null,O=t.timestamp?Object(_.n)(t.timestamp):null,E={color:e.textColorHover,backgroundColor:e.bgColorHover};let S=null;if(null!==n){const e=Math.sqrt(1.3*(n+30)),o=Math.sqrt(1.6*n+100),a=Math.max(e,8)+"px",i=Math.max(o,8)+"px",l={fontSize:a},s={fontSize:a,width:a,height:a},u={fontSize:i,width:i,height:i};S=r.a.createElement("div",{className:d.a.rows},r.a.createElement("div",{className:d.a.topRow},f&&t.username&&r.a.createElement("div",{className:d.a.username},r.a.createElement("a",{href:"https://instagram.com/"+t.username,target:"_blank"},"@",t.username)),b&&t.caption&&r.a.createElement("div",{className:d.a.caption},x)),r.a.createElement("div",{className:d.a.middleRow},c&&r.a.createElement("div",{className:d.a.counterList},r.a.createElement("span",{className:d.a.likesCount,style:l},r.a.createElement(g.a,{icon:"heart",style:s})," ",t.likesCount),r.a.createElement("span",{className:d.a.commentsCount,style:l},r.a.createElement(g.a,{icon:"admin-comments",style:s})," ",t.commentsCount))),r.a.createElement("div",{className:d.a.bottomRow},y&&t.timestamp&&r.a.createElement("div",{className:d.a.date},r.a.createElement("time",{dateTime:L,title:w},O)),v&&r.a.createElement("a",{className:d.a.igLinkIcon,href:t.permalink,title:x,target:"_blank",style:u,onClick:e=>e.stopPropagation()},r.a.createElement(g.a,{icon:"instagram",style:u}))))}return r.a.createElement("div",{ref:a,className:d.a.root,style:E},S)})),f=o(17),y=o(90);t.a=Object(s.b)((function({media:e,options:t,forceOverlay:o,onClick:a}){const[i,s]=r.a.useState(!1),c=function(e){switch(e.type){case l.a.Type.IMAGE:return n.a.imageTypeIcon;case l.a.Type.VIDEO:return n.a.videoTypeIcon;case l.a.Type.ALBUM:return n.a.albumTypeIcon;default:return}}(e),d={backgroundImage:`url(${f.a.image("ig-type-sprites.png")})`};return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:n.a.root,onClick:e=>{a&&a(e)},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1)},r.a.createElement(y.a,{media:e}),r.a.createElement("div",{className:c,style:d}),(i||o)&&r.a.createElement("div",{className:n.a.overlay},r.a.createElement(b,{media:e,options:t}))))}))},137:function(e,t,o){e.exports={root:"MediaTileCaption__root",preview:"MediaTileCaption__preview MediaTileCaption__root",full:"MediaTileCaption__full MediaTileCaption__root"}},138:function(e,t,o){e.exports={image:"MediaLightboxImage__image MediaLightboxObject__media",loading:"MediaLightboxImage__loading MediaLightboxObject__media MediaLightboxObject__loading-animation"}},139:function(e,t,o){e.exports={link:"FollowButton__link",button:"FollowButton__button feed__feed-button"}},14:function(e,t,o){"use strict";var a=o(37),n=o.n(a),i=o(17),r=o(38);const l=i.a.config.restApi.baseUrl,s={};i.a.config.restApi.authToken&&(s["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const c=n.a.create({baseURL:l,headers:s}),d={config:i.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(e,t=0,o=0,a)=>{const i=a?new n.a.CancelToken(a):void 0;return c.post("/media/fetch",{options:e,num:o,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(r.b)(t)}};t.a=d},15:function(e,t,o){e.exports={root:"MediaLightbox__root layout__fill-parent layout__z-higher layout__flex-row layout__flex-center layout__no-overflow",shade:"MediaLightbox__shade layout__fill-parent layout__z-low","loading-skeleton":"MediaLightbox__loading-skeleton layout__z-high",loadingSkeleton:"MediaLightbox__loading-skeleton layout__z-high",wrap:"MediaLightbox__wrap","wrap-vertical":"MediaLightbox__wrap-vertical MediaLightbox__wrap layout__z-high",wrapVertical:"MediaLightbox__wrap-vertical MediaLightbox__wrap layout__z-high",container:"MediaLightbox__container layout__flex-row",sidebar:"MediaLightbox__sidebar layout__flex-column layout__scroll-y","sidebar-element":"MediaLightbox__sidebar-element",sidebarElement:"MediaLightbox__sidebar-element",frame:"MediaLightbox__frame layout__flex-column layout__flex-center","nav-button-container":"MediaLightbox__nav-button-container layout__flex-column layout__flex-center",navButtonContainer:"MediaLightbox__nav-button-container layout__flex-column layout__flex-center","next-button-container":"MediaLightbox__next-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",nextButtonContainer:"MediaLightbox__next-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center","prev-button-container":"MediaLightbox__prev-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",prevButtonContainer:"MediaLightbox__prev-button-container MediaLightbox__nav-button-container layout__flex-column layout__flex-center",button:"MediaLightbox__button layout__z-low","button-icon":"MediaLightbox__button-icon",buttonIcon:"MediaLightbox__button-icon","close-button":"MediaLightbox__close-button MediaLightbox__button layout__z-low",closeButton:"MediaLightbox__close-button MediaLightbox__button layout__z-low","next-button":"MediaLightbox__next-button MediaLightbox__button layout__z-low",nextButton:"MediaLightbox__next-button MediaLightbox__button layout__z-low","prev-button":"MediaLightbox__prev-button MediaLightbox__button layout__z-low",prevButton:"MediaLightbox__prev-button MediaLightbox__button layout__z-low","sidebar-element-bordered":"MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarElementBordered:"MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element","sidebar-header":"MediaLightbox__sidebar-header MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element layout__flex-row",sidebarHeader:"MediaLightbox__sidebar-header MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element layout__flex-row","sidebar-header-pic":"MediaLightbox__sidebar-header-pic",sidebarHeaderPic:"MediaLightbox__sidebar-header-pic","sidebar-header-pic-link":"MediaLightbox__sidebar-header-pic-link MediaLightbox__sidebar-header-pic",sidebarHeaderPicLink:"MediaLightbox__sidebar-header-pic-link MediaLightbox__sidebar-header-pic","sidebar-scroller":"MediaLightbox__sidebar-scroller layout__scroll-y",sidebarScroller:"MediaLightbox__sidebar-scroller layout__scroll-y","sidebar-comment-list":"MediaLightbox__sidebar-comment-list MediaLightbox__sidebar-element layout__flex-column",sidebarCommentList:"MediaLightbox__sidebar-comment-list MediaLightbox__sidebar-element layout__flex-column","sidebar-comment":"MediaLightbox__sidebar-comment",sidebarComment:"MediaLightbox__sidebar-comment","sidebar-source-name":"MediaLightbox__sidebar-source-name",sidebarSourceName:"MediaLightbox__sidebar-source-name","sidebar-footer":"MediaLightbox__sidebar-footer layout__flex-column",sidebarFooter:"MediaLightbox__sidebar-footer layout__flex-column","sidebar-info":"MediaLightbox__sidebar-info layout__flex-column MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarInfo:"MediaLightbox__sidebar-info layout__flex-column MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element","sidebar-info-line":"MediaLightbox__sidebar-info-line",sidebarInfoLine:"MediaLightbox__sidebar-info-line","sidebar-num-likes":"MediaLightbox__sidebar-num-likes MediaLightbox__sidebar-info-line",sidebarNumLikes:"MediaLightbox__sidebar-num-likes MediaLightbox__sidebar-info-line","sidebar-date":"MediaLightbox__sidebar-date MediaLightbox__sidebar-info-line",sidebarDate:"MediaLightbox__sidebar-date MediaLightbox__sidebar-info-line","sidebar-ig-link":"MediaLightbox__sidebar-ig-link MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element",sidebarIgLink:"MediaLightbox__sidebar-ig-link MediaLightbox__sidebar-element-bordered MediaLightbox__sidebar-element"}},168:function(e,t,o){"use strict";var a=o(0),n=o.n(a),i=o(49),r=o.n(i),l=o(4),s=o(136),c=o(131),d=o(132),u=o(134),m=o(8),h=o(5);t.a=Object(l.b)((function({feed:e,options:t,cellClassName:o}){o=null!=o?o:()=>{};const a={gridGap:t.imgPadding,gridTemplateColumns:`repeat(${t.numColumns}, auto)`};return n.a.createElement(u.a,{feed:e,options:t},({mediaList:i,openMedia:l,header:u,loadMoreBtn:p,followBtn:g,loadingMedia:_})=>n.a.createElement("div",{className:r.a.root},u,(!e.isLoading||e.isLoadingMore)&&n.a.createElement("div",{className:r.a.grid,style:a},e.media.length?i.map((e,a)=>n.a.createElement("div",{key:`${a}-${e.id}`,className:Object(m.b)(r.a.cell,o(e,a))},n.a.createElement("div",{className:r.a.cellContent},n.a.createElement("div",{className:r.a.mediaContainer},n.a.createElement(s.a,{media:e,onClick:()=>l(a),options:t})),n.a.createElement("div",{className:r.a.mediaMeta},n.a.createElement(c.a,{options:t,media:e}),n.a.createElement(d.a,{options:t,media:e}))))):null,e.isLoadingMore&&_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(h.p)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),e.isLoading&&!e.isLoadingMore&&n.a.createElement("div",{className:r.a.grid,style:a},_.map((e,t)=>n.a.createElement("div",{key:"fake-media-"+Object(h.p)(),className:Object(m.b)(r.a.loadingCell,e,o(null,t))}))),n.a.createElement("div",{className:r.a.buttonList},p,g)))}))},169:function(e,t,o){e.exports={media:"MediaLightboxObject__media","not-available":"MediaLightboxObject__not-available MediaLightboxObject__media",notAvailable:"MediaLightboxObject__not-available MediaLightboxObject__media","loading-animation":"MediaLightboxObject__loading-animation",loadingAnimation:"MediaLightboxObject__loading-animation",loading:"MediaLightboxObject__loading"}},17:function(e,t,o){"use strict";let a;t.a=a={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${a.config.imagesUrl}/${e}`}},170:function(e,t,o){e.exports={root:"LoadMoreButton__root feed__feed-button"}},18:function(e,t,o){"use strict";o.d(t,"e",(function(){return l})),o.d(t,"b",(function(){return s})),o.d(t,"c",(function(){return c})),o.d(t,"a",(function(){return d})),o.d(t,"k",(function(){return u})),o.d(t,"g",(function(){return m})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return p})),o.d(t,"d",(function(){return _})),o.d(t,"j",(function(){return b})),o.d(t,"f",(function(){return f}));var a=o(0),n=o.n(a),i=o(40),r=o(36);function l(e){const[t,o]=n.a.useState(e),a=n.a.useRef(t);return[t,()=>a.current,e=>o(a.current=e)]}function s(e,t,o=[]){function n(a){!e.current||e.current.contains(a.target)||o.some(e=>e&&e.current&&e.current.contains(a.target))||t(a)}Object(a.useEffect)(()=>(document.addEventListener("mousedown",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchend",n)}))}function c(e,t){Object(a.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function d(e,t,o=100){const[i,r]=n.a.useState(e);return Object(a.useEffect)(()=>{let a=null;return e===t?a=setTimeout(()=>r(t),o):r(!t),()=>{null!==a&&clearTimeout(a)}},[e]),[i,r]}function u(e){const[t,o]=n.a.useState(Object(r.b)()),i=()=>{const t=Object(r.b)();o(t),e&&e(t)};return Object(a.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function m(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){const o=o=>{if(t)return(o||window.event).returnValue=e,e};Object(a.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[t])}function p(e,t){const o=n.a.useRef(!1);return Object(a.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function g(e,t,o,n=[],i=[]){Object(a.useEffect)(()=>(n.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function _(e,t,o=[],a=[]){g(document,e,t,o,a)}function b(e,t,o=[],a=[]){g(window,e,t,o,a)}function f(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}o(38)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(1),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return a(this,e,t)}set(e,t){r(this,t,e)}with(e,t){const a=l(this,t,e);return new o(a.desktop,a.tablet,a.phone)}}function a(e,t,o=!1){if(!e)return;const a=e[t.prop];return!o||""!==a&&null!=a&&""!==a?a:e.desktop}function r(e,t,o){return e[o.prop]=t,e}function l(e,t,o){return r({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,o)}i([n.n],o.prototype,"desktop",void 0),i([n.n],o.prototype,"tablet",void 0),i([n.n],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const a=e.MODES.findIndex(e=>e===o);return void 0===a?t.DESKTOP:e.MODES[(a+1)%e.MODES.length]},e.get=a,e.set=r,e.withValue=l,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(a||(a={}))},26:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));class a{static getById(e){const t=a.list.find(t=>t.id===e);return!t&&a.list.length>0?a.list[0]:t}static getName(e){const t=a.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){a.list.push(e)}}a.list=[]},28:function(e,t,o){"use strict";var a=o(1),n=o(76),i=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class r{constructor(){this.types=[],this.focusSidebar=0,this.mediaStore=n.a}get selectedMedia(){return"number"==typeof this.selectedIdx?this.mediaStore.media[this.selectedIdx]:void 0}nextPost(){this.selectedIdx<this.mediaStore.media.length-1&&this.selectedIdx++}addPromotionType(e){this.types.push(e)}getPromotionType(e){return this.types.find(t=>t.value===e)}getMediaPromo(e,t){var o;const a=t.options.promotions.hasOwnProperty(e.id)?t.options.promotions[e.id]:void 0;if(!a)return[{},null];const n=this.getPromotionType(a.type);return n?[null!==(o=a.data)&&void 0!==o?o:{},n]:[{},null]}executeMediaClick(e,t){const[o,a]=this.getMediaPromo(e,t);return!(null===a||!a.isValid(e,o)||"function"!=typeof a.onMediaClick)&&a.onMediaClick(e,o)}getLinkText(e,t){var o,a;const[n,i]=this.getMediaPromo(e,t);return null!==i&&i.isValid(e,n)?{text:i.getPopupLinkText&&null!==(o=i.getPopupLinkText(e,n))&&void 0!==o?o:null,url:i.getMediaUrl&&null!==(a=i.getMediaUrl(e,n))&&void 0!==a?a:null}:{text:null,url:null}}}i([a.n],r.prototype,"selectedIdx",void 0),i([a.n],r.prototype,"focusSidebar",void 0),i([Object(a.h)({keepAlive:!0})],r.prototype,"selectedMedia",null),i([a.f],r.prototype,"nextPost",null),t.a=new r},29:function(e,t,o){e.exports={root:"StoryLightbox__root layout__fill-parent layout__z-highest layout__flex-column",container:"StoryLightbox__container layout__flex-column",header:"StoryLightbox__header layout__flex-row","profile-picture":"StoryLightbox__profile-picture",profilePicture:"StoryLightbox__profile-picture",username:"StoryLightbox__username",date:"StoryLightbox__date",progress:"StoryLightbox__progress layout__flex-row","progress-segment":"StoryLightbox__progress-segment",progressSegment:"StoryLightbox__progress-segment","progress-overlay":"StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlay:"StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-overlay-animating":"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayAnimating:"StoryLightbox__progress-overlay-animating StoryLightbox__progress-overlay StoryLightbox__progress-segment","progress-segment-animation":"StoryLightbox__progress-segment-animation",progressSegmentAnimation:"StoryLightbox__progress-segment-animation","progress-overlay-done":"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",progressOverlayDone:"StoryLightbox__progress-overlay-done StoryLightbox__progress-overlay StoryLightbox__progress-segment",content:"StoryLightbox__content layout__flex-row layout__flex-center",media:"StoryLightbox__media",button:"StoryLightbox__button","close-button":"StoryLightbox__close-button StoryLightbox__button",closeButton:"StoryLightbox__close-button StoryLightbox__button","nav-button":"StoryLightbox__nav-button StoryLightbox__button",navButton:"StoryLightbox__nav-button StoryLightbox__button","prev-button":"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button",prevButton:"StoryLightbox__prev-button StoryLightbox__nav-button StoryLightbox__button","next-button":"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button",nextButton:"StoryLightbox__next-button StoryLightbox__nav-button StoryLightbox__button"}},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return a}));var a,n=o(14),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(a||(a={}));const r=Object(i.n)([]),l="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",s=e=>r.find(t=>t.id===e),c=e=>"https://instagram.com/"+e;function d(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===a.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return r.replace(t),r}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:r,DEFAULT_PROFILE_PIC:l,getById:s,getByUsername:e=>r.find(t=>t.username===e),hasAccounts:()=>r.length>0,filterExisting:e=>e.filter(e=>void 0!==s(e)),idsToAccounts:e=>e.map(e=>s(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>r.filter(e=>e.type===a.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:l,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>c(e.username),getUsernameUrl:c,loadAccounts:function(){return n.a.getAccounts().then(d).catch(e=>{throw n.a.getErrorReason(e)})},loadFromResponse:d}},30:function(e,o){e.exports=t},31:function(e,t,o){"use strict";o.d(t,"a",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"c",(function(){return m}));var a=o(0),n=o.n(a),i=o(30),r=o.n(i),l=o(4);class s{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let o=this.cache.get(e);if(void 0===o){o=t(this);let a=this.extensions.get(e);a&&a.forEach(e=>o=e(this,o)),this.cache.set(e,o)}return o}has(e){return this.factories.has(e)}}class c{constructor(e,t,o){this.key=e,this.mount=t,this.modules=o,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new u(t,e))}(this);const e=m({root:()=>null,"root/children":()=>[]});this.container=new s(e,this.modules);const t=this.container.get("root/children").map((e,t)=>n.a.createElement(e,{key:t})),o=n.a.createElement(l.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),r.a.render(o,this.mount)})}}function d(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class u extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function m(e){return new Map(Object.entries(e))}},342:function(e,t,o){"use strict";o.r(t);var a=o(26),n=o(17),i=o(168);a.a.addLayout({id:"grid",name:"Grid",img:n.a.image("grid-layout.png"),component:i.a})},35:function(e,t,o){e.exports={root:"FeedHeader__root",container:"FeedHeader__container","left-container":"FeedHeader__left-container FeedHeader__container",leftContainer:"FeedHeader__left-container FeedHeader__container","right-container":"FeedHeader__right-container FeedHeader__container",rightContainer:"FeedHeader__right-container FeedHeader__container","profile-pic":"FeedHeader__profile-pic",profilePic:"FeedHeader__profile-pic","profile-pic-with-stories":"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",profilePicWithStories:"FeedHeader__profile-pic-with-stories FeedHeader__profile-pic",info:"FeedHeader__info","info-row":"FeedHeader__info-row",infoRow:"FeedHeader__info-row",username:"FeedHeader__username FeedHeader__info-row",subtext:"FeedHeader__subtext FeedHeader__info-row",bio:"FeedHeader__bio FeedHeader__subtext FeedHeader__info-row","counter-list":"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counterList:"FeedHeader__counter-list FeedHeader__subtext FeedHeader__info-row",counter:"FeedHeader__counter","follow-button":"FeedHeader__follow-button",followButton:"FeedHeader__follow-button","centered-style":"FeedHeader__centered-style FeedHeader__root",centeredStyle:"FeedHeader__centered-style FeedHeader__root","normal-style":"FeedHeader__normal-style FeedHeader__root",normalStyle:"FeedHeader__normal-style FeedHeader__root","boxed-style":"FeedHeader__boxed-style FeedHeader__root",boxedStyle:"FeedHeader__boxed-style FeedHeader__root"}},36:function(e,t,o){"use strict";function a(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function n(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return i}))},38:function(e,t,o){"use strict";function a(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function n(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return n}))},41:function(e,t,o){e.exports={root:"MediaOverlay__root layout__fill-parent",rows:"MediaOverlay__rows",row:"MediaOverlay__row","top-row":"MediaOverlay__top-row MediaOverlay__row",topRow:"MediaOverlay__top-row MediaOverlay__row","middle-row":"MediaOverlay__middle-row MediaOverlay__row",middleRow:"MediaOverlay__middle-row MediaOverlay__row","bottom-row":"MediaOverlay__bottom-row MediaOverlay__row",bottomRow:"MediaOverlay__bottom-row MediaOverlay__row","counter-list":"MediaOverlay__counter-list",counterList:"MediaOverlay__counter-list",username:"MediaOverlay__username",date:"MediaOverlay__date",caption:"MediaOverlay__caption",counter:"MediaOverlay__counter","comments-count":"MediaOverlay__comments-count MediaOverlay__counter",commentsCount:"MediaOverlay__comments-count MediaOverlay__counter","likes-count":"MediaOverlay__likes-count MediaOverlay__counter",likesCount:"MediaOverlay__likes-count MediaOverlay__counter","ig-link-icon":"MediaOverlay__ig-link-icon",igLinkIcon:"MediaOverlay__ig-link-icon"}},49:function(e,t,o){e.exports={root:"GridLayout__root layout__flex-column",grid:"GridLayout__grid",cell:"GridLayout__cell","cell-content":"GridLayout__cell-content layout__fill-parent layout__flex-column",cellContent:"GridLayout__cell-content layout__fill-parent layout__flex-column","media-container":"GridLayout__media-container",mediaContainer:"GridLayout__media-container","media-meta":"GridLayout__media-meta layout__flex-column",mediaMeta:"GridLayout__media-meta layout__flex-column","button-list":"GridLayout__button-list layout__flex-column",buttonList:"GridLayout__button-list layout__flex-column"}},5:function(e,t,o){"use strict";o.d(t,"p",(function(){return c})),o.d(t,"b",(function(){return d})),o.d(t,"c",(function(){return u})),o.d(t,"k",(function(){return m})),o.d(t,"f",(function(){return h})),o.d(t,"d",(function(){return p})),o.d(t,"j",(function(){return g})),o.d(t,"l",(function(){return _})),o.d(t,"h",(function(){return b})),o.d(t,"a",(function(){return f})),o.d(t,"g",(function(){return y})),o.d(t,"i",(function(){return v})),o.d(t,"o",(function(){return x})),o.d(t,"n",(function(){return M})),o.d(t,"m",(function(){return L})),o.d(t,"e",(function(){return w}));var a=o(0),n=o.n(a),i=o(160),r=o(159),l=o(13);let s=0;function c(){return s++}function d(e,t){return Object.getOwnPropertyNames(t).forEach(o=>{"object"!=typeof t[o]||Array.isArray(t[o])?e[o]=t[o]:("object"!=typeof e[o]&&(e[o]={}),d(e[o],t[o]))}),e}function u(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;++a)if(o){if(!o(e[a],t[a]))return!1}else if(e[a]!==t[a])return!1;return!0}function m(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(o=>"object"==typeof e[o]?"object"!=typeof t[o]||!m(e[o],t[o]):Array.isArray(e[o])?!Array.isArray(t[o])||!u(e[o],t[o]):e[o]!==t[o]):e===t}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function p(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function g(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function _(e,t,o=0,i=!1){let r=e.trim();i&&(r=r.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const l=r.split("\n"),s=l.map((e,o)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let r,s=[];for(;null!==(r=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+r[1],o=n.a.createElement("a",{href:t,target:"_blank",key:c()},r[0]),a=e.substr(0,r.index),i=e.substr(r.index+r[0].length);s.push(a),s.push(o),e=i}return e.length&&s.push(e),t&&(s=t(s,o)),l.length>1&&s.push(n.a.createElement("br",{key:c()})),n.a.createElement(a.Fragment,{key:c()},s)});return o>0?s.slice(0,o):s}function b(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var f;function y(e,t=f.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function v(e,t=f.MEDIUM){return e.thumbnail?e.thumbnail:y(b(e.permalink),t)}function x(e,t){const o=/(\s+)/g;let a,n=0,i=0,r="";for(;null!==(a=o.exec(e))&&n<t;){const t=a.index+a[1].length;r+=e.substr(i,t-i),i=t,n++}return i<e.length&&(r+=" ..."),r}function M(e){return Object(i.a)(Object(r.a)(e),{addSuffix:!0})}function L(e,t){const o=[];return e.forEach((e,a)=>{const n=a%t;Array.isArray(o[n])?o[n].push(e):o[n]=[e]}),o}function w(e,t){return function e(t){if(t.type===l.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(o=>{e.src=t.url,e.addEventListener("loadeddata",()=>{o({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===l.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===l.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const o=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*o,height:e.height*o}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(f||(f={}))},53:function(e,t,o){e.exports={root:"MediaLightboxAlbum__root",strip:"MediaLightboxAlbum__strip layout__flex-row",frame:"MediaLightboxAlbum__frame",controls:"MediaLightboxAlbum__controls layout__fill-parent layout__flex-row","nav-button":"MediaLightboxAlbum__nav-button",navButton:"MediaLightboxAlbum__nav-button","next-button":"MediaLightboxAlbum__next-button MediaLightboxAlbum__nav-button",nextButton:"MediaLightboxAlbum__next-button MediaLightboxAlbum__nav-button","prev-button":"MediaLightboxAlbum__prev-button MediaLightboxAlbum__nav-button",prevButton:"MediaLightboxAlbum__prev-button MediaLightboxAlbum__nav-button","indicator-list":"MediaLightboxAlbum__indicator-list layout__flex-row",indicatorList:"MediaLightboxAlbum__indicator-list layout__flex-row",indicator:"MediaLightboxAlbum__indicator","indicator-current":"MediaLightboxAlbum__indicator-current MediaLightboxAlbum__indicator",indicatorCurrent:"MediaLightboxAlbum__indicator-current MediaLightboxAlbum__indicator"}},56:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var a=o(0),n=o.n(a),i=o(91),r=o.n(i);function l(){return n.a.createElement("div",{className:r.a.root})}},57:function(e,t,o){e.exports={root:"MediaThumbnail__root","media-background-fade-in-animation":"MediaThumbnail__media-background-fade-in-animation",mediaBackgroundFadeInAnimation:"MediaThumbnail__media-background-fade-in-animation","media-object-fade-in-animation":"MediaThumbnail__media-object-fade-in-animation",mediaObjectFadeInAnimation:"MediaThumbnail__media-object-fade-in-animation",image:"MediaThumbnail__image","not-available":"MediaThumbnail__not-available",notAvailable:"MediaThumbnail__not-available"}},58:function(e,t,o){e.exports={root:"IgVideoPlayer__root",thumbnail:"IgVideoPlayer__thumbnail","thumbnail-hidden":"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",thumbnailHidden:"IgVideoPlayer__thumbnail-hidden IgVideoPlayer__thumbnail",video:"IgVideoPlayer__video","video-hidden":"IgVideoPlayer__video-hidden IgVideoPlayer__video",videoHidden:"IgVideoPlayer__video-hidden IgVideoPlayer__video",control:"IgVideoPlayer__control","control-playing":"IgVideoPlayer__control-playing IgVideoPlayer__control",controlPlaying:"IgVideoPlayer__control-playing IgVideoPlayer__control","control-paused":"IgVideoPlayer__control-paused IgVideoPlayer__control",controlPaused:"IgVideoPlayer__control-paused IgVideoPlayer__control","play-button":"IgVideoPlayer__play-button",playButton:"IgVideoPlayer__play-button"}},62:function(e,t,o){e.exports={root:"MediaComment__root",row:"MediaComment__row",username:"MediaComment__username",content:"MediaComment__content MediaComment__row",text:"MediaComment__text","meta-list":"MediaComment__meta-list MediaComment__row",metaList:"MediaComment__meta-list MediaComment__row",meta:"MediaComment__meta",date:"MediaComment__date MediaComment__meta","like-count":"MediaComment__like-count MediaComment__meta",likeCount:"MediaComment__like-count MediaComment__meta"}},7:function(e,t,o){"use strict";o.d(t,"a",(function(){return p}));var a=o(37),n=o.n(a),i=o(1),r=o(2),l=o(26),s=o(31),c=o(3),d=o(5),u=o(12),m=o(14),h=function(e,t,o,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,o):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,o,a);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(r=(i<3?n(r):i>3?n(t,o,r):n(t,o))||r);return i>3&&r&&Object.defineProperty(t,o,r),r};class p{constructor(e=new p.Options,t=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new p.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=r.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=r.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),p.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((a,i)=>{m.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,a&&a()}).catch(e=>{var t;if(n.a.isCancel(e))return null;const o=new p.Events.FetchFailEvent(p.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}h([i.n],p.prototype,"media",void 0),h([i.n],p.prototype,"canLoadMore",void 0),h([i.n],p.prototype,"stories",void 0),h([i.n],p.prototype,"numLoadedMore",void 0),h([i.n],p.prototype,"options",void 0),h([i.n],p.prototype,"totalMedia",void 0),h([i.n],p.prototype,"mode",void 0),h([i.n],p.prototype,"isLoaded",void 0),h([i.n],p.prototype,"isLoading",void 0),h([i.n],p.prototype,"isLoadingMore",void 0),h([i.f],p.prototype,"reload",void 0),h([i.n],p.prototype,"localMedia",void 0),h([i.n],p.prototype,"numMediaToShow",void 0),h([i.n],p.prototype,"numMediaPerPage",void 0),h([i.n],p.prototype,"mediaCounter",void 0),h([i.h],p.prototype,"_media",null),h([i.h],p.prototype,"_numMediaToShow",null),h([i.h],p.prototype,"_numMediaPerPage",null),h([i.h],p.prototype,"_canLoadMore",null),h([i.f],p.prototype,"loadMore",null),h([i.f],p.prototype,"load",null),h([i.f],p.prototype,"loadMedia",null),function(e){let t,o,a,n,m,p,g,_,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class f{constructor(e={}){f.setFromObject(this,e)}static setFromObject(t,o={}){var a,n,i,s,d,u,m,h,p,g,_,b;return t.accounts=o.accounts?o.accounts.slice():e.DefaultOptions.accounts,t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=o.tagged?o.tagged.slice():e.DefaultOptions.tagged,t.layout=l.a.getById(o.layout).id,t.numColumns=r.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=r.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=r.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=r.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=r.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=r.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=r.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=r.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=r.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=r.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=r.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(a=o.headerAccount)&&void 0!==a?a:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===c.b.getById(t.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:t.headerAccount,t.headerStyle=r.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=r.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=r.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=r.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(n=o.customProfilePic)&&void 0!==n?n:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=r.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=r.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(s=o.captionRemoveDots)&&void 0!==s?s:e.DefaultOptions.captionRemoveDots,t.captionSize=r.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=r.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=r.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=r.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(d=o.likesIconColor)&&void 0!==d?d:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(u=o.lightboxShowSidebar)&&void 0!==u?u:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(m=o.autoload)&&void 0!==m?m:e.DefaultOptions.autoload,t.showFollowBtn=r.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(h=o.followBtnText)&&void 0!==h?h:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=r.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(p=o.hashtagWhitelistSettings)&&void 0!==p?p:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(g=o.hashtagBlacklistSettings)&&void 0!==g?g:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(_=o.captionWhitelistSettings)&&void 0!==_?_:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=o.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=o.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=o.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=c.b.idsToAccounts(e.accounts),o=c.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:c.b.idsToAccounts(e.accounts),tagged:c.b.idsToAccounts(e.tagged),hashtags:c.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,o){const a=e.Options.getSources(t),n=a.accounts.length>0||a.tagged.length>0,i=!o&&a.hashtags.length>0;return n||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}h([i.n],f.prototype,"accounts",void 0),h([i.n],f.prototype,"hashtags",void 0),h([i.n],f.prototype,"tagged",void 0),h([i.n],f.prototype,"layout",void 0),h([i.n],f.prototype,"numColumns",void 0),h([i.n],f.prototype,"highlightFreq",void 0),h([i.n],f.prototype,"mediaType",void 0),h([i.n],f.prototype,"postOrder",void 0),h([i.n],f.prototype,"numPosts",void 0),h([i.n],f.prototype,"linkBehavior",void 0),h([i.n],f.prototype,"feedWidth",void 0),h([i.n],f.prototype,"feedHeight",void 0),h([i.n],f.prototype,"feedPadding",void 0),h([i.n],f.prototype,"imgPadding",void 0),h([i.n],f.prototype,"textSize",void 0),h([i.n],f.prototype,"bgColor",void 0),h([i.n],f.prototype,"textColorHover",void 0),h([i.n],f.prototype,"bgColorHover",void 0),h([i.n],f.prototype,"hoverInfo",void 0),h([i.n],f.prototype,"showHeader",void 0),h([i.n],f.prototype,"headerInfo",void 0),h([i.n],f.prototype,"headerAccount",void 0),h([i.n],f.prototype,"headerStyle",void 0),h([i.n],f.prototype,"headerTextSize",void 0),h([i.n],f.prototype,"headerPhotoSize",void 0),h([i.n],f.prototype,"headerTextColor",void 0),h([i.n],f.prototype,"headerBgColor",void 0),h([i.n],f.prototype,"headerPadding",void 0),h([i.n],f.prototype,"customBioText",void 0),h([i.n],f.prototype,"customProfilePic",void 0),h([i.n],f.prototype,"includeStories",void 0),h([i.n],f.prototype,"storiesInterval",void 0),h([i.n],f.prototype,"showCaptions",void 0),h([i.n],f.prototype,"captionMaxLength",void 0),h([i.n],f.prototype,"captionRemoveDots",void 0),h([i.n],f.prototype,"captionSize",void 0),h([i.n],f.prototype,"captionColor",void 0),h([i.n],f.prototype,"showLikes",void 0),h([i.n],f.prototype,"showComments",void 0),h([i.n],f.prototype,"lcIconSize",void 0),h([i.n],f.prototype,"likesIconColor",void 0),h([i.n],f.prototype,"commentsIconColor",void 0),h([i.n],f.prototype,"lightboxShowSidebar",void 0),h([i.n],f.prototype,"numLightboxComments",void 0),h([i.n],f.prototype,"showLoadMoreBtn",void 0),h([i.n],f.prototype,"loadMoreBtnText",void 0),h([i.n],f.prototype,"loadMoreBtnTextColor",void 0),h([i.n],f.prototype,"loadMoreBtnBgColor",void 0),h([i.n],f.prototype,"autoload",void 0),h([i.n],f.prototype,"showFollowBtn",void 0),h([i.n],f.prototype,"followBtnText",void 0),h([i.n],f.prototype,"followBtnTextColor",void 0),h([i.n],f.prototype,"followBtnBgColor",void 0),h([i.n],f.prototype,"followBtnLocation",void 0),h([i.n],f.prototype,"hashtagWhitelist",void 0),h([i.n],f.prototype,"hashtagBlacklist",void 0),h([i.n],f.prototype,"captionWhitelist",void 0),h([i.n],f.prototype,"captionBlacklist",void 0),h([i.n],f.prototype,"hashtagWhitelistSettings",void 0),h([i.n],f.prototype,"hashtagBlacklistSettings",void 0),h([i.n],f.prototype,"captionWhitelistSettings",void 0),h([i.n],f.prototype,"captionBlacklistSettings",void 0),h([i.n],f.prototype,"moderation",void 0),h([i.n],f.prototype,"moderationMode",void 0),h([i.n],f.prototype,"promotionEnabled",void 0),e.Options=f;class y{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(d.l)(Object(d.o)(t,this.captionMaxLength)):t}static compute(t){const o=t.options,a=t.mode,n=new y({accounts:c.b.filterExisting(o.accounts),tagged:c.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(e=>e.tag.length>0),layout:l.a.getById(o.layout),numColumns:r.a.get(o.numColumns,a,!0),highlightFreq:r.a.get(o.highlightFreq,a,!0),numPosts:r.a.get(o.numPosts,a,!0),linkBehavior:r.a.get(o.linkBehavior,a,!0),bgColor:Object(u.a)(o.bgColor),textColorHover:Object(u.a)(o.textColorHover),bgColorHover:Object(u.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:r.a.get(o.showHeader,a,!0),headerInfo:r.a.get(o.headerInfo,a,!0),headerStyle:r.a.get(o.headerStyle,a,!0),headerTextColor:Object(u.a)(o.headerTextColor),headerBgColor:Object(u.a)(o.headerBgColor),headerPadding:r.a.get(o.headerPadding,a,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:r.a.get(o.showCaptions,a,!0),captionMaxLength:r.a.get(o.captionMaxLength,a,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(u.a)(o.captionColor),showLikes:r.a.get(o.showLikes,a,!0),showComments:r.a.get(o.showComments,a,!0),likesIconColor:Object(u.a)(o.likesIconColor),commentsIconColor:Object(u.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:r.a.get(o.showLoadMoreBtn,a,!0),loadMoreBtnTextColor:Object(u.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:r.a.get(o.showFollowBtn,a,!0),autoload:o.autoload,followBtnLocation:r.a.get(o.followBtnLocation,a,!0),followBtnTextColor:Object(u.a)(o.followBtnTextColor),followBtnBgColor:Object(u.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(n.numColumns=Math.max(n.numColumns,1),t.mode!==r.a.Mode.DESKTOP&&(n.numColumns=n.numColumns<1?r.a.get(o.numColumns,r.a.Mode.DESKTOP):n.numColumns),n.numPosts=parseInt(n.numPosts+""),(n.numPosts<1||isNaN(n.numPosts))&&(n.numPosts=1),n.allAccounts=n.accounts.concat(n.tagged.filter(e=>!n.accounts.includes(e))),n.allAccounts.length>0&&(n.account=o.headerAccount&&n.allAccounts.includes(o.headerAccount)?c.b.getById(o.headerAccount):c.b.getById(n.allAccounts[0])),n.showHeader=n.showHeader&&null!==n.account,n.showHeader&&(n.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:c.b.getProfilePicUrl(n.account)),n.showFollowBtn=n.showFollowBtn&&null!==n.account,n.showLoadMoreBtn=n.showLoadMoreBtn&&t.canLoadMore,n.showBio=n.headerInfo.some(t=>t===e.HeaderInfo.BIO),n.showBio){const e=o.customBioText.trim().length>0?o.customBioText:null!==n.account?c.b.getBioText(n.account):"";n.bioText=Object(d.l)(e),n.showBio=n.bioText.length>0}return n.feedWidth=this.normalizeCssSize(o.feedWidth,a,"auto"),n.feedHeight=this.normalizeCssSize(o.feedHeight,a,"auto"),n.feedPadding=this.normalizeCssSize(o.feedPadding,a,"0"),n.imgPadding=this.normalizeCssSize(o.imgPadding,a,"0"),n.textSize=this.normalizeCssSize(o.textSize,a,"inherit"),n.headerTextSize=this.normalizeCssSize(o.headerTextSize,a,"inherit"),n.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,a,"50px"),n.captionSize=this.normalizeCssSize(o.captionSize,a,"inherit"),n.lcIconSize=this.normalizeCssSize(o.lcIconSize,a,"inherit"),n.buttonPadding=Math.max(10,r.a.get(o.imgPadding,a))+"px",n.showLcIcons=n.showLikes||n.showComments,n}static normalizeCssSize(e,t,o=null){const a=r.a.get(e,t);return a?a+"px":o}}e.ComputedOptions=y,e.HashtagSorting=Object(s.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(o=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(a=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(n=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(m=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(p=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(g=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(_=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:n.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:a.LIGHTBOX,phone:a.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[m.LIKES_COMMENTS,m.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[g.PROFILE_PIC,g.BIO]},headerAccount:null,headerStyle:{desktop:p.NORMAL,phone:p.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:_.HEADER,phone:_.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(p||(p={}))},76:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return s}));var a=o(7),n=o(14),i=o(5);class r{constructor(e=!1,t=!1){this.incModeration=!1,this.incFilters=!1,this.prevOptions=null,this.media=new Array,this.incModeration=e,this.incFilters=t}fetchMedia(e,t){if(null!==this.prevOptions&&!this.isCacheInvalid(e))return Promise.resolve(this.media);const o=Object.assign({},e.options,{moderation:this.incModeration?e.options.moderation:[],moderationMode:e.options.moderationMode,hashtagBlacklist:this.incFilters?e.options.hashtagBlacklist:[],hashtagWhitelist:this.incFilters?e.options.hashtagWhitelist:[],captionBlacklist:this.incFilters?e.options.captionBlacklist:[],captionWhitelist:this.incFilters?e.options.captionWhitelist:[],hashtagBlacklistSettings:!!this.incFilters&&e.options.hashtagBlacklistSettings,hashtagWhitelistSettings:!!this.incFilters&&e.options.hashtagWhitelistSettings,captionBlacklistSettings:!!this.incFilters&&e.options.captionBlacklistSettings,captionWhitelistSettings:!!this.incFilters&&e.options.captionWhitelistSettings});return t&&t(),n.a.getFeedMedia(o).then(t=>(this.prevOptions=new a.a.Options(e.options),this.media=t.data.media,this.media))}isCacheInvalid(e){const t=e.options,o=this.prevOptions;if(Object(i.f)(e.media,this.media,(e,t)=>e.id===t.id).length>0)return!0;if(!Object(i.d)(t.accounts,o.accounts))return!0;if(!Object(i.d)(t.tagged,o.tagged))return!0;if(!Object(i.d)(t.hashtags,o.hashtags,i.j))return!0;if(this.incModeration){if(t.moderationMode!==o.moderationMode)return!0;if(!Object(i.d)(t.moderation,o.moderation))return!0}if(this.incFilters){if(t.captionWhitelistSettings!==o.captionWhitelistSettings||t.captionBlacklistSettings!==o.captionBlacklistSettings||t.hashtagWhitelistSettings!==o.hashtagWhitelistSettings||t.hashtagBlacklistSettings!==o.hashtagBlacklistSettings)return!0;if(!Object(i.d)(t.captionWhitelist,o.captionWhitelist))return!0;if(!Object(i.d)(t.captionBlacklist,o.captionBlacklist))return!0;if(!Object(i.d)(t.hashtagWhitelist,o.hashtagWhitelist))return!0;if(!Object(i.d)(t.hashtagBlacklist,o.hashtagBlacklist))return!0}return!1}}const l=new r(!0,!0),s=new r(!1,!0)},77:function(e,t,o){e.exports={root:"MediaTile__root","type-icon":"MediaTile__type-icon",typeIcon:"MediaTile__type-icon","image-type-icon":"MediaTile__image-type-icon MediaTile__type-icon",imageTypeIcon:"MediaTile__image-type-icon MediaTile__type-icon","video-type-icon":"MediaTile__video-type-icon MediaTile__type-icon",videoTypeIcon:"MediaTile__video-type-icon MediaTile__type-icon","album-type-icon":"MediaTile__album-type-icon MediaTile__type-icon",albumTypeIcon:"MediaTile__album-type-icon MediaTile__type-icon",overlay:"MediaTile__overlay layout__fill-parent"}},78:function(e,t,o){e.exports={root:"FeedLayout__root",wrapper:"FeedLayout__wrapper",button:"FeedLayout__button","follow-btn":"FeedLayout__follow-btn FeedLayout__button",followBtn:"FeedLayout__follow-btn FeedLayout__button","load-more-btn":"FeedLayout__load-more-btn FeedLayout__button",loadMoreBtn:"FeedLayout__load-more-btn FeedLayout__button","fake-media":"FeedLayout__fake-media",fakeMedia:"FeedLayout__fake-media","fake-media-flash-animation":"FeedLayout__fake-media-flash-animation",fakeMediaFlashAnimation:"FeedLayout__fake-media-flash-animation"}},8:function(e,t,o){"use strict";function a(...e){return e.filter(e=>!!e).join(" ")}function n(e){return a(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}function r(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}o.d(t,"b",(function(){return a})),o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return i})),o.d(t,"d",(function(){return r}))},9:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var a=o(0),n=o.n(a),i=o(8);const r=e=>{var{icon:t,className:o}=e,a=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["icon","className"]);return n.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},a))}},90:function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));var a=o(0),n=o.n(a),i=o(57),r=o.n(i),l=o(13),s=o(5),c=o(56),d=o(8);function u(e){var{media:t,className:o}=e,i=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]])}return o}(e,["media","className"]);const u=n.a.useRef(),[m,h]=n.a.useState(0),[p,g]=n.a.useState(!0);if(Object(a.useEffect)(()=>{u.current&&h(u.current.getBoundingClientRect().width)},[]),t.url&&t.url.length>0){const e=t.type===l.a.Type.ALBUM&&t.children.length>0?t.children[0]:t,a=Object(s.h)(e.permalink),m=Object(s.g)(a,s.a.SMALL),h=Object(s.g)(a,s.a.MEDIUM),_=Object(s.g)(a,s.a.LARGE);return n.a.createElement("div",Object.assign({className:Object(d.b)(r.a.root,o)},i),n.a.createElement("img",{ref:u,className:r.a.image,src:h,srcSet:`${m} 150w, ${h} 320w, ${_} 600w, ${t.url} 1000w`,onLoad:function(){g(!1)},loading:"lazy",alt:t.caption}),p&&n.a.createElement(c.a,null))}return n.a.createElement("div",{className:r.a.notAvailable},n.a.createElement("span",null,"Thumbnail not available"))}},91:function(e,t,o){e.exports={root:"MediaLoading__root",animation:"MediaLoading__animation"}}},[[342,0,1]]])}));
ui/dist/editor.js CHANGED
@@ -1 +1 @@
1
- (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[3],{103:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(4),l=a(8);const i=Object(r.b)(e=>{var{label:t,component:a,bordered:o}=e,r=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["label","component","bordered"]);const i=Object(l.a)("filter-field",{"--bordered":o});return n.a.createElement("div",{className:i},n.a.createElement("span",{className:"filter-field__label"},t),n.a.createElement(a,r))})},104:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o=a(0),n=a.n(o),r=a(4),l=a(6),i=a(330);const s=Object(r.b)(({feed:e,field:t,value:a,onChange:o})=>{const[r,s]=n.a.useState(!1);return n.a.createElement("div",{className:"filter-field__filtering-from-settings"},n.a.createElement("label",{className:"filter-field__inc-global-label"},n.a.createElement("div",{className:"filter-field__inc-global"},n.a.createElement("input",{id:t.id,type:"checkbox",value:"1",checked:a,onChange:e=>o(e.target.checked)}),n.a.createElement("span",null,"Include global filters")),n.a.createElement(l.a,{type:l.c.LINK,size:l.b.SMALL,onClick:()=>s(!0)},"Edit global filters"),n.a.createElement(i.a,{isOpen:r,onClose:()=>s(!1),onSave:()=>e.reload()})))})},106:function(e,t,a){e.exports={root:"AccountSelector__root",row:"AccountSelector__row",account:"AccountSelector__account button__toggle-button","account-selected":"AccountSelector__account-selected AccountSelector__account button__toggle-button button__toggle-button-on button__toggle-button",accountSelected:"AccountSelector__account-selected AccountSelector__account button__toggle-button button__toggle-button-on button__toggle-button","profile-pic":"AccountSelector__profile-pic",profilePic:"AccountSelector__profile-pic","info-column":"AccountSelector__info-column",infoColumn:"AccountSelector__info-column","info-text":"AccountSelector__info-text",infoText:"AccountSelector__info-text",username:"AccountSelector__username AccountSelector__info-text","account-type":"AccountSelector__account-type AccountSelector__info-text",accountType:"AccountSelector__account-type AccountSelector__info-text","tick-icon":"AccountSelector__tick-icon",tickIcon:"AccountSelector__tick-icon"}},115:function(e,t,a){e.exports={"moderate-viewport":"ModerateViewport__moderate-viewport",moderateViewport:"ModerateViewport__moderate-viewport","moderate-blacklist":"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport",moderateBlacklist:"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport","moderate-whitelist":"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",moderateWhitelist:"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",loading:"ModerateViewport__loading layout__fill-parent",grid:"ModerateViewport__grid","grid-disabled":"ModerateViewport__grid-disabled ModerateViewport__grid",gridDisabled:"ModerateViewport__grid-disabled ModerateViewport__grid",item:"ModerateViewport__item","item-thumbnail":"ModerateViewport__item-thumbnail",itemThumbnail:"ModerateViewport__item-thumbnail","item-selected":"ModerateViewport__item-selected ModerateViewport__item",itemSelected:"ModerateViewport__item-selected ModerateViewport__item","item-unselected":"ModerateViewport__item-unselected ModerateViewport__item",itemUnselected:"ModerateViewport__item-unselected ModerateViewport__item"}},116:function(e,t,a){e.exports={"embed-sidebar":"EmbedSidebar__embed-sidebar",embedSidebar:"EmbedSidebar__embed-sidebar","save-message":"EmbedSidebar__save-message",saveMessage:"EmbedSidebar__save-message",shortcode:"EmbedSidebar__shortcode",example:"EmbedSidebar__example",caption:"EmbedSidebar__caption","example-annotation":"EmbedSidebar__example-annotation",exampleAnnotation:"EmbedSidebar__example-annotation",instances:"EmbedSidebar__instances"}},122:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var o=a(0),n=a.n(o),r=a(208),l=a(65),i=a(44),s=a(11);const c=({onConnect:e,beforeConnect:t,isTransitioning:a})=>n.a.createElement(l.a,{className:"accounts-onboarding",isTransitioning:a},n.a.createElement("div",{className:"accounts-onboarding__left"},n.a.createElement("h1",null,"Let's connect your Instagram account"),n.a.createElement("p",{className:"accounts-onboarding__first-msg"},"If you're unsure which button applies to you, it's most likely a ",n.a.createElement("strong",null,"Personal")," account."," ","Try that first."),n.a.createElement("div",{className:"accounts-onboarding__spacer"}),n.a.createElement(i.a,{label:"Upgrade to an Instagram Business account for free",stealth:!0},n.a.createElement("p",null,"Business accounts get additional API features that give you more control over your feeds in "," ","Spotlight, especially with ",n.a.createElement("strong",null,"PRO"),"."),n.a.createElement("p",null,"Plus, they get access to ",n.a.createElement("strong",null,"more cool stuff")," within Instagram itself, such as "," ","analytics."),n.a.createElement("p",null,n.a.createElement("a",{href:s.a.resources.businessAccounts,target:"_blank",className:"accounts-onboarding__learn-more-business"},"Learn more")))),n.a.createElement("div",null,n.a.createElement(r.a,{beforeConnect:e=>t&&t(e),onConnect:t=>e&&e(t),useColumns:!0,showPrompt:!1})))},152:function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var o=a(0),n=a.n(o),r=a(4),l=a(8),i=a(44),s=a(7),c=a(2),d=a(6),m=a(9),u=a(5),p=a(69),b=a(123);const h=Object(r.b)(({field:e,feed:t,config:a,computed:o,onChange:r})=>{var i,h;o=null!=o?o:s.a.ComputedOptions.compute(t);const g=n.a.useCallback(a=>{!e.isFakePro&&e.option&&(e.isResponsive&&(a=c.a.withValue(t.options[e.option],a,t.mode)),t.options[e.option]=a,r&&r(t.options))},[t,e,r]),f=n.a.useCallback(()=>{t.mode=c.a.cycle(t.mode)},[t]),_=n.a.useMemo(()=>e.isResponsive?()=>n.a.createElement("span",null,n.a.createElement("strong",null,c.a.getName(t.mode)),n.a.createElement("br",null),"Change device.",n.a.createElement("br",null),"All options with this icon can be customized per device."):null,[t.mode]);if(e.hideWhen&&e.hideWhen(t,o))return null;const E=!e.hideLabel&&void 0!==e.label,v="editor-field-"+(null!==(h=null!==(i=e.id)&&void 0!==i?i:e.option)&&void 0!==h?h:Object(u.o)()),w=e.disabledWhen&&e.disabledWhen(t,o)||e.isFakePro,k=Object(l.a)("editor-field",{"--disabled":w,"--has-label":E});let y="";e.option&&(y=t.options[e.option],e.isResponsive&&(y=c.a.get(y,t.mode,!0)),y=null!=y?y:"");const S=e.props?e.props(t,o):{},P=Object.assign({id:v,value:y,onChange:g,field:e,feed:t,config:a},S);return n.a.createElement("div",{className:k},E&&n.a.createElement("div",{className:"editor-field__label"},n.a.createElement("label",{htmlFor:v},e.label),e.help&&n.a.createElement(b.a,null,n.a.createElement(e.help))),e.isResponsive&&n.a.createElement("div",{className:"editor-field__responsive-btn-wrap"},n.a.createElement(d.a,{type:d.c.PILL,size:d.b.NORMAL,onClick:f,tooltip:_},n.a.createElement(m.a,{icon:c.a.getIcon(t.mode)}))),n.a.createElement("div",{className:"editor-field__container"},n.a.createElement(e.component,P)),e.isFakePro&&n.a.createElement("div",{className:"editor-field__pro-pill"},n.a.createElement(p.a,null)))});var g=a(18);a(550);const f=Object(r.b)(({group:e,feed:t,config:a,onChange:o})=>{const r=n.a.useRef(),s=Object(g.h)(r),c=e=>o&&o(e);if(e.isFakePro&&!a.showProOptions)return null;const d=e.isFakePro?n.a.createElement(_,{label:e.label}):e.label,m=Object(l.a)("feed-options__spoiler",{"--fake-pro":e.isFakePro});return n.a.createElement(i.a,{ref:r,className:m,fitted:!0,label:d,isOpen:e.isOpen,onClick:()=>(e=>{e.isOpen=!e.isOpen,e.isOpen&&s()})(e)},e.fields.map((o,r)=>o.isFakePro&&!a.showProOptions?null:(e.isFakePro&&(o=Object.assign(Object.assign({},o),{isFakePro:!1,disabledWhen:()=>!0})),n.a.createElement(h,{key:r,field:o,feed:t,config:a,onChange:c}))))}),_=({label:e})=>n.a.createElement("div",null,n.a.createElement("div",{className:"feed-options__pro-pill"},n.a.createElement(p.a,null)),n.a.createElement("span",{className:"feed-options__pro-group-label"},e));a(551);const E=Object(r.b)(({feed:e,config:t,groups:a,onChange:o})=>{const r=e=>o&&o(e);return n.a.createElement("div",{className:"feed-options"},a.map((a,o)=>n.a.createElement(f,{key:o,feed:e,config:t,group:a,onChange:r})))})},158:function(e,t,a){e.exports={root:"MediaGridPicker__root",loading:"MediaGridPicker__loading layout__fill-parent",grid:"MediaGridPicker__grid","grid-disabled":"MediaGridPicker__grid-disabled MediaGridPicker__grid",gridDisabled:"MediaGridPicker__grid-disabled MediaGridPicker__grid",item:"MediaGridPicker__item"}},173:function(e,t,a){e.exports={root:"LayoutSelector__root","coming-soon":"LayoutSelector__coming-soon",comingSoon:"LayoutSelector__coming-soon",layout:"LayoutSelector__layout button__toggle-button","layout-selected":"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__toggle-button-on button__toggle-button",layoutSelected:"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__toggle-button-on button__toggle-button"}},177:function(e,t,a){e.exports={"moderate-sidebar":"ModerateSidebar__moderate-sidebar",moderateSidebar:"ModerateSidebar__moderate-sidebar",heading:"ModerateSidebar__heading",mode:"ModerateSidebar__mode","pro-pill":"ModerateSidebar__pro-pill",proPill:"ModerateSidebar__pro-pill",reset:"ModerateSidebar__reset"}},178:function(e,t,a){e.exports={item:"PromoteViewport__item",selected:"PromoteViewport__selected PromoteViewport__item",thumbnail:"PromoteViewport__thumbnail",unselected:"PromoteViewport__unselected PromoteViewport__item","promo-type-icon":"PromoteViewport__promo-type-icon",promoTypeIcon:"PromoteViewport__promo-type-icon"}},194:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var o=a(0),n=a.n(o),r=a(106),l=a.n(r),i=a(3),s=a(9),c=a(18);const d=({accounts:e,value:t,onChange:a})=>{const o=(t=null!=t?t:[]).filter(t=>e.some(e=>e.id===t)),r=new Set(o);return n.a.createElement("div",{className:l.a.root},e.map((e,t)=>n.a.createElement(m,{key:t,account:e,selected:r.has(e.id),onChange:t=>{return o=e.id,t?r.add(o):r.delete(o),void a(Array.from(r));var o}})))},m=({account:e,selected:t,onChange:a})=>{const o=`url("${i.b.getProfilePicUrl(e)}")`,r=()=>{a(!t)},d=Object(c.f)(r);return n.a.createElement("div",{className:l.a.row},n.a.createElement("div",{className:t?l.a.accountSelected:l.a.account,onClick:r,onKeyPress:d,role:"button",tabIndex:0},n.a.createElement("div",{className:l.a.profilePic,style:{backgroundImage:o}}),n.a.createElement("div",{className:l.a.infoColumn},n.a.createElement("div",{className:l.a.username},e.username),n.a.createElement("div",{className:l.a.accountType},e.type)),t&&n.a.createElement(s.a,{icon:"yes-alt",className:l.a.tickIcon})))}},195:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var o=a(0),n=a.n(o),r=a(61),l=a.n(r),i=a(4),s=a(2),c=a(7),d=a(108),m=a(65);const u=Object(i.b)(({feed:e,config:t})=>{if(!c.a.Options.hasSources(e.options,!t.isPro))return n.a.createElement(m.a,{className:l.a.onboarding},n.a.createElement("div",null,n.a.createElement("h1",null,"Select an account to get"," ",n.a.createElement("span",{className:l.a.noBreak},"started"," "," →")),n.a.createElement("p",null,"Your Instagram posts will be displayed instantly so you can easily design your feed using"," ","the live interactive preview.")));const a=e.mode,o=a===s.a.Mode.DESKTOP,r=a===s.a.Mode.TABLET,i=a===s.a.Mode.PHONE,u=o?l.a.root:l.a.shrunkRoot,p=i?l.a.phoneSizer:r?l.a.tabletSizer:l.a.sizer;return n.a.createElement("div",{className:u},n.a.createElement("div",{className:l.a.statusBar},n.a.createElement("div",{className:l.a.statusIndicator},n.a.createElement("svg",{viewBox:"0 0 24 24"},n.a.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"red"})),n.a.createElement("span",null,"Live interactive preview"),n.a.createElement("span",null," — "),n.a.createElement("span",null,"Showing ",e.media.length," out of ",e.totalMedia," posts"),e.numLoadedMore>0&&n.a.createElement("span",{className:l.a.reset},"(",n.a.createElement("a",{onClick:()=>e.load()},"Reset"),")"))),n.a.createElement("div",{className:l.a.container},n.a.createElement("div",{className:p},0===e.media.length&&c.a.Options.hasSources(e.options)&&c.a.Options.isLimitingPosts(e.options)?n.a.createElement("div",{className:l.a.noPostsMsg},n.a.createElement("p",null,"There are no posts to show. Try relaxing your filters and moderation.")):n.a.createElement(d.a,{feed:e}))))})},198:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o=a(0),n=a.n(o),r=a(4),l=a(194),i=a(22);const s=Object(r.b)(e=>e.accounts.length>0?n.a.createElement(l.a,Object.assign({},e)):n.a.createElement(i.a,{type:i.b.WARNING},"Connect a business account to use this feature."))},199:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var o=a(0),n=a.n(o),r=a(70),l=a(7),i=a(151),s=a(22),c=(a(555),a(6)),d=a(9),m=a(340),u=a(5),p=a(8);const b=({value:e,onChange:t})=>{const a=(e=null!=e?e:[]).slice(),o=a.map(e=>({id:e.tag,tag:e.tag,sort:e.sort})),[r,l]=n.a.useState(""),[i,s]=n.a.useState(""),[c,d]=n.a.useState(null);return n.a.createElement("div",{className:"hashtag-selector"},n.a.createElement(m.a,{className:"hashtag-selector__list",list:o,setList:e=>{const o=e.map(e=>({tag:e.tag,sort:e.sort}));t&&!Object(u.b)(o,a,(e,t)=>e.tag===t.tag&&e.sort===t.sort)&&t(o)},handle:".hashtag-selector__drag-handle",animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},a.map((e,o)=>n.a.createElement(h,{key:o,disabled:null!==c&&c!==o,hashtag:e,onEdit:e=>((e,o)=>{a[e]=o,t&&t(a)})(o,e),onDelete:()=>(e=>{a.splice(e,1),t&&t(a)})(o),onStartEdit:()=>d(o),onStopEdit:()=>d(null)}))),n.a.createElement(_,{type:f.ADD,disabled:null!==c,hashtag:{tag:r,sort:i},onDone:e=>{a.push(e),t&&t(a),l(""),s("")}}))},h=({hashtag:e,disabled:t,onEdit:a,onDelete:o,onStartEdit:r,onStopEdit:l})=>{const[i,s]=n.a.useState(!1),c=()=>{s(!1),l&&l()};return i?n.a.createElement(_,{type:f.EDIT,disabled:t,hashtag:e,onDone:e=>{a&&a(e),c()},onCancel:c}):n.a.createElement(g,{hashtag:e,disabled:t,onEdit:()=>{s(!0),r&&r()},onDelete:o})},g=({hashtag:e,disabled:t,onEdit:a,onDelete:o})=>{const r=Object(p.a)("hashtag-selector__row",{"--static":!0,"--disabled":t});return n.a.createElement("div",{className:r},n.a.createElement("div",{className:"hashtag-selector__drag-handle"},n.a.createElement(d.a,{icon:"menu"})),n.a.createElement("div",{className:"hashtag-selector__tag"},l.a.HashtagSorting.get(e.sort)," posts with ",n.a.createElement("strong",null,"#",e.tag)),n.a.createElement("div",{className:"hashtag-selector__buttons"},n.a.createElement(c.a,{className:"hashtag-selector__edit-btn",type:c.c.PILL,onClick:a,tooltip:"Edit hashtag"},n.a.createElement(d.a,{icon:"edit"})),n.a.createElement(c.a,{className:"hashtag-selector__delete-btn",type:c.c.DANGER_PILL,onClick:o,tooltip:"Remove hashtag"},n.a.createElement(d.a,{icon:"trash"}))))};var f;!function(e){e[e.ADD=0]="ADD",e[e.EDIT=1]="EDIT"}(f||(f={}));const _=({type:e,hashtag:t,disabled:a,onChange:m,onDone:u,onCancel:b,focus:h})=>{const g=e===f.ADD,[_,E]=n.a.useState({tag:"",sort:"recent"});Object(o.useEffect)(()=>{var e;E({tag:null!==(e=t.tag)&&void 0!==e?e:"",sort:t.sort?t.sort:"recent"})},[t]);const[v,w]=n.a.useState(0),[k,y]=n.a.useState(!0);Object(o.useEffect)(()=>{if(y(!1),v>0){const e=setTimeout(()=>y(!0),10),t=setTimeout(()=>y(!1),310);return()=>{clearTimeout(e),clearTimeout(t)}}},[v]);const S=()=>{!v&&u&&u(_)},P=Object(p.a)("hashtag-selector__row",{"--disabled":a});return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:P},n.a.createElement("input",{className:"hashtag-selector__tag",type:"text",value:"#"+_.tag,onChange:e=>{const t=e.target.value.slice(1),a={tag:Object(i.b)(t),sort:_.sort};w(t!==a.tag?Date.now():0),E(a),m&&m(a)},onKeyDown:e=>{switch(e.key){case"Enter":S();break;case"Escape":b&&b()}},autoFocus:h}),n.a.createElement(r.a,{className:"hashtag-selector__sort",placeholder:"Sort by",value:_.sort,onChange:e=>{E({tag:_.tag,sort:e.value}),m&&m({tag:_.tag,sort:e.value})},isSearchable:!1,options:Array.from(l.a.HashtagSorting.entries()).map(([e,t])=>({value:e,label:t}))}),n.a.createElement("div",{className:"hashtag-selector__buttons"},g?n.a.createElement(c.a,{type:c.c.PRIMARY,className:"hashtag-selector__add-btn",tooltip:"Add new hashtag",onClick:S,disabled:0===_.tag.length},"Add"):n.a.createElement(c.a,{type:g?c.c.PRIMARY:c.c.PILL,className:"hashtag-selector__done-btn",tooltip:"Done",disabled:0===_.tag.length,onClick:S},n.a.createElement(d.a,{icon:"yes"})),!g&&n.a.createElement(c.a,{type:c.c.DANGER_PILL,className:"hashtag-selector__cancel-btn",onClick:b,tooltip:"Cancel changes"},n.a.createElement(d.a,{icon:"no"})))),v?n.a.createElement(s.a,{type:s.b.ERROR,shake:k,showIcon:!0,isDismissible:!0,onDismiss:()=>w(0)},"Hashtags may only contain letters, numbers and underscores"):null)}},200:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(177),l=a.n(r),i=a(4),s=a(94),c=a(7),d=a(69),m=a(331),u=a(22),p=a(83);t.a=Object(i.b)((function({feed:e,tab:t,onChange:a}){const[o,r]=n.a.useState(!1);function i(){r(!1)}const b=e.options.moderationMode===c.a.ModerationMode.WHITELIST;return n.a.createElement(s.a,null,n.a.createElement("div",{className:l.a.moderateSidebar},n.a.createElement("div",null,n.a.createElement("p",null,"You can choose to hide specific posts or to only show posts that you choose."),n.a.createElement("p",null,"Choose the type of moderation that you wish to apply, then simply click on the posts that you "," ","want to show or hide. Posts that appear in grey will not be shown in the feed."),n.a.createElement("hr",null),n.a.createElement("div",{className:l.a.mode},t.isFakePro&&n.a.createElement("div",{className:l.a.proPill},n.a.createElement(d.a,null)),n.a.createElement(m.a,{name:"manualFilterMode",value:e.options.moderationMode,onChange:function(o){t.isFakePro||a({moderationMode:o,moderation:e.options.moderation})},disabled:t.isFakePro,options:[{value:c.a.ModerationMode.BLACKLIST,label:"Hide the selected posts"},{value:c.a.ModerationMode.WHITELIST,label:"Only show the selected posts"}]})),(e.options.moderation.length>0||b)&&n.a.createElement("a",{className:l.a.reset,onClick:function(){r(!0)}},"Reset moderation")),!t.isFakePro&&n.a.createElement("div",null,n.a.createElement("hr",null),n.a.createElement(u.a,{type:u.b.PRO_TIP,showIcon:!0},n.a.createElement("span",null,n.a.createElement("strong",null,"Pro tip"),":"," ","You can navigate the posts using arrow keys and select them by pressing Enter."))),n.a.createElement(p.a,{isOpen:o,title:"Are you sure?",buttons:["Yes","No"],onAccept:function(){t.isFakePro||(i(),a({moderationMode:c.a.ModerationMode.BLACKLIST,moderation:[]}))},onCancel:i},n.a.createElement("p",null,"Are you sure you want to reset your moderation settings? This cannot be undone."))))}))},201:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(152);function l({feed:e,config:t,tab:a,onChange:o}){return n.a.createElement(r.a,{feed:e,config:t,groups:a.groups,onChange:o})}},202:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(115),l=a.n(r),i=a(7),s=a(203),c=a(90),d=a(4),m=a(76);t.a=Object(d.b)((function({feed:e,tab:t,onChange:a}){const[r,c]=n.a.useState([]),[d,p]=n.a.useState(!1),[b,h]=n.a.useState(0);Object(o.useEffect)(()=>{m.b.fetchMedia(e,()=>p(!0)).then(e=>{c(e),p(!1)})},[]);const g=n.a.useRef(),f=n.a.useRef(),_=new Set(e.options.moderation);function E(o){if(t.isFakePro)return;const n=new Set(e.options.moderation),l=r[o].id;n.has(l)?n.delete(l):n.add(l),h(o),a({moderation:Array.from(n).filter(e=>r.some(t=>t.id===e)),moderationMode:e.options.moderationMode})}const v=e.options.moderationMode===i.a.ModerationMode.BLACKLIST?l.a.moderateBlacklist:l.a.moderateWhitelist,w=t.isFakePro?l.a.gridDisabled:l.a.grid;return n.a.createElement("div",{className:v},n.a.createElement("div",{ref:g,className:w,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(t.isFakePro)return;const a=function(){const e=g.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),a=e.width,o=t.width;return Math.floor((a+15)/(o+15))}(),o=Math.ceil(r.length/a);switch(e.key){case" ":case"Enter":E(b);break;case"ArrowLeft":h(Math.max(b-1,0));break;case"ArrowRight":h(Math.min(b+1,r.length-1));break;case"ArrowUp":{const e=Math.max(0,b-a),t=Math.floor(b/a),n=Math.floor(e/a);o>1&&n!==t&&h(e);break}case"ArrowDown":{const e=Math.min(r.length-1,b+a),t=Math.floor(b/a),n=Math.floor(e/a);o>1&&n!==t&&h(e);break}default:return}e.preventDefault(),e.stopPropagation()}},r.map((e,a)=>n.a.createElement(u,{key:a,media:e,ref:0===a?f:null,selected:_.has(e.id),focused:!t.isFakePro&&b===a,onClick:()=>E(a),onFocus:()=>function(e){h(e)}(a)}))),d&&n.a.createElement("div",{className:l.a.loading},n.a.createElement(s.a,{size:60})))}));const u=n.a.forwardRef(({media:e,selected:t,focused:a,onClick:r,onFocus:i},s)=>{s||(s=n.a.useRef()),Object(o.useEffect)(()=>{a&&s.current.focus()},[a]);const d=t?l.a.itemSelected:l.a.itemUnselected;return n.a.createElement("div",{ref:s,className:d,tabIndex:0,onClick:r,onFocus:i},n.a.createElement(c.a,{media:e,className:l.a.itemThumbnail}))})},205:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(42),l=a.n(r),i=a(4),s=a(70),c=a(28),d=a(94),m=a(6),u=a(11),p=(a(14),a(7)),b=a(44),h=a(147),g=a(123),f=a(17),_=p.a.LinkBehavior;const E=[],v={linkType:"",postId:0,postTitle:"",postUrl:"",url:"",linkText:"",newTab:!1};function w({options:e,onChange:t,feed:a,media:r}){e=null!=e?e:v,e=Object.assign(Object.assign({},v),e),0===E.length&&(E.push({value:"",label:"- Do not link -"},{value:"url",label:"Custom URL"}),u.a.config.postTypes.forEach(e=>{"attachment"!==e.name&&E.push({value:e.name,label:e.labels.singular_name})}));const i=n.a.useRef(),c=n.a.useRef(),[d,m]=n.a.useState([]),[p,w]=n.a.useState(!1);Object(o.useEffect)(()=>{e.linkType&&"url"!==e.linkType&&(w(!0),k("").then(m).finally(()=>w(!1)))},[e.linkType]);const k=t=>(clearTimeout(i.current),new Promise(a=>{i.current=setTimeout(()=>{u.a.restApi.searchPosts(t,e.linkType).then(e=>{c.current=e.data,a(e.data.map(e=>({value:e.id,label:e.title})))}).catch(e=>{})},1e3)})),y=u.a.config.postTypes.find(t=>t.name===e.linkType),S=e.linkType&&a.options.lightboxShowSidebar&&(a.options.linkBehavior.desktop===_.LIGHTBOX||a.options.linkBehavior.tablet===_.LIGHTBOX||a.options.linkBehavior.phone===_.LIGHTBOX);return n.a.createElement(b.a,{label:"Link options",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-to"},"Link to")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{id:"sli-promo-link-to",value:e.linkType?e.linkType:"",onChange:function(a){t({linkType:a.value,postId:0,postTitle:"",postUrl:"",url:e.url,newTab:e.newTab,linkText:e.linkText})},options:E}))),"url"===e.linkType&&n.a.createElement("div",{className:l.a.rowVertical},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-url"},"URL")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-url",type:"text",value:e.url,onChange:function(a){t(Object.assign(Object.assign({},e),{url:a.currentTarget.value}))}}))),e.linkType&&"url"!==e.linkType&&n.a.createElement("div",{className:l.a.rowVertical},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-search-post"},y?"Search for a "+y.labels.singular_name:"Search")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{async:!0,cacheOptions:!0,key:r.id,id:"sli-promo-search-post",placeholder:"Select or start typing...",value:e.postId?e.postId:0,defaultValue:0,defaultInputValue:e.postId?e.postTitle:"",onChange:function(a){if(null===a)t(Object.assign(Object.assign({},e),{postId:0,postTitle:"",postUrl:""}));else{const o=c.current.find(e=>e.id==a.value);t(Object.assign(Object.assign({},e),{postId:a.value,postTitle:o.title,postUrl:o.permalink}))}},defaultOptions:d,loadOptions:k,noOptionsMessage:({inputValue:e})=>e.length?`No posts were found for "${e}"`:"Type to search for posts",loadingMessage:()=>"Searching...",isLoading:p,isSearchable:!0,isClearable:!0}))),e.linkType&&n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-new-tab"},"Open in a new tab")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-link-new-tab",type:"checkbox",checked:e.newTab,onChange:function(a){t(Object.assign(Object.assign({},e),{newTab:a.currentTarget.checked}))}}))),S&&n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-text"},"Popup box link text"),n.a.createElement(g.a,{maxWidth:300},n.a.createElement("p",null,"The text to use for the link in the popup box:"),n.a.createElement("img",{src:f.a.image("popup-link-text.png"),alt:""}))),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-link-text",type:"text",value:e.linkText,onChange:function(a){t(Object.assign(Object.assign({},e),{linkText:a.target.value}))},placeholder:h.a.getDefaultLinkText(e)}))))}var k=a(22);const y=new Map([["link",{fields:w,tutorial:function({}){return n.a.createElement(b.a,{label:"Link promotion",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),n.a.createElement("ol",{style:{marginTop:0}},n.a.createElement("li",null,"Select a post from the preview on the left."),n.a.createElement("li",null,"Choose what the post should link to.")),n.a.createElement("p",null,"That’s it!"))}}],["-more-",{fields:function({}){return n.a.createElement(b.a,{label:"Have your say...",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("p",null,"Spotlight’s ‘Promote’ feature has lots more to come. Share your thoughts on what you’d like to"," ","promote and how."),n.a.createElement("p",null,"Take our 2-minute survey."),n.a.createElement("div",null,n.a.createElement(m.a,{type:m.c.PRIMARY,size:m.b.LARGE,onClick:function(){window.open(u.a.resources.promoTypesSurvey)}},"Start Survey")))}}]]),S={value:"link",label:"Link",component:w,isValid:()=>!1},P={linkType:"url",url:"https://your-promotion-url.com",linkText:"Check out my promotion"};t.a=Object(i.b)((function({feed:e,tab:t,onChange:a}){var r;const i=n.a.useRef(c.a.focusSidebar),u=n.a.useRef(),p=n.a.useRef(e.options.promotions.length?e.options.promotions[0].type:"link");Object(o.useEffect)(()=>{c.a.selectedIdx=null},[]),Object(o.useEffect)(()=>{u.current&&c.a.focusSidebar>i.current&&(i.current=c.a.focusSidebar,u.current.focus())},[c.a.focusSidebar]);const b=n.a.useCallback(o=>{if(t.isFakePro)return;p.current=o.value;const n={};Object.entries(e.options.promotions).forEach(([e,t])=>{n[e]={type:o.value,data:t.data}}),a({promotions:n})},[t,e.options.promotions]),h=n.a.useCallback(e=>{a({promotionEnabled:e.target.checked})},[]),g=n.a.useCallback(o=>{t.isFakePro||a({promotions:Object.assign(Object.assign({},e.options.promotions),{[c.a.selectedMedia.id]:{type:p.current,data:o}})})},[t.isFakePro]),f=n.a.useCallback(()=>g({}),[]),_=c.a.selectedIdx>=c.a.mediaStore.media.length-1,E=c.a.selectedMedia;let v,w;t.isFakePro?(v=S,w=P):(w=E?c.a.getMediaPromo(E,e)[0]:{},v=c.a.types.find(e=>e.value===p.current));const C=n.a.createElement("div",{className:l.a.top},n.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."," ","Start by selecting the promotion type for this feed."),n.a.createElement("hr",null),n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-enable-promo"},"Enable promotion")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{type:"checkbox",value:"1",checked:e.options.promotionEnabled,onChange:h}))),!e.options.promotionEnabled&&n.a.createElement(k.a,{type:k.b.WARNING,showIcon:!0},"Promotion is now disabled. You may still add and edit promotions."," ","They will remain saved but will not apply."),n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-type"},"Promotion type")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{id:"sli-promo-type",ref:u,value:p.current,onChange:b,options:c.a.types,disabled:t.isFakePro})))),O=null!==(r=y.get(v.value))&&void 0!==r?r:{fields:void 0};return n.a.createElement(d.a,null,C,O.fields&&(E&&v||"-more-"===v.value)&&n.a.createElement(O.fields,{feed:e,media:E,options:w,onChange:g}),O.tutorial&&!E&&n.a.createElement(O.tutorial),n.a.createElement("div",{className:l.a.bottom},E&&"-more-"!==v.value&&n.a.createElement(m.a,{size:m.b.LARGE,type:m.c.SECONDARY,onClick:()=>!t.isFakePro&&c.a.nextPost(),disabled:_},"Promote next post →"),v.isValid(E,w)&&n.a.createElement("a",{className:l.a.removePromo,onClick:f},"Remove promotion")),t.isFakePro&&n.a.createElement("div",{className:l.a.disabledOverlay}))}))},207:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(178),l=a.n(r),i=a(158),s=a.n(i),c=a(4),d=a(203),m=a(18),u=Object(c.b)((function({feed:e,store:t,selected:a,disabled:r,autoFocusFirst:l,onClickMedia:i,onSelectMedia:c,children:u}){r=null!=r&&r,l=null!=l&&l;const[b,h]=n.a.useState([]),[g,f]=n.a.useState(!0),[_,E,v]=Object(m.e)(a),w=n.a.useRef(),k=n.a.useRef(),y=n.a.useRef();Object(o.useEffect)(()=>{v(a)},[a]),Object(o.useEffect)(()=>{t.fetchMedia(e).then(e=>{h(e),f(!1),e.length>0&&l&&c&&c(e[0],0)})},[]);const S=e=>{null===E()||e.target!==w.current&&e.target!==k.current||P(null)};function P(e){r||(C(e),i&&i(b[e],e))}function C(e){e===E()||r||(c&&c(b[e],e),v(e))}Object(o.useEffect)(()=>{if(w.current)return w.current.addEventListener("click",S),()=>w.current.removeEventListener("click",S)},[w.current]);const O=r?s.a.gridDisabled:s.a.grid;return n.a.createElement("div",{ref:w,className:s.a.root},n.a.createElement("div",{ref:k,className:O,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(r)return;const t=E(),a=function(){const e=k.current.getBoundingClientRect(),t=y.current.getBoundingClientRect(),a=e.width,o=t.width;return Math.floor((a+15)/(o+15))}(),o=Math.ceil(b.length/a);switch(e.key){case" ":case"Enter":P(t);break;case"ArrowLeft":C(Math.max(t-1,0));break;case"ArrowRight":C(Math.min(t+1,b.length-1));break;case"ArrowUp":{const e=Math.max(0,t-a),n=Math.floor(t/a),r=Math.floor(e/a);o>1&&r!==n&&C(e);break}case"ArrowDown":{const e=Math.min(b.length-1,t+a),n=Math.floor(t/a),r=Math.floor(e/a);o>1&&r!==n&&C(e);break}default:return}e.preventDefault(),e.stopPropagation()}},b.map((e,t)=>n.a.createElement(p,{key:e.id,ref:0===t?y:null,focused:!r&&_===t,onClick:()=>P(t),onFocus:()=>C(t)},u(e,t)))),g&&n.a.createElement("div",{className:s.a.loading},n.a.createElement(d.a,{size:60})))}));const p=n.a.forwardRef(({focused:e,onClick:t,onFocus:a,children:r},l)=>(l||(l=n.a.useRef()),Object(o.useEffect)(()=>{e&&l.current.focus()},[e]),n.a.createElement("div",{ref:l,className:s.a.item,onClick:t,onFocus:a,tabIndex:0},r)));var b=a(90),h=a(28),g=a(9);t.a=Object(c.b)((function({feed:e,tab:t}){return n.a.createElement(u,{feed:e,store:h.a.mediaStore,selected:h.a.selectedIdx,onSelectMedia:function(e,t){h.a.selectedIdx=t},onClickMedia:function(){h.a.focusSidebar++},disabled:t.isFakePro},(t,a)=>n.a.createElement(f,{media:t,idx:a,feed:e}))}));const f=Object(c.b)(({media:e,idx:t,feed:a})=>{const o=h.a.selectedIdx===t?l.a.selected:l.a.unselected,[r,i]=h.a.getMediaPromo(e,a),s=i&&i.isValid(e,r)&&i.getIcon?i.getIcon(e,r):void 0;return n.a.createElement("div",{className:o},n.a.createElement("div",{className:l.a.thumbnail},n.a.createElement(b.a,{media:e})),s&&n.a.createElement(g.a,{className:l.a.promoTypeIcon,icon:s}))})},241:function(e,t,a){e.exports={"connect-button":"ConnectSidebar__connect-button",connectButton:"ConnectSidebar__connect-button","connect-sidebar":"ConnectSidebar__connect-sidebar",connectSidebar:"ConnectSidebar__connect-sidebar","connect-account":"ConnectSidebar__connect-account",connectAccount:"ConnectSidebar__connect-account"}},320:function(e,t,a){e.exports={sidebar:"DesignSidebar__sidebar","preview-options":"DesignSidebar__preview-options",previewOptions:"DesignSidebar__preview-options"}},321:function(e,t,a){e.exports={sidebar:"Sidebar__sidebar"}},332:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(81),l=a.n(r),i=a(4),s=a(246),c=a(6),d=a(124),m=a(333),u=a(334),p=a(335),b=a(9),h=a(7),g=a(195),f=a(69),_=a(127);t.a=Object(i.b)((function({children:e,config:t,feedOptions:a,onChange:r}){const i=n.a.useRef(new h.a(a)),[d,m]=n.a.useState(!0);Object(o.useEffect)(()=>{i.current.load()},[]),Object(o.useEffect)(()=>{i.current.options=a},[a]);const u=n.a.useCallback(e=>{t.currTab=e},[t]),p=n.a.useCallback(()=>{m(e=>!e)},[]),f=i.current,v=t.tabs.find(e=>e.key===t.currTab),w=n.a.useMemo(()=>v.sidebar?n.a.createElement(v.sidebar,{feed:f,config:t,tab:v,onChange:r}):null,[v]),k=n.a.useMemo(()=>v.viewport?n.a.createElement(v.viewport,{feed:f,tab:v,onChange:r,config:t}):n.a.createElement(g.a,{feed:f,tab:v,onChange:r,config:t}),[v]),y=!v.showSidebar||!w||v.showSidebar(t),S=n.a.useCallback(e=>{const t=e<=_.a.Sizes.MEDIUM,a=e<=_.a.Sizes.MEDIUM,o=t?d?l.a.sidebarDrawer:l.a.sidebarDrawerClosed:l.a.sidebar;return n.a.createElement("div",{className:l.a.content},y&&n.a.createElement("div",{className:o},a&&n.a.createElement("div",{className:l.a.sidebarHeader},v.label),w),n.a.createElement("div",{className:l.a.viewport},k),y&&t&&n.a.createElement("div",{className:l.a.sidebarDrawerContainer},n.a.createElement(c.a,{className:l.a.sidebarToggleButton,type:c.c.TOGGLE,active:d,onClick:p},n.a.createElement(b.a,{icon:"menu-alt"}))))},[v,y]);return n.a.createElement("div",{className:l.a.root},n.a.createElement(E,{config:t,onChangeTab:u,hasSources:h.a.Options.hasSources(f.options)},e),n.a.createElement(s.a,{breakpoints:_.a.Sizes.ALL},S))}));const E=Object(i.b)(({hasSources:e,config:t,onChangeTab:a,children:o})=>{const r=(t.showProOptions?t.tabs:t.tabs.filter(e=>!e.isFakePro)).map(t=>({key:t.key,label:t.isFakePro?n.a.createElement("span",{className:l.a.navbarProTab},n.a.createElement(f.a,{className:l.a.navbarProPill}),n.a.createElement("span",null,t.label)):n.a.createElement("span",null,t.label),disabled:!t.alwaysEnabled&&!e}));return n.a.createElement("div",{className:l.a.navbar},n.a.createElement(s.a,{breakpoints:_.a.Sizes.ALL},e=>{let{nameField:l,saveBtn:i,cancelBtn:s}=o(e);if(e<=_.a.Sizes.SMALL)return n.a.createElement(p.a,{steps:r,current:t.currTab,onChangeStep:a,firstStep:s,lastStep:i},l);if(e<=_.a.Sizes.MEDIUM)return n.a.createElement(m.a,{pages:r,current:t.currTab,onChangePage:a,hideMenuArrow:!0,showNavArrows:!0},{path:l?[l]:[],right:[s,i]});let c=[n.a.createElement(d.a,{key:"logo"})];return e>_.a.Sizes.WIDE&&c.push(n.a.createElement("span",{key:"page"},"Feeds")),l&&c.push(l),n.a.createElement(u.a,{current:t.currTab,onClickTab:a},{path:c,tabs:r,right:[s,i]})}))})},336:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var o=a(0),n=a.n(o),r=a(116),l=a.n(r),i=a(11),s=a(22),c=a(44),d=a(196),m=a(6),u=a(17),p=a(27),b=a(94);function h({store:e}){const t=`[instagram feed="${e.feed.id}"]`,a=i.a.config.adminUrl+"/widgets.php",o=i.a.config.adminUrl+"/customize.php?autofocus%5Bpanel%5D=widgets";return e.feed.id?n.a.createElement(b.a,null,n.a.createElement("div",{className:l.a.embedSidebar},e.feed.usages.length>0&&n.a.createElement(c.a,{label:"Instances",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",{className:l.a.instances},n.a.createElement("p",null,"This feed is currently being shown in these pages:"),n.a.createElement("ul",null,e.feed.usages.map((e,t)=>n.a.createElement("li",{key:t},n.a.createElement("a",{href:`${i.a.config.adminUrl}/post.php?action=edit&post=${e.id}`,target:"_blank"},e.name),n.a.createElement("span",null,"(",e.type,")")))))),n.a.createElement(c.a,{label:"Shortcode",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"Copy the shortcode below and paste it in any page or post to embed this feed:"),n.a.createElement("div",{className:l.a.shortcode},n.a.createElement("code",null,t),n.a.createElement(d.a,{feed:e.feed,toaster:e.toaster},n.a.createElement(m.a,{type:m.c.SECONDARY},"Copy"))))),n.a.createElement(c.a,{label:"WordPress Block",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"To embed the feed in the WordPress block editor, search for the"," ",n.a.createElement("b",null,"Spotlight Instagram feed")," block and add it to your post or page."),p.a.list.length>1?n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"Next, choose ",n.a.createElement("strong",null,e.feed.label)," from the list of feeds."),n.a.createElement(f,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block-select.png",alt:"Choosing a feed for the block"},{src:"wp-block.png",alt:"The feed in a block"}]})):n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"Since this is your only feed, Spotlight will automatically show this feed."),n.a.createElement(f,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block.png",alt:"The feed in a block"}]})))),n.a.createElement(c.a,{label:"Widget",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"To embed this feed in a widget, go to the"," ",n.a.createElement("a",{href:a,target:"_blank"},"Appearance » Widgets")," page or the"," ",n.a.createElement("a",{href:o,target:"_blank"},"Widgets section of the Customizer"),", add"," ","a ",n.a.createElement("strong",null,"Spotlight Instagram Feed")," widget and choose"," ",n.a.createElement("strong",null,e.feed.name)," as the feed to be shown."),n.a.createElement(g,{img:"widget.png",alt:"Example of a widget"}))))):n.a.createElement(b.a,null,n.a.createElement("div",{className:l.a.embedSidebar},n.a.createElement("div",{className:l.a.saveMessage},n.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"You're almost there... Click the ",n.a.createElement("strong",null,"Save")," button at the top-right to be able"," ","to embed this feed on your site!"))))}function g({img:e,alt:t,annotation:a}){return n.a.createElement("figure",{className:l.a.example},n.a.createElement("figcaption",{className:l.a.caption},"Example:"),n.a.createElement("img",{src:u.a.image(e),alt:null!=t?t:""}),void 0!==a&&n.a.createElement("div",{className:l.a.exampleAnnotation},a))}function f({images:e}){const[t,a]=n.a.useState(0),r=()=>a(t=>(t+1)%e.length);Object(o.useEffect)(()=>{const e=setInterval(r,2e3);return()=>clearInterval(e)},[]);const l=e[t];return n.a.createElement(g,{img:l.src,alt:l.alt,annotation:t+1})}},42:function(e,t,a){e.exports={bottom:"PromoteSidebar__bottom",top:"PromoteSidebar__top",row:"PromoteSidebar__row","row-horizontal":"PromoteSidebar__row-horizontal PromoteSidebar__row",rowHorizontal:"PromoteSidebar__row-horizontal PromoteSidebar__row",label:"PromoteSidebar__label","row-vertical":"PromoteSidebar__row-vertical PromoteSidebar__row",rowVertical:"PromoteSidebar__row-vertical PromoteSidebar__row",field:"PromoteSidebar__field","remove-promo":"PromoteSidebar__remove-promo",removePromo:"PromoteSidebar__remove-promo","disabled-overlay":"PromoteSidebar__disabled-overlay",disabledOverlay:"PromoteSidebar__disabled-overlay"}},50:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(317);const l=({min:e,emptyMin:t,placeholder:a,id:o,value:l,onChange:i,unit:s})=>{e=null!=e?e:0,a=null!=a?a:"",t=null!=t&&t;const c=n.a.useCallback(t=>{const a=t.target.value,o=parseInt(a),n=isNaN(o)?a:Math.max(e,o);i&&i(n)},[e,i]),d=n.a.useCallback(()=>{t&&l<=e&&i&&i("")},[t,l,e,i]),m=n.a.useCallback(a=>{"ArrowUp"===a.key&&""===l&&i&&i(t?e+1:e)},[l,e,t,i]),u=t&&l<=e?"":l;return s?n.a.createElement(r.a,{id:o,type:"number",unit:s,value:u,min:e,placeholder:a,onChange:c,onBlur:d,onKeyDown:m}):n.a.createElement("input",{id:o,type:"number",value:u,min:e,placeholder:a,onChange:c,onBlur:d,onKeyDown:m})}},549:function(e,t,a){},55:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(4),l=(a(272),a(318));const i=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement(l.a,{id:e,value:t,onChange:e=>a(e.rgb)}))},550:function(e,t,a){},551:function(e,t,a){},555:function(e,t,a){},60:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(4);a(307);const l=Object(r.b)(({id:e,value:t,onChange:a,disabled:o})=>n.a.createElement("div",{className:"checkbox-field"},n.a.createElement("div",{className:"checkbox-field__aligner"},n.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:t,onChange:e=>a(e.target.checked),disabled:o}))))},61:function(e,t,a){e.exports={root:"FeedPreview__root","shrunk-root":"FeedPreview__shrunk-root FeedPreview__root",shrunkRoot:"FeedPreview__shrunk-root FeedPreview__root","status-bar":"FeedPreview__status-bar",statusBar:"FeedPreview__status-bar","status-indicator":"FeedPreview__status-indicator",statusIndicator:"FeedPreview__status-indicator",reset:"FeedPreview__reset",container:"FeedPreview__container","no-posts-msg":"FeedPreview__no-posts-msg",noPostsMsg:"FeedPreview__no-posts-msg",indicators:"FeedPreview__indicators","waiting-indicator":"FeedPreview__waiting-indicator",waitingIndicator:"FeedPreview__waiting-indicator","loading-indicator":"FeedPreview__loading-indicator",loadingIndicator:"FeedPreview__loading-indicator",sizer:"FeedPreview__sizer","shrunk-sizer":"FeedPreview__shrunk-sizer FeedPreview__sizer",shrunkSizer:"FeedPreview__shrunk-sizer FeedPreview__sizer","tablet-sizer":"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",tabletSizer:"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer","phone-sizer":"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",phoneSizer:"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",onboarding:"FeedPreview__onboarding","no-break":"FeedPreview__no-break",noBreak:"FeedPreview__no-break",controls:"FeedPreview__controls",control:"FeedPreview__control","control-label":"FeedPreview__control-label",controlLabel:"FeedPreview__control-label","indicator-animation":"FeedPreview__indicator-animation",indicatorAnimation:"FeedPreview__indicator-animation","loading-animation":"FeedPreview__loading-animation",loadingAnimation:"FeedPreview__loading-animation"}},81:function(e,t,a){e.exports={root:"FeedEditor__root",navbar:"FeedEditor__navbar layout__z-high",hidden:"FeedEditor__hidden",content:"FeedEditor__content",viewport:"FeedEditor__viewport",sidebar:"FeedEditor__sidebar","sidebar-drawer-container":"FeedEditor__sidebar-drawer-container",sidebarDrawerContainer:"FeedEditor__sidebar-drawer-container","sidebar-drawer":"FeedEditor__sidebar-drawer FeedEditor__sidebar",sidebarDrawer:"FeedEditor__sidebar-drawer FeedEditor__sidebar","sidebar-drawer-closed":"FeedEditor__sidebar-drawer-closed FeedEditor__sidebar-drawer FeedEditor__sidebar",sidebarDrawerClosed:"FeedEditor__sidebar-drawer-closed FeedEditor__sidebar-drawer FeedEditor__sidebar","sidebar-toggle-button":"FeedEditor__sidebar-toggle-button",sidebarToggleButton:"FeedEditor__sidebar-toggle-button","sidebar-header":"FeedEditor__sidebar-header",sidebarHeader:"FeedEditor__sidebar-header","navbar-pro-tab":"FeedEditor__navbar-pro-tab",navbarProTab:"FeedEditor__navbar-pro-tab","navbar-pro-pill":"FeedEditor__navbar-pro-pill",navbarProPill:"FeedEditor__navbar-pro-pill"}},94:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(321),l=a.n(r);function i({children:e}){return n.a.createElement("div",{className:l.a.sidebar},e)}},96:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(70);const l=({value:e,options:t,onChange:a,id:o})=>{t.length>0&&!t.some(t=>t.value===e)&&(e=t[0].value);const l=n.a.useCallback(e=>{a(e.value)},[a]);return n.a.createElement(r.a,{id:o,value:e,onChange:l,options:t})}},98:function(e,t,a){"use strict";a.d(t,"c",(function(){return K})),a.d(t,"a",(function(){return q}));var o=a(0),n=a.n(o),r=a(4),l=a(3),i=a(194),s=a(173),c=a.n(s),d=a(11),m=a(18),u=a(50),p=a(2),b=a(96),h=a(7),g=a(55),f=a(69),_=a(8);a(548);const E=Object(r.b)(({id:e,value:t,onChange:a,config:o,options:r})=>{const l=new Set(t),i=e=>{const t=e.target.value,o=e.target.checked,n=r.find(e=>e.value===t);n.isFakePro||n.isDisabled||(o?l.add(t):l.delete(t),a(Array.from(l)))};return n.a.createElement("div",{className:"checkbox-list"},r.filter(e=>!!e).map((t,a)=>{if(t.isFakePro&&!o.showProOptions)return null;const r=Object(_.a)("checkbox-list__option",{"--disabled":t.isDisabled||t.isFakePro});return n.a.createElement("label",{className:r,key:a},n.a.createElement("input",{type:"checkbox",id:e,value:t.value,checked:l.has(t.value),onChange:i,disabled:t.isDisabled||t.isFakePro}),n.a.createElement("span",null,t.label),t.isFakePro&&n.a.createElement("div",{className:"checkbox-list__pro-pill"},n.a.createElement(f.a,null)))}))});var v=a(60);const w=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement("textarea",{id:e,value:t,onChange:e=>a(e.target.value)}));a(307);const k=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement("input",{id:e,type:"text",value:t,onChange:e=>a(e.target.value)}));var y=a(48),S=a(121),P=a(6);a(549);var C=a(26),O=a(22),N=a(320),M=a.n(N),F=a(94),T=a(61),I=a.n(T),x=a(240),A=a(9);const L=Object(r.b)(({feed:e,config:t,onChangeMode:a})=>n.a.createElement("div",{className:I.a.controls},n.a.createElement("div",{className:I.a.control},n.a.createElement("span",{className:I.a.controlLabel},"Preview device"),n.a.createElement(x.a,null,p.a.MODES.map((t,o)=>n.a.createElement(P.a,{key:o,type:P.c.TOGGLE,onClick:()=>(e=>a&&a(e))(t),active:e.mode===t,tooltip:t.name},n.a.createElement(A.a,{icon:t.icon}))))),!t.isPro&&n.a.createElement("div",{className:I.a.control},n.a.createElement("span",{className:I.a.controlLabel},"PRO features",n.a.createElement("span",null," ","—"," ",n.a.createElement("a",{href:d.a.resources.upgradeLocalUrl,target:"_blank"},"Upgrade now"))),n.a.createElement(x.a,null,n.a.createElement(P.a,{type:P.c.TOGGLE,active:t.showProOptions,onClick:()=>t.showProOptions=!0,tooltip:"Show PRO features"},"Show"),n.a.createElement(P.a,{type:P.c.TOGGLE,active:!t.showProOptions,onClick:()=>t.showProOptions=!1,tooltip:"Hide PRO features"},"Hide")))));var R=a(152),j=a(241),D=a.n(j),B=a(125),z=a(122),H=a(65),V=a(195),W=h.a.HeaderInfo,G=h.a.FollowBtnLocation;const U=e=>{var t;return e.feed.mode===p.a.Mode.DESKTOP?n.a.createElement(u.a,Object.assign({},e,{placeholder:null!==(t=e.placeholder)&&void 0!==t?t:""})):n.a.createElement(u.a,Object.assign({},e,{placeholder:"Default"}))},K=e=>!p.a.get(e.options.showHeader,e.mode,!0)||J(e),Y=e=>t=>{const a=p.a.get(t.options.headerInfo,t.mode,!0);return K(t)||!Array.isArray(a)||!a.includes(e)},X=e=>!p.a.get(e.options.showFollowBtn,e.mode,!0)||J(e),$=e=>!p.a.get(e.options.showLoadMoreBtn,e.mode,!0),J=e=>0===e.options.accounts.length&&0===e.options.tagged.length&&e.options.hashtags.length>0;var q;!function(e){e.CONNECT="connect",e.DESIGN="design"}(q||(q={}));const Q=[{key:q.CONNECT,label:"Connect",sidebar:function({feed:e,config:t,tab:a,onChange:o}){return l.b.hasAccounts()?n.a.createElement(F.a,null,n.a.createElement("div",{className:D.a.connectSidebar},n.a.createElement("div",{className:D.a.connectButton},n.a.createElement(B.a,{onConnect:t=>{e.options.accounts.push(t),o&&o(e.options)}})),n.a.createElement(R.a,{feed:e,config:t,groups:a.groups,onChange:o}))):null},viewport:function(e){const{feed:t,config:a,onChange:o}=e,[r,i]=n.a.useState(!1);return l.b.hasAccounts()?n.a.createElement(V.a,Object.assign({},e)):n.a.createElement(z.a,{beforeConnect:e=>{(e=>{t.options.accounts.push(e),o&&o(t.options)})(e),i(!0),setTimeout(()=>{a.currTab="design"},H.a.TRANSITION_DURATION)},onConnect:()=>t.load(),isTransitioning:r})},showSidebar:()=>l.b.hasAccounts(),alwaysEnabled:!0,groups:[{id:"accounts",label:"Show posts from these accounts",isOpen:!0,fields:[{option:"accounts",component:i.a,props:()=>({accounts:l.b.list})}]}]},{key:q.DESIGN,label:"Design",sidebar:function({feed:e,config:t,tab:a,onChange:o}){let r=a.groups;return p.a.get(e.options.linkBehavior,e.mode,!0)!==h.a.LinkBehavior.LIGHTBOX&&(r=r.filter(({id:e})=>"lightbox"!==e)),n.a.createElement(F.a,null,n.a.createElement("div",{className:M.a.previewOptions},n.a.createElement(L,{feed:e,config:t,onChangeMode:t=>e.mode=t})),n.a.createElement(R.a,{feed:e,config:t,groups:r,onChange:o}))},groups:[{id:"layout",label:"Layout",isOpen:!0,fields:[{option:"layout",hideLabel:!0,component:({layouts:e,value:t,onChange:a,showUpgrade:o})=>n.a.createElement("div",{className:c.a.root},e.map((e,o)=>{const r=e.id===t?c.a.layoutSelected:c.a.layout,l=()=>a(e.id),i=Object(m.f)(l);return n.a.createElement("div",{key:o,className:r,role:"button",tabIndex:0,onClick:l,onKeyPress:i},e.name,e.img&&n.a.createElement("img",{src:e.img,alt:e.name}))}),o&&n.a.createElement("div",{className:c.a.comingSoon},n.a.createElement("span",null,"More layouts available in PRO!"),n.a.createElement("br",null),n.a.createElement("a",{href:d.a.resources.upgradeLocalUrl,target:"_blank"},"Upgrade now!"))),props:()=>({layouts:C.a.list,showUpgrade:!0})}]},{id:"feed",label:"Feed",isOpen:!0,fields:[{option:"numPosts",label:"Number of posts",isResponsive:!0,component:U,props:()=>({min:1,placeholder:"1 post"})},{option:"numColumns",label:"Number of columns",isResponsive:!0,component:(Z={desktop:Object(y.a)(u.a,{min:1,placeholder:"1"}),tablet:Object(y.a)(u.a,{min:"0",emptyMin:!0,placeholder:"Default"}),phone:Object(y.a)(u.a,{min:"0",emptyMin:!0,placeholder:"Default"})},e=>Z.tablet&&e.feed.mode===p.a.Mode.TABLET?n.a.createElement(Z.tablet,e):Z.phone&&e.feed.mode===p.a.Mode.PHONE?n.a.createElement(Z.phone,e):n.a.createElement(Z.desktop,e))},{option:"postOrder",label:"Post order",component:b.a,props:()=>({options:[{value:h.a.PostOrder.DATE_DESC,label:"Most recent first"},{value:h.a.PostOrder.DATE_ASC,label:"Oldest first"},{value:h.a.PostOrder.POPULARITY_DESC,label:"Most popular first"},{value:h.a.PostOrder.POPULARITY_ASC,label:"Least popular first"},{value:h.a.PostOrder.RANDOM,label:"Random"}]})},{option:"linkBehavior",label:"Open posts in",isResponsive:!0,component:b.a,props:()=>({options:[{value:h.a.LinkBehavior.NOTHING,label:"- Do not open -"},{value:h.a.LinkBehavior.SELF,label:"Same tab"},{value:h.a.LinkBehavior.NEW_TAB,label:"New tab"},{value:h.a.LinkBehavior.LIGHTBOX,label:"Popup box"}]})}]},{id:"appearance",label:"Appearance",fields:[{option:"feedWidth",label:"Feed width",isResponsive:!0,component:u.a,props:()=>({unit:"px",min:0,emptyMin:!0,placeholder:"Auto"})},{option:"feedHeight",label:"Feed height",isResponsive:!0,component:u.a,props:()=>({unit:"px",min:0,emptyMin:!0,placeholder:"Auto"})},{option:"feedPadding",label:"Outside padding",isResponsive:!0,component:U,props:()=>({unit:"px",min:0,placeholder:"No padding"})},{option:"imgPadding",label:"Image padding",isResponsive:!0,component:U,props:()=>({unit:"px",min:0,placeholder:"No padding"})},{option:"textSize",label:"Text size",isResponsive:!0,component:u.a,help:()=>n.a.createElement("span",null,'If left empty, the text size will be controlled by your theme. This option will be ignored for the header if the "Text size" option in the "Header" section is not empty.'),props:()=>({unit:"px",min:0,placeholder:"Theme default"})},{option:"bgColor",label:"Background color",component:g.a},{option:"hoverInfo",label:"Show on hover",help:()=>n.a.createElement("p",null,"Likes and comments icons are not available for Personal accounts, due to restrictions set by Instagram."),component:E,props:()=>({options:[{value:h.a.HoverInfo.LIKES_COMMENTS,label:"Likes & comments icons"},{value:h.a.HoverInfo.INSTA_LINK,label:"Instagram icon/link"}]})}]},{id:"header",label:"Header",fields:[{id:"headerHashtagMsg",label:"",hideLabel:!0,isResponsive:!1,component:Object(r.b)(({feed:e})=>J(e)&&n.a.createElement(O.a,{type:O.b.INFO,showIcon:!0,shake:!0},"The header is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to show in the header."))},{option:"showHeader",label:"Show header",isResponsive:!0,component:v.a,disabledWhen:J},{option:"headerAccount",label:"Account to show",disabledWhen:(e,t)=>!t.showHeader||t.allAccounts.length<2,component:b.a,props:(e,t)=>({value:t.account?t.account.id:"",options:t.allAccounts.map(e=>({value:e,label:l.b.getById(e).username}))})},{option:"headerInfo",label:"Show",isResponsive:!0,disabledWhen:K,component:E,props:()=>({options:[{value:h.a.HeaderInfo.PROFILE_PIC,label:"Profile photo"},{value:h.a.HeaderInfo.BIO,label:"Profile bio text"}]})},{option:"headerPhotoSize",label:"Profile photo size",isResponsive:!0,disabledWhen:Y(W.PROFILE_PIC),component:U,props:()=>({min:0,unit:"px"})},{option:"customProfilePic",label:"Custom profile photo",disabledWhen:Y(W.PROFILE_PIC),component:({id:e,title:t,mediaType:a,button:o,buttonSet:r,buttonChange:l,value:i,onChange:s})=>{r=void 0===o?r:o,l=void 0===o?l:o;const c=!!i,d=c?l:r,m=()=>{s&&s("")};return n.a.createElement(S.a,{id:e,title:t,mediaType:a,button:d,value:i,onSelect:e=>{s&&s(e.attributes.url)}},({open:e})=>n.a.createElement("div",{className:"wp-media-field"},c&&n.a.createElement("div",{className:"wp-media-field__preview",tabIndex:0,onClick:e,role:"button"},n.a.createElement("img",{src:i,alt:"Custom profile picture"})),n.a.createElement(P.a,{className:"wp-media-field__select-btn",type:P.c.SECONDARY,onClick:e},d),c&&n.a.createElement(P.a,{className:"wp-media-field__remove-btn",type:P.c.DANGER_LINK,onClick:m},"Remove custom photo")))},props:()=>({title:"Select custom profile photo",buttonSet:"Choose custom photo",buttonChange:"Change custom photo",mediaType:"image"}),help:()=>n.a.createElement("p",null,"Add a custom profile photo just for this feed. It will override the original"," ","profile photo from Instagram and any custom profile photo added in Spotlight.")},{option:"customBioText",label:"Custom bio",disabledWhen:Y(W.BIO),component:w,help:()=>n.a.createElement("p",null,"Add a custom bio text just for this feed. It will override the original custom bio"," ","text from Instagram and any custom bio text added in Spotlight.")},{option:"headerTextSize",label:"Header text size",isResponsive:!0,disabledWhen:K,component:u.a,help:()=>n.a.createElement("span",null,'If left empty, the "Text size" option in the "Appearance" section will control the header\'s text size.'),props:()=>({min:0,unit:"px",placeholder:"Default",emptyMin:!0})},{option:"headerTextColor",label:"Header text color",disabledWhen:K,component:g.a},{option:"headerBgColor",label:"Header background color",disabledWhen:K,component:g.a},{option:"headerPadding",label:"Header padding",isResponsive:!0,disabledWhen:K,component:U,props:()=>({min:0,unit:"px",placeholder:"No padding"})}]},{id:"followBtn",label:"Follow button",fields:[{id:"followBtnHashtagMsg",label:"",hideLabel:!0,isResponsive:!1,component:Object(r.b)(({feed:e})=>J(e)&&n.a.createElement(O.a,{type:O.b.INFO,showIcon:!0,shake:!0},"The follow button is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to follow."))},{option:"showFollowBtn",label:"Show 'Follow' button",isResponsive:!0,component:v.a,disabledWhen:J},{option:"followBtnLocation",label:"Location",isResponsive:!0,disabledWhen:X,component:b.a,props:()=>({options:[{value:G.HEADER,label:"Header"},{value:G.BOTTOM,label:"Bottom"},{value:G.BOTH,label:"Both"}]})},{option:"followBtnText",label:"'Follow' text",disabledWhen:X,component:k},{option:"followBtnTextColor",label:"Text color",disabledWhen:X,component:g.a},{option:"followBtnBgColor",label:"Background color",disabledWhen:X,component:g.a}]},{id:"loadMoreBtn",label:"Load more button",fields:[{option:"showLoadMoreBtn",label:"Show 'Load more' button",isResponsive:!0,component:v.a},{option:"loadMoreBtnText",label:"'Load more' text",disabledWhen:$,component:k},{option:"loadMoreBtnTextColor",label:"Text color",disabledWhen:$,component:g.a},{option:"loadMoreBtnBgColor",label:"Background color",disabledWhen:$,component:g.a}]}]}];var Z;t.b=Q}}]);
1
+ (window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[3],{103:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(4),l=a(8);const i=Object(r.b)(e=>{var{label:t,component:a,bordered:o}=e,r=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(a[o[n]]=e[o[n]])}return a}(e,["label","component","bordered"]);const i=Object(l.a)("filter-field",{"--bordered":o});return n.a.createElement("div",{className:i},n.a.createElement("span",{className:"filter-field__label"},t),n.a.createElement(a,r))})},104:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o=a(0),n=a.n(o),r=a(4),l=a(6),i=a(330);const s=Object(r.b)(({feed:e,field:t,value:a,onChange:o})=>{const[r,s]=n.a.useState(!1);return n.a.createElement("div",{className:"filter-field__filtering-from-settings"},n.a.createElement("label",{className:"filter-field__inc-global-label"},n.a.createElement("div",{className:"filter-field__inc-global"},n.a.createElement("input",{id:t.id,type:"checkbox",value:"1",checked:a,onChange:e=>o(e.target.checked)}),n.a.createElement("span",null,"Include global filters")),n.a.createElement(l.a,{type:l.c.LINK,size:l.b.SMALL,onClick:()=>s(!0)},"Edit global filters"),n.a.createElement(i.a,{isOpen:r,onClose:()=>s(!1),onSave:()=>e.reload()})))})},106:function(e,t,a){e.exports={root:"AccountSelector__root",row:"AccountSelector__row",account:"AccountSelector__account button__toggle-button","account-selected":"AccountSelector__account-selected AccountSelector__account button__toggle-button button__toggle-button-on button__toggle-button",accountSelected:"AccountSelector__account-selected AccountSelector__account button__toggle-button button__toggle-button-on button__toggle-button","profile-pic":"AccountSelector__profile-pic",profilePic:"AccountSelector__profile-pic","info-column":"AccountSelector__info-column",infoColumn:"AccountSelector__info-column","info-text":"AccountSelector__info-text",infoText:"AccountSelector__info-text",username:"AccountSelector__username AccountSelector__info-text","account-type":"AccountSelector__account-type AccountSelector__info-text",accountType:"AccountSelector__account-type AccountSelector__info-text","tick-icon":"AccountSelector__tick-icon",tickIcon:"AccountSelector__tick-icon"}},115:function(e,t,a){e.exports={"moderate-viewport":"ModerateViewport__moderate-viewport",moderateViewport:"ModerateViewport__moderate-viewport","moderate-blacklist":"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport",moderateBlacklist:"ModerateViewport__moderate-blacklist ModerateViewport__moderate-viewport","moderate-whitelist":"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",moderateWhitelist:"ModerateViewport__moderate-whitelist ModerateViewport__moderate-viewport",loading:"ModerateViewport__loading layout__fill-parent",grid:"ModerateViewport__grid","grid-disabled":"ModerateViewport__grid-disabled ModerateViewport__grid",gridDisabled:"ModerateViewport__grid-disabled ModerateViewport__grid",item:"ModerateViewport__item","item-thumbnail":"ModerateViewport__item-thumbnail",itemThumbnail:"ModerateViewport__item-thumbnail","item-selected":"ModerateViewport__item-selected ModerateViewport__item",itemSelected:"ModerateViewport__item-selected ModerateViewport__item","item-unselected":"ModerateViewport__item-unselected ModerateViewport__item",itemUnselected:"ModerateViewport__item-unselected ModerateViewport__item"}},116:function(e,t,a){e.exports={"embed-sidebar":"EmbedSidebar__embed-sidebar",embedSidebar:"EmbedSidebar__embed-sidebar","save-message":"EmbedSidebar__save-message",saveMessage:"EmbedSidebar__save-message",shortcode:"EmbedSidebar__shortcode",example:"EmbedSidebar__example",caption:"EmbedSidebar__caption","example-annotation":"EmbedSidebar__example-annotation",exampleAnnotation:"EmbedSidebar__example-annotation",instances:"EmbedSidebar__instances"}},122:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var o=a(0),n=a.n(o),r=a(208),l=a(65),i=a(44),s=a(11);const c=({onConnect:e,beforeConnect:t,isTransitioning:a})=>n.a.createElement(l.a,{className:"accounts-onboarding",isTransitioning:a},n.a.createElement("div",{className:"accounts-onboarding__left"},n.a.createElement("h1",null,"Let's connect your Instagram account"),n.a.createElement("p",{className:"accounts-onboarding__first-msg"},"If you're unsure which button applies to you, it's most likely a ",n.a.createElement("strong",null,"Personal")," account."," ","Try that first."),n.a.createElement("div",{className:"accounts-onboarding__spacer"}),n.a.createElement(i.a,{label:"Upgrade to an Instagram Business account for free",stealth:!0},n.a.createElement("p",null,"Business accounts get additional API features that give you more control over your feeds in "," ","Spotlight, especially with ",n.a.createElement("strong",null,"PRO"),"."),n.a.createElement("p",null,"Plus, they get access to ",n.a.createElement("strong",null,"more cool stuff")," within Instagram itself, such as "," ","analytics."),n.a.createElement("p",null,n.a.createElement("a",{href:s.a.resources.businessAccounts,target:"_blank",className:"accounts-onboarding__learn-more-business"},"Learn more")))),n.a.createElement("div",null,n.a.createElement(r.a,{beforeConnect:e=>t&&t(e),onConnect:t=>e&&e(t),useColumns:!0,showPrompt:!1})))},152:function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var o=a(0),n=a.n(o),r=a(4),l=a(8),i=a(44),s=a(7),c=a(2),d=a(6),m=a(9),u=a(5),p=a(69),b=a(123);const h=Object(r.b)(({field:e,feed:t,config:a,computed:o,onChange:r})=>{var i,h;o=null!=o?o:s.a.ComputedOptions.compute(t);const g=n.a.useCallback(a=>{!e.isFakePro&&e.option&&(e.isResponsive&&(a=c.a.withValue(t.options[e.option],a,t.mode)),t.options[e.option]=a,r&&r(t.options))},[t,e,r]),f=n.a.useCallback(()=>{t.mode=c.a.cycle(t.mode)},[t]),_=n.a.useMemo(()=>e.isResponsive?()=>n.a.createElement("span",null,n.a.createElement("strong",null,c.a.getName(t.mode)),n.a.createElement("br",null),"Change device.",n.a.createElement("br",null),"All options with this icon can be customized per device."):null,[t.mode]);if(e.hideWhen&&e.hideWhen(t,o))return null;const E=!e.hideLabel&&void 0!==e.label,v="editor-field-"+(null!==(h=null!==(i=e.id)&&void 0!==i?i:e.option)&&void 0!==h?h:Object(u.p)()),w=e.disabledWhen&&e.disabledWhen(t,o)||e.isFakePro,k=Object(l.a)("editor-field",{"--disabled":w,"--has-label":E});let y="";e.option&&(y=t.options[e.option],e.isResponsive&&(y=c.a.get(y,t.mode,!0)),y=null!=y?y:"");const S=e.props?e.props(t,o):{},P=Object.assign({id:v,value:y,onChange:g,field:e,feed:t,config:a},S);return n.a.createElement("div",{className:k},E&&n.a.createElement("div",{className:"editor-field__label"},n.a.createElement("label",{htmlFor:v},e.label),e.help&&n.a.createElement(b.a,null,n.a.createElement(e.help))),e.isResponsive&&n.a.createElement("div",{className:"editor-field__responsive-btn-wrap"},n.a.createElement(d.a,{type:d.c.PILL,size:d.b.NORMAL,onClick:f,tooltip:_},n.a.createElement(m.a,{icon:c.a.getIcon(t.mode)}))),n.a.createElement("div",{className:"editor-field__container"},n.a.createElement(e.component,P)),e.isFakePro&&n.a.createElement("div",{className:"editor-field__pro-pill"},n.a.createElement(p.a,null)))});var g=a(18);a(550);const f=Object(r.b)(({group:e,feed:t,config:a,onChange:o})=>{const r=n.a.useRef(),s=Object(g.h)(r),c=e=>o&&o(e);if(e.isFakePro&&!a.showProOptions)return null;const d=e.isFakePro?n.a.createElement(_,{label:e.label}):e.label,m=Object(l.a)("feed-options__spoiler",{"--fake-pro":e.isFakePro});return n.a.createElement(i.a,{ref:r,className:m,fitted:!0,label:d,isOpen:e.isOpen,onClick:()=>(e=>{e.isOpen=!e.isOpen,e.isOpen&&s()})(e)},e.fields.map((o,r)=>o.isFakePro&&!a.showProOptions?null:(e.isFakePro&&(o=Object.assign(Object.assign({},o),{isFakePro:!1,disabledWhen:()=>!0})),n.a.createElement(h,{key:r,field:o,feed:t,config:a,onChange:c}))))}),_=({label:e})=>n.a.createElement("div",null,n.a.createElement("div",{className:"feed-options__pro-pill"},n.a.createElement(p.a,null)),n.a.createElement("span",{className:"feed-options__pro-group-label"},e));a(551);const E=Object(r.b)(({feed:e,config:t,groups:a,onChange:o})=>{const r=e=>o&&o(e);return n.a.createElement("div",{className:"feed-options"},a.map((a,o)=>n.a.createElement(f,{key:o,feed:e,config:t,group:a,onChange:r})))})},158:function(e,t,a){e.exports={root:"MediaGridPicker__root",loading:"MediaGridPicker__loading layout__fill-parent",grid:"MediaGridPicker__grid","grid-disabled":"MediaGridPicker__grid-disabled MediaGridPicker__grid",gridDisabled:"MediaGridPicker__grid-disabled MediaGridPicker__grid",item:"MediaGridPicker__item"}},173:function(e,t,a){e.exports={root:"LayoutSelector__root","coming-soon":"LayoutSelector__coming-soon",comingSoon:"LayoutSelector__coming-soon",layout:"LayoutSelector__layout button__toggle-button","layout-selected":"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__toggle-button-on button__toggle-button",layoutSelected:"LayoutSelector__layout-selected LayoutSelector__layout button__toggle-button button__toggle-button-on button__toggle-button"}},177:function(e,t,a){e.exports={"moderate-sidebar":"ModerateSidebar__moderate-sidebar",moderateSidebar:"ModerateSidebar__moderate-sidebar",heading:"ModerateSidebar__heading",mode:"ModerateSidebar__mode","pro-pill":"ModerateSidebar__pro-pill",proPill:"ModerateSidebar__pro-pill",reset:"ModerateSidebar__reset"}},178:function(e,t,a){e.exports={item:"PromoteViewport__item",selected:"PromoteViewport__selected PromoteViewport__item",thumbnail:"PromoteViewport__thumbnail",unselected:"PromoteViewport__unselected PromoteViewport__item","promo-type-icon":"PromoteViewport__promo-type-icon",promoTypeIcon:"PromoteViewport__promo-type-icon"}},194:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var o=a(0),n=a.n(o),r=a(106),l=a.n(r),i=a(3),s=a(9),c=a(18);const d=({accounts:e,value:t,onChange:a})=>{const o=(t=null!=t?t:[]).filter(t=>e.some(e=>e.id===t)),r=new Set(o);return n.a.createElement("div",{className:l.a.root},e.map((e,t)=>n.a.createElement(m,{key:t,account:e,selected:r.has(e.id),onChange:t=>{return o=e.id,t?r.add(o):r.delete(o),void a(Array.from(r));var o}})))},m=({account:e,selected:t,onChange:a})=>{const o=`url("${i.b.getProfilePicUrl(e)}")`,r=()=>{a(!t)},d=Object(c.f)(r);return n.a.createElement("div",{className:l.a.row},n.a.createElement("div",{className:t?l.a.accountSelected:l.a.account,onClick:r,onKeyPress:d,role:"button",tabIndex:0},n.a.createElement("div",{className:l.a.profilePic,style:{backgroundImage:o}}),n.a.createElement("div",{className:l.a.infoColumn},n.a.createElement("div",{className:l.a.username},e.username),n.a.createElement("div",{className:l.a.accountType},e.type)),t&&n.a.createElement(s.a,{icon:"yes-alt",className:l.a.tickIcon})))}},195:function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var o=a(0),n=a.n(o),r=a(61),l=a.n(r),i=a(4),s=a(2),c=a(7),d=a(108),m=a(65);const u=Object(i.b)(({feed:e,config:t})=>{if(!c.a.Options.hasSources(e.options,!t.isPro))return n.a.createElement(m.a,{className:l.a.onboarding},n.a.createElement("div",null,n.a.createElement("h1",null,"Select an account to get"," ",n.a.createElement("span",{className:l.a.noBreak},"started"," "," →")),n.a.createElement("p",null,"Your Instagram posts will be displayed instantly so you can easily design your feed using"," ","the live interactive preview.")));const a=e.mode,o=a===s.a.Mode.DESKTOP,r=a===s.a.Mode.TABLET,i=a===s.a.Mode.PHONE,u=o?l.a.root:l.a.shrunkRoot,p=i?l.a.phoneSizer:r?l.a.tabletSizer:l.a.sizer;return n.a.createElement("div",{className:u},n.a.createElement("div",{className:l.a.statusBar},n.a.createElement("div",{className:l.a.statusIndicator},n.a.createElement("svg",{viewBox:"0 0 24 24"},n.a.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"red"})),n.a.createElement("span",null,"Live interactive preview"),n.a.createElement("span",null," — "),n.a.createElement("span",null,"Showing ",e.media.length," out of ",e.totalMedia," posts"),e.numLoadedMore>0&&n.a.createElement("span",{className:l.a.reset},"(",n.a.createElement("a",{onClick:()=>e.load()},"Reset"),")"))),n.a.createElement("div",{className:l.a.container},n.a.createElement("div",{className:p},0===e.media.length&&c.a.Options.hasSources(e.options)&&c.a.Options.isLimitingPosts(e.options)?n.a.createElement("div",{className:l.a.noPostsMsg},n.a.createElement("p",null,"There are no posts to show. Try relaxing your filters and moderation.")):n.a.createElement(d.a,{feed:e}))))})},198:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o=a(0),n=a.n(o),r=a(4),l=a(194),i=a(22);const s=Object(r.b)(e=>e.accounts.length>0?n.a.createElement(l.a,Object.assign({},e)):n.a.createElement(i.a,{type:i.b.WARNING},"Connect a business account to use this feature."))},199:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var o=a(0),n=a.n(o),r=a(70),l=a(7),i=a(151),s=a(22),c=(a(555),a(6)),d=a(9),m=a(340),u=a(5),p=a(8);const b=({value:e,onChange:t})=>{const a=(e=null!=e?e:[]).slice(),o=a.map(e=>({id:e.tag,tag:e.tag,sort:e.sort})),[r,l]=n.a.useState(""),[i,s]=n.a.useState(""),[c,d]=n.a.useState(null);return n.a.createElement("div",{className:"hashtag-selector"},n.a.createElement(m.a,{className:"hashtag-selector__list",list:o,setList:e=>{const o=e.map(e=>({tag:e.tag,sort:e.sort}));t&&!Object(u.c)(o,a,(e,t)=>e.tag===t.tag&&e.sort===t.sort)&&t(o)},handle:".hashtag-selector__drag-handle",animation:200,delay:1e3,fallbackTolerance:5,delayOnTouchOnly:!0},a.map((e,o)=>n.a.createElement(h,{key:o,disabled:null!==c&&c!==o,hashtag:e,onEdit:e=>((e,o)=>{a[e]=o,t&&t(a)})(o,e),onDelete:()=>(e=>{a.splice(e,1),t&&t(a)})(o),onStartEdit:()=>d(o),onStopEdit:()=>d(null)}))),n.a.createElement(_,{type:f.ADD,disabled:null!==c,hashtag:{tag:r,sort:i},onDone:e=>{a.push(e),t&&t(a),l(""),s("")}}))},h=({hashtag:e,disabled:t,onEdit:a,onDelete:o,onStartEdit:r,onStopEdit:l})=>{const[i,s]=n.a.useState(!1),c=()=>{s(!1),l&&l()};return i?n.a.createElement(_,{type:f.EDIT,disabled:t,hashtag:e,onDone:e=>{a&&a(e),c()},onCancel:c}):n.a.createElement(g,{hashtag:e,disabled:t,onEdit:()=>{s(!0),r&&r()},onDelete:o})},g=({hashtag:e,disabled:t,onEdit:a,onDelete:o})=>{const r=Object(p.a)("hashtag-selector__row",{"--static":!0,"--disabled":t});return n.a.createElement("div",{className:r},n.a.createElement("div",{className:"hashtag-selector__drag-handle"},n.a.createElement(d.a,{icon:"menu"})),n.a.createElement("div",{className:"hashtag-selector__tag"},l.a.HashtagSorting.get(e.sort)," posts with ",n.a.createElement("strong",null,"#",e.tag)),n.a.createElement("div",{className:"hashtag-selector__buttons"},n.a.createElement(c.a,{className:"hashtag-selector__edit-btn",type:c.c.PILL,onClick:a,tooltip:"Edit hashtag"},n.a.createElement(d.a,{icon:"edit"})),n.a.createElement(c.a,{className:"hashtag-selector__delete-btn",type:c.c.DANGER_PILL,onClick:o,tooltip:"Remove hashtag"},n.a.createElement(d.a,{icon:"trash"}))))};var f;!function(e){e[e.ADD=0]="ADD",e[e.EDIT=1]="EDIT"}(f||(f={}));const _=({type:e,hashtag:t,disabled:a,onChange:m,onDone:u,onCancel:b,focus:h})=>{const g=e===f.ADD,[_,E]=n.a.useState({tag:"",sort:"recent"});Object(o.useEffect)(()=>{var e;E({tag:null!==(e=t.tag)&&void 0!==e?e:"",sort:t.sort?t.sort:"recent"})},[t]);const[v,w]=n.a.useState(0),[k,y]=n.a.useState(!0);Object(o.useEffect)(()=>{if(y(!1),v>0){const e=setTimeout(()=>y(!0),10),t=setTimeout(()=>y(!1),310);return()=>{clearTimeout(e),clearTimeout(t)}}},[v]);const S=()=>{!v&&u&&u(_)},P=Object(p.a)("hashtag-selector__row",{"--disabled":a});return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:P},n.a.createElement("input",{className:"hashtag-selector__tag",type:"text",value:"#"+_.tag,onChange:e=>{const t=e.target.value.slice(1),a={tag:Object(i.b)(t),sort:_.sort};w(t!==a.tag?Date.now():0),E(a),m&&m(a)},onKeyDown:e=>{switch(e.key){case"Enter":S();break;case"Escape":b&&b()}},autoFocus:h}),n.a.createElement(r.a,{className:"hashtag-selector__sort",placeholder:"Sort by",value:_.sort,onChange:e=>{E({tag:_.tag,sort:e.value}),m&&m({tag:_.tag,sort:e.value})},isSearchable:!1,options:Array.from(l.a.HashtagSorting.entries()).map(([e,t])=>({value:e,label:t}))}),n.a.createElement("div",{className:"hashtag-selector__buttons"},g?n.a.createElement(c.a,{type:c.c.PRIMARY,className:"hashtag-selector__add-btn",tooltip:"Add new hashtag",onClick:S,disabled:0===_.tag.length},"Add"):n.a.createElement(c.a,{type:g?c.c.PRIMARY:c.c.PILL,className:"hashtag-selector__done-btn",tooltip:"Done",disabled:0===_.tag.length,onClick:S},n.a.createElement(d.a,{icon:"yes"})),!g&&n.a.createElement(c.a,{type:c.c.DANGER_PILL,className:"hashtag-selector__cancel-btn",onClick:b,tooltip:"Cancel changes"},n.a.createElement(d.a,{icon:"no"})))),v?n.a.createElement(s.a,{type:s.b.ERROR,shake:k,showIcon:!0,isDismissible:!0,onDismiss:()=>w(0)},"Hashtags may only contain letters, numbers and underscores"):null)}},200:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(177),l=a.n(r),i=a(4),s=a(94),c=a(7),d=a(69),m=a(331),u=a(22),p=a(83);t.a=Object(i.b)((function({feed:e,tab:t,onChange:a}){const[o,r]=n.a.useState(!1);function i(){r(!1)}const b=e.options.moderationMode===c.a.ModerationMode.WHITELIST;return n.a.createElement(s.a,null,n.a.createElement("div",{className:l.a.moderateSidebar},n.a.createElement("div",null,n.a.createElement("p",null,"You can choose to hide specific posts or to only show posts that you choose."),n.a.createElement("p",null,"Choose the type of moderation that you wish to apply, then simply click on the posts that you "," ","want to show or hide. Posts that appear in grey will not be shown in the feed."),n.a.createElement("hr",null),n.a.createElement("div",{className:l.a.mode},t.isFakePro&&n.a.createElement("div",{className:l.a.proPill},n.a.createElement(d.a,null)),n.a.createElement(m.a,{name:"manualFilterMode",value:e.options.moderationMode,onChange:function(o){t.isFakePro||a({moderationMode:o,moderation:e.options.moderation})},disabled:t.isFakePro,options:[{value:c.a.ModerationMode.BLACKLIST,label:"Hide the selected posts"},{value:c.a.ModerationMode.WHITELIST,label:"Only show the selected posts"}]})),(e.options.moderation.length>0||b)&&n.a.createElement("a",{className:l.a.reset,onClick:function(){r(!0)}},"Reset moderation")),!t.isFakePro&&n.a.createElement("div",null,n.a.createElement("hr",null),n.a.createElement(u.a,{type:u.b.PRO_TIP,showIcon:!0},n.a.createElement("span",null,n.a.createElement("strong",null,"Pro tip"),":"," ","You can navigate the posts using arrow keys and select them by pressing Enter."))),n.a.createElement(p.a,{isOpen:o,title:"Are you sure?",buttons:["Yes","No"],onAccept:function(){t.isFakePro||(i(),a({moderationMode:c.a.ModerationMode.BLACKLIST,moderation:[]}))},onCancel:i},n.a.createElement("p",null,"Are you sure you want to reset your moderation settings? This cannot be undone."))))}))},201:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(152);function l({feed:e,config:t,tab:a,onChange:o}){return n.a.createElement(r.a,{feed:e,config:t,groups:a.groups,onChange:o})}},202:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(115),l=a.n(r),i=a(7),s=a(203),c=a(90),d=a(4),m=a(76);t.a=Object(d.b)((function({feed:e,tab:t,onChange:a}){const[r,c]=n.a.useState([]),[d,p]=n.a.useState(!1),[b,h]=n.a.useState(0);Object(o.useEffect)(()=>{m.b.fetchMedia(e,()=>p(!0)).then(e=>{c(e),p(!1)})},[]);const g=n.a.useRef(),f=n.a.useRef(),_=new Set(e.options.moderation);function E(o){if(t.isFakePro)return;const n=new Set(e.options.moderation),l=r[o].id;n.has(l)?n.delete(l):n.add(l),h(o),a({moderation:Array.from(n).filter(e=>r.some(t=>t.id===e)),moderationMode:e.options.moderationMode})}const v=e.options.moderationMode===i.a.ModerationMode.BLACKLIST?l.a.moderateBlacklist:l.a.moderateWhitelist,w=t.isFakePro?l.a.gridDisabled:l.a.grid;return n.a.createElement("div",{className:v},n.a.createElement("div",{ref:g,className:w,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(t.isFakePro)return;const a=function(){const e=g.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),a=e.width,o=t.width;return Math.floor((a+15)/(o+15))}(),o=Math.ceil(r.length/a);switch(e.key){case" ":case"Enter":E(b);break;case"ArrowLeft":h(Math.max(b-1,0));break;case"ArrowRight":h(Math.min(b+1,r.length-1));break;case"ArrowUp":{const e=Math.max(0,b-a),t=Math.floor(b/a),n=Math.floor(e/a);o>1&&n!==t&&h(e);break}case"ArrowDown":{const e=Math.min(r.length-1,b+a),t=Math.floor(b/a),n=Math.floor(e/a);o>1&&n!==t&&h(e);break}default:return}e.preventDefault(),e.stopPropagation()}},r.map((e,a)=>n.a.createElement(u,{key:a,media:e,ref:0===a?f:null,selected:_.has(e.id),focused:!t.isFakePro&&b===a,onClick:()=>E(a),onFocus:()=>function(e){h(e)}(a)}))),d&&n.a.createElement("div",{className:l.a.loading},n.a.createElement(s.a,{size:60})))}));const u=n.a.forwardRef(({media:e,selected:t,focused:a,onClick:r,onFocus:i},s)=>{s||(s=n.a.useRef()),Object(o.useEffect)(()=>{a&&s.current.focus()},[a]);const d=t?l.a.itemSelected:l.a.itemUnselected;return n.a.createElement("div",{ref:s,className:d,tabIndex:0,onClick:r,onFocus:i},n.a.createElement(c.a,{media:e,className:l.a.itemThumbnail}))})},205:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(42),l=a.n(r),i=a(4),s=a(70),c=a(28),d=a(94),m=a(6),u=a(11),p=(a(14),a(7)),b=a(44),h=a(147),g=a(123),f=a(17),_=p.a.LinkBehavior;const E=[],v={linkType:"",postId:0,postTitle:"",postUrl:"",url:"",linkText:"",newTab:!1};function w({options:e,onChange:t,feed:a,media:r}){e=null!=e?e:v,e=Object.assign(Object.assign({},v),e),0===E.length&&(E.push({value:"",label:"- Do not link -"},{value:"url",label:"Custom URL"}),u.a.config.postTypes.forEach(e=>{"attachment"!==e.name&&E.push({value:e.name,label:e.labels.singular_name})}));const i=n.a.useRef(),c=n.a.useRef(),[d,m]=n.a.useState([]),[p,w]=n.a.useState(!1);Object(o.useEffect)(()=>{e.linkType&&"url"!==e.linkType&&(w(!0),k("").then(m).finally(()=>w(!1)))},[e.linkType]);const k=t=>(clearTimeout(i.current),new Promise(a=>{i.current=setTimeout(()=>{u.a.restApi.searchPosts(t,e.linkType).then(e=>{c.current=e.data,a(e.data.map(e=>({value:e.id,label:e.title})))}).catch(e=>{})},1e3)})),y=u.a.config.postTypes.find(t=>t.name===e.linkType),S=e.linkType&&a.options.lightboxShowSidebar&&(a.options.linkBehavior.desktop===_.LIGHTBOX||a.options.linkBehavior.tablet===_.LIGHTBOX||a.options.linkBehavior.phone===_.LIGHTBOX);return n.a.createElement(b.a,{label:"Link options",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-to"},"Link to")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{id:"sli-promo-link-to",value:e.linkType?e.linkType:"",onChange:function(a){t({linkType:a.value,postId:0,postTitle:"",postUrl:"",url:e.url,newTab:e.newTab,linkText:e.linkText})},options:E}))),"url"===e.linkType&&n.a.createElement("div",{className:l.a.rowVertical},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-url"},"URL")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-url",type:"text",value:e.url,onChange:function(a){t(Object.assign(Object.assign({},e),{url:a.currentTarget.value}))}}))),e.linkType&&"url"!==e.linkType&&n.a.createElement("div",{className:l.a.rowVertical},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-search-post"},y?"Search for a "+y.labels.singular_name:"Search")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{async:!0,cacheOptions:!0,key:r.id,id:"sli-promo-search-post",placeholder:"Select or start typing...",value:e.postId?e.postId:0,defaultValue:0,defaultInputValue:e.postId?e.postTitle:"",onChange:function(a){if(null===a)t(Object.assign(Object.assign({},e),{postId:0,postTitle:"",postUrl:""}));else{const o=c.current.find(e=>e.id==a.value);t(Object.assign(Object.assign({},e),{postId:a.value,postTitle:o.title,postUrl:o.permalink}))}},defaultOptions:d,loadOptions:k,noOptionsMessage:({inputValue:e})=>e.length?`No posts were found for "${e}"`:"Type to search for posts",loadingMessage:()=>"Searching...",isLoading:p,isSearchable:!0,isClearable:!0}))),e.linkType&&n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-new-tab"},"Open in a new tab")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-link-new-tab",type:"checkbox",checked:e.newTab,onChange:function(a){t(Object.assign(Object.assign({},e),{newTab:a.currentTarget.checked}))}}))),S&&n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-link-text"},"Popup box link text"),n.a.createElement(g.a,{maxWidth:300},n.a.createElement("p",null,"The text to use for the link in the popup box:"),n.a.createElement("img",{src:f.a.image("popup-link-text.png"),alt:""}))),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{id:"sli-promo-link-text",type:"text",value:e.linkText,onChange:function(a){t(Object.assign(Object.assign({},e),{linkText:a.target.value}))},placeholder:h.a.getDefaultLinkText(e)}))))}var k=a(22);const y=new Map([["link",{fields:w,tutorial:function({}){return n.a.createElement(b.a,{label:"Link promotion",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("p",{style:{fontWeight:"bold"}},"How it works:"),n.a.createElement("ol",{style:{marginTop:0}},n.a.createElement("li",null,"Select a post from the preview on the left."),n.a.createElement("li",null,"Choose what the post should link to.")),n.a.createElement("p",null,"That’s it!"))}}],["-more-",{fields:function({}){return n.a.createElement(b.a,{label:"Have your say...",fitted:!0,isOpen:!0,showIcon:!1},n.a.createElement("p",null,"Spotlight’s ‘Promote’ feature has lots more to come. Share your thoughts on what you’d like to"," ","promote and how."),n.a.createElement("p",null,"Take our 2-minute survey."),n.a.createElement("div",null,n.a.createElement(m.a,{type:m.c.PRIMARY,size:m.b.LARGE,onClick:function(){window.open(u.a.resources.promoTypesSurvey)}},"Start Survey")))}}]]),S={value:"link",label:"Link",component:w,isValid:()=>!1},P={linkType:"url",url:"https://your-promotion-url.com",linkText:"Check out my promotion"};t.a=Object(i.b)((function({feed:e,tab:t,onChange:a}){var r;const i=n.a.useRef(c.a.focusSidebar),u=n.a.useRef(),p=n.a.useRef(e.options.promotions.length?e.options.promotions[0].type:"link");Object(o.useEffect)(()=>{c.a.selectedIdx=null},[]),Object(o.useEffect)(()=>{u.current&&c.a.focusSidebar>i.current&&(i.current=c.a.focusSidebar,u.current.focus())},[c.a.focusSidebar]);const b=n.a.useCallback(o=>{if(t.isFakePro)return;p.current=o.value;const n={};Object.entries(e.options.promotions).forEach(([e,t])=>{n[e]={type:o.value,data:t.data}}),a({promotions:n})},[t,e.options.promotions]),h=n.a.useCallback(e=>{a({promotionEnabled:e.target.checked})},[]),g=n.a.useCallback(o=>{t.isFakePro||a({promotions:Object.assign(Object.assign({},e.options.promotions),{[c.a.selectedMedia.id]:{type:p.current,data:o}})})},[t.isFakePro]),f=n.a.useCallback(()=>g({}),[]),_=c.a.selectedIdx>=c.a.mediaStore.media.length-1,E=c.a.selectedMedia;let v,w;t.isFakePro?(v=S,w=P):(w=E?c.a.getMediaPromo(E,e)[0]:{},v=c.a.types.find(e=>e.value===p.current));const C=n.a.createElement("div",{className:l.a.top},n.a.createElement("p",null,"Promote your blog posts, landing pages, products, and much more through your Instagram feed."," ","Start by selecting the promotion type for this feed."),n.a.createElement("hr",null),n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-enable-promo"},"Enable promotion")),n.a.createElement("div",{className:l.a.field},n.a.createElement("input",{type:"checkbox",value:"1",checked:e.options.promotionEnabled,onChange:h}))),!e.options.promotionEnabled&&n.a.createElement(k.a,{type:k.b.WARNING,showIcon:!0},"Promotion is now disabled. You may still add and edit promotions."," ","They will remain saved but will not apply."),n.a.createElement("div",{className:l.a.rowHorizontal},n.a.createElement("div",{className:l.a.label},n.a.createElement("label",{htmlFor:"sli-promo-type"},"Promotion type")),n.a.createElement("div",{className:l.a.field},n.a.createElement(s.a,{id:"sli-promo-type",ref:u,value:p.current,onChange:b,options:c.a.types,disabled:t.isFakePro})))),O=null!==(r=y.get(v.value))&&void 0!==r?r:{fields:void 0};return n.a.createElement(d.a,null,C,O.fields&&(E&&v||"-more-"===v.value)&&n.a.createElement(O.fields,{feed:e,media:E,options:w,onChange:g}),O.tutorial&&!E&&n.a.createElement(O.tutorial),n.a.createElement("div",{className:l.a.bottom},E&&"-more-"!==v.value&&n.a.createElement(m.a,{size:m.b.LARGE,type:m.c.SECONDARY,onClick:()=>!t.isFakePro&&c.a.nextPost(),disabled:_},"Promote next post →"),v.isValid(E,w)&&n.a.createElement("a",{className:l.a.removePromo,onClick:f},"Remove promotion")),t.isFakePro&&n.a.createElement("div",{className:l.a.disabledOverlay}))}))},207:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(178),l=a.n(r),i=a(158),s=a.n(i),c=a(4),d=a(203),m=a(18),u=Object(c.b)((function({feed:e,store:t,selected:a,disabled:r,autoFocusFirst:l,onClickMedia:i,onSelectMedia:c,children:u}){r=null!=r&&r,l=null!=l&&l;const[b,h]=n.a.useState([]),[g,f]=n.a.useState(!0),[_,E,v]=Object(m.e)(a),w=n.a.useRef(),k=n.a.useRef(),y=n.a.useRef();Object(o.useEffect)(()=>{v(a)},[a]),Object(o.useEffect)(()=>{t.fetchMedia(e).then(e=>{h(e),f(!1),e.length>0&&l&&c&&c(e[0],0)})},[]);const S=e=>{null===E()||e.target!==w.current&&e.target!==k.current||P(null)};function P(e){r||(C(e),i&&i(b[e],e))}function C(e){e===E()||r||(c&&c(b[e],e),v(e))}Object(o.useEffect)(()=>{if(w.current)return w.current.addEventListener("click",S),()=>w.current.removeEventListener("click",S)},[w.current]);const O=r?s.a.gridDisabled:s.a.grid;return n.a.createElement("div",{ref:w,className:s.a.root},n.a.createElement("div",{ref:k,className:O,style:{gridGap:15},tabIndex:0,onKeyDown:function(e){if(r)return;const t=E(),a=function(){const e=k.current.getBoundingClientRect(),t=y.current.getBoundingClientRect(),a=e.width,o=t.width;return Math.floor((a+15)/(o+15))}(),o=Math.ceil(b.length/a);switch(e.key){case" ":case"Enter":P(t);break;case"ArrowLeft":C(Math.max(t-1,0));break;case"ArrowRight":C(Math.min(t+1,b.length-1));break;case"ArrowUp":{const e=Math.max(0,t-a),n=Math.floor(t/a),r=Math.floor(e/a);o>1&&r!==n&&C(e);break}case"ArrowDown":{const e=Math.min(b.length-1,t+a),n=Math.floor(t/a),r=Math.floor(e/a);o>1&&r!==n&&C(e);break}default:return}e.preventDefault(),e.stopPropagation()}},b.map((e,t)=>n.a.createElement(p,{key:e.id,ref:0===t?y:null,focused:!r&&_===t,onClick:()=>P(t),onFocus:()=>C(t)},u(e,t)))),g&&n.a.createElement("div",{className:s.a.loading},n.a.createElement(d.a,{size:60})))}));const p=n.a.forwardRef(({focused:e,onClick:t,onFocus:a,children:r},l)=>(l||(l=n.a.useRef()),Object(o.useEffect)(()=>{e&&l.current.focus()},[e]),n.a.createElement("div",{ref:l,className:s.a.item,onClick:t,onFocus:a,tabIndex:0},r)));var b=a(90),h=a(28),g=a(9);t.a=Object(c.b)((function({feed:e,tab:t}){return n.a.createElement(u,{feed:e,store:h.a.mediaStore,selected:h.a.selectedIdx,onSelectMedia:function(e,t){h.a.selectedIdx=t},onClickMedia:function(){h.a.focusSidebar++},disabled:t.isFakePro},(t,a)=>n.a.createElement(f,{media:t,idx:a,feed:e}))}));const f=Object(c.b)(({media:e,idx:t,feed:a})=>{const o=h.a.selectedIdx===t?l.a.selected:l.a.unselected,[r,i]=h.a.getMediaPromo(e,a),s=i&&i.isValid(e,r)&&i.getIcon?i.getIcon(e,r):void 0;return n.a.createElement("div",{className:o},n.a.createElement("div",{className:l.a.thumbnail},n.a.createElement(b.a,{media:e})),s&&n.a.createElement(g.a,{className:l.a.promoTypeIcon,icon:s}))})},241:function(e,t,a){e.exports={"connect-button":"ConnectSidebar__connect-button",connectButton:"ConnectSidebar__connect-button","connect-sidebar":"ConnectSidebar__connect-sidebar",connectSidebar:"ConnectSidebar__connect-sidebar","connect-account":"ConnectSidebar__connect-account",connectAccount:"ConnectSidebar__connect-account"}},320:function(e,t,a){e.exports={sidebar:"DesignSidebar__sidebar","preview-options":"DesignSidebar__preview-options",previewOptions:"DesignSidebar__preview-options"}},321:function(e,t,a){e.exports={sidebar:"Sidebar__sidebar"}},332:function(e,t,a){"use strict";var o=a(0),n=a.n(o),r=a(81),l=a.n(r),i=a(4),s=a(246),c=a(6),d=a(124),m=a(333),u=a(334),p=a(335),b=a(9),h=a(7),g=a(195),f=a(69),_=a(127);t.a=Object(i.b)((function({children:e,config:t,feedOptions:a,onChange:r}){const i=n.a.useRef(new h.a(a)),[d,m]=n.a.useState(!0);Object(o.useEffect)(()=>{i.current.load()},[]),Object(o.useEffect)(()=>{i.current.options=a},[a]);const u=n.a.useCallback(e=>{t.currTab=e},[t]),p=n.a.useCallback(()=>{m(e=>!e)},[]),f=i.current,v=t.tabs.find(e=>e.key===t.currTab),w=n.a.useMemo(()=>v.sidebar?n.a.createElement(v.sidebar,{feed:f,config:t,tab:v,onChange:r}):null,[v]),k=n.a.useMemo(()=>v.viewport?n.a.createElement(v.viewport,{feed:f,tab:v,onChange:r,config:t}):n.a.createElement(g.a,{feed:f,tab:v,onChange:r,config:t}),[v]),y=!v.showSidebar||!w||v.showSidebar(t),S=n.a.useCallback(e=>{const t=e<=_.a.Sizes.MEDIUM,a=e<=_.a.Sizes.MEDIUM,o=t?d?l.a.sidebarDrawer:l.a.sidebarDrawerClosed:l.a.sidebar;return n.a.createElement("div",{className:l.a.content},y&&n.a.createElement("div",{className:o},a&&n.a.createElement("div",{className:l.a.sidebarHeader},v.label),w),n.a.createElement("div",{className:l.a.viewport},k),y&&t&&n.a.createElement("div",{className:l.a.sidebarDrawerContainer},n.a.createElement(c.a,{className:l.a.sidebarToggleButton,type:c.c.TOGGLE,active:d,onClick:p},n.a.createElement(b.a,{icon:"menu-alt"}))))},[v,y]);return n.a.createElement("div",{className:l.a.root},n.a.createElement(E,{config:t,onChangeTab:u,hasSources:h.a.Options.hasSources(f.options)},e),n.a.createElement(s.a,{breakpoints:_.a.Sizes.ALL},S))}));const E=Object(i.b)(({hasSources:e,config:t,onChangeTab:a,children:o})=>{const r=(t.showProOptions?t.tabs:t.tabs.filter(e=>!e.isFakePro)).map(t=>({key:t.key,label:t.isFakePro?n.a.createElement("span",{className:l.a.navbarProTab},n.a.createElement(f.a,{className:l.a.navbarProPill}),n.a.createElement("span",null,t.label)):n.a.createElement("span",null,t.label),disabled:!t.alwaysEnabled&&!e})),i=t.currTab;return n.a.createElement("div",{className:l.a.navbar},n.a.createElement(s.a,{breakpoints:_.a.Sizes.ALL},e=>{let{nameField:t,saveBtn:l,cancelBtn:s}=o(e);if(e<=_.a.Sizes.SMALL)return n.a.createElement(p.a,{steps:r,current:i,onChangeStep:a,firstStep:s,lastStep:l},t);if(e<=_.a.Sizes.MEDIUM)return n.a.createElement(m.a,{pages:r,current:i,onChangePage:a,hideMenuArrow:!0,showNavArrows:!0},{path:t?[t]:[],right:[s,l]});let c=[n.a.createElement(d.a,{key:"logo"})];return e>_.a.Sizes.WIDE&&c.push(n.a.createElement("span",{key:"page"},"Feeds")),t&&c.push(t),n.a.createElement(u.a,{current:i,onClickTab:a},{path:c,tabs:r,right:[s,l]})}))})},336:function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var o=a(0),n=a.n(o),r=a(116),l=a.n(r),i=a(11),s=a(22),c=a(44),d=a(196),m=a(6),u=a(17),p=a(27),b=a(94);function h({store:e}){const t=`[instagram feed="${e.feed.id}"]`,a=i.a.config.adminUrl+"/widgets.php",o=i.a.config.adminUrl+"/customize.php?autofocus%5Bpanel%5D=widgets";return e.feed.id?n.a.createElement(b.a,null,n.a.createElement("div",{className:l.a.embedSidebar},e.feed.usages.length>0&&n.a.createElement(c.a,{label:"Instances",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",{className:l.a.instances},n.a.createElement("p",null,"This feed is currently being shown in these pages:"),n.a.createElement("ul",null,e.feed.usages.map((e,t)=>n.a.createElement("li",{key:t},n.a.createElement("a",{href:`${i.a.config.adminUrl}/post.php?action=edit&post=${e.id}`,target:"_blank"},e.name),n.a.createElement("span",null,"(",e.type,")")))))),n.a.createElement(c.a,{label:"Shortcode",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"Copy the shortcode below and paste it in any page or post to embed this feed:"),n.a.createElement("div",{className:l.a.shortcode},n.a.createElement("code",null,t),n.a.createElement(d.a,{feed:e.feed,toaster:e.toaster},n.a.createElement(m.a,{type:m.c.SECONDARY},"Copy"))))),n.a.createElement(c.a,{label:"WordPress Block",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"To embed the feed in the WordPress block editor, search for the"," ",n.a.createElement("b",null,"Spotlight Instagram feed")," block and add it to your post or page."),p.a.list.length>1?n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"Next, choose ",n.a.createElement("strong",null,e.feed.label)," from the list of feeds."),n.a.createElement(f,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block-select.png",alt:"Choosing a feed for the block"},{src:"wp-block.png",alt:"The feed in a block"}]})):n.a.createElement(n.a.Fragment,null,n.a.createElement("p",null,"Since this is your only feed, Spotlight will automatically show this feed."),n.a.createElement(f,{images:[{src:"wp-block-search.png",alt:"Searching for the block"},{src:"wp-block.png",alt:"The feed in a block"}]})))),n.a.createElement(c.a,{label:"Widget",isOpen:!0,showIcon:!1,fitted:!0},n.a.createElement("div",null,n.a.createElement("p",null,"To embed this feed in a widget, go to the"," ",n.a.createElement("a",{href:a,target:"_blank"},"Appearance » Widgets")," page or the"," ",n.a.createElement("a",{href:o,target:"_blank"},"Widgets section of the Customizer"),", add"," ","a ",n.a.createElement("strong",null,"Spotlight Instagram Feed")," widget and choose"," ",n.a.createElement("strong",null,e.feed.name)," as the feed to be shown."),n.a.createElement(g,{img:"widget.png",alt:"Example of a widget"}))))):n.a.createElement(b.a,null,n.a.createElement("div",{className:l.a.embedSidebar},n.a.createElement("div",{className:l.a.saveMessage},n.a.createElement(s.a,{type:s.b.INFO,showIcon:!0},"You're almost there... Click the ",n.a.createElement("strong",null,"Save")," button at the top-right to be able"," ","to embed this feed on your site!"))))}function g({img:e,alt:t,annotation:a}){return n.a.createElement("figure",{className:l.a.example},n.a.createElement("figcaption",{className:l.a.caption},"Example:"),n.a.createElement("img",{src:u.a.image(e),alt:null!=t?t:""}),void 0!==a&&n.a.createElement("div",{className:l.a.exampleAnnotation},a))}function f({images:e}){const[t,a]=n.a.useState(0),r=()=>a(t=>(t+1)%e.length);Object(o.useEffect)(()=>{const e=setInterval(r,2e3);return()=>clearInterval(e)},[]);const l=e[t];return n.a.createElement(g,{img:l.src,alt:l.alt,annotation:t+1})}},42:function(e,t,a){e.exports={bottom:"PromoteSidebar__bottom",top:"PromoteSidebar__top",row:"PromoteSidebar__row","row-horizontal":"PromoteSidebar__row-horizontal PromoteSidebar__row",rowHorizontal:"PromoteSidebar__row-horizontal PromoteSidebar__row",label:"PromoteSidebar__label","row-vertical":"PromoteSidebar__row-vertical PromoteSidebar__row",rowVertical:"PromoteSidebar__row-vertical PromoteSidebar__row",field:"PromoteSidebar__field","remove-promo":"PromoteSidebar__remove-promo",removePromo:"PromoteSidebar__remove-promo","disabled-overlay":"PromoteSidebar__disabled-overlay",disabledOverlay:"PromoteSidebar__disabled-overlay"}},50:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(317);const l=({min:e,emptyMin:t,placeholder:a,id:o,value:l,onChange:i,unit:s})=>{e=null!=e?e:0,a=null!=a?a:"",t=null!=t&&t;const c=n.a.useCallback(t=>{const a=t.target.value,o=parseInt(a),n=isNaN(o)?a:Math.max(e,o);i&&i(n)},[e,i]),d=n.a.useCallback(()=>{t&&l<=e&&i&&i("")},[t,l,e,i]),m=n.a.useCallback(a=>{"ArrowUp"===a.key&&""===l&&i&&i(t?e+1:e)},[l,e,t,i]),u=t&&l<=e?"":l;return s?n.a.createElement(r.a,{id:o,type:"number",unit:s,value:u,min:e,placeholder:a,onChange:c,onBlur:d,onKeyDown:m}):n.a.createElement("input",{id:o,type:"number",value:u,min:e,placeholder:a,onChange:c,onBlur:d,onKeyDown:m})}},549:function(e,t,a){},55:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(4),l=(a(272),a(318));const i=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement(l.a,{id:e,value:t,onChange:e=>a(e.rgb)}))},550:function(e,t,a){},551:function(e,t,a){},555:function(e,t,a){},60:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(4);a(307);const l=Object(r.b)(({id:e,value:t,onChange:a,disabled:o})=>n.a.createElement("div",{className:"checkbox-field"},n.a.createElement("div",{className:"checkbox-field__aligner"},n.a.createElement("input",{id:e,type:"checkbox",value:"1",checked:t,onChange:e=>a(e.target.checked),disabled:o}))))},61:function(e,t,a){e.exports={root:"FeedPreview__root","shrunk-root":"FeedPreview__shrunk-root FeedPreview__root",shrunkRoot:"FeedPreview__shrunk-root FeedPreview__root","status-bar":"FeedPreview__status-bar",statusBar:"FeedPreview__status-bar","status-indicator":"FeedPreview__status-indicator",statusIndicator:"FeedPreview__status-indicator",reset:"FeedPreview__reset",container:"FeedPreview__container","no-posts-msg":"FeedPreview__no-posts-msg",noPostsMsg:"FeedPreview__no-posts-msg",indicators:"FeedPreview__indicators","waiting-indicator":"FeedPreview__waiting-indicator",waitingIndicator:"FeedPreview__waiting-indicator","loading-indicator":"FeedPreview__loading-indicator",loadingIndicator:"FeedPreview__loading-indicator",sizer:"FeedPreview__sizer","shrunk-sizer":"FeedPreview__shrunk-sizer FeedPreview__sizer",shrunkSizer:"FeedPreview__shrunk-sizer FeedPreview__sizer","tablet-sizer":"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",tabletSizer:"FeedPreview__tablet-sizer FeedPreview__shrunk-sizer FeedPreview__sizer","phone-sizer":"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",phoneSizer:"FeedPreview__phone-sizer FeedPreview__shrunk-sizer FeedPreview__sizer",onboarding:"FeedPreview__onboarding","no-break":"FeedPreview__no-break",noBreak:"FeedPreview__no-break",controls:"FeedPreview__controls",control:"FeedPreview__control","control-label":"FeedPreview__control-label",controlLabel:"FeedPreview__control-label","indicator-animation":"FeedPreview__indicator-animation",indicatorAnimation:"FeedPreview__indicator-animation","loading-animation":"FeedPreview__loading-animation",loadingAnimation:"FeedPreview__loading-animation"}},81:function(e,t,a){e.exports={root:"FeedEditor__root",navbar:"FeedEditor__navbar layout__z-high",hidden:"FeedEditor__hidden",content:"FeedEditor__content",viewport:"FeedEditor__viewport",sidebar:"FeedEditor__sidebar","sidebar-drawer-container":"FeedEditor__sidebar-drawer-container",sidebarDrawerContainer:"FeedEditor__sidebar-drawer-container","sidebar-drawer":"FeedEditor__sidebar-drawer FeedEditor__sidebar",sidebarDrawer:"FeedEditor__sidebar-drawer FeedEditor__sidebar","sidebar-drawer-closed":"FeedEditor__sidebar-drawer-closed FeedEditor__sidebar-drawer FeedEditor__sidebar",sidebarDrawerClosed:"FeedEditor__sidebar-drawer-closed FeedEditor__sidebar-drawer FeedEditor__sidebar","sidebar-toggle-button":"FeedEditor__sidebar-toggle-button",sidebarToggleButton:"FeedEditor__sidebar-toggle-button","sidebar-header":"FeedEditor__sidebar-header",sidebarHeader:"FeedEditor__sidebar-header","navbar-pro-tab":"FeedEditor__navbar-pro-tab",navbarProTab:"FeedEditor__navbar-pro-tab","navbar-pro-pill":"FeedEditor__navbar-pro-pill",navbarProPill:"FeedEditor__navbar-pro-pill"}},94:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var o=a(0),n=a.n(o),r=a(321),l=a.n(r);function i({children:e}){return n.a.createElement("div",{className:l.a.sidebar},e)}},96:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var o=a(0),n=a.n(o),r=a(70);const l=({value:e,options:t,onChange:a,id:o})=>{t.length>0&&!t.some(t=>t.value===e)&&(e=t[0].value);const l=n.a.useCallback(e=>{a(e.value)},[a]);return n.a.createElement(r.a,{id:o,value:e,onChange:l,options:t})}},98:function(e,t,a){"use strict";a.d(t,"c",(function(){return K})),a.d(t,"a",(function(){return q}));var o=a(0),n=a.n(o),r=a(4),l=a(3),i=a(194),s=a(173),c=a.n(s),d=a(11),m=a(18),u=a(50),p=a(2),b=a(96),h=a(7),g=a(55),f=a(69),_=a(8);a(548);const E=Object(r.b)(({id:e,value:t,onChange:a,config:o,options:r})=>{const l=new Set(t),i=e=>{const t=e.target.value,o=e.target.checked,n=r.find(e=>e.value===t);n.isFakePro||n.isDisabled||(o?l.add(t):l.delete(t),a(Array.from(l)))};return n.a.createElement("div",{className:"checkbox-list"},r.filter(e=>!!e).map((t,a)=>{if(t.isFakePro&&!o.showProOptions)return null;const r=Object(_.a)("checkbox-list__option",{"--disabled":t.isDisabled||t.isFakePro});return n.a.createElement("label",{className:r,key:a},n.a.createElement("input",{type:"checkbox",id:e,value:t.value,checked:l.has(t.value),onChange:i,disabled:t.isDisabled||t.isFakePro}),n.a.createElement("span",null,t.label),t.isFakePro&&n.a.createElement("div",{className:"checkbox-list__pro-pill"},n.a.createElement(f.a,null)))}))});var v=a(60);const w=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement("textarea",{id:e,value:t,onChange:e=>a(e.target.value)}));a(307);const k=Object(r.b)(({id:e,value:t,onChange:a})=>n.a.createElement("input",{id:e,type:"text",value:t,onChange:e=>a(e.target.value)}));var y=a(48),S=a(121),P=a(6);a(549);var C=a(26),O=a(22),N=a(320),M=a.n(N),F=a(94),T=a(61),I=a.n(T),x=a(240),A=a(9);const L=Object(r.b)(({feed:e,config:t,onChangeMode:a})=>n.a.createElement("div",{className:I.a.controls},n.a.createElement("div",{className:I.a.control},n.a.createElement("span",{className:I.a.controlLabel},"Preview device"),n.a.createElement(x.a,null,p.a.MODES.map((t,o)=>n.a.createElement(P.a,{key:o,type:P.c.TOGGLE,onClick:()=>(e=>a&&a(e))(t),active:e.mode===t,tooltip:t.name},n.a.createElement(A.a,{icon:t.icon}))))),!t.isPro&&n.a.createElement("div",{className:I.a.control},n.a.createElement("span",{className:I.a.controlLabel},"PRO features",n.a.createElement("span",null," ","—"," ",n.a.createElement("a",{href:d.a.resources.upgradeLocalUrl,target:"_blank"},"Upgrade now"))),n.a.createElement(x.a,null,n.a.createElement(P.a,{type:P.c.TOGGLE,active:t.showProOptions,onClick:()=>t.showProOptions=!0,tooltip:"Show PRO features"},"Show"),n.a.createElement(P.a,{type:P.c.TOGGLE,active:!t.showProOptions,onClick:()=>t.showProOptions=!1,tooltip:"Hide PRO features"},"Hide")))));var R=a(152),j=a(241),D=a.n(j),B=a(125),z=a(122),H=a(65),V=a(195),W=h.a.HeaderInfo,G=h.a.FollowBtnLocation;const U=e=>{var t;return e.feed.mode===p.a.Mode.DESKTOP?n.a.createElement(u.a,Object.assign({},e,{placeholder:null!==(t=e.placeholder)&&void 0!==t?t:""})):n.a.createElement(u.a,Object.assign({},e,{placeholder:"Default"}))},K=e=>!p.a.get(e.options.showHeader,e.mode,!0)||J(e),Y=e=>t=>{const a=p.a.get(t.options.headerInfo,t.mode,!0);return K(t)||!Array.isArray(a)||!a.includes(e)},X=e=>!p.a.get(e.options.showFollowBtn,e.mode,!0)||J(e),$=e=>!p.a.get(e.options.showLoadMoreBtn,e.mode,!0),J=e=>0===e.options.accounts.length&&0===e.options.tagged.length&&e.options.hashtags.length>0;var q;!function(e){e.CONNECT="connect",e.DESIGN="design"}(q||(q={}));const Q=[{key:q.CONNECT,label:"Connect",sidebar:function({feed:e,config:t,tab:a,onChange:o}){return l.b.hasAccounts()?n.a.createElement(F.a,null,n.a.createElement("div",{className:D.a.connectSidebar},n.a.createElement("div",{className:D.a.connectButton},n.a.createElement(B.a,{onConnect:t=>{e.options.accounts.push(t),o&&o(e.options)}})),n.a.createElement(R.a,{feed:e,config:t,groups:a.groups,onChange:o}))):null},viewport:function(e){const{feed:t,config:a,onChange:o}=e,[r,i]=n.a.useState(!1);return l.b.hasAccounts()?n.a.createElement(V.a,Object.assign({},e)):n.a.createElement(z.a,{beforeConnect:e=>{(e=>{t.options.accounts.push(e),o&&o(t.options)})(e),i(!0),setTimeout(()=>{a.currTab="design"},H.a.TRANSITION_DURATION)},onConnect:()=>t.load(),isTransitioning:r})},showSidebar:()=>l.b.hasAccounts(),alwaysEnabled:!0,groups:[{id:"accounts",label:"Show posts from these accounts",isOpen:!0,fields:[{option:"accounts",component:i.a,props:()=>({accounts:l.b.list})}]}]},{key:q.DESIGN,label:"Design",sidebar:function({feed:e,config:t,tab:a,onChange:o}){let r=a.groups;return p.a.get(e.options.linkBehavior,e.mode,!0)!==h.a.LinkBehavior.LIGHTBOX&&(r=r.filter(({id:e})=>"lightbox"!==e)),n.a.createElement(F.a,null,n.a.createElement("div",{className:M.a.previewOptions},n.a.createElement(L,{feed:e,config:t,onChangeMode:t=>e.mode=t})),n.a.createElement(R.a,{feed:e,config:t,groups:r,onChange:o}))},groups:[{id:"layout",label:"Layout",isOpen:!0,fields:[{option:"layout",hideLabel:!0,component:({layouts:e,value:t,onChange:a,showUpgrade:o})=>n.a.createElement("div",{className:c.a.root},e.map((e,o)=>{const r=e.id===t?c.a.layoutSelected:c.a.layout,l=()=>a(e.id),i=Object(m.f)(l);return n.a.createElement("div",{key:o,className:r,role:"button",tabIndex:0,onClick:l,onKeyPress:i},e.name,e.img&&n.a.createElement("img",{src:e.img,alt:e.name}))}),o&&n.a.createElement("div",{className:c.a.comingSoon},n.a.createElement("span",null,"More layouts available in PRO!"),n.a.createElement("br",null),n.a.createElement("a",{href:d.a.resources.upgradeLocalUrl,target:"_blank"},"Upgrade now!"))),props:()=>({layouts:C.a.list,showUpgrade:!0})}]},{id:"feed",label:"Feed",isOpen:!0,fields:[{option:"numPosts",label:"Number of posts",isResponsive:!0,component:U,props:()=>({min:1,placeholder:"1 post"})},{option:"numColumns",label:"Number of columns",isResponsive:!0,component:(Z={desktop:Object(y.a)(u.a,{min:1,placeholder:"1"}),tablet:Object(y.a)(u.a,{min:"0",emptyMin:!0,placeholder:"Default"}),phone:Object(y.a)(u.a,{min:"0",emptyMin:!0,placeholder:"Default"})},e=>Z.tablet&&e.feed.mode===p.a.Mode.TABLET?n.a.createElement(Z.tablet,e):Z.phone&&e.feed.mode===p.a.Mode.PHONE?n.a.createElement(Z.phone,e):n.a.createElement(Z.desktop,e))},{option:"postOrder",label:"Post order",component:b.a,props:()=>({options:[{value:h.a.PostOrder.DATE_DESC,label:"Most recent first"},{value:h.a.PostOrder.DATE_ASC,label:"Oldest first"},{value:h.a.PostOrder.POPULARITY_DESC,label:"Most popular first"},{value:h.a.PostOrder.POPULARITY_ASC,label:"Least popular first"},{value:h.a.PostOrder.RANDOM,label:"Random"}]})},{option:"linkBehavior",label:"Open posts in",isResponsive:!0,component:b.a,props:()=>({options:[{value:h.a.LinkBehavior.NOTHING,label:"- Do not open -"},{value:h.a.LinkBehavior.SELF,label:"Same tab"},{value:h.a.LinkBehavior.NEW_TAB,label:"New tab"},{value:h.a.LinkBehavior.LIGHTBOX,label:"Popup box"}]})}]},{id:"appearance",label:"Appearance",fields:[{option:"feedWidth",label:"Feed width",isResponsive:!0,component:u.a,props:()=>({unit:"px",min:0,emptyMin:!0,placeholder:"Auto"})},{option:"feedHeight",label:"Feed height",isResponsive:!0,component:u.a,props:()=>({unit:"px",min:0,emptyMin:!0,placeholder:"Auto"})},{option:"feedPadding",label:"Outside padding",isResponsive:!0,component:U,props:()=>({unit:"px",min:0,placeholder:"No padding"})},{option:"imgPadding",label:"Image padding",isResponsive:!0,component:U,props:()=>({unit:"px",min:0,placeholder:"No padding"})},{option:"textSize",label:"Text size",isResponsive:!0,component:u.a,help:()=>n.a.createElement("span",null,'If left empty, the text size will be controlled by your theme. This option will be ignored for the header if the "Text size" option in the "Header" section is not empty.'),props:()=>({unit:"px",min:0,placeholder:"Theme default"})},{option:"bgColor",label:"Background color",component:g.a},{option:"hoverInfo",label:"Show on hover",help:()=>n.a.createElement("p",null,"Likes and comments icons are not available for Personal accounts, due to restrictions set by Instagram."),component:E,props:()=>({options:[{value:h.a.HoverInfo.LIKES_COMMENTS,label:"Likes & comments icons"},{value:h.a.HoverInfo.INSTA_LINK,label:"Instagram icon/link"}]})}]},{id:"header",label:"Header",fields:[{id:"headerHashtagMsg",label:"",hideLabel:!0,isResponsive:!1,component:Object(r.b)(({feed:e})=>J(e)&&n.a.createElement(O.a,{type:O.b.INFO,showIcon:!0,shake:!0},"The header is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to show in the header."))},{option:"showHeader",label:"Show header",isResponsive:!0,component:v.a,disabledWhen:J},{option:"headerAccount",label:"Account to show",disabledWhen:(e,t)=>!t.showHeader||t.allAccounts.length<2,component:b.a,props:(e,t)=>({value:t.account?t.account.id:"",options:t.allAccounts.map(e=>({value:e,label:l.b.getById(e).username}))})},{option:"headerInfo",label:"Show",isResponsive:!0,disabledWhen:K,component:E,props:()=>({options:[{value:h.a.HeaderInfo.PROFILE_PIC,label:"Profile photo"},{value:h.a.HeaderInfo.BIO,label:"Profile bio text"}]})},{option:"headerPhotoSize",label:"Profile photo size",isResponsive:!0,disabledWhen:Y(W.PROFILE_PIC),component:U,props:()=>({min:0,unit:"px"})},{option:"customProfilePic",label:"Custom profile photo",disabledWhen:Y(W.PROFILE_PIC),component:({id:e,title:t,mediaType:a,button:o,buttonSet:r,buttonChange:l,value:i,onChange:s})=>{r=void 0===o?r:o,l=void 0===o?l:o;const c=!!i,d=c?l:r,m=()=>{s&&s("")};return n.a.createElement(S.a,{id:e,title:t,mediaType:a,button:d,value:i,onSelect:e=>{s&&s(e.attributes.url)}},({open:e})=>n.a.createElement("div",{className:"wp-media-field"},c&&n.a.createElement("div",{className:"wp-media-field__preview",tabIndex:0,onClick:e,role:"button"},n.a.createElement("img",{src:i,alt:"Custom profile picture"})),n.a.createElement(P.a,{className:"wp-media-field__select-btn",type:P.c.SECONDARY,onClick:e},d),c&&n.a.createElement(P.a,{className:"wp-media-field__remove-btn",type:P.c.DANGER_LINK,onClick:m},"Remove custom photo")))},props:()=>({title:"Select custom profile photo",buttonSet:"Choose custom photo",buttonChange:"Change custom photo",mediaType:"image"}),help:()=>n.a.createElement("p",null,"Add a custom profile photo just for this feed. It will override the original"," ","profile photo from Instagram and any custom profile photo added in Spotlight.")},{option:"customBioText",label:"Custom bio",disabledWhen:Y(W.BIO),component:w,help:()=>n.a.createElement("p",null,"Add a custom bio text just for this feed. It will override the original custom bio"," ","text from Instagram and any custom bio text added in Spotlight.")},{option:"headerTextSize",label:"Header text size",isResponsive:!0,disabledWhen:K,component:u.a,help:()=>n.a.createElement("span",null,'If left empty, the "Text size" option in the "Appearance" section will control the header\'s text size.'),props:()=>({min:0,unit:"px",placeholder:"Default",emptyMin:!0})},{option:"headerTextColor",label:"Header text color",disabledWhen:K,component:g.a},{option:"headerBgColor",label:"Header background color",disabledWhen:K,component:g.a},{option:"headerPadding",label:"Header padding",isResponsive:!0,disabledWhen:K,component:U,props:()=>({min:0,unit:"px",placeholder:"No padding"})}]},{id:"followBtn",label:"Follow button",fields:[{id:"followBtnHashtagMsg",label:"",hideLabel:!0,isResponsive:!1,component:Object(r.b)(({feed:e})=>J(e)&&n.a.createElement(O.a,{type:O.b.INFO,showIcon:!0,shake:!0},"The follow button is disabled because you are currently only showing posts from"," ","hashtags, so there are no accounts to follow."))},{option:"showFollowBtn",label:"Show 'Follow' button",isResponsive:!0,component:v.a,disabledWhen:J},{option:"followBtnLocation",label:"Location",isResponsive:!0,disabledWhen:X,component:b.a,props:()=>({options:[{value:G.HEADER,label:"Header"},{value:G.BOTTOM,label:"Bottom"},{value:G.BOTH,label:"Both"}]})},{option:"followBtnText",label:"'Follow' text",disabledWhen:X,component:k},{option:"followBtnTextColor",label:"Text color",disabledWhen:X,component:g.a},{option:"followBtnBgColor",label:"Background color",disabledWhen:X,component:g.a}]},{id:"loadMoreBtn",label:"Load more button",fields:[{option:"showLoadMoreBtn",label:"Show 'Load more' button",isResponsive:!0,component:v.a},{option:"loadMoreBtnText",label:"'Load more' text",disabledWhen:$,component:k},{option:"loadMoreBtnTextColor",label:"Text color",disabledWhen:$,component:g.a},{option:"loadMoreBtnBgColor",label:"Background color",disabledWhen:$,component:g.a}]}]}];var Z;t.b=Q}}]);
ui/dist/front-app.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],e):"object"==typeof exports?exports.spotlight=e(require("React"),require("ReactDOM")):t.spotlight=e(t.React,t.ReactDOM)}(window,(function(t,e){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[8],{0:function(e,o){e.exports=t},108:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(0),i=o.n(n),a=o(4),r=o(26),s=o(7);const l=Object(a.b)(({feed:t})=>{const e=r.a.getById(t.options.layout),o=s.a.ComputedOptions.compute(t);return i.a.createElement("div",{className:"feed"},i.a.createElement(e.component,{feed:t,options:o}))})},12:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));const n=t=>"string"==typeof t?t:"r"in t?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":"h"in t?"hsla("+t.h+","+t.s+","+t.l+","+t.a+")":"#fff"},13:function(t,e,o){"use strict";var n;o.d(e,"a",(function(){return n})),function(t){let e,o;!function(t){t.IMAGE="IMAGE",t.VIDEO="VIDEO",t.ALBUM="CAROUSEL_ALBUM"}(e=t.Type||(t.Type={})),function(t){let e;!function(t){t.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",t.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",t.TAGGED_ACCOUNT="TAGGED_ACCOUNT",t.RECENT_HASHTAG="RECENT_HASHTAG",t.POPULAR_HASHTAG="POPULAR_HASHTAG",t.USER_STORY="USER_STORY"}(e=t.Type||(t.Type={}))}(o=t.Source||(t.Source={})),t.getAsRows=(t,e)=>{t=t.slice(),e=e>0?e:1;let o=[];for(;t.length;)o.push(t.splice(0,e));if(o.length>0){const t=o.length-1;for(;o[t].length<e;)o[t].push({})}return o},t.isFromHashtag=t=>t.source.type===o.Type.POPULAR_HASHTAG||t.source.type===o.Type.RECENT_HASHTAG}(n||(n={}))},14:function(t,e,o){"use strict";var n=o(37),i=o.n(n),a=o(17),r=o(38);const s=a.a.config.restApi.baseUrl,l={};a.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=a.a.config.restApi.authToken);const c=i.a.create({baseURL:s,headers:l}),d={config:a.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(t,e=0,o=0,n)=>{const a=n?new i.a.CancelToken(n):void 0;return c.post("/media/fetch",{options:t,num:o,from:e},{cancelToken:a})},getErrorReason:t=>{let e;return e="object"==typeof t.response?t.response.data:"string"==typeof t.message?t.message:t.toString(),Object(r.b)(e)}};e.a=d},17:function(t,e,o){"use strict";let n;e.a=n={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:t=>`${n.config.imagesUrl}/${t}`}},18:function(t,e,o){"use strict";o.d(e,"e",(function(){return s})),o.d(e,"b",(function(){return l})),o.d(e,"c",(function(){return c})),o.d(e,"a",(function(){return d})),o.d(e,"k",(function(){return u})),o.d(e,"g",(function(){return h})),o.d(e,"i",(function(){return p})),o.d(e,"h",(function(){return g})),o.d(e,"d",(function(){return m})),o.d(e,"j",(function(){return v})),o.d(e,"f",(function(){return y}));var n=o(0),i=o.n(n),a=o(40),r=o(36);function s(t){const[e,o]=i.a.useState(t),n=i.a.useRef(e);return[e,()=>n.current,t=>o(n.current=t)]}function l(t,e,o=[]){function i(n){!t.current||t.current.contains(n.target)||o.some(t=>t&&t.current&&t.current.contains(n.target))||e(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",i),document.addEventListener("touchend",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchend",i)}))}function c(t,e){Object(n.useEffect)(()=>{const o=()=>{0===t.filter(t=>!t.current||document.activeElement===t.current||t.current.contains(document.activeElement)).length&&e()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},t)}function d(t,e,o=100){const[a,r]=i.a.useState(t);return Object(n.useEffect)(()=>{let n=null;return t===e?n=setTimeout(()=>r(e),o):r(!e),()=>{null!==n&&clearTimeout(n)}},[t]),[a,r]}function u(t){const[e,o]=i.a.useState(Object(r.b)()),a=()=>{const e=Object(r.b)();o(e),t&&t(e)};return Object(n.useEffect)(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[]),e}function h(){return new URLSearchParams(Object(a.e)().search)}function p(t,e){const o=o=>{if(e)return(o||window.event).returnValue=t,t};Object(n.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[e])}function g(t,e){const o=i.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==t.current&&(t.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=e?e:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(t,e,o,i=[],a=[]){Object(n.useEffect)(()=>(i.reduce((t,e)=>t&&e,!0)&&t.addEventListener(e,o),()=>t.removeEventListener(e,o)),a)}function m(t,e,o=[],n=[]){f(document,t,e,o,n)}function v(t,e,o=[],n=[]){f(window,t,e,o,n)}function y(t){return e=>{" "!==e.key&&"Enter"!==e.key||(t(),e.preventDefault(),e.stopPropagation())}}o(38)},2:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(1),a=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};!function(t){class e{constructor(t,e,o){this.prop=t,this.name=e,this.icon=o}}e.DESKTOP=new e("desktop","Desktop","desktop"),e.TABLET=new e("tablet","Tablet","tablet"),e.PHONE=new e("phone","Phone","smartphone"),t.Mode=e,t.MODES=[e.DESKTOP,e.TABLET,e.PHONE];class o{constructor(t,e,o){this.desktop=t,this.tablet=e,this.phone=o}get(t,e){return n(this,t,e)}set(t,e){r(this,e,t)}with(t,e){const n=s(this,e,t);return new o(n.desktop,n.tablet,n.phone)}}function n(t,e,o=!1){if(!t)return;const n=t[e.prop];return!o||""!==n&&null!=n&&""!==n?n:t.desktop}function r(t,e,o){return t[o.prop]=e,t}function s(t,e,o){return r({desktop:t.desktop,tablet:t.tablet,phone:t.phone},e,o)}a([i.n],o.prototype,"desktop",void 0),a([i.n],o.prototype,"tablet",void 0),a([i.n],o.prototype,"phone",void 0),t.Value=o,t.getName=function(t){return t.name},t.getIcon=function(t){return t.icon},t.cycle=function(o){const n=t.MODES.findIndex(t=>t===o);return void 0===n?e.DESKTOP:t.MODES[(n+1)%t.MODES.length]},t.get=n,t.set=r,t.withValue=s,t.normalize=function(t,e){return null==t?e.hasOwnProperty("all")?new o(e.all,e.all,e.all):new o(e.desktop,e.tablet,e.phone):"object"==typeof t&&t.hasOwnProperty("desktop")?new o(t.desktop,t.tablet,t.phone):new o(t,t,t)},t.getModeForWindowSize=function(t){return t.width<=768?e.PHONE:t.width<=935?e.TABLET:e.DESKTOP}}(n||(n={}))},26:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));class n{static getById(t){const e=n.list.find(e=>e.id===t);return!e&&n.list.length>0?n.list[0]:e}static getName(t){const e=n.getById(t);return e?e.name:"(Missing layout)"}static addLayout(t){n.list.push(t)}}n.list=[]},3:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(14),a=o(1);!function(t){let e;!function(t){t.PERSONAL="PERSONAL",t.BUSINESS="BUSINESS"}(e=t.Type||(t.Type={}))}(n||(n={}));const r=Object(a.n)([]),s="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=t=>r.find(e=>e.id===t),c=t=>"https://instagram.com/"+t;function d(t){if("object"==typeof t&&Array.isArray(t.data)){t.data.sort((t,e)=>t.type===e.type?0:t.type===n.Type.PERSONAL?-1:1);const e=t.data.map(t=>Object(a.n)(t));return r.replace(e),r}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}e.b={list:r,DEFAULT_PROFILE_PIC:s,getById:l,getByUsername:t=>r.find(e=>e.username===t),hasAccounts:()=>r.length>0,filterExisting:t=>t.filter(t=>void 0!==l(t)),idsToAccounts:t=>t.map(t=>l(t)).filter(t=>void 0!==t),getBusinessAccounts:()=>r.filter(t=>t.type===n.Type.BUSINESS),getProfilePicUrl:t=>t.customProfilePicUrl?t.customProfilePicUrl:t.profilePicUrl?t.profilePicUrl:s,getBioText:t=>t.customBio.length?t.customBio:t.bio,getProfileUrl:t=>c(t.username),getUsernameUrl:c,loadAccounts:function(){return i.a.getAccounts().then(d).catch(t=>{throw i.a.getErrorReason(t)})},loadFromResponse:d}},30:function(t,o){t.exports=e},31:function(t,e,o){"use strict";o.d(e,"a",(function(){return c})),o.d(e,"b",(function(){return d})),o.d(e,"c",(function(){return h}));var n=o(0),i=o.n(n),a=o(30),r=o.n(a),s=o(4);class l{constructor(t=new Map,e=[]){this.factories=t,this.extensions=new Map,this.cache=new Map,e.forEach(t=>this.addModule(t))}addModule(t){t.factories&&(this.factories=new Map([...this.factories,...t.factories])),t.extensions&&t.extensions.forEach((t,e)=>{this.extensions.has(e)?this.extensions.get(e).push(t):this.extensions.set(e,[t])})}get(t){let e=this.factories.get(t);if(void 0===e)throw new Error('Service "'+t+'" does not exist');let o=this.cache.get(t);if(void 0===o){o=e(this);let n=this.extensions.get(t);n&&n.forEach(t=>o=t(this,o)),this.cache.set(t,o)}return o}has(t){return this.factories.has(t)}}class c{constructor(t,e,o){this.key=t,this.mount=e,this.modules=o,this.container=null}addModules(t){this.modules=this.modules.concat(t)}run(){null===this.container&&window.addEventListener("load",()=>{!function(t){const e=`app/${t.key}/run`;document.dispatchEvent(new u(e,t))}(this);const t=h({root:()=>null,"root/children":()=>[]});this.container=new l(t,this.modules);const e=this.container.get("root/children").map((t,e)=>i.a.createElement(t,{key:e})),o=i.a.createElement(s.a,{c:this.container},e);this.modules.forEach(t=>t.run&&t.run(this.container)),r.a.render(o,this.mount)})}}function d(t,e){document.addEventListener(`app/${t}/run`,t=>{e(t.detail.app)})}class u extends CustomEvent{constructor(t,e){super(t,{detail:{app:e}})}}function h(t){return new Map(Object.entries(t))}},36:function(t,e,o){"use strict";function n(t,e,o={}){return window.open(t,e,function(t={}){return Object.getOwnPropertyNames(t).map(e=>`${e}=${t[e]}`).join(",")}(o))}function i(t,e){return{top:window.top.outerHeight/2+window.top.screenY-e/2,left:window.top.outerWidth/2+window.top.screenX-t/2,width:t,height:e}}function a(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return i})),o.d(e,"b",(function(){return a}))},38:function(t,e,o){"use strict";function n(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function i(t){const e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""}o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return i}))},5:function(t,e,o){"use strict";o.d(e,"o",(function(){return c})),o.d(e,"b",(function(){return d})),o.d(e,"j",(function(){return u})),o.d(e,"e",(function(){return h})),o.d(e,"c",(function(){return p})),o.d(e,"i",(function(){return g})),o.d(e,"k",(function(){return f})),o.d(e,"g",(function(){return m})),o.d(e,"a",(function(){return v})),o.d(e,"f",(function(){return y})),o.d(e,"h",(function(){return w})),o.d(e,"n",(function(){return O})),o.d(e,"m",(function(){return S})),o.d(e,"l",(function(){return b})),o.d(e,"d",(function(){return C}));var n=o(0),i=o.n(n),a=o(160),r=o(159),s=o(13);let l=0;function c(){return l++}function d(t,e,o){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(o){if(!o(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function u(t,e){return t&&e&&"object"==typeof t&&"object"==typeof e?!Object.getOwnPropertyNames(t).some(o=>"object"==typeof t[o]?"object"!=typeof e[o]||!u(t[o],e[o]):Array.isArray(t[o])?!Array.isArray(e[o])||!d(t[o],e[o]):t[o]!==e[o]):t===e}function h(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.filter(t=>!e.some(e=>o(t,e)))}function p(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.every(t=>e.some(e=>o(t,e)))&&e.every(e=>t.some(t=>o(e,t)))}function g(t,e){return 0===t.tag.localeCompare(e.tag)&&t.sort===e.sort}function f(t,e,o=0,a=!1){let r=t.trim();a&&(r=r.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const s=r.split("\n"),l=s.map((t,o)=>{if(t=t.trim(),a&&/^[.*•]$/.test(t))return null;let r,l=[];for(;null!==(r=/#([^\s]+)/g.exec(t));){const e="https://instagram.com/explore/tags/"+r[1],o=i.a.createElement("a",{href:e,target:"_blank",key:c()},r[0]),n=t.substr(0,r.index),a=t.substr(r.index+r[0].length);l.push(n),l.push(o),t=a}return t.length&&l.push(t),e&&(l=e(l,o)),s.length>1&&l.push(i.a.createElement("br",{key:c()})),i.a.createElement(n.Fragment,{key:c()},l)});return o>0?l.slice(0,o):l}function m(t){const e=t.match(/instagram\.com\/p\/([^\/]+)\//);return e&&e.length>0?e[1]:null}var v;function y(t,e=v.MEDIUM){return`https://www.instagram.com/p/${t}/media/?size=${e}`}function w(t,e=v.MEDIUM){return t.thumbnail?t.thumbnail:y(m(t.permalink),e)}function O(t,e){const o=/(\s+)/g;let n,i=0,a=0,r="";for(;null!==(n=o.exec(t))&&i<e;){const e=n.index+n[1].length;r+=t.substr(a,e-a),a=e,i++}return a<t.length&&(r+=" ..."),r}function S(t){return Object(a.a)(Object(r.a)(t),{addSuffix:!0})}function b(t,e){const o=[];return t.forEach((t,n)=>{const i=n%e;Array.isArray(o[i])?o[i].push(t):o[i]=[t]}),o}function C(t,e){return function t(e){if(e.type===s.a.Type.VIDEO){const t=document.createElement("video");return t.autoplay=!1,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.visibility="hidden",document.body.appendChild(t),new Promise(o=>{t.src=e.url,t.addEventListener("loadeddata",()=>{o({width:t.videoWidth,height:t.videoHeight}),document.body.removeChild(t)})})}if(e.type===s.a.Type.IMAGE){const t=new Image;return t.src=e.url,new Promise(e=>{t.onload=()=>{e({width:t.naturalWidth,height:t.naturalHeight})}})}return e.type===s.a.Type.ALBUM?t(e.children[0]):Promise.reject("Unknown media type")}(t).then(t=>function(t,e){const o=t.width>t.height?e.width/t.width:e.height/t.height;return{width:t.width*o,height:t.height*o}}(t,e))}!function(t){t.SMALL="t",t.MEDIUM="m",t.LARGE="l"}(v||(v={}))},558:function(t,e,o){},560:function(t,e,o){"use strict";o.r(e),o(215);var n=o(31),i=(o(558),o(0)),a=o.n(i),r=o(1),s=o(3),l=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};class c{constructor(t){this.feed=t,this.isLoaded=!1}load(t){this.isLoaded||s.b.loadAccounts().then(()=>{this.feed.load().then(()=>{this.isLoaded=!0,t&&t()}).catch(t=>{})}).catch(t=>{})}}l([r.n],c.prototype,"isLoaded",void 0),l([r.n],c.prototype,"feed",void 0);var d=o(4),u=o(2),h=o(18),p=o(108);const g=Object(d.b)(({store:t})=>(Object(h.k)(e=>t.feed.mode=u.a.getModeForWindowSize(e)),a.a.createElement("div",{className:"spotlight-instagram-app"},a.a.createElement(p.a,{feed:t.feed}))));var f=o(7),m=o(36);const v=t=>({factories:Object(n.c)({"front/feed":()=>{const e=u.a.getModeForWindowSize(Object(m.b)());return new f.a(t,e)},"front/store":t=>new c(t.get("front/feed")),"front/component":t=>()=>a.a.createElement(g,{store:t.get("front/store")})}),extensions:Object(n.c)({"root/children":(t,e)=>[...e,t.get("front/component")]}),run:t=>{t.get("front/store").load()}});{const t=document.getElementsByClassName("spotlight-instagram-feed");for(let e=0,o=t.length||0;e<o;++e){const o=t[e],i=o.getAttribute("data-feed-var");if(i&&SliFrontCtx.hasOwnProperty(i)){const t=[v(SliFrontCtx[i])];new n.a("front/vars/"+e,o,t).run()}}}},7:function(t,e,o){"use strict";o.d(e,"a",(function(){return g}));var n=o(37),i=o.n(n),a=o(1),r=o(2),s=o(26),l=o(31),c=o(3),d=o(5),u=o(12),h=o(14),p=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};class g{constructor(t=new g.Options,e=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new g.Options(t),this.localMedia=[],this.mode=e,this.mediaCounter=this._numMediaPerPage,this.reload=function(t,e){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,t()},300)}}(()=>this.load()),Object(a.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(a.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(a.o)(()=>this.options.numPosts,t=>{const e=r.a.get(t,this.mode);this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,e)}),Object(a.o)(()=>this._media,t=>this.media=t),Object(a.o)(()=>this._numMediaToShow,t=>this.numMediaToShow=t),Object(a.o)(()=>this._numMediaPerPage,t=>this.numMediaPerPage=t),Object(a.o)(()=>this._canLoadMore,t=>this.canLoadMore=t)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const t=r.a.get(this.options.numPosts,this.mode,!0),e=parseInt(t.toString());return e<1||isNaN(e)?1:t}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const t=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,t>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(t=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,t()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(t,e,o){return this.cancelFetch(),g.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,a)=>{h.a.getFeedMedia(this.options,t,e,t=>this.cancelFetch=t).then(t=>{var e;if("object"!=typeof t||"object"!=typeof t.data||!Array.isArray(t.data.media))throw{message:"The media response is malformed or corrupt",response:t};o&&(this.localMedia=[]),this.localMedia.push(...t.data.media),this.stories=null!==(e=t.data.stories)&&void 0!==e?e:[],this.totalMedia=t.data.total,n&&n()}).catch(t=>{var e;if(i.a.isCancel(t))return null;const o=new g.Events.FetchFailEvent(g.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(e=t.message)&&void 0!==e?e:t.response.data.message,response:t.response}});return document.dispatchEvent(o),a&&a(t),t}).finally(()=>this.isLoading=!1)})):new Promise(t=>{this.localMedia=[],this.totalMedia=0,t&&t()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}p([a.n],g.prototype,"media",void 0),p([a.n],g.prototype,"canLoadMore",void 0),p([a.n],g.prototype,"stories",void 0),p([a.n],g.prototype,"numLoadedMore",void 0),p([a.n],g.prototype,"options",void 0),p([a.n],g.prototype,"totalMedia",void 0),p([a.n],g.prototype,"mode",void 0),p([a.n],g.prototype,"isLoaded",void 0),p([a.n],g.prototype,"isLoading",void 0),p([a.n],g.prototype,"isLoadingMore",void 0),p([a.f],g.prototype,"reload",void 0),p([a.n],g.prototype,"localMedia",void 0),p([a.n],g.prototype,"numMediaToShow",void 0),p([a.n],g.prototype,"numMediaPerPage",void 0),p([a.n],g.prototype,"mediaCounter",void 0),p([a.h],g.prototype,"_media",null),p([a.h],g.prototype,"_numMediaToShow",null),p([a.h],g.prototype,"_numMediaPerPage",null),p([a.h],g.prototype,"_canLoadMore",null),p([a.f],g.prototype,"loadMore",null),p([a.f],g.prototype,"load",null),p([a.f],g.prototype,"loadMedia",null),function(t){let e,o,n,i,h,g,f,m,v;!function(t){t.FETCH_FAIL="sli/feed/fetch_fail";class e extends CustomEvent{constructor(t,e){super(t,e)}}t.FetchFailEvent=e}(e=t.Events||(t.Events={}));class y{constructor(t={}){y.setFromObject(this,t)}static setFromObject(e,o={}){var n,i,a,l,d,u,h,p,g,f,m,v;return e.accounts=o.accounts?o.accounts.slice():t.DefaultOptions.accounts,e.hashtags=o.hashtags?o.hashtags.slice():t.DefaultOptions.hashtags,e.tagged=o.tagged?o.tagged.slice():t.DefaultOptions.tagged,e.layout=s.a.getById(o.layout).id,e.numColumns=r.a.normalize(o.numColumns,t.DefaultOptions.numColumns),e.highlightFreq=r.a.normalize(o.highlightFreq,t.DefaultOptions.highlightFreq),e.mediaType=o.mediaType||t.DefaultOptions.mediaType,e.postOrder=o.postOrder||t.DefaultOptions.postOrder,e.numPosts=r.a.normalize(o.numPosts,t.DefaultOptions.numPosts),e.linkBehavior=r.a.normalize(o.linkBehavior,t.DefaultOptions.linkBehavior),e.feedWidth=r.a.normalize(o.feedWidth,t.DefaultOptions.feedWidth),e.feedHeight=r.a.normalize(o.feedHeight,t.DefaultOptions.feedHeight),e.feedPadding=r.a.normalize(o.feedPadding,t.DefaultOptions.feedPadding),e.imgPadding=r.a.normalize(o.imgPadding,t.DefaultOptions.imgPadding),e.textSize=r.a.normalize(o.textSize,t.DefaultOptions.textSize),e.bgColor=o.bgColor||t.DefaultOptions.bgColor,e.hoverInfo=o.hoverInfo?o.hoverInfo.slice():t.DefaultOptions.hoverInfo,e.textColorHover=o.textColorHover||t.DefaultOptions.textColorHover,e.bgColorHover=o.bgColorHover||t.DefaultOptions.bgColorHover,e.showHeader=r.a.normalize(o.showHeader,t.DefaultOptions.showHeader),e.headerInfo=r.a.normalize(o.headerInfo,t.DefaultOptions.headerInfo),e.headerAccount=null!==(n=o.headerAccount)&&void 0!==n?n:t.DefaultOptions.headerAccount,e.headerAccount=null===e.headerAccount||void 0===c.b.getById(e.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:e.headerAccount,e.headerStyle=r.a.normalize(o.headerStyle,t.DefaultOptions.headerStyle),e.headerTextSize=r.a.normalize(o.headerTextSize,t.DefaultOptions.headerTextSize),e.headerPhotoSize=r.a.normalize(o.headerPhotoSize,t.DefaultOptions.headerPhotoSize),e.headerTextColor=o.headerTextColor||t.DefaultOptions.headerTextColor,e.headerBgColor=o.headerBgColor||t.DefaultOptions.bgColor,e.headerPadding=r.a.normalize(o.headerPadding,t.DefaultOptions.headerPadding),e.customProfilePic=null!==(i=o.customProfilePic)&&void 0!==i?i:t.DefaultOptions.customProfilePic,e.customBioText=o.customBioText||t.DefaultOptions.customBioText,e.includeStories=null!==(a=o.includeStories)&&void 0!==a?a:t.DefaultOptions.includeStories,e.storiesInterval=o.storiesInterval||t.DefaultOptions.storiesInterval,e.showCaptions=r.a.normalize(o.showCaptions,t.DefaultOptions.showCaptions),e.captionMaxLength=r.a.normalize(o.captionMaxLength,t.DefaultOptions.captionMaxLength),e.captionRemoveDots=null!==(l=o.captionRemoveDots)&&void 0!==l?l:t.DefaultOptions.captionRemoveDots,e.captionSize=r.a.normalize(o.captionSize,t.DefaultOptions.captionSize),e.captionColor=o.captionColor||t.DefaultOptions.captionColor,e.showLikes=r.a.normalize(o.showLikes,t.DefaultOptions.showLikes),e.showComments=r.a.normalize(o.showComments,t.DefaultOptions.showCaptions),e.lcIconSize=r.a.normalize(o.lcIconSize,t.DefaultOptions.lcIconSize),e.likesIconColor=null!==(d=o.likesIconColor)&&void 0!==d?d:t.DefaultOptions.likesIconColor,e.commentsIconColor=o.commentsIconColor||t.DefaultOptions.commentsIconColor,e.lightboxShowSidebar=null!==(u=o.lightboxShowSidebar)&&void 0!==u?u:t.DefaultOptions.lightboxShowSidebar,e.numLightboxComments=o.numLightboxComments||t.DefaultOptions.numLightboxComments,e.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,t.DefaultOptions.showLoadMoreBtn),e.loadMoreBtnTextColor=o.loadMoreBtnTextColor||t.DefaultOptions.loadMoreBtnTextColor,e.loadMoreBtnBgColor=o.loadMoreBtnBgColor||t.DefaultOptions.loadMoreBtnBgColor,e.loadMoreBtnText=o.loadMoreBtnText||t.DefaultOptions.loadMoreBtnText,e.autoload=null!==(h=o.autoload)&&void 0!==h?h:t.DefaultOptions.autoload,e.showFollowBtn=r.a.normalize(o.showFollowBtn,t.DefaultOptions.showFollowBtn),e.followBtnText=null!==(p=o.followBtnText)&&void 0!==p?p:t.DefaultOptions.followBtnText,e.followBtnTextColor=o.followBtnTextColor||t.DefaultOptions.followBtnTextColor,e.followBtnBgColor=o.followBtnBgColor||t.DefaultOptions.followBtnBgColor,e.followBtnLocation=r.a.normalize(o.followBtnLocation,t.DefaultOptions.followBtnLocation),e.hashtagWhitelist=o.hashtagWhitelist||t.DefaultOptions.hashtagWhitelist,e.hashtagBlacklist=o.hashtagBlacklist||t.DefaultOptions.hashtagBlacklist,e.captionWhitelist=o.captionWhitelist||t.DefaultOptions.captionWhitelist,e.captionBlacklist=o.captionBlacklist||t.DefaultOptions.captionBlacklist,e.hashtagWhitelistSettings=null!==(g=o.hashtagWhitelistSettings)&&void 0!==g?g:t.DefaultOptions.hashtagWhitelistSettings,e.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:t.DefaultOptions.hashtagBlacklistSettings,e.captionWhitelistSettings=null!==(m=o.captionWhitelistSettings)&&void 0!==m?m:t.DefaultOptions.captionWhitelistSettings,e.captionBlacklistSettings=null!==(v=o.captionBlacklistSettings)&&void 0!==v?v:t.DefaultOptions.captionBlacklistSettings,e.moderation=o.moderation||t.DefaultOptions.moderation,e.moderationMode=o.moderationMode||t.DefaultOptions.moderationMode,e.promotionEnabled=o.promotionEnabled||t.DefaultOptions.promotionEnabled,e.promotions=o.promotions||t.DefaultOptions.promotions,e}static getAllAccounts(t){const e=c.b.idsToAccounts(t.accounts),o=c.b.idsToAccounts(t.tagged);return{all:e.concat(o),accounts:e,tagged:o}}static getSources(t){return{accounts:c.b.idsToAccounts(t.accounts),tagged:c.b.idsToAccounts(t.tagged),hashtags:c.b.getBusinessAccounts().length>0?t.hashtags.filter(t=>t.tag.length>0):[]}}static hasSources(e,o){const n=t.Options.getSources(e),i=n.accounts.length>0||n.tagged.length>0,a=!o&&n.hashtags.length>0;return i||a}static isLimitingPosts(t){return t.moderation.length>0||t.hashtagBlacklist.length>0||t.hashtagWhitelist.length>0||t.captionBlacklist.length>0||t.captionWhitelist.length>0}}p([a.n],y.prototype,"accounts",void 0),p([a.n],y.prototype,"hashtags",void 0),p([a.n],y.prototype,"tagged",void 0),p([a.n],y.prototype,"layout",void 0),p([a.n],y.prototype,"numColumns",void 0),p([a.n],y.prototype,"highlightFreq",void 0),p([a.n],y.prototype,"mediaType",void 0),p([a.n],y.prototype,"postOrder",void 0),p([a.n],y.prototype,"numPosts",void 0),p([a.n],y.prototype,"linkBehavior",void 0),p([a.n],y.prototype,"feedWidth",void 0),p([a.n],y.prototype,"feedHeight",void 0),p([a.n],y.prototype,"feedPadding",void 0),p([a.n],y.prototype,"imgPadding",void 0),p([a.n],y.prototype,"textSize",void 0),p([a.n],y.prototype,"bgColor",void 0),p([a.n],y.prototype,"textColorHover",void 0),p([a.n],y.prototype,"bgColorHover",void 0),p([a.n],y.prototype,"hoverInfo",void 0),p([a.n],y.prototype,"showHeader",void 0),p([a.n],y.prototype,"headerInfo",void 0),p([a.n],y.prototype,"headerAccount",void 0),p([a.n],y.prototype,"headerStyle",void 0),p([a.n],y.prototype,"headerTextSize",void 0),p([a.n],y.prototype,"headerPhotoSize",void 0),p([a.n],y.prototype,"headerTextColor",void 0),p([a.n],y.prototype,"headerBgColor",void 0),p([a.n],y.prototype,"headerPadding",void 0),p([a.n],y.prototype,"customBioText",void 0),p([a.n],y.prototype,"customProfilePic",void 0),p([a.n],y.prototype,"includeStories",void 0),p([a.n],y.prototype,"storiesInterval",void 0),p([a.n],y.prototype,"showCaptions",void 0),p([a.n],y.prototype,"captionMaxLength",void 0),p([a.n],y.prototype,"captionRemoveDots",void 0),p([a.n],y.prototype,"captionSize",void 0),p([a.n],y.prototype,"captionColor",void 0),p([a.n],y.prototype,"showLikes",void 0),p([a.n],y.prototype,"showComments",void 0),p([a.n],y.prototype,"lcIconSize",void 0),p([a.n],y.prototype,"likesIconColor",void 0),p([a.n],y.prototype,"commentsIconColor",void 0),p([a.n],y.prototype,"lightboxShowSidebar",void 0),p([a.n],y.prototype,"numLightboxComments",void 0),p([a.n],y.prototype,"showLoadMoreBtn",void 0),p([a.n],y.prototype,"loadMoreBtnText",void 0),p([a.n],y.prototype,"loadMoreBtnTextColor",void 0),p([a.n],y.prototype,"loadMoreBtnBgColor",void 0),p([a.n],y.prototype,"autoload",void 0),p([a.n],y.prototype,"showFollowBtn",void 0),p([a.n],y.prototype,"followBtnText",void 0),p([a.n],y.prototype,"followBtnTextColor",void 0),p([a.n],y.prototype,"followBtnBgColor",void 0),p([a.n],y.prototype,"followBtnLocation",void 0),p([a.n],y.prototype,"hashtagWhitelist",void 0),p([a.n],y.prototype,"hashtagBlacklist",void 0),p([a.n],y.prototype,"captionWhitelist",void 0),p([a.n],y.prototype,"captionBlacklist",void 0),p([a.n],y.prototype,"hashtagWhitelistSettings",void 0),p([a.n],y.prototype,"hashtagBlacklistSettings",void 0),p([a.n],y.prototype,"captionWhitelistSettings",void 0),p([a.n],y.prototype,"captionBlacklistSettings",void 0),p([a.n],y.prototype,"moderation",void 0),p([a.n],y.prototype,"moderationMode",void 0),p([a.n],y.prototype,"promotionEnabled",void 0),t.Options=y;class w{constructor(t){Object.getOwnPropertyNames(t).map(e=>{this[e]=t[e]})}getCaption(t){const e=t.caption?t.caption:"";return this.captionMaxLength&&e.length?Object(d.k)(Object(d.n)(e,this.captionMaxLength)):e}static compute(e){const o=e.options,n=e.mode,i=new w({accounts:c.b.filterExisting(o.accounts),tagged:c.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(t=>t.tag.length>0),layout:s.a.getById(o.layout),numColumns:r.a.get(o.numColumns,n,!0),highlightFreq:r.a.get(o.highlightFreq,n,!0),numPosts:r.a.get(o.numPosts,n,!0),linkBehavior:r.a.get(o.linkBehavior,n,!0),bgColor:Object(u.a)(o.bgColor),textColorHover:Object(u.a)(o.textColorHover),bgColorHover:Object(u.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:r.a.get(o.showHeader,n,!0),headerInfo:r.a.get(o.headerInfo,n,!0),headerStyle:r.a.get(o.headerStyle,n,!0),headerTextColor:Object(u.a)(o.headerTextColor),headerBgColor:Object(u.a)(o.headerBgColor),headerPadding:r.a.get(o.headerPadding,n,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:r.a.get(o.showCaptions,n,!0),captionMaxLength:r.a.get(o.captionMaxLength,n,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(u.a)(o.captionColor),showLikes:r.a.get(o.showLikes,n,!0),showComments:r.a.get(o.showComments,n,!0),likesIconColor:Object(u.a)(o.likesIconColor),commentsIconColor:Object(u.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:r.a.get(o.showLoadMoreBtn,n,!0),loadMoreBtnTextColor:Object(u.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:r.a.get(o.showFollowBtn,n,!0),autoload:o.autoload,followBtnLocation:r.a.get(o.followBtnLocation,n,!0),followBtnTextColor:Object(u.a)(o.followBtnTextColor),followBtnBgColor:Object(u.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(i.numColumns=Math.max(i.numColumns,1),e.mode!==r.a.Mode.DESKTOP&&(i.numColumns=i.numColumns<1?r.a.get(o.numColumns,r.a.Mode.DESKTOP):i.numColumns),i.numPosts=parseInt(i.numPosts+""),(i.numPosts<1||isNaN(i.numPosts))&&(i.numPosts=1),i.allAccounts=i.accounts.concat(i.tagged.filter(t=>!i.accounts.includes(t))),i.allAccounts.length>0&&(i.account=o.headerAccount&&i.allAccounts.includes(o.headerAccount)?c.b.getById(o.headerAccount):c.b.getById(i.allAccounts[0])),i.showHeader=i.showHeader&&null!==i.account,i.showHeader&&(i.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:c.b.getProfilePicUrl(i.account)),i.showFollowBtn=i.showFollowBtn&&null!==i.account,i.showLoadMoreBtn=i.showLoadMoreBtn&&e.canLoadMore,i.showBio=i.headerInfo.some(e=>e===t.HeaderInfo.BIO),i.showBio){const t=o.customBioText.trim().length>0?o.customBioText:null!==i.account?c.b.getBioText(i.account):"";i.bioText=Object(d.k)(t),i.showBio=i.bioText.length>0}return i.feedWidth=this.normalizeCssSize(o.feedWidth,n,"auto"),i.feedHeight=this.normalizeCssSize(o.feedHeight,n,"auto"),i.feedPadding=this.normalizeCssSize(o.feedPadding,n,"0"),i.imgPadding=this.normalizeCssSize(o.imgPadding,n,"0"),i.textSize=this.normalizeCssSize(o.textSize,n,"inherit"),i.headerTextSize=this.normalizeCssSize(o.headerTextSize,n,"inherit"),i.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,n,"50px"),i.captionSize=this.normalizeCssSize(o.captionSize,n,"inherit"),i.lcIconSize=this.normalizeCssSize(o.lcIconSize,n,"inherit"),i.buttonPadding=Math.max(10,r.a.get(o.imgPadding,n))+"px",i.showLcIcons=i.showLikes||i.showComments,i}static normalizeCssSize(t,e,o=null){const n=r.a.get(t,e);return n?n+"px":o}}t.ComputedOptions=w,t.HashtagSorting=Object(l.c)({recent:"Most recent",popular:"Most popular"}),function(t){t.ALL="all",t.PHOTOS="photos",t.VIDEOS="videos"}(o=t.MediaType||(t.MediaType={})),function(t){t.NOTHING="nothing",t.SELF="self",t.NEW_TAB="new_tab",t.LIGHTBOX="lightbox"}(n=t.LinkBehavior||(t.LinkBehavior={})),function(t){t.DATE_ASC="date_asc",t.DATE_DESC="date_desc",t.POPULARITY_ASC="popularity_asc",t.POPULARITY_DESC="popularity_desc",t.RANDOM="random"}(i=t.PostOrder||(t.PostOrder={})),function(t){t.USERNAME="username",t.DATE="date",t.CAPTION="caption",t.LIKES_COMMENTS="likes_comments",t.INSTA_LINK="insta_link"}(h=t.HoverInfo||(t.HoverInfo={})),function(t){t.NORMAL="normal",t.BOXED="boxed",t.CENTERED="centered"}(g=t.HeaderStyle||(t.HeaderStyle={})),function(t){t.BIO="bio",t.PROFILE_PIC="profile_pic",t.FOLLOWERS="followers",t.MEDIA_COUNT="media_count"}(f=t.HeaderInfo||(t.HeaderInfo={})),function(t){t.HEADER="header",t.BOTTOM="bottom",t.BOTH="both"}(m=t.FollowBtnLocation||(t.FollowBtnLocation={})),function(t){t.WHITELIST="whitelist",t.BLACKLIST="blacklist"}(v=t.ModerationMode||(t.ModerationMode={})),t.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:i.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX,phone:n.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[h.LIKES_COMMENTS,h.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[f.PROFILE_PIC,f.BIO]},headerAccount:null,headerStyle:{desktop:g.NORMAL,phone:g.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:m.HEADER,phone:m.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:v.BLACKLIST,promotionEnabled:!0,promotions:{}}}(g||(g={}))}},[[560,0,1]]])}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],e):"object"==typeof exports?exports.spotlight=e(require("React"),require("ReactDOM")):t.spotlight=e(t.React,t.ReactDOM)}(window,(function(t,e){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[8],{0:function(e,o){e.exports=t},108:function(t,e,o){"use strict";o.d(e,"a",(function(){return l}));var n=o(0),i=o.n(n),a=o(4),r=o(26),s=o(7);const l=Object(a.b)(({feed:t})=>{const e=r.a.getById(t.options.layout),o=s.a.ComputedOptions.compute(t);return i.a.createElement("div",{className:"feed"},i.a.createElement(e.component,{feed:t,options:o}))})},12:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));const n=t=>"string"==typeof t?t:"r"in t?"rgba("+t.r+","+t.g+","+t.b+","+t.a+")":"h"in t?"hsla("+t.h+","+t.s+","+t.l+","+t.a+")":"#fff"},13:function(t,e,o){"use strict";var n;o.d(e,"a",(function(){return n})),function(t){let e,o;!function(t){t.IMAGE="IMAGE",t.VIDEO="VIDEO",t.ALBUM="CAROUSEL_ALBUM"}(e=t.Type||(t.Type={})),function(t){let e;!function(t){t.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",t.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",t.TAGGED_ACCOUNT="TAGGED_ACCOUNT",t.RECENT_HASHTAG="RECENT_HASHTAG",t.POPULAR_HASHTAG="POPULAR_HASHTAG",t.USER_STORY="USER_STORY"}(e=t.Type||(t.Type={}))}(o=t.Source||(t.Source={})),t.getAsRows=(t,e)=>{t=t.slice(),e=e>0?e:1;let o=[];for(;t.length;)o.push(t.splice(0,e));if(o.length>0){const t=o.length-1;for(;o[t].length<e;)o[t].push({})}return o},t.isFromHashtag=t=>t.source.type===o.Type.POPULAR_HASHTAG||t.source.type===o.Type.RECENT_HASHTAG}(n||(n={}))},14:function(t,e,o){"use strict";var n=o(37),i=o.n(n),a=o(17),r=o(38);const s=a.a.config.restApi.baseUrl,l={};a.a.config.restApi.authToken&&(l["X-Sli-Auth-Token"]=a.a.config.restApi.authToken);const c=i.a.create({baseURL:s,headers:l}),d={config:a.a.config.restApi,driver:c,getAccounts:()=>c.get("/accounts"),getFeeds:()=>c.get("/feeds"),getFeedMedia:(t,e=0,o=0,n)=>{const a=n?new i.a.CancelToken(n):void 0;return c.post("/media/fetch",{options:t,num:o,from:e},{cancelToken:a})},getErrorReason:t=>{let e;return e="object"==typeof t.response?t.response.data:"string"==typeof t.message?t.message:t.toString(),Object(r.b)(e)}};e.a=d},17:function(t,e,o){"use strict";let n;e.a=n={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:t=>`${n.config.imagesUrl}/${t}`}},18:function(t,e,o){"use strict";o.d(e,"e",(function(){return s})),o.d(e,"b",(function(){return l})),o.d(e,"c",(function(){return c})),o.d(e,"a",(function(){return d})),o.d(e,"k",(function(){return u})),o.d(e,"g",(function(){return h})),o.d(e,"i",(function(){return p})),o.d(e,"h",(function(){return g})),o.d(e,"d",(function(){return m})),o.d(e,"j",(function(){return y})),o.d(e,"f",(function(){return v}));var n=o(0),i=o.n(n),a=o(40),r=o(36);function s(t){const[e,o]=i.a.useState(t),n=i.a.useRef(e);return[e,()=>n.current,t=>o(n.current=t)]}function l(t,e,o=[]){function i(n){!t.current||t.current.contains(n.target)||o.some(t=>t&&t.current&&t.current.contains(n.target))||e(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",i),document.addEventListener("touchend",i),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("touchend",i)}))}function c(t,e){Object(n.useEffect)(()=>{const o=()=>{0===t.filter(t=>!t.current||document.activeElement===t.current||t.current.contains(document.activeElement)).length&&e()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},t)}function d(t,e,o=100){const[a,r]=i.a.useState(t);return Object(n.useEffect)(()=>{let n=null;return t===e?n=setTimeout(()=>r(e),o):r(!e),()=>{null!==n&&clearTimeout(n)}},[t]),[a,r]}function u(t){const[e,o]=i.a.useState(Object(r.b)()),a=()=>{const e=Object(r.b)();o(e),t&&t(e)};return Object(n.useEffect)(()=>(a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)),[]),e}function h(){return new URLSearchParams(Object(a.e)().search)}function p(t,e){const o=o=>{if(e)return(o||window.event).returnValue=t,t};Object(n.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[e])}function g(t,e){const o=i.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==t.current&&(t.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=e?e:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(t,e,o,i=[],a=[]){Object(n.useEffect)(()=>(i.reduce((t,e)=>t&&e,!0)&&t.addEventListener(e,o),()=>t.removeEventListener(e,o)),a)}function m(t,e,o=[],n=[]){f(document,t,e,o,n)}function y(t,e,o=[],n=[]){f(window,t,e,o,n)}function v(t){return e=>{" "!==e.key&&"Enter"!==e.key||(t(),e.preventDefault(),e.stopPropagation())}}o(38)},2:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(1),a=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};!function(t){class e{constructor(t,e,o){this.prop=t,this.name=e,this.icon=o}}e.DESKTOP=new e("desktop","Desktop","desktop"),e.TABLET=new e("tablet","Tablet","tablet"),e.PHONE=new e("phone","Phone","smartphone"),t.Mode=e,t.MODES=[e.DESKTOP,e.TABLET,e.PHONE];class o{constructor(t,e,o){this.desktop=t,this.tablet=e,this.phone=o}get(t,e){return n(this,t,e)}set(t,e){r(this,e,t)}with(t,e){const n=s(this,e,t);return new o(n.desktop,n.tablet,n.phone)}}function n(t,e,o=!1){if(!t)return;const n=t[e.prop];return!o||""!==n&&null!=n&&""!==n?n:t.desktop}function r(t,e,o){return t[o.prop]=e,t}function s(t,e,o){return r({desktop:t.desktop,tablet:t.tablet,phone:t.phone},e,o)}a([i.n],o.prototype,"desktop",void 0),a([i.n],o.prototype,"tablet",void 0),a([i.n],o.prototype,"phone",void 0),t.Value=o,t.getName=function(t){return t.name},t.getIcon=function(t){return t.icon},t.cycle=function(o){const n=t.MODES.findIndex(t=>t===o);return void 0===n?e.DESKTOP:t.MODES[(n+1)%t.MODES.length]},t.get=n,t.set=r,t.withValue=s,t.normalize=function(t,e){return null==t?e.hasOwnProperty("all")?new o(e.all,e.all,e.all):new o(e.desktop,e.tablet,e.phone):"object"==typeof t&&t.hasOwnProperty("desktop")?new o(t.desktop,t.tablet,t.phone):new o(t,t,t)},t.getModeForWindowSize=function(t){return t.width<=768?e.PHONE:t.width<=935?e.TABLET:e.DESKTOP}}(n||(n={}))},26:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));class n{static getById(t){const e=n.list.find(e=>e.id===t);return!e&&n.list.length>0?n.list[0]:e}static getName(t){const e=n.getById(t);return e?e.name:"(Missing layout)"}static addLayout(t){n.list.push(t)}}n.list=[]},3:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));var n,i=o(14),a=o(1);!function(t){let e;!function(t){t.PERSONAL="PERSONAL",t.BUSINESS="BUSINESS"}(e=t.Type||(t.Type={}))}(n||(n={}));const r=Object(a.n)([]),s="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",l=t=>r.find(e=>e.id===t),c=t=>"https://instagram.com/"+t;function d(t){if("object"==typeof t&&Array.isArray(t.data)){t.data.sort((t,e)=>t.type===e.type?0:t.type===n.Type.PERSONAL?-1:1);const e=t.data.map(t=>Object(a.n)(t));return r.replace(e),r}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}e.b={list:r,DEFAULT_PROFILE_PIC:s,getById:l,getByUsername:t=>r.find(e=>e.username===t),hasAccounts:()=>r.length>0,filterExisting:t=>t.filter(t=>void 0!==l(t)),idsToAccounts:t=>t.map(t=>l(t)).filter(t=>void 0!==t),getBusinessAccounts:()=>r.filter(t=>t.type===n.Type.BUSINESS),getProfilePicUrl:t=>t.customProfilePicUrl?t.customProfilePicUrl:t.profilePicUrl?t.profilePicUrl:s,getBioText:t=>t.customBio.length?t.customBio:t.bio,getProfileUrl:t=>c(t.username),getUsernameUrl:c,loadAccounts:function(){return i.a.getAccounts().then(d).catch(t=>{throw i.a.getErrorReason(t)})},loadFromResponse:d}},30:function(t,o){t.exports=e},31:function(t,e,o){"use strict";o.d(e,"a",(function(){return c})),o.d(e,"b",(function(){return d})),o.d(e,"c",(function(){return h}));var n=o(0),i=o.n(n),a=o(30),r=o.n(a),s=o(4);class l{constructor(t=new Map,e=[]){this.factories=t,this.extensions=new Map,this.cache=new Map,e.forEach(t=>this.addModule(t))}addModule(t){t.factories&&(this.factories=new Map([...this.factories,...t.factories])),t.extensions&&t.extensions.forEach((t,e)=>{this.extensions.has(e)?this.extensions.get(e).push(t):this.extensions.set(e,[t])})}get(t){let e=this.factories.get(t);if(void 0===e)throw new Error('Service "'+t+'" does not exist');let o=this.cache.get(t);if(void 0===o){o=e(this);let n=this.extensions.get(t);n&&n.forEach(t=>o=t(this,o)),this.cache.set(t,o)}return o}has(t){return this.factories.has(t)}}class c{constructor(t,e,o){this.key=t,this.mount=e,this.modules=o,this.container=null}addModules(t){this.modules=this.modules.concat(t)}run(){null===this.container&&window.addEventListener("load",()=>{!function(t){const e=`app/${t.key}/run`;document.dispatchEvent(new u(e,t))}(this);const t=h({root:()=>null,"root/children":()=>[]});this.container=new l(t,this.modules);const e=this.container.get("root/children").map((t,e)=>i.a.createElement(t,{key:e})),o=i.a.createElement(s.a,{c:this.container},e);this.modules.forEach(t=>t.run&&t.run(this.container)),r.a.render(o,this.mount)})}}function d(t,e){document.addEventListener(`app/${t}/run`,t=>{e(t.detail.app)})}class u extends CustomEvent{constructor(t,e){super(t,{detail:{app:e}})}}function h(t){return new Map(Object.entries(t))}},36:function(t,e,o){"use strict";function n(t,e,o={}){return window.open(t,e,function(t={}){return Object.getOwnPropertyNames(t).map(e=>`${e}=${t[e]}`).join(",")}(o))}function i(t,e){return{top:window.top.outerHeight/2+window.top.screenY-e/2,left:window.top.outerWidth/2+window.top.screenX-t/2,width:t,height:e}}function a(){const{innerWidth:t,innerHeight:e}=window;return{width:t,height:e}}o.d(e,"c",(function(){return n})),o.d(e,"a",(function(){return i})),o.d(e,"b",(function(){return a}))},38:function(t,e,o){"use strict";function n(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function i(t){const e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""}o.d(e,"a",(function(){return n})),o.d(e,"b",(function(){return i}))},5:function(t,e,o){"use strict";o.d(e,"p",(function(){return c})),o.d(e,"b",(function(){return d})),o.d(e,"c",(function(){return u})),o.d(e,"k",(function(){return h})),o.d(e,"f",(function(){return p})),o.d(e,"d",(function(){return g})),o.d(e,"j",(function(){return f})),o.d(e,"l",(function(){return m})),o.d(e,"h",(function(){return y})),o.d(e,"a",(function(){return v})),o.d(e,"g",(function(){return w})),o.d(e,"i",(function(){return O})),o.d(e,"o",(function(){return S})),o.d(e,"n",(function(){return b})),o.d(e,"m",(function(){return C})),o.d(e,"e",(function(){return B}));var n=o(0),i=o.n(n),a=o(160),r=o(159),s=o(13);let l=0;function c(){return l++}function d(t,e){return Object.getOwnPropertyNames(e).forEach(o=>{"object"!=typeof e[o]||Array.isArray(e[o])?t[o]=e[o]:("object"!=typeof t[o]&&(t[o]={}),d(t[o],e[o]))}),t}function u(t,e,o){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(o){if(!o(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0}function h(t,e){return t&&e&&"object"==typeof t&&"object"==typeof e?!Object.getOwnPropertyNames(t).some(o=>"object"==typeof t[o]?"object"!=typeof e[o]||!h(t[o],e[o]):Array.isArray(t[o])?!Array.isArray(e[o])||!u(t[o],e[o]):t[o]!==e[o]):t===e}function p(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.filter(t=>!e.some(e=>o(t,e)))}function g(t,e,o){return o=null!=o?o:(t,e)=>t===e,t.every(t=>e.some(e=>o(t,e)))&&e.every(e=>t.some(t=>o(e,t)))}function f(t,e){return 0===t.tag.localeCompare(e.tag)&&t.sort===e.sort}function m(t,e,o=0,a=!1){let r=t.trim();a&&(r=r.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const s=r.split("\n"),l=s.map((t,o)=>{if(t=t.trim(),a&&/^[.*•]$/.test(t))return null;let r,l=[];for(;null!==(r=/#([^\s]+)/g.exec(t));){const e="https://instagram.com/explore/tags/"+r[1],o=i.a.createElement("a",{href:e,target:"_blank",key:c()},r[0]),n=t.substr(0,r.index),a=t.substr(r.index+r[0].length);l.push(n),l.push(o),t=a}return t.length&&l.push(t),e&&(l=e(l,o)),s.length>1&&l.push(i.a.createElement("br",{key:c()})),i.a.createElement(n.Fragment,{key:c()},l)});return o>0?l.slice(0,o):l}function y(t){const e=t.match(/instagram\.com\/p\/([^\/]+)\//);return e&&e.length>0?e[1]:null}var v;function w(t,e=v.MEDIUM){return`https://www.instagram.com/p/${t}/media/?size=${e}`}function O(t,e=v.MEDIUM){return t.thumbnail?t.thumbnail:w(y(t.permalink),e)}function S(t,e){const o=/(\s+)/g;let n,i=0,a=0,r="";for(;null!==(n=o.exec(t))&&i<e;){const e=n.index+n[1].length;r+=t.substr(a,e-a),a=e,i++}return a<t.length&&(r+=" ..."),r}function b(t){return Object(a.a)(Object(r.a)(t),{addSuffix:!0})}function C(t,e){const o=[];return t.forEach((t,n)=>{const i=n%e;Array.isArray(o[i])?o[i].push(t):o[i]=[t]}),o}function B(t,e){return function t(e){if(e.type===s.a.Type.VIDEO){const t=document.createElement("video");return t.autoplay=!1,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.visibility="hidden",document.body.appendChild(t),new Promise(o=>{t.src=e.url,t.addEventListener("loadeddata",()=>{o({width:t.videoWidth,height:t.videoHeight}),document.body.removeChild(t)})})}if(e.type===s.a.Type.IMAGE){const t=new Image;return t.src=e.url,new Promise(e=>{t.onload=()=>{e({width:t.naturalWidth,height:t.naturalHeight})}})}return e.type===s.a.Type.ALBUM?t(e.children[0]):Promise.reject("Unknown media type")}(t).then(t=>function(t,e){const o=t.width>t.height?e.width/t.width:e.height/t.height;return{width:t.width*o,height:t.height*o}}(t,e))}!function(t){t.SMALL="t",t.MEDIUM="m",t.LARGE="l"}(v||(v={}))},558:function(t,e,o){},560:function(t,e,o){"use strict";o.r(e),o(215);var n=o(31),i=(o(558),o(0)),a=o.n(i),r=o(1),s=o(3),l=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};class c{constructor(t){this.feed=t,this.isLoaded=!1}load(t){this.isLoaded||s.b.loadAccounts().then(()=>{this.feed.load().then(()=>{this.isLoaded=!0,t&&t()}).catch(t=>{})}).catch(t=>{})}}l([r.n],c.prototype,"isLoaded",void 0),l([r.n],c.prototype,"feed",void 0);var d=o(4),u=o(2),h=o(18),p=o(108);const g=Object(d.b)(({store:t})=>(Object(h.k)(e=>t.feed.mode=u.a.getModeForWindowSize(e)),a.a.createElement("div",{className:"spotlight-instagram-app"},a.a.createElement(p.a,{feed:t.feed}))));var f=o(7),m=o(36);const y=t=>({factories:Object(n.c)({"front/feed":()=>{const e=u.a.getModeForWindowSize(Object(m.b)());return new f.a(t,e)},"front/store":t=>new c(t.get("front/feed")),"front/component":t=>()=>a.a.createElement(g,{store:t.get("front/store")})}),extensions:Object(n.c)({"root/children":(t,e)=>[...e,t.get("front/component")]}),run:t=>{t.get("front/store").load()}});{const t=document.getElementsByClassName("spotlight-instagram-feed");for(let e=0,o=t.length||0;e<o;++e){const o=t[e],i=o.getAttribute("data-feed-var");if(i&&SliFrontCtx.hasOwnProperty(i)){const t=[y(SliFrontCtx[i])];new n.a("front/vars/"+e,o,t).run()}}}},7:function(t,e,o){"use strict";o.d(e,"a",(function(){return g}));var n=o(37),i=o.n(n),a=o(1),r=o(2),s=o(26),l=o(31),c=o(3),d=o(5),u=o(12),h=o(14),p=function(t,e,o,n){var i,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(r=(a<3?i(r):a>3?i(e,o,r):i(e,o))||r);return a>3&&r&&Object.defineProperty(e,o,r),r};class g{constructor(t=new g.Options,e=r.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=r.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new g.Options(t),this.localMedia=[],this.mode=e,this.mediaCounter=this._numMediaPerPage,this.reload=function(t,e){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,t()},300)}}(()=>this.load()),Object(a.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(a.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(a.o)(()=>this.options.numPosts,t=>{const e=r.a.get(t,this.mode);this.localMedia.length<e&&e<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,e)}),Object(a.o)(()=>this._media,t=>this.media=t),Object(a.o)(()=>this._numMediaToShow,t=>this.numMediaToShow=t),Object(a.o)(()=>this._numMediaPerPage,t=>this.numMediaPerPage=t),Object(a.o)(()=>this._canLoadMore,t=>this.canLoadMore=t)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const t=r.a.get(this.options.numPosts,this.mode,!0),e=parseInt(t.toString());return e<1||isNaN(e)?1:t}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const t=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,t>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(t=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,t()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(t,e,o){return this.cancelFetch(),g.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,a)=>{h.a.getFeedMedia(this.options,t,e,t=>this.cancelFetch=t).then(t=>{var e;if("object"!=typeof t||"object"!=typeof t.data||!Array.isArray(t.data.media))throw{message:"The media response is malformed or corrupt",response:t};o&&(this.localMedia=[]),this.localMedia.push(...t.data.media),this.stories=null!==(e=t.data.stories)&&void 0!==e?e:[],this.totalMedia=t.data.total,n&&n()}).catch(t=>{var e;if(i.a.isCancel(t))return null;const o=new g.Events.FetchFailEvent(g.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(e=t.message)&&void 0!==e?e:t.response.data.message,response:t.response}});return document.dispatchEvent(o),a&&a(t),t}).finally(()=>this.isLoading=!1)})):new Promise(t=>{this.localMedia=[],this.totalMedia=0,t&&t()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}p([a.n],g.prototype,"media",void 0),p([a.n],g.prototype,"canLoadMore",void 0),p([a.n],g.prototype,"stories",void 0),p([a.n],g.prototype,"numLoadedMore",void 0),p([a.n],g.prototype,"options",void 0),p([a.n],g.prototype,"totalMedia",void 0),p([a.n],g.prototype,"mode",void 0),p([a.n],g.prototype,"isLoaded",void 0),p([a.n],g.prototype,"isLoading",void 0),p([a.n],g.prototype,"isLoadingMore",void 0),p([a.f],g.prototype,"reload",void 0),p([a.n],g.prototype,"localMedia",void 0),p([a.n],g.prototype,"numMediaToShow",void 0),p([a.n],g.prototype,"numMediaPerPage",void 0),p([a.n],g.prototype,"mediaCounter",void 0),p([a.h],g.prototype,"_media",null),p([a.h],g.prototype,"_numMediaToShow",null),p([a.h],g.prototype,"_numMediaPerPage",null),p([a.h],g.prototype,"_canLoadMore",null),p([a.f],g.prototype,"loadMore",null),p([a.f],g.prototype,"load",null),p([a.f],g.prototype,"loadMedia",null),function(t){let e,o,n,i,h,g,f,m,y;!function(t){t.FETCH_FAIL="sli/feed/fetch_fail";class e extends CustomEvent{constructor(t,e){super(t,e)}}t.FetchFailEvent=e}(e=t.Events||(t.Events={}));class v{constructor(t={}){v.setFromObject(this,t)}static setFromObject(e,o={}){var n,i,a,l,d,u,h,p,g,f,m,y;return e.accounts=o.accounts?o.accounts.slice():t.DefaultOptions.accounts,e.hashtags=o.hashtags?o.hashtags.slice():t.DefaultOptions.hashtags,e.tagged=o.tagged?o.tagged.slice():t.DefaultOptions.tagged,e.layout=s.a.getById(o.layout).id,e.numColumns=r.a.normalize(o.numColumns,t.DefaultOptions.numColumns),e.highlightFreq=r.a.normalize(o.highlightFreq,t.DefaultOptions.highlightFreq),e.mediaType=o.mediaType||t.DefaultOptions.mediaType,e.postOrder=o.postOrder||t.DefaultOptions.postOrder,e.numPosts=r.a.normalize(o.numPosts,t.DefaultOptions.numPosts),e.linkBehavior=r.a.normalize(o.linkBehavior,t.DefaultOptions.linkBehavior),e.feedWidth=r.a.normalize(o.feedWidth,t.DefaultOptions.feedWidth),e.feedHeight=r.a.normalize(o.feedHeight,t.DefaultOptions.feedHeight),e.feedPadding=r.a.normalize(o.feedPadding,t.DefaultOptions.feedPadding),e.imgPadding=r.a.normalize(o.imgPadding,t.DefaultOptions.imgPadding),e.textSize=r.a.normalize(o.textSize,t.DefaultOptions.textSize),e.bgColor=o.bgColor||t.DefaultOptions.bgColor,e.hoverInfo=o.hoverInfo?o.hoverInfo.slice():t.DefaultOptions.hoverInfo,e.textColorHover=o.textColorHover||t.DefaultOptions.textColorHover,e.bgColorHover=o.bgColorHover||t.DefaultOptions.bgColorHover,e.showHeader=r.a.normalize(o.showHeader,t.DefaultOptions.showHeader),e.headerInfo=r.a.normalize(o.headerInfo,t.DefaultOptions.headerInfo),e.headerAccount=null!==(n=o.headerAccount)&&void 0!==n?n:t.DefaultOptions.headerAccount,e.headerAccount=null===e.headerAccount||void 0===c.b.getById(e.headerAccount)?c.b.list.length>0?c.b.list[0].id:null:e.headerAccount,e.headerStyle=r.a.normalize(o.headerStyle,t.DefaultOptions.headerStyle),e.headerTextSize=r.a.normalize(o.headerTextSize,t.DefaultOptions.headerTextSize),e.headerPhotoSize=r.a.normalize(o.headerPhotoSize,t.DefaultOptions.headerPhotoSize),e.headerTextColor=o.headerTextColor||t.DefaultOptions.headerTextColor,e.headerBgColor=o.headerBgColor||t.DefaultOptions.bgColor,e.headerPadding=r.a.normalize(o.headerPadding,t.DefaultOptions.headerPadding),e.customProfilePic=null!==(i=o.customProfilePic)&&void 0!==i?i:t.DefaultOptions.customProfilePic,e.customBioText=o.customBioText||t.DefaultOptions.customBioText,e.includeStories=null!==(a=o.includeStories)&&void 0!==a?a:t.DefaultOptions.includeStories,e.storiesInterval=o.storiesInterval||t.DefaultOptions.storiesInterval,e.showCaptions=r.a.normalize(o.showCaptions,t.DefaultOptions.showCaptions),e.captionMaxLength=r.a.normalize(o.captionMaxLength,t.DefaultOptions.captionMaxLength),e.captionRemoveDots=null!==(l=o.captionRemoveDots)&&void 0!==l?l:t.DefaultOptions.captionRemoveDots,e.captionSize=r.a.normalize(o.captionSize,t.DefaultOptions.captionSize),e.captionColor=o.captionColor||t.DefaultOptions.captionColor,e.showLikes=r.a.normalize(o.showLikes,t.DefaultOptions.showLikes),e.showComments=r.a.normalize(o.showComments,t.DefaultOptions.showCaptions),e.lcIconSize=r.a.normalize(o.lcIconSize,t.DefaultOptions.lcIconSize),e.likesIconColor=null!==(d=o.likesIconColor)&&void 0!==d?d:t.DefaultOptions.likesIconColor,e.commentsIconColor=o.commentsIconColor||t.DefaultOptions.commentsIconColor,e.lightboxShowSidebar=null!==(u=o.lightboxShowSidebar)&&void 0!==u?u:t.DefaultOptions.lightboxShowSidebar,e.numLightboxComments=o.numLightboxComments||t.DefaultOptions.numLightboxComments,e.showLoadMoreBtn=r.a.normalize(o.showLoadMoreBtn,t.DefaultOptions.showLoadMoreBtn),e.loadMoreBtnTextColor=o.loadMoreBtnTextColor||t.DefaultOptions.loadMoreBtnTextColor,e.loadMoreBtnBgColor=o.loadMoreBtnBgColor||t.DefaultOptions.loadMoreBtnBgColor,e.loadMoreBtnText=o.loadMoreBtnText||t.DefaultOptions.loadMoreBtnText,e.autoload=null!==(h=o.autoload)&&void 0!==h?h:t.DefaultOptions.autoload,e.showFollowBtn=r.a.normalize(o.showFollowBtn,t.DefaultOptions.showFollowBtn),e.followBtnText=null!==(p=o.followBtnText)&&void 0!==p?p:t.DefaultOptions.followBtnText,e.followBtnTextColor=o.followBtnTextColor||t.DefaultOptions.followBtnTextColor,e.followBtnBgColor=o.followBtnBgColor||t.DefaultOptions.followBtnBgColor,e.followBtnLocation=r.a.normalize(o.followBtnLocation,t.DefaultOptions.followBtnLocation),e.hashtagWhitelist=o.hashtagWhitelist||t.DefaultOptions.hashtagWhitelist,e.hashtagBlacklist=o.hashtagBlacklist||t.DefaultOptions.hashtagBlacklist,e.captionWhitelist=o.captionWhitelist||t.DefaultOptions.captionWhitelist,e.captionBlacklist=o.captionBlacklist||t.DefaultOptions.captionBlacklist,e.hashtagWhitelistSettings=null!==(g=o.hashtagWhitelistSettings)&&void 0!==g?g:t.DefaultOptions.hashtagWhitelistSettings,e.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:t.DefaultOptions.hashtagBlacklistSettings,e.captionWhitelistSettings=null!==(m=o.captionWhitelistSettings)&&void 0!==m?m:t.DefaultOptions.captionWhitelistSettings,e.captionBlacklistSettings=null!==(y=o.captionBlacklistSettings)&&void 0!==y?y:t.DefaultOptions.captionBlacklistSettings,e.moderation=o.moderation||t.DefaultOptions.moderation,e.moderationMode=o.moderationMode||t.DefaultOptions.moderationMode,e.promotionEnabled=o.promotionEnabled||t.DefaultOptions.promotionEnabled,e.promotions=o.promotions||t.DefaultOptions.promotions,e}static getAllAccounts(t){const e=c.b.idsToAccounts(t.accounts),o=c.b.idsToAccounts(t.tagged);return{all:e.concat(o),accounts:e,tagged:o}}static getSources(t){return{accounts:c.b.idsToAccounts(t.accounts),tagged:c.b.idsToAccounts(t.tagged),hashtags:c.b.getBusinessAccounts().length>0?t.hashtags.filter(t=>t.tag.length>0):[]}}static hasSources(e,o){const n=t.Options.getSources(e),i=n.accounts.length>0||n.tagged.length>0,a=!o&&n.hashtags.length>0;return i||a}static isLimitingPosts(t){return t.moderation.length>0||t.hashtagBlacklist.length>0||t.hashtagWhitelist.length>0||t.captionBlacklist.length>0||t.captionWhitelist.length>0}}p([a.n],v.prototype,"accounts",void 0),p([a.n],v.prototype,"hashtags",void 0),p([a.n],v.prototype,"tagged",void 0),p([a.n],v.prototype,"layout",void 0),p([a.n],v.prototype,"numColumns",void 0),p([a.n],v.prototype,"highlightFreq",void 0),p([a.n],v.prototype,"mediaType",void 0),p([a.n],v.prototype,"postOrder",void 0),p([a.n],v.prototype,"numPosts",void 0),p([a.n],v.prototype,"linkBehavior",void 0),p([a.n],v.prototype,"feedWidth",void 0),p([a.n],v.prototype,"feedHeight",void 0),p([a.n],v.prototype,"feedPadding",void 0),p([a.n],v.prototype,"imgPadding",void 0),p([a.n],v.prototype,"textSize",void 0),p([a.n],v.prototype,"bgColor",void 0),p([a.n],v.prototype,"textColorHover",void 0),p([a.n],v.prototype,"bgColorHover",void 0),p([a.n],v.prototype,"hoverInfo",void 0),p([a.n],v.prototype,"showHeader",void 0),p([a.n],v.prototype,"headerInfo",void 0),p([a.n],v.prototype,"headerAccount",void 0),p([a.n],v.prototype,"headerStyle",void 0),p([a.n],v.prototype,"headerTextSize",void 0),p([a.n],v.prototype,"headerPhotoSize",void 0),p([a.n],v.prototype,"headerTextColor",void 0),p([a.n],v.prototype,"headerBgColor",void 0),p([a.n],v.prototype,"headerPadding",void 0),p([a.n],v.prototype,"customBioText",void 0),p([a.n],v.prototype,"customProfilePic",void 0),p([a.n],v.prototype,"includeStories",void 0),p([a.n],v.prototype,"storiesInterval",void 0),p([a.n],v.prototype,"showCaptions",void 0),p([a.n],v.prototype,"captionMaxLength",void 0),p([a.n],v.prototype,"captionRemoveDots",void 0),p([a.n],v.prototype,"captionSize",void 0),p([a.n],v.prototype,"captionColor",void 0),p([a.n],v.prototype,"showLikes",void 0),p([a.n],v.prototype,"showComments",void 0),p([a.n],v.prototype,"lcIconSize",void 0),p([a.n],v.prototype,"likesIconColor",void 0),p([a.n],v.prototype,"commentsIconColor",void 0),p([a.n],v.prototype,"lightboxShowSidebar",void 0),p([a.n],v.prototype,"numLightboxComments",void 0),p([a.n],v.prototype,"showLoadMoreBtn",void 0),p([a.n],v.prototype,"loadMoreBtnText",void 0),p([a.n],v.prototype,"loadMoreBtnTextColor",void 0),p([a.n],v.prototype,"loadMoreBtnBgColor",void 0),p([a.n],v.prototype,"autoload",void 0),p([a.n],v.prototype,"showFollowBtn",void 0),p([a.n],v.prototype,"followBtnText",void 0),p([a.n],v.prototype,"followBtnTextColor",void 0),p([a.n],v.prototype,"followBtnBgColor",void 0),p([a.n],v.prototype,"followBtnLocation",void 0),p([a.n],v.prototype,"hashtagWhitelist",void 0),p([a.n],v.prototype,"hashtagBlacklist",void 0),p([a.n],v.prototype,"captionWhitelist",void 0),p([a.n],v.prototype,"captionBlacklist",void 0),p([a.n],v.prototype,"hashtagWhitelistSettings",void 0),p([a.n],v.prototype,"hashtagBlacklistSettings",void 0),p([a.n],v.prototype,"captionWhitelistSettings",void 0),p([a.n],v.prototype,"captionBlacklistSettings",void 0),p([a.n],v.prototype,"moderation",void 0),p([a.n],v.prototype,"moderationMode",void 0),p([a.n],v.prototype,"promotionEnabled",void 0),t.Options=v;class w{constructor(t){Object.getOwnPropertyNames(t).map(e=>{this[e]=t[e]})}getCaption(t){const e=t.caption?t.caption:"";return this.captionMaxLength&&e.length?Object(d.l)(Object(d.o)(e,this.captionMaxLength)):e}static compute(e){const o=e.options,n=e.mode,i=new w({accounts:c.b.filterExisting(o.accounts),tagged:c.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(t=>t.tag.length>0),layout:s.a.getById(o.layout),numColumns:r.a.get(o.numColumns,n,!0),highlightFreq:r.a.get(o.highlightFreq,n,!0),numPosts:r.a.get(o.numPosts,n,!0),linkBehavior:r.a.get(o.linkBehavior,n,!0),bgColor:Object(u.a)(o.bgColor),textColorHover:Object(u.a)(o.textColorHover),bgColorHover:Object(u.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:r.a.get(o.showHeader,n,!0),headerInfo:r.a.get(o.headerInfo,n,!0),headerStyle:r.a.get(o.headerStyle,n,!0),headerTextColor:Object(u.a)(o.headerTextColor),headerBgColor:Object(u.a)(o.headerBgColor),headerPadding:r.a.get(o.headerPadding,n,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:r.a.get(o.showCaptions,n,!0),captionMaxLength:r.a.get(o.captionMaxLength,n,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(u.a)(o.captionColor),showLikes:r.a.get(o.showLikes,n,!0),showComments:r.a.get(o.showComments,n,!0),likesIconColor:Object(u.a)(o.likesIconColor),commentsIconColor:Object(u.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:r.a.get(o.showLoadMoreBtn,n,!0),loadMoreBtnTextColor:Object(u.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(u.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:r.a.get(o.showFollowBtn,n,!0),autoload:o.autoload,followBtnLocation:r.a.get(o.followBtnLocation,n,!0),followBtnTextColor:Object(u.a)(o.followBtnTextColor),followBtnBgColor:Object(u.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:c.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(i.numColumns=Math.max(i.numColumns,1),e.mode!==r.a.Mode.DESKTOP&&(i.numColumns=i.numColumns<1?r.a.get(o.numColumns,r.a.Mode.DESKTOP):i.numColumns),i.numPosts=parseInt(i.numPosts+""),(i.numPosts<1||isNaN(i.numPosts))&&(i.numPosts=1),i.allAccounts=i.accounts.concat(i.tagged.filter(t=>!i.accounts.includes(t))),i.allAccounts.length>0&&(i.account=o.headerAccount&&i.allAccounts.includes(o.headerAccount)?c.b.getById(o.headerAccount):c.b.getById(i.allAccounts[0])),i.showHeader=i.showHeader&&null!==i.account,i.showHeader&&(i.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:c.b.getProfilePicUrl(i.account)),i.showFollowBtn=i.showFollowBtn&&null!==i.account,i.showLoadMoreBtn=i.showLoadMoreBtn&&e.canLoadMore,i.showBio=i.headerInfo.some(e=>e===t.HeaderInfo.BIO),i.showBio){const t=o.customBioText.trim().length>0?o.customBioText:null!==i.account?c.b.getBioText(i.account):"";i.bioText=Object(d.l)(t),i.showBio=i.bioText.length>0}return i.feedWidth=this.normalizeCssSize(o.feedWidth,n,"auto"),i.feedHeight=this.normalizeCssSize(o.feedHeight,n,"auto"),i.feedPadding=this.normalizeCssSize(o.feedPadding,n,"0"),i.imgPadding=this.normalizeCssSize(o.imgPadding,n,"0"),i.textSize=this.normalizeCssSize(o.textSize,n,"inherit"),i.headerTextSize=this.normalizeCssSize(o.headerTextSize,n,"inherit"),i.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,n,"50px"),i.captionSize=this.normalizeCssSize(o.captionSize,n,"inherit"),i.lcIconSize=this.normalizeCssSize(o.lcIconSize,n,"inherit"),i.buttonPadding=Math.max(10,r.a.get(o.imgPadding,n))+"px",i.showLcIcons=i.showLikes||i.showComments,i}static normalizeCssSize(t,e,o=null){const n=r.a.get(t,e);return n?n+"px":o}}t.ComputedOptions=w,t.HashtagSorting=Object(l.c)({recent:"Most recent",popular:"Most popular"}),function(t){t.ALL="all",t.PHOTOS="photos",t.VIDEOS="videos"}(o=t.MediaType||(t.MediaType={})),function(t){t.NOTHING="nothing",t.SELF="self",t.NEW_TAB="new_tab",t.LIGHTBOX="lightbox"}(n=t.LinkBehavior||(t.LinkBehavior={})),function(t){t.DATE_ASC="date_asc",t.DATE_DESC="date_desc",t.POPULARITY_ASC="popularity_asc",t.POPULARITY_DESC="popularity_desc",t.RANDOM="random"}(i=t.PostOrder||(t.PostOrder={})),function(t){t.USERNAME="username",t.DATE="date",t.CAPTION="caption",t.LIKES_COMMENTS="likes_comments",t.INSTA_LINK="insta_link"}(h=t.HoverInfo||(t.HoverInfo={})),function(t){t.NORMAL="normal",t.BOXED="boxed",t.CENTERED="centered"}(g=t.HeaderStyle||(t.HeaderStyle={})),function(t){t.BIO="bio",t.PROFILE_PIC="profile_pic",t.FOLLOWERS="followers",t.MEDIA_COUNT="media_count"}(f=t.HeaderInfo||(t.HeaderInfo={})),function(t){t.HEADER="header",t.BOTTOM="bottom",t.BOTH="both"}(m=t.FollowBtnLocation||(t.FollowBtnLocation={})),function(t){t.WHITELIST="whitelist",t.BLACKLIST="blacklist"}(y=t.ModerationMode||(t.ModerationMode={})),t.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:i.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX,phone:n.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[h.LIKES_COMMENTS,h.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[f.PROFILE_PIC,f.BIO]},headerAccount:null,headerStyle:{desktop:g.NORMAL,phone:g.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:m.HEADER,phone:m.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:y.BLACKLIST,promotionEnabled:!0,promotions:{}}}(g||(g={}))}},[[560,0,1]]])}));
ui/dist/wp-block.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[9],{0:function(t,o){t.exports=e},10:function(e,t,o){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},102:function(e,t,o){"use strict";o.d(t,"a",(function(){return O}));var n=o(0),a=o.n(n),i=o(39),s=o(10),r=o.n(s),c=o(4),l=o(3),u=o(567),d=o(565),p=o(44),h=o(121),m=o(109),f=o(33),g=o(6),b=o(22),y=o(11),E=o(68),v=Object(c.b)((function({account:e,onUpdate:t}){const[o,n]=a.a.useState(!1),[i,s]=a.a.useState(""),[c,v]=a.a.useState(!1),O=e.type===l.a.Type.PERSONAL,w=l.b.getBioText(e),S=()=>{e.customBio=i,v(!0),f.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})},_=o=>{e.customProfilePicUrl=o,v(!0),f.a.updateAccount(e).then(()=>{v(!1),t&&t()})};return a.a.createElement("div",{className:r.a.root},a.a.createElement("div",{className:r.a.container},a.a.createElement("div",{className:r.a.infoColumn},a.a.createElement("a",{href:l.b.getProfileUrl(e),target:"_blank",className:r.a.username},"@",e.username),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Spotlight ID:"),e.id),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"User ID:"),e.userId),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Type:"),e.type),!o&&a.a.createElement("div",{className:r.a.row},a.a.createElement("div",null,a.a.createElement("span",{className:r.a.label},"Bio:"),a.a.createElement("a",{className:r.a.editBioLink,onClick:()=>{s(l.b.getBioText(e)),n(!0)}},"Edit bio"),a.a.createElement("pre",{className:r.a.bio},w.length>0?w:"(No bio)"))),o&&a.a.createElement("div",{className:r.a.row},a.a.createElement("textarea",{className:r.a.bioEditor,value:i,onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(S(),e.preventDefault(),e.stopPropagation())},rows:4}),a.a.createElement("div",{className:r.a.bioFooter},a.a.createElement("div",{className:r.a.bioEditingControls},c&&a.a.createElement("span",null,"Please wait ...")),a.a.createElement("div",{className:r.a.bioEditingControls},a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.DANGER,disabled:c,onClick:()=>{e.customBio="",v(!0),f.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})}},"Reset"),a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.SECONDARY,disabled:c,onClick:()=>{n(!1)}},"Cancel"),a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.PRIMARY,disabled:c,onClick:S},"Save"))))),a.a.createElement("div",{className:r.a.picColumn},a.a.createElement("div",null,a.a.createElement(E.a,{account:e,className:r.a.profilePic})),a.a.createElement(h.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),o=m.a.media.attachment(t).attributes.url;_(o)}},({open:e})=>a.a.createElement(g.a,{type:g.c.SECONDARY,className:r.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&a.a.createElement("a",{className:r.a.resetCustomPic,onClick:()=>{_("")}},"Reset profile picture"))),O&&a.a.createElement("div",{className:r.a.personalInfoMessage},a.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",a.a.createElement("a",{href:y.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),a.a.createElement(p.a,{label:"View access token",stealth:!0},a.a.createElement("div",{className:r.a.row},e.accessToken&&a.a.createElement("div",null,a.a.createElement("p",null,a.a.createElement("span",{className:r.a.label},"Expires on:"),a.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),a.a.createElement("pre",{className:r.a.accessToken},e.accessToken.code)))))}));function O({isOpen:e,onClose:t,onUpdate:o,account:n}){return a.a.createElement(i.a,{isOpen:e,title:"Account details",icon:"admin-users",onClose:t},a.a.createElement(i.a.Content,null,a.a.createElement(v,{account:n,onUpdate:o})))}},108:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var n=o(0),a=o.n(n),i=o(4),s=o(26),r=o(7);const c=Object(i.b)(({feed:e})=>{const t=s.a.getById(e.options.layout),o=r.a.ComputedOptions.compute(e);return a.a.createElement("div",{className:"feed"},a.a.createElement(t.component,{feed:e,options:o}))})},118:function(e,t,o){e.exports={pill:"ProPill__pill"}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},13:function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),function(e){let t,o;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(o=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===o.Type.POPULAR_HASHTAG||e.source.type===o.Type.RECENT_HASHTAG}(n||(n={}))},14:function(e,t,o){"use strict";var n=o(37),a=o.n(n),i=o(17),s=o(38);const r=i.a.config.restApi.baseUrl,c={};i.a.config.restApi.authToken&&(c["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const l=a.a.create({baseURL:r,headers:c}),u={config:i.a.config.restApi,driver:l,getAccounts:()=>l.get("/accounts"),getFeeds:()=>l.get("/feeds"),getFeedMedia:(e,t=0,o=0,n)=>{const i=n?new a.a.CancelToken(n):void 0;return l.post("/media/fetch",{options:e,num:o,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(s.b)(t)}};t.a=u},148:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(125),s=o(20),r=o.n(s),c=o(4),l=o(47),u=o(3),d=o(6),p=o(9),h=o(120),m=o(27),f=o(23),g=o(33),b=o(102),y=o(68),E=o(11),v=o(83),O=Object(c.b)((function({accounts:e,showDelete:t,onDeleteError:o}){e=null!=e?e:[];const[n,i]=a.a.useState(!1),[s,c]=a.a.useState(null),[O,w]=a.a.useState(!1),[S,_]=a.a.useState(),[C,P]=a.a.useState(!1),B=e=>()=>{c(e),i(!0)},A=e=>()=>{g.a.openAuthWindow(e.type,0,()=>{E.a.restApi.deleteAccountMedia(e.id)})},I=e=>()=>{_(e),w(!0)},L={cols:{username:r.a.usernameCol,type:r.a.typeCol,usages:r.a.usagesCol,actions:r.a.actionsCol},cells:{username:r.a.usernameCell,type:r.a.typeCell,usages:r.a.usagesCell,actions:r.a.actionsCell}};return a.a.createElement("div",{className:"accounts-list"},a.a.createElement(h.a,{styleMap:L,rows:e,cols:[{id:"username",label:"Username",render:e=>a.a.createElement("div",null,a.a.createElement(y.a,{account:e,className:r.a.profilePic}),a.a.createElement("a",{className:r.a.username,onClick:B(e)},e.username))},{id:"type",label:"Type",render:e=>a.a.createElement("span",{className:r.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>a.a.createElement("span",{className:r.a.usages},e.usages.map((e,t)=>!!m.a.getById(e)&&a.a.createElement(l.a,{key:t,to:f.a.at({screen:"edit",id:e.toString()})},m.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&a.a.createElement("div",{className:r.a.actionsList},a.a.createElement(d.a,{className:r.a.action,type:d.c.SECONDARY,tooltip:"Account info",onClick:B(e)},a.a.createElement(p.a,{icon:"info"})),a.a.createElement(d.a,{className:r.a.action,type:d.c.SECONDARY,tooltip:"Reconnect account",onClick:A(e)},a.a.createElement(p.a,{icon:"image-rotate"})),a.a.createElement(d.a,{className:r.a.actions,type:d.c.DANGER,tooltip:"Remove account",onClick:I(e)},a.a.createElement(p.a,{icon:"trash"})))}]}),a.a.createElement(b.a,{isOpen:n,onClose:()=>i(!1),account:s}),S&&a.a.createElement(v.a,{isOpen:O,title:"Are you sure?",buttons:[C?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:C,cancelDisabled:C,onAccept:()=>{P(!0),g.a.deleteAccount(S.id).catch(()=>{o&&o("An error occurred while trying to remove the account.")}).finally(()=>P(!1))},onCancel:()=>{_(null),w(!1)}},a.a.createElement("p",null,"Are you sure you want to delete"," ",a.a.createElement("span",{style:{fontWeight:"bold"}},S.username),"?"," ","This will also delete all saved media associated with this account."),S.type===u.a.Type.BUSINESS&&1===u.b.getBusinessAccounts().length&&a.a.createElement("p",null,a.a.createElement("b",null,"Note:")," Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work.")))})),w=o(22),S=o(122),_=o(93),C=o.n(_);t.a=Object(c.b)((function(){const[e,t]=a.a.useState("");return u.b.hasAccounts()?a.a.createElement("div",{className:C.a.root},e.length>0&&a.a.createElement(w.a,{type:w.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>t("")},e),a.a.createElement("div",{className:C.a.connectBtn},a.a.createElement(i.a,null)),a.a.createElement(O,{accounts:u.b.list,showDelete:!0,onDeleteError:t})):a.a.createElement(S.a,null)}))},17:function(e,t,o){"use strict";let n;t.a=n={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${n.config.imagesUrl}/${e}`}},18:function(e,t,o){"use strict";o.d(t,"e",(function(){return r})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return l})),o.d(t,"a",(function(){return u})),o.d(t,"k",(function(){return d})),o.d(t,"g",(function(){return p})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return m})),o.d(t,"d",(function(){return g})),o.d(t,"j",(function(){return b})),o.d(t,"f",(function(){return y}));var n=o(0),a=o.n(n),i=o(40),s=o(36);function r(e){const[t,o]=a.a.useState(e),n=a.a.useRef(t);return[t,()=>n.current,e=>o(n.current=e)]}function c(e,t,o=[]){function a(n){!e.current||e.current.contains(n.target)||o.some(e=>e&&e.current&&e.current.contains(n.target))||t(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",a),document.addEventListener("touchend",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchend",a)}))}function l(e,t){Object(n.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function u(e,t,o=100){const[i,s]=a.a.useState(e);return Object(n.useEffect)(()=>{let n=null;return e===t?n=setTimeout(()=>s(t),o):s(!t),()=>{null!==n&&clearTimeout(n)}},[e]),[i,s]}function d(e){const[t,o]=a.a.useState(Object(s.b)()),i=()=>{const t=Object(s.b)();o(t),e&&e(t)};return Object(n.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){const o=o=>{if(t)return(o||window.event).returnValue=e,e};Object(n.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[t])}function m(e,t){const o=a.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(e,t,o,a=[],i=[]){Object(n.useEffect)(()=>(a.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function g(e,t,o=[],n=[]){f(document,e,t,o,n)}function b(e,t,o=[],n=[]){f(window,e,t,o,n)}function y(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}o(38)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(1),i=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return n(this,e,t)}set(e,t){s(this,t,e)}with(e,t){const n=r(this,t,e);return new o(n.desktop,n.tablet,n.phone)}}function n(e,t,o=!1){if(!e)return;const n=e[t.prop];return!o||""!==n&&null!=n&&""!==n?n:e.desktop}function s(e,t,o){return e[o.prop]=t,e}function r(e,t,o){return s({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,o)}i([a.n],o.prototype,"desktop",void 0),i([a.n],o.prototype,"tablet",void 0),i([a.n],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const n=e.MODES.findIndex(e=>e===o);return void 0===n?t.DESKTOP:e.MODES[(n+1)%e.MODES.length]},e.get=n,e.set=s,e.withValue=r,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(n||(n={}))},20:function(e,t,o){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-list":"AccountsList__actions-list layout__flex-row",actionsList:"AccountsList__actions-list layout__flex-row",action:"AccountsList__action"}},213:function(e,t){!function(){e.exports=this.wp.components}()},23:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(1),a=o(63),i=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(a.parse)(e.search),this.unListen=null,this.listeners=[],Object(n.o)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(a.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=null){var o;return null!==(o=this.parsed[e])&&void 0!==o?o:t}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(a.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(o=>{e[o]&&0===e[o].length?delete t[o]:t[o]=e[o]}),t}}i([n.n],s.prototype,"path",void 0),i([n.n],s.prototype,"parsed",void 0),i([n.h],s.prototype,"_path",null);const r=new s},26:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));class n{static getById(e){const t=n.list.find(t=>t.id===e);return!t&&n.list.length>0?n.list[0]:t}static getName(e){const t=n.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){n.list.push(e)}}n.list=[]},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(14),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(n||(n={}));const s=Object(i.n)([]),r="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",c=e=>s.find(t=>t.id===e),l=e=>"https://instagram.com/"+e;function u(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===n.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return s.replace(t),s}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:s,DEFAULT_PROFILE_PIC:r,getById:c,getByUsername:e=>s.find(t=>t.username===e),hasAccounts:()=>s.length>0,filterExisting:e=>e.filter(e=>void 0!==c(e)),idsToAccounts:e=>e.map(e=>c(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>s.filter(e=>e.type===n.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:r,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>l(e.username),getUsernameUrl:l,loadAccounts:function(){return a.a.getAccounts().then(u).catch(e=>{throw a.a.getErrorReason(e)})},loadFromResponse:u}},30:function(e,o){e.exports=t},31:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return u})),o.d(t,"c",(function(){return p}));var n=o(0),a=o.n(n),i=o(30),s=o.n(i),r=o(4);class c{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let o=this.cache.get(e);if(void 0===o){o=t(this);let n=this.extensions.get(e);n&&n.forEach(e=>o=e(this,o)),this.cache.set(e,o)}return o}has(e){return this.factories.has(e)}}class l{constructor(e,t,o){this.key=e,this.mount=t,this.modules=o,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new d(t,e))}(this);const e=p({root:()=>null,"root/children":()=>[]});this.container=new c(e,this.modules);const t=this.container.get("root/children").map((e,t)=>a.a.createElement(e,{key:t})),o=a.a.createElement(r.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),s.a.render(o,this.mount)})}}function u(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class d extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function p(e){return new Map(Object.entries(e))}},337:function(e,t){!function(){e.exports=this.wp.blocks}()},338:function(e,t){!function(){e.exports=this.wp.blockEditor}()},36:function(e,t,o){"use strict";function n(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function a(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return i}))},38:function(e,t,o){"use strict";function n(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return a}))},48:function(e,t,o){"use strict";o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return r}));var n=o(0),a=o.n(n),i=o(4);const s=(e,t)=>Object(i.b)(o=>a.a.createElement(e,Object.assign(Object.assign({},t),o))),r=(e,t)=>Object(i.b)(o=>{const n={};return Object.keys(t).forEach(e=>n[e]=t[e](o)),a.a.createElement(e,Object.assign({},n,o))})},5:function(e,t,o){"use strict";o.d(t,"o",(function(){return l})),o.d(t,"b",(function(){return u})),o.d(t,"j",(function(){return d})),o.d(t,"e",(function(){return p})),o.d(t,"c",(function(){return h})),o.d(t,"i",(function(){return m})),o.d(t,"k",(function(){return f})),o.d(t,"g",(function(){return g})),o.d(t,"a",(function(){return b})),o.d(t,"f",(function(){return y})),o.d(t,"h",(function(){return E})),o.d(t,"n",(function(){return v})),o.d(t,"m",(function(){return O})),o.d(t,"l",(function(){return w})),o.d(t,"d",(function(){return S}));var n=o(0),a=o.n(n),i=o(160),s=o(159),r=o(13);let c=0;function l(){return c++}function u(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(o){if(!o(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1;return!0}function d(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(o=>"object"==typeof e[o]?"object"!=typeof t[o]||!d(e[o],t[o]):Array.isArray(e[o])?!Array.isArray(t[o])||!u(e[o],t[o]):e[o]!==t[o]):e===t}function p(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function m(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function f(e,t,o=0,i=!1){let s=e.trim();i&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const r=s.split("\n"),c=r.map((e,o)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let s,c=[];for(;null!==(s=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],o=a.a.createElement("a",{href:t,target:"_blank",key:l()},s[0]),n=e.substr(0,s.index),i=e.substr(s.index+s[0].length);c.push(n),c.push(o),e=i}return e.length&&c.push(e),t&&(c=t(c,o)),r.length>1&&c.push(a.a.createElement("br",{key:l()})),a.a.createElement(n.Fragment,{key:l()},c)});return o>0?c.slice(0,o):c}function g(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var b;function y(e,t=b.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function E(e,t=b.MEDIUM){return e.thumbnail?e.thumbnail:y(g(e.permalink),t)}function v(e,t){const o=/(\s+)/g;let n,a=0,i=0,s="";for(;null!==(n=o.exec(e))&&a<t;){const t=n.index+n[1].length;s+=e.substr(i,t-i),i=t,a++}return i<e.length&&(s+=" ..."),s}function O(e){return Object(i.a)(Object(s.a)(e),{addSuffix:!0})}function w(e,t){const o=[];return e.forEach((e,n)=>{const a=n%t;Array.isArray(o[a])?o[a].push(e):o[a]=[e]}),o}function S(e,t){return function e(t){if(t.type===r.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(o=>{e.src=t.url,e.addEventListener("loadeddata",()=>{o({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===r.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===r.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const o=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*o,height:e.height*o}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(b||(b={}))},562:function(e,t,o){"use strict";o.r(t),o(215);var n=o(337),a=o(0),i=o.n(a),s=o(87),r=o.n(s),c=o(4),l=o(338),u=o(213),d=o(7),p=o(27),h=o(2),m=o(1),f=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class g{constructor(){this.feedsLoaded=!1,this.accountsLoaded=!1,this.isLoaded=!1,Object(m.o)(()=>this.feedsLoaded&&this.accountsLoaded,e=>{this.isLoaded=e})}}f([m.n],g.prototype,"feedsLoaded",void 0),f([m.n],g.prototype,"accountsLoaded",void 0),f([m.n],g.prototype,"isLoaded",void 0);var b=new g,y=o(18),E=o(17),v=o(8),O=o(108),w=o(11);const S={label:"- Choose a feed -",value:""},_=w.a.config.adminUrl+"admin.php?page=spotlight-instagram&screen=new",C=Object(c.b)(({attributes:e,setAttributes:t,className:o})=>{const n=i.a.useRef(null),[s,c]=i.a.useState(null),[m,f]=i.a.useState(!1),[g,w]=i.a.useState(!1);function C(e){if(b.isLoaded)if(e){const o=null!==n.current&&n.current===e,a=p.a.getById(e);if(o)a||(c(null),f(!0),w(!0));else{t({feedId:e}),n.current=e;const o=a?new d.a(a.options):null;o&&o.load(),c(o),f(null===o),w(null===o)}}else 1===p.a.list.length?C(p.a.list[0].id):f(!0)}function P(e){t({feedId:parseInt(e)}),f(!1)}if(Object(a.useEffect)(()=>C(e.feedId),[b.isLoaded,e.feedId]),Object(a.useEffect)(()=>p.a.list.observe(()=>{C(e.feedId)}),[e.feedId]),Object(y.k)(i.a.useCallback(e=>{s&&(s.mode=h.a.getModeForWindowSize(e))},[s])),!b.isLoaded)return i.a.createElement("div",null);const B=e.feedId?e.feedId.toString():"",A=p.a.list.map(e=>({label:e.name?e.name:"(no name)",value:""+e.id}));return i.a.createElement("div",null,!m&&i.a.createElement(l.BlockControls,null,!m&&p.a.list.length>1&&i.a.createElement(u.Toolbar,null,i.a.createElement("div",{className:r.a.selector},i.a.createElement("label",{className:r.a.selectorLabel},i.a.createElement("span",null,"Feed:")),i.a.createElement("div",{className:r.a.selectorListContainer},i.a.createElement(u.SelectControl,{value:B,onChange:P,options:A}))))),i.a.createElement("div",null,m?i.a.createElement("div",{className:r.a.root},i.a.createElement("img",{className:r.a.logo,src:E.a.image("spotlight-favicon.png"),alt:""}),g&&i.a.createElement("div",{className:r.a.missingFeedMsg},"This block is hidden because the selected feed (with ID #",B,") does not"," ","exist or has been deleted."),0===p.a.list.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.a.label},"You do not have any Instagram feeds."),i.a.createElement("div",{className:r.a.label},"Go to"," ",i.a.createElement("a",{href:_,target:"_blank"},"Instagram feeds → Add New")," ","to begin designing your first feed."),i.a.createElement("div",{className:r.a.label},"You can keep this page open and Spotlight's block will automatically detect"," ","your new feed.")),p.a.list.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.a.label},"Choose which Instagram feed to show:"),i.a.createElement(u.SelectControl,{value:B,onChange:P,options:[S].concat(A)}))):i.a.createElement("div",{className:Object(v.b)(o,r.a.feedContainer)},s&&(s.isLoading||s.isLoaded&&s.media.length>0)&&i.a.createElement(O.a,{feed:s}),s&&s.isLoaded&&0===s.media.length&&i.a.createElement("div",null,"This feed does not have any posts to show"))))}),P={title:"Spotlight Instagram Feed",description:"Embed a Spotlight Instagram feed",category:"widgets",icon:"instagram",keywords:["instagram","feed","feeds","ig","story","spotlight"],attributes:{feedId:{type:"number"}},supports:{html:!1},edit:function(e){return i.a.createElement(C,Object.assign({},e))}};var B=o(3);Object(n.registerBlockType)("spotlight/instagram",P),p.a.loadFeeds().then(()=>b.feedsLoaded=!0).catch(console.error),B.b.loadAccounts().then(()=>b.accountsLoaded=!0).catch(console.error),window.addEventListener("focus",(function(){b.feedsLoaded&&B.b.loadAccounts().then(()=>{p.a.loadFeeds().catch(console.error)}).catch(console.error)}))},68:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(92),s=o.n(i),r=o(3),c=o(8),l=o(4);t.a=Object(l.b)((function(e){var{account:t,square:o,className:n}=e,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["account","square","className"]);const l=r.b.getProfilePicUrl(t),u=Object(c.b)(o?s.a.square:s.a.round,n);return a.a.createElement("img",Object.assign({},i,{className:u,src:r.b.DEFAULT_PROFILE_PIC,srcSet:l+" 1x",alt:t.username+" profile picture"}))}))},69:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(0),a=o.n(n),i=o(118),s=o.n(i),r=o(11),c=o(8);const l=({className:e,children:t})=>a.a.createElement("a",{className:Object(c.b)(s.a.pill,e),href:r.a.resources.upgradeLocalUrl,target:"_blank",tabIndex:-1},"PRO",t)},7:function(e,t,o){"use strict";o.d(t,"a",(function(){return m}));var n=o(37),a=o.n(n),i=o(1),s=o(2),r=o(26),c=o(31),l=o(3),u=o(5),d=o(12),p=o(14),h=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class m{constructor(e=new m.Options,t=s.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=s.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new m.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=s.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=s.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),m.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,i)=>{p.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,n&&n()}).catch(e=>{var t;if(a.a.isCancel(e))return null;const o=new m.Events.FetchFailEvent(m.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}h([i.n],m.prototype,"media",void 0),h([i.n],m.prototype,"canLoadMore",void 0),h([i.n],m.prototype,"stories",void 0),h([i.n],m.prototype,"numLoadedMore",void 0),h([i.n],m.prototype,"options",void 0),h([i.n],m.prototype,"totalMedia",void 0),h([i.n],m.prototype,"mode",void 0),h([i.n],m.prototype,"isLoaded",void 0),h([i.n],m.prototype,"isLoading",void 0),h([i.n],m.prototype,"isLoadingMore",void 0),h([i.f],m.prototype,"reload",void 0),h([i.n],m.prototype,"localMedia",void 0),h([i.n],m.prototype,"numMediaToShow",void 0),h([i.n],m.prototype,"numMediaPerPage",void 0),h([i.n],m.prototype,"mediaCounter",void 0),h([i.h],m.prototype,"_media",null),h([i.h],m.prototype,"_numMediaToShow",null),h([i.h],m.prototype,"_numMediaPerPage",null),h([i.h],m.prototype,"_canLoadMore",null),h([i.f],m.prototype,"loadMore",null),h([i.f],m.prototype,"load",null),h([i.f],m.prototype,"loadMedia",null),function(e){let t,o,n,a,p,m,f,g,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class y{constructor(e={}){y.setFromObject(this,e)}static setFromObject(t,o={}){var n,a,i,c,u,d,p,h,m,f,g,b;return t.accounts=o.accounts?o.accounts.slice():e.DefaultOptions.accounts,t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=o.tagged?o.tagged.slice():e.DefaultOptions.tagged,t.layout=r.a.getById(o.layout).id,t.numColumns=s.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=s.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=s.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=s.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=s.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=s.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=s.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=s.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=s.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=s.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=s.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(n=o.headerAccount)&&void 0!==n?n:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===l.b.getById(t.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:t.headerAccount,t.headerStyle=s.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=s.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=s.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=s.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(a=o.customProfilePic)&&void 0!==a?a:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=s.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=s.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(c=o.captionRemoveDots)&&void 0!==c?c:e.DefaultOptions.captionRemoveDots,t.captionSize=s.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=s.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=s.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=s.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(u=o.likesIconColor)&&void 0!==u?u:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(d=o.lightboxShowSidebar)&&void 0!==d?d:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=s.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(p=o.autoload)&&void 0!==p?p:e.DefaultOptions.autoload,t.showFollowBtn=s.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(h=o.followBtnText)&&void 0!==h?h:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=s.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(m=o.hashtagWhitelistSettings)&&void 0!==m?m:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(g=o.captionWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=o.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=o.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=o.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=l.b.idsToAccounts(e.accounts),o=l.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:l.b.idsToAccounts(e.accounts),tagged:l.b.idsToAccounts(e.tagged),hashtags:l.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,o){const n=e.Options.getSources(t),a=n.accounts.length>0||n.tagged.length>0,i=!o&&n.hashtags.length>0;return a||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}h([i.n],y.prototype,"accounts",void 0),h([i.n],y.prototype,"hashtags",void 0),h([i.n],y.prototype,"tagged",void 0),h([i.n],y.prototype,"layout",void 0),h([i.n],y.prototype,"numColumns",void 0),h([i.n],y.prototype,"highlightFreq",void 0),h([i.n],y.prototype,"mediaType",void 0),h([i.n],y.prototype,"postOrder",void 0),h([i.n],y.prototype,"numPosts",void 0),h([i.n],y.prototype,"linkBehavior",void 0),h([i.n],y.prototype,"feedWidth",void 0),h([i.n],y.prototype,"feedHeight",void 0),h([i.n],y.prototype,"feedPadding",void 0),h([i.n],y.prototype,"imgPadding",void 0),h([i.n],y.prototype,"textSize",void 0),h([i.n],y.prototype,"bgColor",void 0),h([i.n],y.prototype,"textColorHover",void 0),h([i.n],y.prototype,"bgColorHover",void 0),h([i.n],y.prototype,"hoverInfo",void 0),h([i.n],y.prototype,"showHeader",void 0),h([i.n],y.prototype,"headerInfo",void 0),h([i.n],y.prototype,"headerAccount",void 0),h([i.n],y.prototype,"headerStyle",void 0),h([i.n],y.prototype,"headerTextSize",void 0),h([i.n],y.prototype,"headerPhotoSize",void 0),h([i.n],y.prototype,"headerTextColor",void 0),h([i.n],y.prototype,"headerBgColor",void 0),h([i.n],y.prototype,"headerPadding",void 0),h([i.n],y.prototype,"customBioText",void 0),h([i.n],y.prototype,"customProfilePic",void 0),h([i.n],y.prototype,"includeStories",void 0),h([i.n],y.prototype,"storiesInterval",void 0),h([i.n],y.prototype,"showCaptions",void 0),h([i.n],y.prototype,"captionMaxLength",void 0),h([i.n],y.prototype,"captionRemoveDots",void 0),h([i.n],y.prototype,"captionSize",void 0),h([i.n],y.prototype,"captionColor",void 0),h([i.n],y.prototype,"showLikes",void 0),h([i.n],y.prototype,"showComments",void 0),h([i.n],y.prototype,"lcIconSize",void 0),h([i.n],y.prototype,"likesIconColor",void 0),h([i.n],y.prototype,"commentsIconColor",void 0),h([i.n],y.prototype,"lightboxShowSidebar",void 0),h([i.n],y.prototype,"numLightboxComments",void 0),h([i.n],y.prototype,"showLoadMoreBtn",void 0),h([i.n],y.prototype,"loadMoreBtnText",void 0),h([i.n],y.prototype,"loadMoreBtnTextColor",void 0),h([i.n],y.prototype,"loadMoreBtnBgColor",void 0),h([i.n],y.prototype,"autoload",void 0),h([i.n],y.prototype,"showFollowBtn",void 0),h([i.n],y.prototype,"followBtnText",void 0),h([i.n],y.prototype,"followBtnTextColor",void 0),h([i.n],y.prototype,"followBtnBgColor",void 0),h([i.n],y.prototype,"followBtnLocation",void 0),h([i.n],y.prototype,"hashtagWhitelist",void 0),h([i.n],y.prototype,"hashtagBlacklist",void 0),h([i.n],y.prototype,"captionWhitelist",void 0),h([i.n],y.prototype,"captionBlacklist",void 0),h([i.n],y.prototype,"hashtagWhitelistSettings",void 0),h([i.n],y.prototype,"hashtagBlacklistSettings",void 0),h([i.n],y.prototype,"captionWhitelistSettings",void 0),h([i.n],y.prototype,"captionBlacklistSettings",void 0),h([i.n],y.prototype,"moderation",void 0),h([i.n],y.prototype,"moderationMode",void 0),h([i.n],y.prototype,"promotionEnabled",void 0),e.Options=y;class E{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.k)(Object(u.n)(t,this.captionMaxLength)):t}static compute(t){const o=t.options,n=t.mode,a=new E({accounts:l.b.filterExisting(o.accounts),tagged:l.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(e=>e.tag.length>0),layout:r.a.getById(o.layout),numColumns:s.a.get(o.numColumns,n,!0),highlightFreq:s.a.get(o.highlightFreq,n,!0),numPosts:s.a.get(o.numPosts,n,!0),linkBehavior:s.a.get(o.linkBehavior,n,!0),bgColor:Object(d.a)(o.bgColor),textColorHover:Object(d.a)(o.textColorHover),bgColorHover:Object(d.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:s.a.get(o.showHeader,n,!0),headerInfo:s.a.get(o.headerInfo,n,!0),headerStyle:s.a.get(o.headerStyle,n,!0),headerTextColor:Object(d.a)(o.headerTextColor),headerBgColor:Object(d.a)(o.headerBgColor),headerPadding:s.a.get(o.headerPadding,n,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:s.a.get(o.showCaptions,n,!0),captionMaxLength:s.a.get(o.captionMaxLength,n,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(d.a)(o.captionColor),showLikes:s.a.get(o.showLikes,n,!0),showComments:s.a.get(o.showComments,n,!0),likesIconColor:Object(d.a)(o.likesIconColor),commentsIconColor:Object(d.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:s.a.get(o.showLoadMoreBtn,n,!0),loadMoreBtnTextColor:Object(d.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:s.a.get(o.showFollowBtn,n,!0),autoload:o.autoload,followBtnLocation:s.a.get(o.followBtnLocation,n,!0),followBtnTextColor:Object(d.a)(o.followBtnTextColor),followBtnBgColor:Object(d.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=Math.max(a.numColumns,1),t.mode!==s.a.Mode.DESKTOP&&(a.numColumns=a.numColumns<1?s.a.get(o.numColumns,s.a.Mode.DESKTOP):a.numColumns),a.numPosts=parseInt(a.numPosts+""),(a.numPosts<1||isNaN(a.numPosts))&&(a.numPosts=1),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=o.headerAccount&&a.allAccounts.includes(o.headerAccount)?l.b.getById(o.headerAccount):l.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:l.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showLoadMoreBtn=a.showLoadMoreBtn&&t.canLoadMore,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=o.customBioText.trim().length>0?o.customBioText:null!==a.account?l.b.getBioText(a.account):"";a.bioText=Object(u.k)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(o.feedWidth,n,"auto"),a.feedHeight=this.normalizeCssSize(o.feedHeight,n,"auto"),a.feedPadding=this.normalizeCssSize(o.feedPadding,n,"0"),a.imgPadding=this.normalizeCssSize(o.imgPadding,n,"0"),a.textSize=this.normalizeCssSize(o.textSize,n,"inherit"),a.headerTextSize=this.normalizeCssSize(o.headerTextSize,n,"inherit"),a.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,n,"50px"),a.captionSize=this.normalizeCssSize(o.captionSize,n,"inherit"),a.lcIconSize=this.normalizeCssSize(o.lcIconSize,n,"inherit"),a.buttonPadding=Math.max(10,s.a.get(o.imgPadding,n))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static normalizeCssSize(e,t,o=null){const n=s.a.get(e,t);return n?n+"px":o}}e.ComputedOptions=E,e.HashtagSorting=Object(c.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(o=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(n=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(a=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(p=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(m=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(f=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(g=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:a.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX,phone:n.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[f.PROFILE_PIC,f.BIO]},headerAccount:null,headerStyle:{desktop:m.NORMAL,phone:m.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:g.HEADER,phone:g.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(m||(m={}))},8:function(e,t,o){"use strict";function n(...e){return e.filter(e=>!!e).join(" ")}function a(e){return n(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i})),o.d(t,"d",(function(){return s}))},87:function(e,t,o){e.exports={root:"SliWpBlockEdit__root",logo:"SliWpBlockEdit__logo",label:"SliWpBlockEdit__label","missing-feed-msg":"SliWpBlockEdit__missing-feed-msg SliWpBlockEdit__label",missingFeedMsg:"SliWpBlockEdit__missing-feed-msg SliWpBlockEdit__label",selector:"SliWpBlockEdit__selector","selector-label":"SliWpBlockEdit__selector-label",selectorLabel:"SliWpBlockEdit__selector-label","selector-list-container":"SliWpBlockEdit__selector-list-container",selectorListContainer:"SliWpBlockEdit__selector-list-container","feed-container":"SliWpBlockEdit__feed-container",feedContainer:"SliWpBlockEdit__feed-container"}},9:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var n=o(0),a=o.n(n),i=o(8);const s=e=>{var{icon:t,className:o}=e,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["icon","className"]);return a.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},n))}},92:function(e,t,o){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},93:function(e,t,o){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}}},[[562,0,1,2,3]]])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.spotlight=t(require("React"),require("ReactDOM")):e.spotlight=t(e.React,e.ReactDOM)}(window,(function(e,t){return(window.webpackJsonpspotlight=window.webpackJsonpspotlight||[]).push([[9],{0:function(t,o){t.exports=e},10:function(e,t,o){e.exports={root:"AccountInfo__root",container:"AccountInfo__container",column:"AccountInfo__column","info-column":"AccountInfo__info-column AccountInfo__column",infoColumn:"AccountInfo__info-column AccountInfo__column","pic-column":"AccountInfo__pic-column AccountInfo__column",picColumn:"AccountInfo__pic-column AccountInfo__column",id:"AccountInfo__id",username:"AccountInfo__username","profile-pic":"AccountInfo__profile-pic",profilePic:"AccountInfo__profile-pic",label:"AccountInfo__label",row:"AccountInfo__row",pre:"AccountInfo__pre",bio:"AccountInfo__bio AccountInfo__pre","link-button":"AccountInfo__link-button",linkButton:"AccountInfo__link-button","edit-bio-link":"AccountInfo__edit-bio-link AccountInfo__link-button",editBioLink:"AccountInfo__edit-bio-link AccountInfo__link-button","bio-editor":"AccountInfo__bio-editor",bioEditor:"AccountInfo__bio-editor","bio-footer":"AccountInfo__bio-footer",bioFooter:"AccountInfo__bio-footer","bio-editing-controls":"AccountInfo__bio-editing-controls",bioEditingControls:"AccountInfo__bio-editing-controls","access-token":"AccountInfo__access-token AccountInfo__pre",accessToken:"AccountInfo__access-token AccountInfo__pre","set-custom-pic":"AccountInfo__set-custom-pic",setCustomPic:"AccountInfo__set-custom-pic","reset-custom-pic":"AccountInfo__reset-custom-pic AccountInfo__link-button",resetCustomPic:"AccountInfo__reset-custom-pic AccountInfo__link-button",subtext:"AccountInfo__subtext","personal-info-message":"AccountInfo__personal-info-message",personalInfoMessage:"AccountInfo__personal-info-message"}},102:function(e,t,o){"use strict";o.d(t,"a",(function(){return O}));var n=o(0),a=o.n(n),i=o(39),s=o(10),r=o.n(s),c=o(4),l=o(3),u=o(567),d=o(565),p=o(44),h=o(121),m=o(109),f=o(33),g=o(6),b=o(22),y=o(11),E=o(68),v=Object(c.b)((function({account:e,onUpdate:t}){const[o,n]=a.a.useState(!1),[i,s]=a.a.useState(""),[c,v]=a.a.useState(!1),O=e.type===l.a.Type.PERSONAL,w=l.b.getBioText(e),S=()=>{e.customBio=i,v(!0),f.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})},_=o=>{e.customProfilePicUrl=o,v(!0),f.a.updateAccount(e).then(()=>{v(!1),t&&t()})};return a.a.createElement("div",{className:r.a.root},a.a.createElement("div",{className:r.a.container},a.a.createElement("div",{className:r.a.infoColumn},a.a.createElement("a",{href:l.b.getProfileUrl(e),target:"_blank",className:r.a.username},"@",e.username),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Spotlight ID:"),e.id),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"User ID:"),e.userId),a.a.createElement("div",{className:r.a.row},a.a.createElement("span",{className:r.a.label},"Type:"),e.type),!o&&a.a.createElement("div",{className:r.a.row},a.a.createElement("div",null,a.a.createElement("span",{className:r.a.label},"Bio:"),a.a.createElement("a",{className:r.a.editBioLink,onClick:()=>{s(l.b.getBioText(e)),n(!0)}},"Edit bio"),a.a.createElement("pre",{className:r.a.bio},w.length>0?w:"(No bio)"))),o&&a.a.createElement("div",{className:r.a.row},a.a.createElement("textarea",{className:r.a.bioEditor,value:i,onChange:e=>{s(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.ctrlKey&&(S(),e.preventDefault(),e.stopPropagation())},rows:4}),a.a.createElement("div",{className:r.a.bioFooter},a.a.createElement("div",{className:r.a.bioEditingControls},c&&a.a.createElement("span",null,"Please wait ...")),a.a.createElement("div",{className:r.a.bioEditingControls},a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.DANGER,disabled:c,onClick:()=>{e.customBio="",v(!0),f.a.updateAccount(e).then(()=>{n(!1),v(!1),t&&t()})}},"Reset"),a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.SECONDARY,disabled:c,onClick:()=>{n(!1)}},"Cancel"),a.a.createElement(g.a,{className:r.a.bioEditingButton,type:g.c.PRIMARY,disabled:c,onClick:S},"Save"))))),a.a.createElement("div",{className:r.a.picColumn},a.a.createElement("div",null,a.a.createElement(E.a,{account:e,className:r.a.profilePic})),a.a.createElement(h.a,{id:"account-custom-profile-pic",title:"Select profile picture",mediaType:"image",onSelect:e=>{const t=parseInt(e.attributes.id),o=m.a.media.attachment(t).attributes.url;_(o)}},({open:e})=>a.a.createElement(g.a,{type:g.c.SECONDARY,className:r.a.setCustomPic,onClick:e},"Change profile picture")),e.customProfilePicUrl.length>0&&a.a.createElement("a",{className:r.a.resetCustomPic,onClick:()=>{_("")}},"Reset profile picture"))),O&&a.a.createElement("div",{className:r.a.personalInfoMessage},a.a.createElement(b.a,{type:b.b.INFO,showIcon:!0},"Due to restrictions set by Instagram, Spotlight cannot import the profile photo and bio"," ","text for Personal accounts."," ",a.a.createElement("a",{href:y.a.resources.customPersonalInfoUrl,target:"_blank"},"Click here to learn more"),".")),a.a.createElement(p.a,{label:"View access token",stealth:!0},a.a.createElement("div",{className:r.a.row},e.accessToken&&a.a.createElement("div",null,a.a.createElement("p",null,a.a.createElement("span",{className:r.a.label},"Expires on:"),a.a.createElement("span",null,e.accessToken.expiry?Object(u.a)(Object(d.a)(e.accessToken.expiry),"PPPP"):"Unknown")),a.a.createElement("pre",{className:r.a.accessToken},e.accessToken.code)))))}));function O({isOpen:e,onClose:t,onUpdate:o,account:n}){return a.a.createElement(i.a,{isOpen:e,title:"Account details",icon:"admin-users",onClose:t},a.a.createElement(i.a.Content,null,a.a.createElement(v,{account:n,onUpdate:o})))}},108:function(e,t,o){"use strict";o.d(t,"a",(function(){return c}));var n=o(0),a=o.n(n),i=o(4),s=o(26),r=o(7);const c=Object(i.b)(({feed:e})=>{const t=s.a.getById(e.options.layout),o=r.a.ComputedOptions.compute(e);return a.a.createElement("div",{className:"feed"},a.a.createElement(t.component,{feed:e,options:o}))})},118:function(e,t,o){e.exports={pill:"ProPill__pill"}},12:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));const n=e=>"string"==typeof e?e:"r"in e?"rgba("+e.r+","+e.g+","+e.b+","+e.a+")":"h"in e?"hsla("+e.h+","+e.s+","+e.l+","+e.a+")":"#fff"},13:function(e,t,o){"use strict";var n;o.d(t,"a",(function(){return n})),function(e){let t,o;!function(e){e.IMAGE="IMAGE",e.VIDEO="VIDEO",e.ALBUM="CAROUSEL_ALBUM"}(t=e.Type||(e.Type={})),function(e){let t;!function(e){e.PERSONAL_ACCOUNT="PERSONAL_ACCOUNT",e.BUSINESS_ACCOUNT="BUSINESS_ACCOUNT",e.TAGGED_ACCOUNT="TAGGED_ACCOUNT",e.RECENT_HASHTAG="RECENT_HASHTAG",e.POPULAR_HASHTAG="POPULAR_HASHTAG",e.USER_STORY="USER_STORY"}(t=e.Type||(e.Type={}))}(o=e.Source||(e.Source={})),e.getAsRows=(e,t)=>{e=e.slice(),t=t>0?t:1;let o=[];for(;e.length;)o.push(e.splice(0,t));if(o.length>0){const e=o.length-1;for(;o[e].length<t;)o[e].push({})}return o},e.isFromHashtag=e=>e.source.type===o.Type.POPULAR_HASHTAG||e.source.type===o.Type.RECENT_HASHTAG}(n||(n={}))},14:function(e,t,o){"use strict";var n=o(37),a=o.n(n),i=o(17),s=o(38);const r=i.a.config.restApi.baseUrl,c={};i.a.config.restApi.authToken&&(c["X-Sli-Auth-Token"]=i.a.config.restApi.authToken);const l=a.a.create({baseURL:r,headers:c}),u={config:i.a.config.restApi,driver:l,getAccounts:()=>l.get("/accounts"),getFeeds:()=>l.get("/feeds"),getFeedMedia:(e,t=0,o=0,n)=>{const i=n?new a.a.CancelToken(n):void 0;return l.post("/media/fetch",{options:e,num:o,from:t},{cancelToken:i})},getErrorReason:e=>{let t;return t="object"==typeof e.response?e.response.data:"string"==typeof e.message?e.message:e.toString(),Object(s.b)(t)}};t.a=u},148:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(125),s=o(20),r=o.n(s),c=o(4),l=o(47),u=o(3),d=o(6),p=o(9),h=o(120),m=o(27),f=o(23),g=o(33),b=o(102),y=o(68),E=o(11),v=o(83),O=Object(c.b)((function({accounts:e,showDelete:t,onDeleteError:o}){e=null!=e?e:[];const[n,i]=a.a.useState(!1),[s,c]=a.a.useState(null),[O,w]=a.a.useState(!1),[S,_]=a.a.useState(),[C,P]=a.a.useState(!1),B=e=>()=>{c(e),i(!0)},A=e=>()=>{g.a.openAuthWindow(e.type,0,()=>{E.a.restApi.deleteAccountMedia(e.id)})},I=e=>()=>{_(e),w(!0)},L={cols:{username:r.a.usernameCol,type:r.a.typeCol,usages:r.a.usagesCol,actions:r.a.actionsCol},cells:{username:r.a.usernameCell,type:r.a.typeCell,usages:r.a.usagesCell,actions:r.a.actionsCell}};return a.a.createElement("div",{className:"accounts-list"},a.a.createElement(h.a,{styleMap:L,rows:e,cols:[{id:"username",label:"Username",render:e=>a.a.createElement("div",null,a.a.createElement(y.a,{account:e,className:r.a.profilePic}),a.a.createElement("a",{className:r.a.username,onClick:B(e)},e.username))},{id:"type",label:"Type",render:e=>a.a.createElement("span",{className:r.a.accountType},e.type)},{id:"usages",label:"Feeds",render:e=>a.a.createElement("span",{className:r.a.usages},e.usages.map((e,t)=>!!m.a.getById(e)&&a.a.createElement(l.a,{key:t,to:f.a.at({screen:"edit",id:e.toString()})},m.a.getById(e).name)))},{id:"actions",label:"Actions",render:e=>t&&a.a.createElement("div",{className:r.a.actionsList},a.a.createElement(d.a,{className:r.a.action,type:d.c.SECONDARY,tooltip:"Account info",onClick:B(e)},a.a.createElement(p.a,{icon:"info"})),a.a.createElement(d.a,{className:r.a.action,type:d.c.SECONDARY,tooltip:"Reconnect account",onClick:A(e)},a.a.createElement(p.a,{icon:"image-rotate"})),a.a.createElement(d.a,{className:r.a.actions,type:d.c.DANGER,tooltip:"Remove account",onClick:I(e)},a.a.createElement(p.a,{icon:"trash"})))}]}),a.a.createElement(b.a,{isOpen:n,onClose:()=>i(!1),account:s}),S&&a.a.createElement(v.a,{isOpen:O,title:"Are you sure?",buttons:[C?"Please wait ...":"Yes I'm sure","Cancel"],okDisabled:C,cancelDisabled:C,onAccept:()=>{P(!0),g.a.deleteAccount(S.id).catch(()=>{o&&o("An error occurred while trying to remove the account.")}).finally(()=>P(!1))},onCancel:()=>{_(null),w(!1)}},a.a.createElement("p",null,"Are you sure you want to delete"," ",a.a.createElement("span",{style:{fontWeight:"bold"}},S.username),"?"," ","This will also delete all saved media associated with this account."),S.type===u.a.Type.BUSINESS&&1===u.b.getBusinessAccounts().length&&a.a.createElement("p",null,a.a.createElement("b",null,"Note:")," Because this is your only connected Business account, deleting it will"," ","also cause any feeds that show public hashtag posts to no longer work.")))})),w=o(22),S=o(122),_=o(93),C=o.n(_);t.a=Object(c.b)((function(){const[e,t]=a.a.useState("");return u.b.hasAccounts()?a.a.createElement("div",{className:C.a.root},e.length>0&&a.a.createElement(w.a,{type:w.b.ERROR,showIcon:!0,isDismissible:!0,onDismiss:()=>t("")},e),a.a.createElement("div",{className:C.a.connectBtn},a.a.createElement(i.a,null)),a.a.createElement(O,{accounts:u.b.list,showDelete:!0,onDeleteError:t})):a.a.createElement(S.a,null)}))},17:function(e,t,o){"use strict";let n;t.a=n={config:{restApi:SliCommonL10n.restApi,imagesUrl:SliCommonL10n.imagesUrl},image:e=>`${n.config.imagesUrl}/${e}`}},18:function(e,t,o){"use strict";o.d(t,"e",(function(){return r})),o.d(t,"b",(function(){return c})),o.d(t,"c",(function(){return l})),o.d(t,"a",(function(){return u})),o.d(t,"k",(function(){return d})),o.d(t,"g",(function(){return p})),o.d(t,"i",(function(){return h})),o.d(t,"h",(function(){return m})),o.d(t,"d",(function(){return g})),o.d(t,"j",(function(){return b})),o.d(t,"f",(function(){return y}));var n=o(0),a=o.n(n),i=o(40),s=o(36);function r(e){const[t,o]=a.a.useState(e),n=a.a.useRef(t);return[t,()=>n.current,e=>o(n.current=e)]}function c(e,t,o=[]){function a(n){!e.current||e.current.contains(n.target)||o.some(e=>e&&e.current&&e.current.contains(n.target))||t(n)}Object(n.useEffect)(()=>(document.addEventListener("mousedown",a),document.addEventListener("touchend",a),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("touchend",a)}))}function l(e,t){Object(n.useEffect)(()=>{const o=()=>{0===e.filter(e=>!e.current||document.activeElement===e.current||e.current.contains(document.activeElement)).length&&t()};return document.addEventListener("keyup",o),()=>document.removeEventListener("keyup",o)},e)}function u(e,t,o=100){const[i,s]=a.a.useState(e);return Object(n.useEffect)(()=>{let n=null;return e===t?n=setTimeout(()=>s(t),o):s(!t),()=>{null!==n&&clearTimeout(n)}},[e]),[i,s]}function d(e){const[t,o]=a.a.useState(Object(s.b)()),i=()=>{const t=Object(s.b)();o(t),e&&e(t)};return Object(n.useEffect)(()=>(i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),t}function p(){return new URLSearchParams(Object(i.e)().search)}function h(e,t){const o=o=>{if(t)return(o||window.event).returnValue=e,e};Object(n.useEffect)(()=>(window.addEventListener("beforeunload",o),()=>window.removeEventListener("beforeunload",o)),[t])}function m(e,t){const o=a.a.useRef(!1);return Object(n.useEffect)(()=>{o.current&&void 0!==e.current&&(e.current.scrollIntoView(Object.assign({behavior:"smooth",block:"start"},null!=t?t:{})),o.current=!1)},[o.current]),()=>o.current=!0}function f(e,t,o,a=[],i=[]){Object(n.useEffect)(()=>(a.reduce((e,t)=>e&&t,!0)&&e.addEventListener(t,o),()=>e.removeEventListener(t,o)),i)}function g(e,t,o=[],n=[]){f(document,e,t,o,n)}function b(e,t,o=[],n=[]){f(window,e,t,o,n)}function y(e){return t=>{" "!==t.key&&"Enter"!==t.key||(e(),t.preventDefault(),t.stopPropagation())}}o(38)},2:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(1),i=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};!function(e){class t{constructor(e,t,o){this.prop=e,this.name=t,this.icon=o}}t.DESKTOP=new t("desktop","Desktop","desktop"),t.TABLET=new t("tablet","Tablet","tablet"),t.PHONE=new t("phone","Phone","smartphone"),e.Mode=t,e.MODES=[t.DESKTOP,t.TABLET,t.PHONE];class o{constructor(e,t,o){this.desktop=e,this.tablet=t,this.phone=o}get(e,t){return n(this,e,t)}set(e,t){s(this,t,e)}with(e,t){const n=r(this,t,e);return new o(n.desktop,n.tablet,n.phone)}}function n(e,t,o=!1){if(!e)return;const n=e[t.prop];return!o||""!==n&&null!=n&&""!==n?n:e.desktop}function s(e,t,o){return e[o.prop]=t,e}function r(e,t,o){return s({desktop:e.desktop,tablet:e.tablet,phone:e.phone},t,o)}i([a.n],o.prototype,"desktop",void 0),i([a.n],o.prototype,"tablet",void 0),i([a.n],o.prototype,"phone",void 0),e.Value=o,e.getName=function(e){return e.name},e.getIcon=function(e){return e.icon},e.cycle=function(o){const n=e.MODES.findIndex(e=>e===o);return void 0===n?t.DESKTOP:e.MODES[(n+1)%e.MODES.length]},e.get=n,e.set=s,e.withValue=r,e.normalize=function(e,t){return null==e?t.hasOwnProperty("all")?new o(t.all,t.all,t.all):new o(t.desktop,t.tablet,t.phone):"object"==typeof e&&e.hasOwnProperty("desktop")?new o(e.desktop,e.tablet,e.phone):new o(e,e,e)},e.getModeForWindowSize=function(e){return e.width<=768?t.PHONE:e.width<=935?t.TABLET:t.DESKTOP}}(n||(n={}))},20:function(e,t,o){e.exports={"username-col":"AccountsList__username-col",usernameCol:"AccountsList__username-col","actions-col":"AccountsList__actions-col",actionsCol:"AccountsList__actions-col","username-cell":"AccountsList__username-cell",usernameCell:"AccountsList__username-cell",username:"AccountsList__username","profile-pic":"AccountsList__profile-pic",profilePic:"AccountsList__profile-pic","account-type":"AccountsList__account-type",accountType:"AccountsList__account-type",usages:"AccountsList__usages","actions-list":"AccountsList__actions-list layout__flex-row",actionsList:"AccountsList__actions-list layout__flex-row",action:"AccountsList__action"}},213:function(e,t){!function(){e.exports=this.wp.components}()},23:function(e,t,o){"use strict";o.d(t,"a",(function(){return r}));var n=o(1),a=o(63),i=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class s{constructor(){const e=window.location;this._pathName=e.pathname,this._baseUrl=e.protocol+"//"+e.host,this.parsed=Object(a.parse)(e.search),this.unListen=null,this.listeners=[],Object(n.o)(()=>this._path,e=>this.path=e)}createPath(e){return this._pathName+"?"+Object(a.stringify)(e)}get _path(){return this.createPath(this.parsed)}get(e,t=null){var o;return null!==(o=this.parsed[e])&&void 0!==o?o:t}at(e){return this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}fullUrl(e){return this._baseUrl+this.createPath(Object.assign({page:this.parsed.page},this.processQuery(e)))}with(e){return this.createPath(Object.assign(Object.assign({},this.parsed),this.processQuery(e)))}without(e){const t=Object.assign({},this.parsed);return delete t[e],this.createPath(t)}useHistory(e){return this.unListen&&this.unListen(),this.history=e,this.unListen=this.history.listen(e=>{this.parsed=Object(a.parse)(e.search),this.listeners.forEach(e=>e())}),this}listen(e){this.listeners.push(e)}unlisten(e){this.listeners=this.listeners.filter(t=>t===e)}processQuery(e){const t=Object.assign({},e);return Object.getOwnPropertyNames(e).forEach(o=>{e[o]&&0===e[o].length?delete t[o]:t[o]=e[o]}),t}}i([n.n],s.prototype,"path",void 0),i([n.n],s.prototype,"parsed",void 0),i([n.h],s.prototype,"_path",null);const r=new s},26:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));class n{static getById(e){const t=n.list.find(t=>t.id===e);return!t&&n.list.length>0?n.list[0]:t}static getName(e){const t=n.getById(e);return t?t.name:"(Missing layout)"}static addLayout(e){n.list.push(e)}}n.list=[]},3:function(e,t,o){"use strict";o.d(t,"a",(function(){return n}));var n,a=o(14),i=o(1);!function(e){let t;!function(e){e.PERSONAL="PERSONAL",e.BUSINESS="BUSINESS"}(t=e.Type||(e.Type={}))}(n||(n={}));const s=Object(i.n)([]),r="https://secure.gravatar.com/avatar/4a94d759753ade2961582f7345c1d7b2?s=64&d=mm&r=g",c=e=>s.find(t=>t.id===e),l=e=>"https://instagram.com/"+e;function u(e){if("object"==typeof e&&Array.isArray(e.data)){e.data.sort((e,t)=>e.type===t.type?0:e.type===n.Type.PERSONAL?-1:1);const t=e.data.map(e=>Object(i.n)(e));return s.replace(t),s}throw"Spotlight encountered a problem trying to load your accounts. Kindly contact customer support for assistance."}t.b={list:s,DEFAULT_PROFILE_PIC:r,getById:c,getByUsername:e=>s.find(t=>t.username===e),hasAccounts:()=>s.length>0,filterExisting:e=>e.filter(e=>void 0!==c(e)),idsToAccounts:e=>e.map(e=>c(e)).filter(e=>void 0!==e),getBusinessAccounts:()=>s.filter(e=>e.type===n.Type.BUSINESS),getProfilePicUrl:e=>e.customProfilePicUrl?e.customProfilePicUrl:e.profilePicUrl?e.profilePicUrl:r,getBioText:e=>e.customBio.length?e.customBio:e.bio,getProfileUrl:e=>l(e.username),getUsernameUrl:l,loadAccounts:function(){return a.a.getAccounts().then(u).catch(e=>{throw a.a.getErrorReason(e)})},loadFromResponse:u}},30:function(e,o){e.exports=t},31:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return u})),o.d(t,"c",(function(){return p}));var n=o(0),a=o.n(n),i=o(30),s=o.n(i),r=o(4);class c{constructor(e=new Map,t=[]){this.factories=e,this.extensions=new Map,this.cache=new Map,t.forEach(e=>this.addModule(e))}addModule(e){e.factories&&(this.factories=new Map([...this.factories,...e.factories])),e.extensions&&e.extensions.forEach((e,t)=>{this.extensions.has(t)?this.extensions.get(t).push(e):this.extensions.set(t,[e])})}get(e){let t=this.factories.get(e);if(void 0===t)throw new Error('Service "'+e+'" does not exist');let o=this.cache.get(e);if(void 0===o){o=t(this);let n=this.extensions.get(e);n&&n.forEach(e=>o=e(this,o)),this.cache.set(e,o)}return o}has(e){return this.factories.has(e)}}class l{constructor(e,t,o){this.key=e,this.mount=t,this.modules=o,this.container=null}addModules(e){this.modules=this.modules.concat(e)}run(){null===this.container&&window.addEventListener("load",()=>{!function(e){const t=`app/${e.key}/run`;document.dispatchEvent(new d(t,e))}(this);const e=p({root:()=>null,"root/children":()=>[]});this.container=new c(e,this.modules);const t=this.container.get("root/children").map((e,t)=>a.a.createElement(e,{key:t})),o=a.a.createElement(r.a,{c:this.container},t);this.modules.forEach(e=>e.run&&e.run(this.container)),s.a.render(o,this.mount)})}}function u(e,t){document.addEventListener(`app/${e}/run`,e=>{t(e.detail.app)})}class d extends CustomEvent{constructor(e,t){super(e,{detail:{app:t}})}}function p(e){return new Map(Object.entries(e))}},337:function(e,t){!function(){e.exports=this.wp.blocks}()},338:function(e,t){!function(){e.exports=this.wp.blockEditor}()},36:function(e,t,o){"use strict";function n(e,t,o={}){return window.open(e,t,function(e={}){return Object.getOwnPropertyNames(e).map(t=>`${t}=${e[t]}`).join(",")}(o))}function a(e,t){return{top:window.top.outerHeight/2+window.top.screenY-t/2,left:window.top.outerWidth/2+window.top.screenX-e/2,width:e,height:t}}function i(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}o.d(t,"c",(function(){return n})),o.d(t,"a",(function(){return a})),o.d(t,"b",(function(){return i}))},38:function(e,t,o){"use strict";function n(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function a(e){const t=document.createElement("DIV");return t.innerHTML=e,t.textContent||t.innerText||""}o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return a}))},48:function(e,t,o){"use strict";o.d(t,"a",(function(){return s})),o.d(t,"b",(function(){return r}));var n=o(0),a=o.n(n),i=o(4);const s=(e,t)=>Object(i.b)(o=>a.a.createElement(e,Object.assign(Object.assign({},t),o))),r=(e,t)=>Object(i.b)(o=>{const n={};return Object.keys(t).forEach(e=>n[e]=t[e](o)),a.a.createElement(e,Object.assign({},n,o))})},5:function(e,t,o){"use strict";o.d(t,"p",(function(){return l})),o.d(t,"b",(function(){return u})),o.d(t,"c",(function(){return d})),o.d(t,"k",(function(){return p})),o.d(t,"f",(function(){return h})),o.d(t,"d",(function(){return m})),o.d(t,"j",(function(){return f})),o.d(t,"l",(function(){return g})),o.d(t,"h",(function(){return b})),o.d(t,"a",(function(){return y})),o.d(t,"g",(function(){return E})),o.d(t,"i",(function(){return v})),o.d(t,"o",(function(){return O})),o.d(t,"n",(function(){return w})),o.d(t,"m",(function(){return S})),o.d(t,"e",(function(){return _}));var n=o(0),a=o.n(n),i=o(160),s=o(159),r=o(13);let c=0;function l(){return c++}function u(e,t){return Object.getOwnPropertyNames(t).forEach(o=>{"object"!=typeof t[o]||Array.isArray(t[o])?e[o]=t[o]:("object"!=typeof e[o]&&(e[o]={}),u(e[o],t[o]))}),e}function d(e,t,o){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(o){if(!o(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1;return!0}function p(e,t){return e&&t&&"object"==typeof e&&"object"==typeof t?!Object.getOwnPropertyNames(e).some(o=>"object"==typeof e[o]?"object"!=typeof t[o]||!p(e[o],t[o]):Array.isArray(e[o])?!Array.isArray(t[o])||!d(e[o],t[o]):e[o]!==t[o]):e===t}function h(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.filter(e=>!t.some(t=>o(e,t)))}function m(e,t,o){return o=null!=o?o:(e,t)=>e===t,e.every(e=>t.some(t=>o(e,t)))&&t.every(t=>e.some(e=>o(t,e)))}function f(e,t){return 0===e.tag.localeCompare(t.tag)&&e.sort===t.sort}function g(e,t,o=0,i=!1){let s=e.trim();i&&(s=s.replace(/((?:^[.*•]+(\r\n|\r|\n))+)/gm,"\n"));const r=s.split("\n"),c=r.map((e,o)=>{if(e=e.trim(),i&&/^[.*•]$/.test(e))return null;let s,c=[];for(;null!==(s=/#([^\s]+)/g.exec(e));){const t="https://instagram.com/explore/tags/"+s[1],o=a.a.createElement("a",{href:t,target:"_blank",key:l()},s[0]),n=e.substr(0,s.index),i=e.substr(s.index+s[0].length);c.push(n),c.push(o),e=i}return e.length&&c.push(e),t&&(c=t(c,o)),r.length>1&&c.push(a.a.createElement("br",{key:l()})),a.a.createElement(n.Fragment,{key:l()},c)});return o>0?c.slice(0,o):c}function b(e){const t=e.match(/instagram\.com\/p\/([^\/]+)\//);return t&&t.length>0?t[1]:null}var y;function E(e,t=y.MEDIUM){return`https://www.instagram.com/p/${e}/media/?size=${t}`}function v(e,t=y.MEDIUM){return e.thumbnail?e.thumbnail:E(b(e.permalink),t)}function O(e,t){const o=/(\s+)/g;let n,a=0,i=0,s="";for(;null!==(n=o.exec(e))&&a<t;){const t=n.index+n[1].length;s+=e.substr(i,t-i),i=t,a++}return i<e.length&&(s+=" ..."),s}function w(e){return Object(i.a)(Object(s.a)(e),{addSuffix:!0})}function S(e,t){const o=[];return e.forEach((e,n)=>{const a=n%t;Array.isArray(o[a])?o[a].push(e):o[a]=[e]}),o}function _(e,t){return function e(t){if(t.type===r.a.Type.VIDEO){const e=document.createElement("video");return e.autoplay=!1,e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.visibility="hidden",document.body.appendChild(e),new Promise(o=>{e.src=t.url,e.addEventListener("loadeddata",()=>{o({width:e.videoWidth,height:e.videoHeight}),document.body.removeChild(e)})})}if(t.type===r.a.Type.IMAGE){const e=new Image;return e.src=t.url,new Promise(t=>{e.onload=()=>{t({width:e.naturalWidth,height:e.naturalHeight})}})}return t.type===r.a.Type.ALBUM?e(t.children[0]):Promise.reject("Unknown media type")}(e).then(e=>function(e,t){const o=e.width>e.height?t.width/e.width:t.height/e.height;return{width:e.width*o,height:e.height*o}}(e,t))}!function(e){e.SMALL="t",e.MEDIUM="m",e.LARGE="l"}(y||(y={}))},562:function(e,t,o){"use strict";o.r(t),o(215);var n=o(337),a=o(0),i=o.n(a),s=o(87),r=o.n(s),c=o(4),l=o(338),u=o(213),d=o(7),p=o(27),h=o(2),m=o(1),f=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class g{constructor(){this.feedsLoaded=!1,this.accountsLoaded=!1,this.isLoaded=!1,Object(m.o)(()=>this.feedsLoaded&&this.accountsLoaded,e=>{this.isLoaded=e})}}f([m.n],g.prototype,"feedsLoaded",void 0),f([m.n],g.prototype,"accountsLoaded",void 0),f([m.n],g.prototype,"isLoaded",void 0);var b=new g,y=o(18),E=o(17),v=o(8),O=o(108),w=o(11);const S={label:"- Choose a feed -",value:""},_=w.a.config.adminUrl+"admin.php?page=spotlight-instagram&screen=new",C=Object(c.b)(({attributes:e,setAttributes:t,className:o})=>{const n=i.a.useRef(null),[s,c]=i.a.useState(null),[m,f]=i.a.useState(!1),[g,w]=i.a.useState(!1);function C(e){if(b.isLoaded)if(e){const o=null!==n.current&&n.current===e,a=p.a.getById(e);if(o)a||(c(null),f(!0),w(!0));else{t({feedId:e}),n.current=e;const o=a?new d.a(a.options):null;o&&o.load(),c(o),f(null===o),w(null===o)}}else 1===p.a.list.length?C(p.a.list[0].id):f(!0)}function P(e){t({feedId:parseInt(e)}),f(!1)}if(Object(a.useEffect)(()=>C(e.feedId),[b.isLoaded,e.feedId]),Object(a.useEffect)(()=>p.a.list.observe(()=>{C(e.feedId)}),[e.feedId]),Object(y.k)(i.a.useCallback(e=>{s&&(s.mode=h.a.getModeForWindowSize(e))},[s])),!b.isLoaded)return i.a.createElement("div",null);const B=e.feedId?e.feedId.toString():"",A=p.a.list.map(e=>({label:e.name?e.name:"(no name)",value:""+e.id}));return i.a.createElement("div",null,!m&&i.a.createElement(l.BlockControls,null,!m&&p.a.list.length>1&&i.a.createElement(u.Toolbar,null,i.a.createElement("div",{className:r.a.selector},i.a.createElement("label",{className:r.a.selectorLabel},i.a.createElement("span",null,"Feed:")),i.a.createElement("div",{className:r.a.selectorListContainer},i.a.createElement(u.SelectControl,{value:B,onChange:P,options:A}))))),i.a.createElement("div",null,m?i.a.createElement("div",{className:r.a.root},i.a.createElement("img",{className:r.a.logo,src:E.a.image("spotlight-favicon.png"),alt:""}),g&&i.a.createElement("div",{className:r.a.missingFeedMsg},"This block is hidden because the selected feed (with ID #",B,") does not"," ","exist or has been deleted."),0===p.a.list.length&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.a.label},"You do not have any Instagram feeds."),i.a.createElement("div",{className:r.a.label},"Go to"," ",i.a.createElement("a",{href:_,target:"_blank"},"Instagram feeds → Add New")," ","to begin designing your first feed."),i.a.createElement("div",{className:r.a.label},"You can keep this page open and Spotlight's block will automatically detect"," ","your new feed.")),p.a.list.length>0&&i.a.createElement(i.a.Fragment,null,i.a.createElement("div",{className:r.a.label},"Choose which Instagram feed to show:"),i.a.createElement(u.SelectControl,{value:B,onChange:P,options:[S].concat(A)}))):i.a.createElement("div",{className:Object(v.b)(o,r.a.feedContainer)},s&&(s.isLoading||s.isLoaded&&s.media.length>0)&&i.a.createElement(O.a,{feed:s}),s&&s.isLoaded&&0===s.media.length&&i.a.createElement("div",null,"This feed does not have any posts to show"))))}),P={title:"Spotlight Instagram Feed",description:"Embed a Spotlight Instagram feed",category:"widgets",icon:"instagram",keywords:["instagram","feed","feeds","ig","story","spotlight"],attributes:{feedId:{type:"number"}},supports:{html:!1},edit:function(e){return i.a.createElement(C,Object.assign({},e))}};var B=o(3);Object(n.registerBlockType)("spotlight/instagram",P),p.a.loadFeeds().then(()=>b.feedsLoaded=!0).catch(console.error),B.b.loadAccounts().then(()=>b.accountsLoaded=!0).catch(console.error),window.addEventListener("focus",(function(){b.feedsLoaded&&B.b.loadAccounts().then(()=>{p.a.loadFeeds().catch(console.error)}).catch(console.error)}))},68:function(e,t,o){"use strict";var n=o(0),a=o.n(n),i=o(92),s=o.n(i),r=o(3),c=o(8),l=o(4);t.a=Object(l.b)((function(e){var{account:t,square:o,className:n}=e,i=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["account","square","className"]);const l=r.b.getProfilePicUrl(t),u=Object(c.b)(o?s.a.square:s.a.round,n);return a.a.createElement("img",Object.assign({},i,{className:u,src:r.b.DEFAULT_PROFILE_PIC,srcSet:l+" 1x",alt:t.username+" profile picture"}))}))},69:function(e,t,o){"use strict";o.d(t,"a",(function(){return l}));var n=o(0),a=o.n(n),i=o(118),s=o.n(i),r=o(11),c=o(8);const l=({className:e,children:t})=>a.a.createElement("a",{className:Object(c.b)(s.a.pill,e),href:r.a.resources.upgradeLocalUrl,target:"_blank",tabIndex:-1},"PRO",t)},7:function(e,t,o){"use strict";o.d(t,"a",(function(){return m}));var n=o(37),a=o.n(n),i=o(1),s=o(2),r=o(26),c=o(31),l=o(3),u=o(5),d=o(12),p=o(14),h=function(e,t,o,n){var a,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,n);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(s=(i<3?a(s):i>3?a(t,o,s):a(t,o))||s);return i>3&&s&&Object.defineProperty(t,o,s),s};class m{constructor(e=new m.Options,t=s.a.Mode.DESKTOP){this.media=[],this.canLoadMore=!1,this.stories=[],this.numLoadedMore=0,this.totalMedia=0,this.mode=s.a.Mode.DESKTOP,this.isLoaded=!1,this.isLoading=!1,this.isLoadingMore=!1,this.numMediaToShow=0,this.numMediaPerPage=0,this.cancelFetch=()=>{},this.options=new m.Options(e),this.localMedia=[],this.mode=t,this.mediaCounter=this._numMediaPerPage,this.reload=function(e,t){let o;return()=>{clearTimeout(o),o=setTimeout(()=>{o=null,e()},300)}}(()=>this.load()),Object(i.o)(()=>this.mode,()=>{0===this.numLoadedMore&&(this.mediaCounter=this._numMediaPerPage,this.localMedia.length<this.numMediaToShow&&this.loadMedia(this.localMedia.length,this.numMediaToShow-this.localMedia.length))}),Object(i.o)(()=>this.getReloadOptions(),()=>this.reload()),Object(i.o)(()=>this.options.numPosts,e=>{const t=s.a.get(e,this.mode);this.localMedia.length<t&&t<=this.totalMedia?this.reload():this.mediaCounter=Math.max(1,t)}),Object(i.o)(()=>this._media,e=>this.media=e),Object(i.o)(()=>this._numMediaToShow,e=>this.numMediaToShow=e),Object(i.o)(()=>this._numMediaPerPage,e=>this.numMediaPerPage=e),Object(i.o)(()=>this._canLoadMore,e=>this.canLoadMore=e)}get _media(){return this.localMedia.slice(0,this.numMediaToShow)}get _numMediaToShow(){return Math.min(this.mediaCounter,this.totalMedia)}get _numMediaPerPage(){const e=s.a.get(this.options.numPosts,this.mode,!0),t=parseInt(e.toString());return t<1||isNaN(t)?1:e}get _canLoadMore(){return this.localMedia.length>this.mediaCounter||this.localMedia.length<this.totalMedia}loadMore(){const e=this.numMediaToShow+this._numMediaPerPage-this.localMedia.length;return this.isLoadingMore=!0,e>0?this.loadMedia(this.localMedia.length,this._numMediaPerPage).then(()=>{this.mediaCounter+=this._numMediaPerPage,this.numLoadedMore++,this.isLoadingMore=!1}):new Promise(e=>{this.numLoadedMore++,this.mediaCounter+=this._numMediaPerPage,this.isLoadingMore=!1,e()})}load(){return this.numLoadedMore=0,this.loadMedia(0,this._numMediaPerPage,!0).then(()=>(this.isLoaded=!0,this.mediaCounter=this._numMediaPerPage))}loadMedia(e,t,o){return this.cancelFetch(),m.Options.hasSources(this.options)?(this.isLoading=!0,new Promise((n,i)=>{p.a.getFeedMedia(this.options,e,t,e=>this.cancelFetch=e).then(e=>{var t;if("object"!=typeof e||"object"!=typeof e.data||!Array.isArray(e.data.media))throw{message:"The media response is malformed or corrupt",response:e};o&&(this.localMedia=[]),this.localMedia.push(...e.data.media),this.stories=null!==(t=e.data.stories)&&void 0!==t?t:[],this.totalMedia=e.data.total,n&&n()}).catch(e=>{var t;if(a.a.isCancel(e))return null;const o=new m.Events.FetchFailEvent(m.Events.FETCH_FAIL,{detail:{feed:this,message:null!==(t=e.message)&&void 0!==t?t:e.response.data.message,response:e.response}});return document.dispatchEvent(o),i&&i(e),e}).finally(()=>this.isLoading=!1)})):new Promise(e=>{this.localMedia=[],this.totalMedia=0,e&&e()})}getReloadOptions(){return JSON.stringify({accounts:this.options.accounts,hashtags:this.options.hashtags,tagged:this.options.tagged,postOrder:this.options.postOrder,mediaType:this.options.mediaType,moderation:this.options.moderation,moderationMode:this.options.moderationMode,hashtagBlacklist:this.options.hashtagBlacklist,hashtagWhitelist:this.options.hashtagWhitelist,captionBlacklist:this.options.captionBlacklist,captionWhitelist:this.options.captionWhitelist,hashtagBlacklistSettings:this.options.hashtagBlacklistSettings,hashtagWhitelistSettings:this.options.hashtagWhitelistSettings,captionBlacklistSettings:this.options.captionBlacklistSettings,captionWhitelistSettings:this.options.captionWhitelistSettings})}}h([i.n],m.prototype,"media",void 0),h([i.n],m.prototype,"canLoadMore",void 0),h([i.n],m.prototype,"stories",void 0),h([i.n],m.prototype,"numLoadedMore",void 0),h([i.n],m.prototype,"options",void 0),h([i.n],m.prototype,"totalMedia",void 0),h([i.n],m.prototype,"mode",void 0),h([i.n],m.prototype,"isLoaded",void 0),h([i.n],m.prototype,"isLoading",void 0),h([i.n],m.prototype,"isLoadingMore",void 0),h([i.f],m.prototype,"reload",void 0),h([i.n],m.prototype,"localMedia",void 0),h([i.n],m.prototype,"numMediaToShow",void 0),h([i.n],m.prototype,"numMediaPerPage",void 0),h([i.n],m.prototype,"mediaCounter",void 0),h([i.h],m.prototype,"_media",null),h([i.h],m.prototype,"_numMediaToShow",null),h([i.h],m.prototype,"_numMediaPerPage",null),h([i.h],m.prototype,"_canLoadMore",null),h([i.f],m.prototype,"loadMore",null),h([i.f],m.prototype,"load",null),h([i.f],m.prototype,"loadMedia",null),function(e){let t,o,n,a,p,m,f,g,b;!function(e){e.FETCH_FAIL="sli/feed/fetch_fail";class t extends CustomEvent{constructor(e,t){super(e,t)}}e.FetchFailEvent=t}(t=e.Events||(e.Events={}));class y{constructor(e={}){y.setFromObject(this,e)}static setFromObject(t,o={}){var n,a,i,c,u,d,p,h,m,f,g,b;return t.accounts=o.accounts?o.accounts.slice():e.DefaultOptions.accounts,t.hashtags=o.hashtags?o.hashtags.slice():e.DefaultOptions.hashtags,t.tagged=o.tagged?o.tagged.slice():e.DefaultOptions.tagged,t.layout=r.a.getById(o.layout).id,t.numColumns=s.a.normalize(o.numColumns,e.DefaultOptions.numColumns),t.highlightFreq=s.a.normalize(o.highlightFreq,e.DefaultOptions.highlightFreq),t.mediaType=o.mediaType||e.DefaultOptions.mediaType,t.postOrder=o.postOrder||e.DefaultOptions.postOrder,t.numPosts=s.a.normalize(o.numPosts,e.DefaultOptions.numPosts),t.linkBehavior=s.a.normalize(o.linkBehavior,e.DefaultOptions.linkBehavior),t.feedWidth=s.a.normalize(o.feedWidth,e.DefaultOptions.feedWidth),t.feedHeight=s.a.normalize(o.feedHeight,e.DefaultOptions.feedHeight),t.feedPadding=s.a.normalize(o.feedPadding,e.DefaultOptions.feedPadding),t.imgPadding=s.a.normalize(o.imgPadding,e.DefaultOptions.imgPadding),t.textSize=s.a.normalize(o.textSize,e.DefaultOptions.textSize),t.bgColor=o.bgColor||e.DefaultOptions.bgColor,t.hoverInfo=o.hoverInfo?o.hoverInfo.slice():e.DefaultOptions.hoverInfo,t.textColorHover=o.textColorHover||e.DefaultOptions.textColorHover,t.bgColorHover=o.bgColorHover||e.DefaultOptions.bgColorHover,t.showHeader=s.a.normalize(o.showHeader,e.DefaultOptions.showHeader),t.headerInfo=s.a.normalize(o.headerInfo,e.DefaultOptions.headerInfo),t.headerAccount=null!==(n=o.headerAccount)&&void 0!==n?n:e.DefaultOptions.headerAccount,t.headerAccount=null===t.headerAccount||void 0===l.b.getById(t.headerAccount)?l.b.list.length>0?l.b.list[0].id:null:t.headerAccount,t.headerStyle=s.a.normalize(o.headerStyle,e.DefaultOptions.headerStyle),t.headerTextSize=s.a.normalize(o.headerTextSize,e.DefaultOptions.headerTextSize),t.headerPhotoSize=s.a.normalize(o.headerPhotoSize,e.DefaultOptions.headerPhotoSize),t.headerTextColor=o.headerTextColor||e.DefaultOptions.headerTextColor,t.headerBgColor=o.headerBgColor||e.DefaultOptions.bgColor,t.headerPadding=s.a.normalize(o.headerPadding,e.DefaultOptions.headerPadding),t.customProfilePic=null!==(a=o.customProfilePic)&&void 0!==a?a:e.DefaultOptions.customProfilePic,t.customBioText=o.customBioText||e.DefaultOptions.customBioText,t.includeStories=null!==(i=o.includeStories)&&void 0!==i?i:e.DefaultOptions.includeStories,t.storiesInterval=o.storiesInterval||e.DefaultOptions.storiesInterval,t.showCaptions=s.a.normalize(o.showCaptions,e.DefaultOptions.showCaptions),t.captionMaxLength=s.a.normalize(o.captionMaxLength,e.DefaultOptions.captionMaxLength),t.captionRemoveDots=null!==(c=o.captionRemoveDots)&&void 0!==c?c:e.DefaultOptions.captionRemoveDots,t.captionSize=s.a.normalize(o.captionSize,e.DefaultOptions.captionSize),t.captionColor=o.captionColor||e.DefaultOptions.captionColor,t.showLikes=s.a.normalize(o.showLikes,e.DefaultOptions.showLikes),t.showComments=s.a.normalize(o.showComments,e.DefaultOptions.showCaptions),t.lcIconSize=s.a.normalize(o.lcIconSize,e.DefaultOptions.lcIconSize),t.likesIconColor=null!==(u=o.likesIconColor)&&void 0!==u?u:e.DefaultOptions.likesIconColor,t.commentsIconColor=o.commentsIconColor||e.DefaultOptions.commentsIconColor,t.lightboxShowSidebar=null!==(d=o.lightboxShowSidebar)&&void 0!==d?d:e.DefaultOptions.lightboxShowSidebar,t.numLightboxComments=o.numLightboxComments||e.DefaultOptions.numLightboxComments,t.showLoadMoreBtn=s.a.normalize(o.showLoadMoreBtn,e.DefaultOptions.showLoadMoreBtn),t.loadMoreBtnTextColor=o.loadMoreBtnTextColor||e.DefaultOptions.loadMoreBtnTextColor,t.loadMoreBtnBgColor=o.loadMoreBtnBgColor||e.DefaultOptions.loadMoreBtnBgColor,t.loadMoreBtnText=o.loadMoreBtnText||e.DefaultOptions.loadMoreBtnText,t.autoload=null!==(p=o.autoload)&&void 0!==p?p:e.DefaultOptions.autoload,t.showFollowBtn=s.a.normalize(o.showFollowBtn,e.DefaultOptions.showFollowBtn),t.followBtnText=null!==(h=o.followBtnText)&&void 0!==h?h:e.DefaultOptions.followBtnText,t.followBtnTextColor=o.followBtnTextColor||e.DefaultOptions.followBtnTextColor,t.followBtnBgColor=o.followBtnBgColor||e.DefaultOptions.followBtnBgColor,t.followBtnLocation=s.a.normalize(o.followBtnLocation,e.DefaultOptions.followBtnLocation),t.hashtagWhitelist=o.hashtagWhitelist||e.DefaultOptions.hashtagWhitelist,t.hashtagBlacklist=o.hashtagBlacklist||e.DefaultOptions.hashtagBlacklist,t.captionWhitelist=o.captionWhitelist||e.DefaultOptions.captionWhitelist,t.captionBlacklist=o.captionBlacklist||e.DefaultOptions.captionBlacklist,t.hashtagWhitelistSettings=null!==(m=o.hashtagWhitelistSettings)&&void 0!==m?m:e.DefaultOptions.hashtagWhitelistSettings,t.hashtagBlacklistSettings=null!==(f=o.hashtagBlacklistSettings)&&void 0!==f?f:e.DefaultOptions.hashtagBlacklistSettings,t.captionWhitelistSettings=null!==(g=o.captionWhitelistSettings)&&void 0!==g?g:e.DefaultOptions.captionWhitelistSettings,t.captionBlacklistSettings=null!==(b=o.captionBlacklistSettings)&&void 0!==b?b:e.DefaultOptions.captionBlacklistSettings,t.moderation=o.moderation||e.DefaultOptions.moderation,t.moderationMode=o.moderationMode||e.DefaultOptions.moderationMode,t.promotionEnabled=o.promotionEnabled||e.DefaultOptions.promotionEnabled,t.promotions=o.promotions||e.DefaultOptions.promotions,t}static getAllAccounts(e){const t=l.b.idsToAccounts(e.accounts),o=l.b.idsToAccounts(e.tagged);return{all:t.concat(o),accounts:t,tagged:o}}static getSources(e){return{accounts:l.b.idsToAccounts(e.accounts),tagged:l.b.idsToAccounts(e.tagged),hashtags:l.b.getBusinessAccounts().length>0?e.hashtags.filter(e=>e.tag.length>0):[]}}static hasSources(t,o){const n=e.Options.getSources(t),a=n.accounts.length>0||n.tagged.length>0,i=!o&&n.hashtags.length>0;return a||i}static isLimitingPosts(e){return e.moderation.length>0||e.hashtagBlacklist.length>0||e.hashtagWhitelist.length>0||e.captionBlacklist.length>0||e.captionWhitelist.length>0}}h([i.n],y.prototype,"accounts",void 0),h([i.n],y.prototype,"hashtags",void 0),h([i.n],y.prototype,"tagged",void 0),h([i.n],y.prototype,"layout",void 0),h([i.n],y.prototype,"numColumns",void 0),h([i.n],y.prototype,"highlightFreq",void 0),h([i.n],y.prototype,"mediaType",void 0),h([i.n],y.prototype,"postOrder",void 0),h([i.n],y.prototype,"numPosts",void 0),h([i.n],y.prototype,"linkBehavior",void 0),h([i.n],y.prototype,"feedWidth",void 0),h([i.n],y.prototype,"feedHeight",void 0),h([i.n],y.prototype,"feedPadding",void 0),h([i.n],y.prototype,"imgPadding",void 0),h([i.n],y.prototype,"textSize",void 0),h([i.n],y.prototype,"bgColor",void 0),h([i.n],y.prototype,"textColorHover",void 0),h([i.n],y.prototype,"bgColorHover",void 0),h([i.n],y.prototype,"hoverInfo",void 0),h([i.n],y.prototype,"showHeader",void 0),h([i.n],y.prototype,"headerInfo",void 0),h([i.n],y.prototype,"headerAccount",void 0),h([i.n],y.prototype,"headerStyle",void 0),h([i.n],y.prototype,"headerTextSize",void 0),h([i.n],y.prototype,"headerPhotoSize",void 0),h([i.n],y.prototype,"headerTextColor",void 0),h([i.n],y.prototype,"headerBgColor",void 0),h([i.n],y.prototype,"headerPadding",void 0),h([i.n],y.prototype,"customBioText",void 0),h([i.n],y.prototype,"customProfilePic",void 0),h([i.n],y.prototype,"includeStories",void 0),h([i.n],y.prototype,"storiesInterval",void 0),h([i.n],y.prototype,"showCaptions",void 0),h([i.n],y.prototype,"captionMaxLength",void 0),h([i.n],y.prototype,"captionRemoveDots",void 0),h([i.n],y.prototype,"captionSize",void 0),h([i.n],y.prototype,"captionColor",void 0),h([i.n],y.prototype,"showLikes",void 0),h([i.n],y.prototype,"showComments",void 0),h([i.n],y.prototype,"lcIconSize",void 0),h([i.n],y.prototype,"likesIconColor",void 0),h([i.n],y.prototype,"commentsIconColor",void 0),h([i.n],y.prototype,"lightboxShowSidebar",void 0),h([i.n],y.prototype,"numLightboxComments",void 0),h([i.n],y.prototype,"showLoadMoreBtn",void 0),h([i.n],y.prototype,"loadMoreBtnText",void 0),h([i.n],y.prototype,"loadMoreBtnTextColor",void 0),h([i.n],y.prototype,"loadMoreBtnBgColor",void 0),h([i.n],y.prototype,"autoload",void 0),h([i.n],y.prototype,"showFollowBtn",void 0),h([i.n],y.prototype,"followBtnText",void 0),h([i.n],y.prototype,"followBtnTextColor",void 0),h([i.n],y.prototype,"followBtnBgColor",void 0),h([i.n],y.prototype,"followBtnLocation",void 0),h([i.n],y.prototype,"hashtagWhitelist",void 0),h([i.n],y.prototype,"hashtagBlacklist",void 0),h([i.n],y.prototype,"captionWhitelist",void 0),h([i.n],y.prototype,"captionBlacklist",void 0),h([i.n],y.prototype,"hashtagWhitelistSettings",void 0),h([i.n],y.prototype,"hashtagBlacklistSettings",void 0),h([i.n],y.prototype,"captionWhitelistSettings",void 0),h([i.n],y.prototype,"captionBlacklistSettings",void 0),h([i.n],y.prototype,"moderation",void 0),h([i.n],y.prototype,"moderationMode",void 0),h([i.n],y.prototype,"promotionEnabled",void 0),e.Options=y;class E{constructor(e){Object.getOwnPropertyNames(e).map(t=>{this[t]=e[t]})}getCaption(e){const t=e.caption?e.caption:"";return this.captionMaxLength&&t.length?Object(u.l)(Object(u.o)(t,this.captionMaxLength)):t}static compute(t){const o=t.options,n=t.mode,a=new E({accounts:l.b.filterExisting(o.accounts),tagged:l.b.filterExisting(o.tagged),hashtags:o.hashtags.filter(e=>e.tag.length>0),layout:r.a.getById(o.layout),numColumns:s.a.get(o.numColumns,n,!0),highlightFreq:s.a.get(o.highlightFreq,n,!0),numPosts:s.a.get(o.numPosts,n,!0),linkBehavior:s.a.get(o.linkBehavior,n,!0),bgColor:Object(d.a)(o.bgColor),textColorHover:Object(d.a)(o.textColorHover),bgColorHover:Object(d.a)(o.bgColorHover),hoverInfo:o.hoverInfo,showHeader:s.a.get(o.showHeader,n,!0),headerInfo:s.a.get(o.headerInfo,n,!0),headerStyle:s.a.get(o.headerStyle,n,!0),headerTextColor:Object(d.a)(o.headerTextColor),headerBgColor:Object(d.a)(o.headerBgColor),headerPadding:s.a.get(o.headerPadding,n,!0),includeStories:o.includeStories,storiesInterval:o.storiesInterval,showCaptions:s.a.get(o.showCaptions,n,!0),captionMaxLength:s.a.get(o.captionMaxLength,n,!0),captionRemoveDots:o.captionRemoveDots,captionColor:Object(d.a)(o.captionColor),showLikes:s.a.get(o.showLikes,n,!0),showComments:s.a.get(o.showComments,n,!0),likesIconColor:Object(d.a)(o.likesIconColor),commentsIconColor:Object(d.a)(o.commentsIconColor),lightboxShowSidebar:o.lightboxShowSidebar,numLightboxComments:o.numLightboxComments,showLoadMoreBtn:s.a.get(o.showLoadMoreBtn,n,!0),loadMoreBtnTextColor:Object(d.a)(o.loadMoreBtnTextColor),loadMoreBtnBgColor:Object(d.a)(o.loadMoreBtnBgColor),loadMoreBtnText:o.loadMoreBtnText,showFollowBtn:s.a.get(o.showFollowBtn,n,!0),autoload:o.autoload,followBtnLocation:s.a.get(o.followBtnLocation,n,!0),followBtnTextColor:Object(d.a)(o.followBtnTextColor),followBtnBgColor:Object(d.a)(o.followBtnBgColor),followBtnText:o.followBtnText,account:null,showBio:!1,bioText:null,profilePhotoUrl:l.b.DEFAULT_PROFILE_PIC,feedWidth:"",feedHeight:"",feedPadding:"",imgPadding:"",textSize:"",headerTextSize:"",headerPhotoSize:"",captionSize:"",lcIconSize:"",showLcIcons:!1});if(a.numColumns=Math.max(a.numColumns,1),t.mode!==s.a.Mode.DESKTOP&&(a.numColumns=a.numColumns<1?s.a.get(o.numColumns,s.a.Mode.DESKTOP):a.numColumns),a.numPosts=parseInt(a.numPosts+""),(a.numPosts<1||isNaN(a.numPosts))&&(a.numPosts=1),a.allAccounts=a.accounts.concat(a.tagged.filter(e=>!a.accounts.includes(e))),a.allAccounts.length>0&&(a.account=o.headerAccount&&a.allAccounts.includes(o.headerAccount)?l.b.getById(o.headerAccount):l.b.getById(a.allAccounts[0])),a.showHeader=a.showHeader&&null!==a.account,a.showHeader&&(a.profilePhotoUrl=o.customProfilePic.length?o.customProfilePic:l.b.getProfilePicUrl(a.account)),a.showFollowBtn=a.showFollowBtn&&null!==a.account,a.showLoadMoreBtn=a.showLoadMoreBtn&&t.canLoadMore,a.showBio=a.headerInfo.some(t=>t===e.HeaderInfo.BIO),a.showBio){const e=o.customBioText.trim().length>0?o.customBioText:null!==a.account?l.b.getBioText(a.account):"";a.bioText=Object(u.l)(e),a.showBio=a.bioText.length>0}return a.feedWidth=this.normalizeCssSize(o.feedWidth,n,"auto"),a.feedHeight=this.normalizeCssSize(o.feedHeight,n,"auto"),a.feedPadding=this.normalizeCssSize(o.feedPadding,n,"0"),a.imgPadding=this.normalizeCssSize(o.imgPadding,n,"0"),a.textSize=this.normalizeCssSize(o.textSize,n,"inherit"),a.headerTextSize=this.normalizeCssSize(o.headerTextSize,n,"inherit"),a.headerPhotoSize=this.normalizeCssSize(o.headerPhotoSize,n,"50px"),a.captionSize=this.normalizeCssSize(o.captionSize,n,"inherit"),a.lcIconSize=this.normalizeCssSize(o.lcIconSize,n,"inherit"),a.buttonPadding=Math.max(10,s.a.get(o.imgPadding,n))+"px",a.showLcIcons=a.showLikes||a.showComments,a}static normalizeCssSize(e,t,o=null){const n=s.a.get(e,t);return n?n+"px":o}}e.ComputedOptions=E,e.HashtagSorting=Object(c.c)({recent:"Most recent",popular:"Most popular"}),function(e){e.ALL="all",e.PHOTOS="photos",e.VIDEOS="videos"}(o=e.MediaType||(e.MediaType={})),function(e){e.NOTHING="nothing",e.SELF="self",e.NEW_TAB="new_tab",e.LIGHTBOX="lightbox"}(n=e.LinkBehavior||(e.LinkBehavior={})),function(e){e.DATE_ASC="date_asc",e.DATE_DESC="date_desc",e.POPULARITY_ASC="popularity_asc",e.POPULARITY_DESC="popularity_desc",e.RANDOM="random"}(a=e.PostOrder||(e.PostOrder={})),function(e){e.USERNAME="username",e.DATE="date",e.CAPTION="caption",e.LIKES_COMMENTS="likes_comments",e.INSTA_LINK="insta_link"}(p=e.HoverInfo||(e.HoverInfo={})),function(e){e.NORMAL="normal",e.BOXED="boxed",e.CENTERED="centered"}(m=e.HeaderStyle||(e.HeaderStyle={})),function(e){e.BIO="bio",e.PROFILE_PIC="profile_pic",e.FOLLOWERS="followers",e.MEDIA_COUNT="media_count"}(f=e.HeaderInfo||(e.HeaderInfo={})),function(e){e.HEADER="header",e.BOTTOM="bottom",e.BOTH="both"}(g=e.FollowBtnLocation||(e.FollowBtnLocation={})),function(e){e.WHITELIST="whitelist",e.BLACKLIST="blacklist"}(b=e.ModerationMode||(e.ModerationMode={})),e.DefaultOptions={accounts:[],hashtags:[],tagged:[],layout:null,numColumns:{desktop:3},highlightFreq:{desktop:7},mediaType:o.ALL,postOrder:a.DATE_DESC,numPosts:{desktop:9},linkBehavior:{desktop:n.LIGHTBOX,phone:n.NEW_TAB},feedWidth:{desktop:""},feedHeight:{desktop:""},feedPadding:{desktop:20,tablet:14,phone:10},imgPadding:{desktop:14,tablet:10,phone:6},textSize:{desktop:""},bgColor:{r:255,g:255,b:255,a:1},hoverInfo:[p.LIKES_COMMENTS,p.INSTA_LINK],textColorHover:{r:255,g:255,b:255,a:1},bgColorHover:{r:0,g:0,b:0,a:.5},showHeader:{desktop:!0},headerInfo:{desktop:[f.PROFILE_PIC,f.BIO]},headerAccount:null,headerStyle:{desktop:m.NORMAL,phone:m.CENTERED},headerTextSize:{desktop:""},headerPhotoSize:{desktop:50},headerTextColor:{r:0,g:0,b:0,a:1},headerBgColor:{r:255,g:255,b:255,a:1},headerPadding:{desktop:0},customProfilePic:0,customBioText:"",includeStories:!1,storiesInterval:5,showCaptions:{desktop:!1},captionMaxLength:{desktop:0},captionRemoveDots:!1,captionSize:{desktop:0},captionColor:{r:0,g:0,b:0,a:1},showLikes:{desktop:!1},showComments:{desktop:!1},lcIconSize:{desktop:14},likesIconColor:{r:0,g:0,b:0,a:1},commentsIconColor:{r:0,g:0,b:0,a:1},lightboxShowSidebar:!1,numLightboxComments:50,showLoadMoreBtn:{desktop:!0},loadMoreBtnTextColor:{r:255,g:255,b:255,a:1},loadMoreBtnBgColor:{r:0,g:149,b:246,a:1},loadMoreBtnText:"Load more",autoload:!1,showFollowBtn:{desktop:!0},followBtnText:"Follow on Instagram",followBtnTextColor:{r:255,g:255,b:255,a:1},followBtnBgColor:{r:0,g:149,b:246,a:1},followBtnLocation:{desktop:g.HEADER,phone:g.BOTTOM},hashtagWhitelist:[],hashtagBlacklist:[],captionWhitelist:[],captionBlacklist:[],hashtagWhitelistSettings:!0,hashtagBlacklistSettings:!0,captionWhitelistSettings:!0,captionBlacklistSettings:!0,moderation:[],moderationMode:b.BLACKLIST,promotionEnabled:!0,promotions:{}}}(m||(m={}))},8:function(e,t,o){"use strict";function n(...e){return e.filter(e=>!!e).join(" ")}function a(e){return n(...Object.getOwnPropertyNames(e).map(t=>e[t]?t:null))}function i(e,t={}){let o=Object.getOwnPropertyNames(t).map(o=>t[o]?e+o:null);return e+" "+o.filter(e=>!!e).join(" ")}function s(...e){return t=>{e.forEach(e=>e&&function(e,t){"function"==typeof e?e(t):e.current=t}(e,t))}}o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return i})),o.d(t,"d",(function(){return s}))},87:function(e,t,o){e.exports={root:"SliWpBlockEdit__root",logo:"SliWpBlockEdit__logo",label:"SliWpBlockEdit__label","missing-feed-msg":"SliWpBlockEdit__missing-feed-msg SliWpBlockEdit__label",missingFeedMsg:"SliWpBlockEdit__missing-feed-msg SliWpBlockEdit__label",selector:"SliWpBlockEdit__selector","selector-label":"SliWpBlockEdit__selector-label",selectorLabel:"SliWpBlockEdit__selector-label","selector-list-container":"SliWpBlockEdit__selector-list-container",selectorListContainer:"SliWpBlockEdit__selector-list-container","feed-container":"SliWpBlockEdit__feed-container",feedContainer:"SliWpBlockEdit__feed-container"}},9:function(e,t,o){"use strict";o.d(t,"a",(function(){return s}));var n=o(0),a=o.n(n),i=o(8);const s=e=>{var{icon:t,className:o}=e,n=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(o[n[a]]=e[n[a]])}return o}(e,["icon","className"]);return a.a.createElement("span",Object.assign({className:Object(i.b)("dashicons","dashicons-"+t,o)},n))}},92:function(e,t,o){e.exports={root:"ProfilePic__root",round:"ProfilePic__round ProfilePic__root",square:"ProfilePic__square ProfilePic__root"}},93:function(e,t,o){e.exports={"connect-btn":"AccountsPage__connect-btn",connectBtn:"AccountsPage__connect-btn"}}},[[562,0,1,2,3]]])}));
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitc296807111f69ce064de5a336de555c5::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit8b5addfca4cbaa9168aa2f75ca146c5c
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
- $includeFiles = Composer\Autoload\ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
- composerRequire8b5addfca4cbaa9168aa2f75ca146c5c($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
- function composerRequire8b5addfca4cbaa9168aa2f75ca146c5c($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitc296807111f69ce064de5a336de555c5
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitc296807111f69ce064de5a336de555c5', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitc296807111f69ce064de5a336de555c5', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitc296807111f69ce064de5a336de555c5::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
51
  $loader->register(true);
52
 
53
  if ($useStaticLoader) {
54
+ $includeFiles = Composer\Autoload\ComposerStaticInitc296807111f69ce064de5a336de555c5::$files;
55
  } else {
56
  $includeFiles = require __DIR__ . '/autoload_files.php';
57
  }
58
  foreach ($includeFiles as $fileIdentifier => $file) {
59
+ composerRequirec296807111f69ce064de5a336de555c5($fileIdentifier, $file);
60
  }
61
 
62
  return $loader;
63
  }
64
  }
65
 
66
+ function composerRequirec296807111f69ce064de5a336de555c5($fileIdentifier, $file)
67
  {
68
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
69
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c
8
  {
9
  public static $files = array (
10
  '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
@@ -480,9 +480,9 @@ class ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c
480
  public static function getInitializer(ClassLoader $loader)
481
  {
482
  return \Closure::bind(function () use ($loader) {
483
- $loader->prefixLengthsPsr4 = ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c::$prefixLengthsPsr4;
484
- $loader->prefixDirsPsr4 = ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c::$prefixDirsPsr4;
485
- $loader->classMap = ComposerStaticInit8b5addfca4cbaa9168aa2f75ca146c5c::$classMap;
486
 
487
  }, null, ClassLoader::class);
488
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitc296807111f69ce064de5a336de555c5
8
  {
9
  public static $files = array (
10
  '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
480
  public static function getInitializer(ClassLoader $loader)
481
  {
482
  return \Closure::bind(function () use ($loader) {
483
+ $loader->prefixLengthsPsr4 = ComposerStaticInitc296807111f69ce064de5a336de555c5::$prefixLengthsPsr4;
484
+ $loader->prefixDirsPsr4 = ComposerStaticInitc296807111f69ce064de5a336de555c5::$prefixDirsPsr4;
485
+ $loader->classMap = ComposerStaticInitc296807111f69ce064de5a336de555c5::$classMap;
486
 
487
  }, null, ClassLoader::class);
488
  }