1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8134],{74027:function(e,t,r){"use strict";r.d(t,{P:function(){return o}});var n,o,i=r(57437),l=r(2265),a=r(41568),c=r(92297),s=r(5515),u=r.n(s),d=r(21705),g=r(65979),f=r(15500),v=r(44007),h=r(7460),p=r(17150),m=r(32626);(n=o||(o={}))[n.Items=1]="Items",n[n.Veterans=2]="Veterans",n[n.People=3]="People",n[n.Organizations=4]="Organizations",n[n.Products=5]="Products",n[n.Events=6]="Events",n[n.Assignments=7]="Assignments",n[n.Settings=8]="Settings",n[n.Security=9]="Security",n[n.Groups=10]="Groups",n[n.Stories=11]="Stories",n[n.Collections=12]="Collections";let x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")};t.Z=e=>{let{itemId:t,moduleType:r,cachedFolders:n,position:o,refreshFolders:s}=e,S=(0,f.N)(),[E,y]=(0,l.useState)(""),[b,w]=(0,l.useState)(!1),[R,U]=(0,l.useState)(!1),N=(0,l.useRef)(null),L=e=>{window.location.href=p._S.getRedirectUrl(e)};(0,a.Z)(N,()=>{w(!1)});let j=e=>{v.Y.debug("Save compared items to folder",t,e),v.Y.debug("module type is ",r);let n=t.toString();c.S.saveItemToFolder(n,null!=r?r:1,e.id,"",S).then(t=>{v.Y.debug("Saved items to folder",t),t.success&&0===t.result.statusCode?(U(!0),u().fire({title:"Success!",text:'Item(s) successfully saved in folder "'.concat(e.title,'".'),icon:"success",confirmButtonColor:"#3085d6"}).then(()=>{console.log("Item saved in folder '".concat(e.title,"'. Saved icon active:"),!0)})):u().fire({title:"OOPS!",text:t.result.message,icon:"error",confirmButtonColor:"#3085d6"})})};(0,l.useEffect)(()=>{U(n.some(e=>Array.isArray(e.items)&&e.items.includes(t)))},[n,t]);let[C,A]=l.useState(!1);return(0,i.jsxs)("div",{ref:N,className:"postcard_save dropdown ".concat(b?"show":""),children:[(0,i.jsx)("a",{id:"SaveDropdownMenuButton",className:"save-1-67".concat(R?" active":""),"data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"true",onClick:()=>{w(!b)},children:(0,i.jsxs)("span",{"data-toggle":"tooltip","data-placement":"bottom","data-original-title":'<TranslationLabel identifier={"SavedFolders.save"}/>',children:[(0,i.jsx)("i",{className:"fal fa-bookmark default_icon ".concat(b?"hidden":"")}),(0,d.g)((0,i.jsx)("i",{className:"fas fa-bookmark active_icon ".concat(b?"":"hidden")}),"save","Save","bottom")]})}),b&&(0,i.jsxs)("div",{className:"dropdown-menu dropdown-menu-right show","aria-labelledby":"SaveDropdownMenuButton0","x-placement":"bottom-end",style:{position:"absolute",transform:"translate3d(".concat(o.x,"px, ").concat(o.y,"px, ").concat(o.z,"px)"),top:"0px",left:"0px",willChange:"transform"},children:[(0,i.jsx)("div",{className:"export_header ng-binding",children:(0,i.jsx)(g.default,{identifier:"SavedFolders.save_to_folder"})}),(0,i.jsx)("div",{className:"save_outer ng-scope","ng-if":"loggedInUser",children:localStorage.getItem("user")?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("ul",{className:"folder_list",children:n.map(e=>(0,i.jsx)("li",{children:(0,i.jsx)("a",{className:"dropdown-item",onClick:()=>j(e),children:e.title})},e.id))}),(0,i.jsx)("div",{className:"search-folder",children:(0,i.jsxs)("div",{className:"input-group input-group-sm",children:[(0,i.jsx)("input",{value:E,onChange:e=>y(e.target.value),type:"text",className:"form-control",placeholder:"Add new folder","aria-label":"folder name","aria-describedby":"basic-addon2"}),(0,i.jsx)("div",{className:"input-group-append",children:(0,i.jsx)("button",{className:"btn btn-primary",type:"button",children:(0,i.jsx)("i",{className:x(""===E.trim()?"fal":"fas","fa-plus-circle"),onClick:()=>{v.Y.debug("Save compared items to new folder ",t);let e=t.toString();c.S.saveItemToFolder(e,null!=r?r:1,0,E,S).then(e=>{v.Y.debug("Saved items to folder",e),e&&(u().fire({title:"Success!",text:'Item(s) successfully saved in new folder "'.concat(E,'".'),icon:"success",confirmButtonColor:"#3085d6"}).then(()=>{U(!0),console.log("Item saved in new folder '".concat(E,"'. Saved icon active:"),!0)}),s&&s(),m.Z.emit("savedFolder:created"))})}})})})]})})]}):(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{children:(0,i.jsx)("a",{onClick:e=>{e.preventDefault(),A(!0),w(!1),m.Z.emit("modal:opened")},"data-toggle":"modal","data-target":"#loginModal",href:"",children:"Login to account"})}),(0,i.jsx)("li",{children:(0,i.jsx)("a",{onClick:()=>L("/register"),href:"/register",children:"Create account"})})]})})]}),(0,i.jsx)(h.Z,{isModalOpen:C,setIsModalOpen:A,onClose:()=>A(!1)})]})}},1287:function(e,t,r){"use strict";r.d(t,{LanguageProvider:function(){return a},Z:function(){return l}});var n=r(57437),o=r(2265);let i=(0,o.createContext)({language:"ENG",setLanguage:e=>{},translations:{}}),l=()=>(0,o.useContext)(i),a=e=>{let{children:t,translations:r}=e,[l,a]=(0,o.useState)("RUS");return(0,n.jsx)(i.Provider,{value:{language:l,setLanguage:a,translations:r},children:t})}},15500:function(e,t,r){"use strict";r.d(t,{N:function(){return c},SiteConfigProvider:function(){return a}});var n=r(57437),o=r(2265),i=r(89655);let l=(0,o.createContext)(void 0),a=e=>{let{children:t,siteKey:r,currentUrl:o,siteStage:a}=e,c=(0,i.d)(r);return(0,n.jsx)(l.Provider,{value:{siteKey:r,currentSite:c,currentUrl:o,siteStage:a},children:t})},c=()=>{let e=(0,o.useContext)(l);if(void 0===e)throw Error("useSiteConfig must be used within a SiteConfigProvider");return e}},17597:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var n=r(15500),o=r(11848),i=r(2265);function l(e){let t=(0,n.N)(),[r,l]=(0,i.useState)(null),a=(0,i.useMemo)(()=>e?function(e){if(!e)return"";let t="iiiflb.blavatnikarchive.org";return e.replace(/iiif\.blavatnikarchive\.org/g,t).replace(/iiifv\.blavatnikarchive\.org/g,t)}(e.split("?")[0]):"",[e]);return(0,i.useEffect)(()=>
1{if(!a){l("");return}let e=!0;return(0,o.NF)(a,t.siteKey).then(t=>{e&&l(t)}).catch(t=>{console.error("Error fetching presigned URL: ".concat(t)),e&&l(a)}),()=>{e=!1}},[a,t.siteKey]),null!=r?r:a}},65979:function(e,t,r){"use strict";var n=r(57437),o=r(1287);r(2265);var i=r(44007);t.default=e=>{let{identifier:t}=e,{translations:r}=(0,o.Z)(),l=t.split(".")[0],a=t.split(".")[1],c=r[l],s=c?c[a]:t;return s||(i.Y.error("Translation not found for ".concat(t)),s=t),(0,n.jsx)(n.Fragment,{children:s})}},41568:function(e,t,r){"use strict";var n=r(2265);t.Z=function(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=arguments.length>3?arguments[3]:void 0;(0,n.useEffect)(()=>{if(!r)return;let n=r=>{if(e.current&&!e.current.contains(r.target)){if(o){let e=r.target;for(;e;){if(e.id===o)return;let t=e.parentElement;if(!t)break;e=t}}t(r)}},i=setTimeout(()=>{document.addEventListener("mousedown",n)},0);return()=>{clearTimeout(i),document.removeEventListener("mousedown",n)}},[e,t,r,o])}},11848:function(e,t,r){"use strict";r.d(t,{NF:function(){return a},ZP:function(){return l},uK:function(){return i}});var n=r(92297),o=r(44007);function i(){return""}function l(e,t){let r=e.replace(/<[^>]+>/gi,"").replace(/ /g," ").trim().split(/\s+/);return r.length>t?r.slice(0,t).join(" ")+"...":e}async function a(e,t){if(console.log("DEBUG getPresignedUrl called with:",{url:e,siteKey:t}),!e.includes("aws"))return console.log("DEBUG URL doesn't contain 'aws', returning original:",e),e;let r=e.split("?")[0].split(".com/")[1];console.log("DEBUG extracted filename:",r);try{let e=await n.S.getPresignedUrl(r,t);return console.log("DEBUG presigned URL received:",e),e}catch(t){return o.Y.error("â Failed to get presigned URL:",t),console.log("DEBUG presigning failed, returning original:",e),e}}},44007:function(e,t,r){"use strict";var n,o;r.d(t,{Y:function(){return l}}),(o=n||(n={})).RED="red",o.YELLOW="yellow",o.BLUE="blue",o.GREEN="green",o.RESET="black",o.LIGHT_BLUE="lightblue";class i{static fromLevel(e){return this.AllLevels.find(t=>t.level===e)}constructor(e,t,r){this.level=e,this.color=t,this.priority=r,i.AllLevels.push(this)}}i.AllLevels=[],i.TRACE=new i("TRACE","blue",1),i.DEBUG=new i("DEBUG","green",2),i.INFO=new i("INFO","lightblue",3),i.WARN=new i("WARN","yellow",4),i.ERROR=new i("ERROR","red",5);class l{static log(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(e.priority>=this.LOG_LEVEL.priority){let t=new Date,n="".concat(t.getHours(),":").concat(t.getMinutes(),":").concat(t.getSeconds());e===i.ERROR?console.error("%c[".concat(n,"] %c[").concat(e.level,"]"),"color: gray","color: ".concat(e.color),...r):e===i.WARN?console.warn("%c[".concat(n,"] %c[").concat(e.level,"]"),"color: gray","color: ".concat(e.color),...r):e===i.INFO?console.info("%c[".concat(n,"] %c[").concat(e.level,"]"),"color: gray","color: ".concat(e.color),...r):e===i.DEBUG?console.debug("%c[".concat(n,"] %c[").concat(e.level,"]"),"color: gray","color: ".concat(e.color),...r):e===i.TRACE&&console.log("%c[".concat(n,"] %c[").concat(e.level,"]"),"color: gray","color: ".concat(e.color),...r)}}static trace(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.log(i.TRACE,...t)}static debug(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.log(i.DEBUG,...t)}static info(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.log(i.INFO,...t)}static warn(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.log(i.WARN,...t)}static error(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this.log(i.ERROR,...t)}static setLogLevel(e){this.LOG_LEVEL=e}}l.LOG_LEVEL=i.TRACE},21705:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});var n=r(57437),o=r(32491),i=r(7843);r(2265);let l=(e,t,r)=>(0,n.jsx)(o.Z,{id:"".concat(t,"-tooltip"),...e,children:r}),a=function(e,t,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top";return(0,n.jsx)(i.Z,{overlay:e=>l(e,t,r),placement:o,children:e})}},17150:function(e,t,r){"use strict";r.d(t,{Nc:function(){return i},Uv:function(){return l},_S:function(){return o}});var n=r(44007);r(40257);class o{static getBaseUrl(){return window.location.origin}static getCurrentUrl(){return window.location.href}static getRedirectUrl(e){return"#"===e?"".concat(this.getCurrentUrl(),"#"):"".concat(o.getBaseUrl()).concat(e)}}
1o.SERVER_URL_FOR_SSR_HYDRATION="https://sja-website-dev.itcomrade.us";let i=e=>e.pageUrl?e.pageUrl.startsWith("http")?{url:e.pageUrl,target:e.externalUrl?"_blank":void 0}:{url:e.pageUrl.startsWith("/")?e.pageUrl:"/".concat(e.pageUrl),target:e.externalUrl?"_blank":void 0}:{url:"/more/".concat(e.code),target:void 0},l=(e,t)=>{let r;let o="/search/item/";if(Array.isArray(t))r=t.filter(e=>null!=e&&String(e).length>0).map(String);else if(null!=t){let e=String(t);r=e.length>0?[e]:[]}else r=[];if(0===r.length)return n.Y.warn("generateFacetSearchLink called for type '".concat(e,"' with no valid IDs. Returning base search URL."),{originalIds:t}),o;let i=[{type:e,ids:r}];try{let e=JSON.stringify(i),t=encodeURIComponent(e);return"".concat(o,"?f=").concat(t)}catch(r){return n.Y.error("Failed to stringify or encode facet search params for URL:",r,{facetType:e,ids:t}),o}}},85588:function(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.