From 54500de024b4e0e9ef0ec357282086a6bebefb65 Mon Sep 17 00:00:00 2001 From: srosset81 Date: Mon, 30 Jan 2023 14:37:45 +0100 Subject: [PATCH] Don't throw error if permissions cannot be fetched --- src/frontend/packages/auth-provider/dist/index.cjs.js | 2 +- .../packages/auth-provider/dist/index.cjs.js.map | 2 +- src/frontend/packages/auth-provider/dist/index.es.js | 2 +- .../packages/auth-provider/dist/index.es.js.map | 2 +- .../packages/auth-provider/src/authProvider.js | 10 +++++++--- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js b/src/frontend/packages/auth-provider/dist/index.cjs.js index 0f75d3128..d72e5c132 100644 --- a/src/frontend/packages/auth-provider/dist/index.cjs.js +++ b/src/frontend/packages/auth-provider/dist/index.cjs.js @@ -1,4 +1,4 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-admin"),r=require("@semapps/semantic-data-provider"),n=require("@material-ui/icons/Share"),a=require("@material-ui/core"),o=require("@material-ui/lab/Autocomplete"),i=require("@material-ui/icons/Person"),s=require("@material-ui/icons/Edit"),c=require("@material-ui/icons/Check"),u=require("@material-ui/icons/Public"),l=require("@material-ui/icons/VpnLock"),d=require("@material-ui/icons/Group"),f=require("@material-ui/styles"),p=require("@material-ui/core/styles"),m=require("@material-ui/icons/Lock"),h=require("@material-ui/icons/Storage"),v=require("classnames"),g=require("react-router-dom"),y=require("react-final-form"),b=require("@material-ui/icons/PowerSettingsNew"),w=require("@material-ui/icons/AccountCircle");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function E(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var x=_(e),k=E(e),j=_(n),P=_(o),O=_(i),S=_(s),C=_(c),A=_(u),T=_(l),I=_(d),L=_(m),N=_(h),R=_(v),U=_(b),D=_(w);function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e){for(var t=1;t=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function B(e,t,r,n,a,o,i){try{var s=e[o](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function F(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){B(o,n,a,i,s,"next",e)}function s(e){B(o,n,a,i,s,"throw",e)}i(void 0)}))}}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V(){return(V=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){if(e){if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i};function X(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(K(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return K(t)}}function Z(e){this.message=e}function ee(e,t){if("string"!=typeof e)throw new Z("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(X(e.split(".")[r]))}catch(e){throw new Z("Invalid token specified: "+e.message)}}Z.prototype=new Error,Z.prototype.name="InvalidTokenError";var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e,t){return e(t={exports:{}},t.exports),t.exports}var ne,ae,oe=re((function(e){var t,r;t=te,r=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n0&&(a=a.replace(/^[\/]+/,"")),a=n0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=r():t.urljoin=r()})),ie=function(e){return e?Array.isArray(e)?e:[e]:void 0},se=function(e){var t=new URL(e);return oe(t.origin,"_acl",t.pathname)},ce=function(e){return{"@base":e,acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/","acl:agent":{"@type":"@id"},"acl:agentGroup":{"@type":"@id"},"acl:agentClass":{"@type":"@id"},"acl:mode":{"@type":"@id"},"acl:accessTo":{"@type":"@id"}}},ue=function(){var e=F(q().mark((function e(t){var r,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getDataServers();case 2:if(r=e.sent,n=Object.values(r).find((function(e){return!0===e.authServer}))){e.next=6;break}throw new Error("Could not find a server with authServer: true. Check your dataServers config.");case 6:return e.abrupt("return",n.pod?new URL(n.baseUrl).origin:n.baseUrl);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=["username","email","password","domain"],de="acl:agentClass",fe=["acl:Append","acl:Write","acl:Control"],pe=["acl:Append","acl:Write","acl:Control"],me=["acl:Write","acl:Control"],he=["acl:Control"],ve={show:["acl:Read","acl:Append","acl:Write","acl:Control"],list:["acl:Read","acl:Append","acl:Write","acl:Control"],create:fe,edit:pe,delete:me,control:he},ge={show:"auth.message.resource_show_forbidden",edit:"auth.message.resource_edit_forbidden",delete:"auth.message.resource_delete_forbidden",control:"auth.message.resource_control_forbidden",list:"auth.message.container_list_forbidden",create:"auth.message.container_create_forbidden"},ye=(M(ne={},"acl:Read","auth.right.resource.read"),M(ne,"acl:Append","auth.right.resource.append"),M(ne,"acl:Write","auth.right.resource.write"),M(ne,"acl:Control","auth.right.resource.control"),ne),be=(M(ae={},"acl:Read","auth.right.container.read"),M(ae,"acl:Write","auth.right.container.write"),M(ae,"acl:Control","auth.right.container.control"),ae),we=function(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",o=t.useGetIdentity(),i=o.identity,s=o.loading,c=t.usePermissionsOptimized(r),u=c.permissions,l=t.useNotify(),d=t.useRedirect();return e.useEffect((function(){!s&&i&&u&&!u.some((function(e){return ve[n].includes(e["acl:mode"])}))&&(l(ge[n],"error"),d(a))}),[u,i,d,l,s]),u},_e=function(e){var n=r.useCreateContainer(e.resource);return we(n,"create"),x.default.createElement(t.Create,e)};_e.defaultProps={actions:x.default.createElement(t.CreateActions,null)};var Ee=a.makeStyles((function(){return{list:{padding:0,width:"100%"},option:{padding:0}}})),xe=function(r){var n=r.agents,o=r.addPermission,i=Ee(),s=t.useTranslate(),c=Y(e.useState(null),2),u=c[0],l=c[1],d=Y(e.useState(""),2),f=d[0],p=d[1],m=Y(e.useState([]),2),h=m[0],v=m[1],g=t.useGetList("Person",{page:1,perPage:100},{field:"pair:label",order:"ASC"},{q:f},{enabled:f.length>0}),y=g.ids,b=g.data;return e.useEffect((function(){v(y.length>0?Object.values(b):[])}),[y,b]),x.default.createElement(P.default,{classes:{option:i.option},getOptionLabel:function(e){return e["pair:label"]},filterOptions:function(e){return e.filter((function(e){return!Object.keys(n).includes(e.id)}))},options:h,noOptionsText:s("ra.navigation.no_results"),autoComplete:!0,blurOnSelect:!0,clearOnBlur:!0,disableClearable:!0,value:u,onChange:function(e,t){o(t.id||t["@id"],"acl:agent","acl:Read"),l(null),p(""),v([])},onInputChange:function(e,t){p(t)},renderInput:function(e){return x.default.createElement(a.TextField,V({},e,{label:s("auth.input.agent_select"),variant:"filled",margin:"dense",fullWidth:!0}))},renderOption:function(e){return x.default.createElement(a.List,{dense:!0,className:i.list},x.default.createElement(a.ListItem,{button:!0},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,{src:e.image},x.default.createElement(O.default,null))),x.default.createElement(a.ListItemText,{primary:e["pair:label"]})))}})},ke=function(e){var t=e.agent;switch(t.predicate){case de:return"foaf:Agent"===t.id?x.default.createElement(A.default,null):x.default.createElement(T.default,null);case"acl:agent":return x.default.createElement(O.default,null);case"acl:agentGroup":return x.default.createElement(I.default,null);default:throw new Error("Unknown agent predicate: "+t.predicate)}},je=a.makeStyles((function(){return{listItem:{paddingLeft:4,paddingRight:36},primaryText:{width:"30%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},secondaryText:{textAlign:"center",width:"60%",fontStyle:"italic",color:"grey"}}})),Pe=function(r){var n=r.isContainer,o=r.agent,i=r.addPermission,s=r.removePermission,c=je(),u=t.useTranslate(),l=t.useDataProvider(),d=Y(x.default.useState(null),2),f=d[0],p=d[1],m=Y(e.useState(),2),h=m[0],v=m[1],g=Y(e.useState(!0),2),y=g[0],b=g[1],w=Y(e.useState(),2),_=w[0],E=w[1];if(e.useEffect((function(){"acl:agent"===o.predicate?l.getOne("Person",{id:o.id}).then((function(e){var t=e.data;v(t),b(!1)})).catch((function(e){E(e),b(!1)})):b(!1)}),[o.id,o.predicate]),"acl:agentGroup"===o.predicate)return null;var k=function(){return p(null)},j=n?be:ye;return y?x.default.createElement(t.Loading,null):_?x.default.createElement(t.Error,null):x.default.createElement(a.ListItem,{className:c.listItem},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,{src:null==h?void 0:h.image},x.default.createElement(ke,{agent:o}))),x.default.createElement(a.ListItemText,{className:c.primaryText,primary:h?h["pair:label"]:u("foaf:Agent"===o.id?"auth.agent.anonymous":"auth.agent.authenticated")}),x.default.createElement(a.ListItemText,{className:c.secondaryText,primary:o.permissions&&o.permissions.map((function(e){return u(j[e])})).join(", ")}),x.default.createElement(a.ListItemSecondaryAction,null,x.default.createElement(a.IconButton,{onClick:function(e){return p(e.currentTarget)}},x.default.createElement(S.default,null)),x.default.createElement(a.Menu,{anchorEl:f,keepMounted:!0,open:Boolean(f),onClose:k},Object.entries(j).map((function(e){var t=Y(e,2),r=t[0],n=t[1],c=o.permissions&&o.permissions.includes(r);return x.default.createElement(a.MenuItem,{key:r,onClick:function(){c?s(o.id,o.predicate,r):i(o.id,o.predicate,r),k()}},x.default.createElement(a.ListItemIcon,null,c?x.default.createElement(C.default,null):null),x.default.createElement(a.ListItemText,{primary:u(n)}))})))))},Oe=a.makeStyles((function(e){return{list:{width:"100%",maxWidth:"100%",backgroundColor:e.palette.background.paper}}})),Se=function(e){var t=e.isContainer,r=e.agents,n=e.addPermission,o=e.removePermission,i=Oe();return x.default.createElement(a.List,{dense:!0,className:i.list},Object.entries(r).map((function(e){var r=Y(e,2),a=r[0],i=r[1];return x.default.createElement(Pe,{key:a,isContainer:t,agent:i,addPermission:n,removePermission:o})})))},Ce=function(r){var n=t.usePermissionsOptimized(r).permissions,a=t.useAuthProvider(),o=Y(e.useState({}),2),i=o[0],s=o[1];e.useEffect((function(){var e,t=(M(e={},"foaf:Agent",{id:"foaf:Agent",predicate:de,permissions:[]}),M(e,"acl:AuthenticatedAgent",{id:"acl:AuthenticatedAgent",predicate:de,permissions:[]}),e),r=function(e,r,n){t[e]?t[e].permissions.push(n):t[e]={id:e,predicate:r,permissions:[n]}};if(n){var a,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}(n);try{var i=function(){var e=a.value;e[de]&&ie(e[de]).forEach((function(t){return r(t,de,e["acl:mode"])})),e["acl:agent"]&&ie(e["acl:agent"]).forEach((function(t){return r(t,"acl:agent",e["acl:mode"])})),e["acl:agentGroup"]&&ie(e["acl:agentGroup"]).forEach((function(t){return r(t,"acl:agentGroup",e["acl:mode"])}))};for(o.s();!(a=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}s(t)}}),[n]);var c=e.useCallback((function(e,t,n){var o,c=W({},i);s(W(W({},i),{},M({},e,{id:e,predicate:t,permissions:i[e]?[].concat($(null===(o=i[e])||void 0===o?void 0:o.permissions),[n]):[n]}))),a.addPermission(r,e,t,n).catch((function(e){s(c)}))}),[i,s,r,a]),u=e.useCallback((function(e,t,n){var o=W({},i);s(Object.fromEntries(Object.entries(i).map((function(t){var r=Y(t,2),a=r[0],o=r[1];return o.id===e&&(o.permissions=o.permissions.filter((function(e){return e!==n}))),[a,o]})).filter((function(e){var t=Y(e,2);t[0];var r=t[1];return r.predicate===de||r.permissions.length>0})))),a.removePermission(r,e,t,n).catch((function(e){s(o)}))}),[i,s,r,a]);return{agents:i,addPermission:c,removePermission:u}},Ae=a.makeStyles((function(){return{title:{paddingBottom:8},actions:{padding:15},addForm:{paddingTop:0},listForm:{paddingTop:0,paddingBottom:0,paddingRight:0,maxHeight:210}}})),Te=function(e){var r=e.open,n=e.onClose,o=e.uri,i=e.isContainer,s=Ae(),c=t.useTranslate(),u=Ce(o),l=u.agents,d=u.addPermission,f=u.removePermission;return x.default.createElement(a.Dialog,{fullWidth:!0,open:r,onClose:n},x.default.createElement(a.DialogTitle,{className:s.title},c(i?"auth.dialog.container_permissions":"auth.dialog.resource_permissions")),x.default.createElement(a.DialogContent,{className:s.addForm},x.default.createElement(xe,{agents:l,addPermission:d})),x.default.createElement(a.DialogContent,{className:s.listForm},x.default.createElement(Se,{isContainer:i,agents:l,addPermission:d,removePermission:f})),x.default.createElement(a.DialogActions,{className:s.actions},x.default.createElement(t.Button,{label:"ra.action.close",variant:"text",onClick:n})))},Ie=function(n){var a=n.record,o=n.resource,i=Y(e.useState(!1),2),s=i[0],c=i[1],u=r.useCreateContainer(o),l=!!o,d=l?u:a.id||a["@id"];return x.default.createElement(x.default.Fragment,null,x.default.createElement(t.Button,{label:"auth.action.permissions",onClick:function(){return c(!0)}},x.default.createElement(j.default,null)),x.default.createElement(Te,{uri:d,isContainer:!!l,open:s,onClose:function(){return c(!1)}}))},Le=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasShow,i=t.usePermissionsOptimized(null==n?void 0:n.id).permissions;return x.default.createElement(t.TopToolbar,null,a&&x.default.createElement(t.ListButton,{basePath:r,record:n}),o&&x.default.createElement(t.ShowButton,{basePath:r,record:n}),!!i&&i.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:r,record:n}))},Ne=function(e){var r=t.useRecordContext(),n=t.usePermissionsOptimized(null==r?void 0:r.id).permissions;return n&&n.some((function(e){return me.includes(e["acl:mode"])}))?x.default.createElement(t.DeleteButton,e):null},Re=a.makeStyles((function(){return{toolbar:{flex:1,display:"flex",justifyContent:"space-between"}}})),Ue=function(e){var r=Re();return x.default.createElement(t.Toolbar,V({},e,{className:r.toolbar}),x.default.createElement(t.SaveButton,null),x.default.createElement(Ne,{undoable:!1}),"}")},De=function(e){return we(e.id,"edit"),x.default.createElement(t.Edit,e,x.default.cloneElement(e.children,W({toolbar:x.default.createElement(Ue,null)},e.children.props)))};De.defaultProps={actions:x.default.createElement(Le,null)};var ze=["bulkActions","basePath","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","resource","selectedIds","showFilter","total"],We=function(e){var n=e.bulkActions,o=e.basePath,i=e.currentSort,s=e.displayedFilters,c=e.exporter,u=e.filters,l=e.filterValues,d=e.onUnselectItems,f=e.resource,p=e.selectedIds,m=e.showFilter,h=e.total,v=G(e,ze),g=a.useMediaQuery((function(e){return e.breakpoints.down("xs")})),y=t.useResourceDefinition(v),b=r.useCreateContainer(f),w=t.usePermissionsOptimized(b).permissions;return x.default.createElement(t.TopToolbar,null,u&&x.default.cloneElement(u,{resource:f,showFilter:m,displayedFilters:s,filterValues:l,context:"button"}),y.hasCreate&&w&&w.some((function(e){return fe.includes(e["acl:mode"])}))&&x.default.createElement(t.CreateButton,{basePath:o}),w&&w.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:o,record:b}),!g&&!1!==c&&x.default.createElement(t.ExportButton,{disabled:0===h,resource:f,sort:i,filter:l,exporter:c}),n&&x.default.cloneElement(n,{basePath:o,filterValues:l,resource:f,selectedIds:p,onUnselectItems:d}))},qe=function(e){return x.default.createElement(t.List,e)};qe.defaultProps={actions:x.default.createElement(We,null)};var Be=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasEdit,i=t.usePermissionsOptimized(null==n?void 0:n.id).permissions;return x.default.createElement(t.TopToolbar,null,a&&x.default.createElement(t.ListButton,{basePath:r,record:n}),o&&i&&i.some((function(e){return pe.includes(e["acl:mode"])}))&&x.default.createElement(t.EditButton,{basePath:r,record:n}),i&&i.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:r,record:n}))},Fe=function(e){return we(e.id,"edit"),x.default.createElement(t.Show,e)};Fe.defaultProps={actions:x.default.createElement(Be,null)};var Me=["open","onClose","title","message","redirect"],Ve=function(e){var r=e.open,n=e.onClose,o=e.title,i=e.message,s=e.redirect,c=G(e,Me),u=t.useLogin(),l=t.useTranslate();return x.default.createElement(a.Dialog,V({open:r,onClose:n},c),x.default.createElement(a.DialogTitle,null,l(o)),x.default.createElement(a.DialogContent,null,x.default.createElement(a.DialogContentText,null,l(i))),x.default.createElement(a.DialogActions,null,x.default.createElement(a.Button,{onClick:n},l("ra.action.cancel")),x.default.createElement(a.Button,{onClick:function(){return u({redirect:s||window.location.pathname+window.location.search})},color:"primary",variant:"contained"},l("auth.action.login"))))};Ve.defaultProps={title:"auth.dialog.login_required",message:"auth.message.login_to_continue"};var Ge=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Ye=p.makeStyles((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.grey[300]},text:{maxWidth:300,textAlign:"center",padding:"4px 8px 8px"},card:{minWidth:300,marginTop:"6em"},lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]}}})),$e=function(r){var n=r.theme,o=r.history,i=r.location,s=r.buttons,c=r.userResource,u=r.propertiesExist,l=r.text,d=Ye(),m=t.useNotify(),h=t.useLogin(),v=t.useDataProvider(),g=t.useAuthProvider();return e.useEffect((function(){F(q().mark((function e(){var t;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=new URLSearchParams(i.search)).has("login")){e.next=8;break}if(!t.has("error")){e.next=6;break}"registration.not-allowed"===t.get("error")?m("auth.message.user_email_not_found","error"):m("auth.message.bad_request","error",{error:t.get("error")}),e.next=8;break;case 6:if(!t.has("token")){e.next=8;break}return e.delegateYield(q().mark((function e(){var r,n,a,i,s,l,d;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.get("token"),n=ee(r),a=n.webId,e.next=4,v.getOne(c,{id:a});case 4:if(s=e.sent,i=s.data,!(u.length>0)){e.next=19;break}l=u.every((function(e){return i[e]}));case 8:if(l){e.next=19;break}return console.log("Waiting for all properties to have been created",u),e.next=12,Ge(500);case 12:return e.next=14,v.getOne(c,{id:a});case 14:d=e.sent,i=d.data,l=u.every((function(e){return i[e]})),e.next=8;break;case 19:g.checkUser(i)?(localStorage.setItem("token",r),t.has("redirect")?(m("auth.message.user_connected","info"),o.push(t.get("redirect"))):t.has("new")&&"true"===t.get("new")?(m("auth.message.new_user_created","info"),o.push("/"+c+"/"+encodeURIComponent(a)+"/edit")):(m("auth.message.user_connected","info"),o.push("/"))):(m("auth.message.user_not_allowed_to_login","error"),o.replace("/login"));case 20:case"end":return e.stop()}}),e)}))(),"t0",8);case 8:t.has("logout")&&(localStorage.clear(),m("auth.message.user_disconnected","info"),o.push("/"));case 9:case"end":return e.stop()}}),e)})))()}),[i.search]),x.default.createElement(f.ThemeProvider,{theme:p.createTheme(n)},x.default.createElement("div",{className:d.main},x.default.createElement(a.Card,{className:d.card},x.default.createElement("div",{className:d.lockIconAvatar},x.default.createElement(a.Avatar,{className:d.lockIcon},x.default.createElement(L.default,null))),l&&x.default.createElement(a.Typography,{variant:"body2",className:d.text},l),s&&s.map((function(e,t){return x.default.createElement(a.CardActions,{key:t},x.default.cloneElement(e,{fullWidth:!0,variant:"outlined",type:"submit",onClick:function(){return h({},"/login")}}))})))),x.default.createElement(t.Notification,null))};$e.defaultProps={propertiesExist:[],buttons:[x.default.createElement(a.Button,{startIcon:x.default.createElement(a.Avatar,{src:"/lescommuns.jpg"})},"Les Communs")],userResource:"Person"};var He=a.makeStyles((function(e){return{"@global":{body:{backgroundColor:e.palette.primary.main}},text:{textAlign:"center",padding:"4px 8px 8px"},card:M({minWidth:300,maxWidth:350,marginTop:"6em"},e.breakpoints.down("sm"),{margin:"1em"}),lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]},list:{paddingTop:0,paddingBottom:0},listItem:{paddingTop:5,paddingBottom:5}}})),Je=function(r){var n=r.history,o=r.location,i=r.text,s=r.customPodProviders,c=He(),u=t.useNotify(),l=t.useLocale(),d=t.useTranslate(),f=t.useAuthProvider(),p=t.useDataProvider(),m=Y(e.useState(s||[]),2),h=m[0],v=m[1],g=new URLSearchParams(o.search);return e.useEffect((function(){F(q().mark((function e(){var t,r,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==h.length){e.next=13;break}return e.next=3,fetch("https://data.activitypods.org/pod-providers",{headers:{Accept:"application/ld+json"}});case 3:if(!(t=e.sent).ok){e.next=12;break}return e.next=7,t.json();case 7:r=e.sent,n=r["ldp:contains"].filter((function(e){return Array.isArray(e["apods:locales"])?e["apods:locales"].includes(l):e["apods:locales"]===l})),v(n),e.next=13;break;case 12:u("auth.message.pod_providers_not_loaded","error");case 13:case"end":return e.stop()}}),e)})))()}),[h,v,u,l]),e.useEffect((function(){F(q().mark((function e(){var t,r,a,o,i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!g.has("token")){e.next=16;break}return t=g.get("token"),r=ee(t),a=r.webId,e.next=5,fetch(a,{headers:{Accept:"application/json"}});case 5:if((o=e.sent).ok){e.next=10;break}u("auth.message.unable_to_fetch_user_data","error"),e.next=14;break;case 10:return e.next=12,o.json();case 12:i=e.sent,f.checkUser(i)?(localStorage.setItem("token",t),u("auth.message.user_connected","info"),window.location.reload(),window.location.href="/?addUser=true"):(u("auth.message.user_not_allowed_to_login","error"),n.replace("/login"));case 14:e.next=17;break;case 16:g.has("logout")&&(localStorage.clear(),u("auth.message.user_disconnected","info"),n.push("/"));case 17:case"end":return e.stop()}}),e)})))()}),[g,p]),g.has("token")||g.has("addUser")||g.has("logout")?null:x.default.createElement(a.Box,{display:"flex",flexDirection:"column",alignItems:"center"},x.default.createElement(a.Card,{className:c.card},x.default.createElement("div",{className:c.lockIconAvatar},x.default.createElement(a.Avatar,{className:c.lockIcon},x.default.createElement(L.default,null))),x.default.createElement(a.Box,{pl:2,pr:2},x.default.createElement(a.Typography,{variant:"body2",className:c.text},i||d("auth.message.choose_pod_provider"))),x.default.createElement(a.Box,{m:2},x.default.createElement(a.List,{className:c.list},h.map((function(e,t){var r=new URL("/auth",(e["apods:domainName"].includes(":")?"http://":"https://")+e["apods:domainName"]);return g.has("signup")&&r.searchParams.set("signup","true"),r.searchParams.set("redirect",window.location.href),x.default.createElement(x.default.Fragment,{key:t},x.default.createElement(a.Divider,null),x.default.createElement(a.ListItem,{key:t,button:!0,onClick:function(){return window.location.href=r.toString()},className:c.listItem},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,null,x.default.createElement(N.default,null))),x.default.createElement(a.ListItemText,{primary:e["apods:domainName"],secondary:e["apods:area"]})))}))))))};function Qe(){}function Ke(){}Ke.resetWarningCache=Qe;var Xe=function(){function e(e,t,r,n,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ke,resetWarningCache:Qe};return r.PropTypes=r,r},Ze=re((function(e){e.exports=Xe()})),et=function(){var r=t.useAuthProvider();return e.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.signup(e)}),[r])},tt=["meta","input"],rt=a.makeStyles((function(e){return{form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},button:{width:"100%"},icon:{marginRight:e.spacing(1)}}})),nt=function(e){var t=e.meta,r=t.touched,n=t.error,o=e.input,i=G(e,tt);return k.createElement(a.TextField,V({error:!(!r||!n),helperText:r&&n},o,i,{fullWidth:!0}))},at=function(e){var r=e.redirectTo,n=e.delayBeforeRedirect,o=Y(t.useSafeSetState(!1),2),i=o[0],s=o[1],c=et(),u=t.useTranslate(),l=t.useNotify(),d=rt(),f=g.useLocation(),p=new URLSearchParams(f.search);return k.createElement(y.Form,{onSubmit:function(e){s(!0),c(e).then((function(e){n?setTimeout((function(){window.location.reload(),window.location.href=r||"/",s(!1)}),n):(window.location.reload(),window.location.href=r||"/",s(!1)),l("auth.message.new_user_created","info")})).catch((function(e){s(!1),l("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning",{_:"string"==typeof e?e:e&&e.message?e.message:void 0})}))},validate:function(e){var t={email:void 0,password:void 0};return e.email||(t.email=u("ra.validation.required")),e.password||(t.password=u("ra.validation.required")),t},initialValues:{email:p.get("email")},render:function(e){var t=e.handleSubmit;return k.createElement("form",{onSubmit:t,noValidate:!0},k.createElement("div",{className:d.form},k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"username",name:"username",component:nt,label:u("auth.input.username"),disabled:i})),k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"email",name:"email",component:nt,label:u("auth.input.email"),disabled:i||p.has("email")&&p.has("force-email")})),k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"password",name:"password",component:nt,label:u("ra.auth.password"),type:"password",disabled:i}))),k.createElement(a.CardActions,null,k.createElement(a.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,className:d.button},i&&k.createElement(a.CircularProgress,{className:d.icon,size:18,thickness:2}),u("auth.action.signup"))))}})};at.propTypes={redirectTo:Ze.string};var ot=["theme","title","classes","className"],it=a.makeStyles((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",height:"1px",alignItems:"center",justifyContent:"flex-start",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundImage:"radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary[500]},switch:{margin:"1em",display:"flex",justifyContent:"center"}}})),st=function(r){var n=r.theme;r.title,r.classes;var o=r.className,i=G(r,ot),s=it(r),c=g.useLocation(),u=t.useTranslate(),l=e.useMemo((function(){return a.createTheme(n)}),[n]),d=new URLSearchParams(c.search),f=d.has("signup"),p=d.get("redirect"),m=t.useGetIdentity(),h=m.identity;return m.loading?null:null!=h&&h.id?x.default.createElement(g.Redirect,{to:p||"/"}):x.default.createElement(a.ThemeProvider,{theme:l},x.default.createElement("div",V({className:R.default(s.main,o)},i),x.default.createElement(a.Card,{className:s.card},x.default.createElement("div",{className:s.avatar},x.default.createElement(a.Avatar,{className:s.icon},x.default.createElement(L.default,null))),f?x.default.createElement(at,{redirectTo:p,delayBeforeRedirect:3e3}):x.default.createElement(t.LoginForm,{redirectTo:p}),x.default.createElement("div",{className:s.switch},f?x.default.createElement(g.Link,{to:"/login"},x.default.createElement(a.Typography,{variant:"body2"},u("auth.action.login"))):x.default.createElement(g.Link,{to:"/login?signup=true"},x.default.createElement(a.Typography,{variant:"body2"},u("auth.action.signup"))))),x.default.createElement(t.Notification,null)))};st.propTypes={children:Ze.node,classes:Ze.object,className:Ze.string,theme:Ze.object};var ct=a.makeStyles((function(e){return{root:{color:e.palette.text.secondary},active:{color:e.palette.text.primary},icon:{minWidth:e.spacing(5)}}})),ut=e.forwardRef((function(e,r){var n=ct(),o=t.useLogout(),i=t.useTranslate();return x.default.createElement(a.MenuItem,{onClick:function(){return o()},ref:r,className:n.root,activeClassName:n.active},x.default.createElement(a.ListItemIcon,{className:n.icon},x.default.createElement(U.default,null)),i("auth.action.logout"))})),lt=["name","create"],dt=["logout","profileResource"],ft=e.forwardRef((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i),"/show"),primaryText:o,leftIcon:x.default.createElement(D.default,null),onClick:n})})),pt=e.forwardRef((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i)),primaryText:o,leftIcon:x.default.createElement(S.default,null),onClick:n})})),mt=e.forwardRef((function(e,r){var n=e.onClick,a=e.label;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/login",primaryText:a,onClick:n})})),ht=e.forwardRef((function(e,r){var n=e.onClick,a=e.label;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/login?signup=true",primaryText:a,onClick:n})})),vt=function(e){var r,n,a=e.logout,o=e.profileResource,i=G(e,dt),s=t.useGetIdentity().identity,c=t.useTranslate();return x.default.createElement(t.UserMenu,i,s&&""!==s.id?[x.default.createElement(ft,{webId:(null==s||null===(r=s.profileData)||void 0===r?void 0:r.id)||s.id,label:c("auth.action.view_my_profile"),profileResource:o,key:"view"}),x.default.createElement(pt,{webId:(null==s||null===(n=s.profileData)||void 0===n?void 0:n.id)||s.id,label:c("auth.action.edit_my_profile"),profileResource:o,key:"edit"}),x.default.cloneElement(a,{key:"logout"})]:[x.default.createElement(ht,{label:c("auth.action.signup"),key:"signup"}),x.default.createElement(mt,{label:c("auth.action.login"),key:"login"})])};vt.defaultProps={profileResource:"Person"};var gt=function(){this.__data__=[],this.size=0};var yt=function(e,t){return e===t||e!=e&&t!=t};var bt=function(e,t){for(var r=e.length;r--;)if(yt(e[r][0],t))return r;return-1},wt=Array.prototype.splice;var _t=function(e){var t=this.__data__,r=bt(t,e);return!(r<0)&&(r==t.length-1?t.pop():wt.call(t,r,1),--this.size,!0)};var Et=function(e){var t=this.__data__,r=bt(t,e);return r<0?void 0:t[r][1]};var xt=function(e){return bt(this.__data__,e)>-1};var kt=function(e,t){var r=this.__data__,n=bt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function jt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ts))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,p=2&r?new Lr:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},ln={};ln["[object Float32Array]"]=ln["[object Float64Array]"]=ln["[object Int8Array]"]=ln["[object Int16Array]"]=ln["[object Int32Array]"]=ln["[object Uint8Array]"]=ln["[object Uint8ClampedArray]"]=ln["[object Uint16Array]"]=ln["[object Uint32Array]"]=!0,ln["[object Arguments]"]=ln["[object Array]"]=ln["[object ArrayBuffer]"]=ln["[object Boolean]"]=ln["[object DataView]"]=ln["[object Date]"]=ln["[object Error]"]=ln["[object Function]"]=ln["[object Map]"]=ln["[object Number]"]=ln["[object Object]"]=ln["[object RegExp]"]=ln["[object Set]"]=ln["[object String]"]=ln["[object WeakMap]"]=!1;var dn=function(e){return Xr(e)&&un(e.length)&&!!ln[Mt(e)]};var fn=function(e){return function(t){return e(t)}},pn=re((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,a=n&&n.exports===r&&Tt.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o})),mn=pn&&pn.isTypedArray,hn=mn?fn(mn):dn,vn=Object.prototype.hasOwnProperty;var gn=function(e,t){var r=Vr(e),n=!r&&nn(e),a=!r&&!n&&on(e),o=!r&&!n&&!a&&hn(e),i=r||n||a||o,s=i?Kr(e.length,String):[],c=s.length;for(var u in e)!t&&!vn.call(e,u)||i&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||cn(u,c))||s.push(u);return s},yn=Object.prototype;var bn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yn)};var wn=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),_n=Object.prototype.hasOwnProperty;var En=function(e){if(!bn(e))return wn(e);var t=[];for(var r in Object(e))_n.call(e,r)&&"constructor"!=r&&t.push(r);return t};var xn=function(e){return null!=e&&un(e.length)&&!Yt(e)};var kn=function(e){return xn(e)?gn(e):En(e)};var jn=function(e){return Gr(e,kn,Qr)},Pn=Object.prototype.hasOwnProperty;var On=function(e,t,r,n,a,o){var i=1&r,s=jn(e),c=s.length;if(c!=jn(t).length&&!i)return!1;for(var u=c;u--;){var l=s[u];if(!(i?l in t:Pn.call(t,l)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++u0&&void 0!==arguments[0]?arguments[0]:Vn,n=JSON.stringify(r),a=t.useSafeSetState({permissions:Gn[n]}),o=Y(a,2),i=o[0],s=o[1],c=t.useGetPermissions(),u=e.useCallback((function(){return c(r).then((function(e){Mn(e,i.permissions)||(Gn[n]=e,s({permissions:e}))})).catch((function(e){s({error:e})}))}),[n,r,c]);return e.useEffect((function(){u()}),[n]),W(W({},i),{},{refetch:u})},exports.useSignup=et; +q=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function c(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return j()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var s=w(i,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=u(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,i),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var l={};function d(){}function f(){}function p(){}var m={};s(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(k([])));v&&v!==t&&r.call(v,a)&&(m=v);var g=p.prototype=d.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,s){var c=u(e[a],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,l;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function k(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function B(e,t,r,n,a,o,i){try{var s=e[o](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function F(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){B(o,n,a,i,s,"next",e)}function s(e){B(o,n,a,i,s,"throw",e)}i(void 0)}))}}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V(){return(V=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw a}}return o}(e,t)||H(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||H(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(e,t){if(e){if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i};function X(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(K(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return K(t)}}function Z(e){this.message=e}function ee(e,t){if("string"!=typeof e)throw new Z("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(X(e.split(".")[r]))}catch(e){throw new Z("Invalid token specified: "+e.message)}}Z.prototype=new Error,Z.prototype.name="InvalidTokenError";var te="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function re(e,t){return e(t={exports:{}},t.exports),t.exports}var ne,ae,oe=re((function(e){var t,r;t=te,r=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n0&&(a=a.replace(/^[\/]+/,"")),a=n0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=r():t.urljoin=r()})),ie=function(e){return e?Array.isArray(e)?e:[e]:void 0},se=function(e){var t=new URL(e);return oe(t.origin,"_acl",t.pathname)},ce=function(e){return{"@base":e,acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/","acl:agent":{"@type":"@id"},"acl:agentGroup":{"@type":"@id"},"acl:agentClass":{"@type":"@id"},"acl:mode":{"@type":"@id"},"acl:accessTo":{"@type":"@id"}}},ue=function(){var e=F(q().mark((function e(t){var r,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getDataServers();case 2:if(r=e.sent,n=Object.values(r).find((function(e){return!0===e.authServer}))){e.next=6;break}throw new Error("Could not find a server with authServer: true. Check your dataServers config.");case 6:return e.abrupt("return",n.pod?new URL(n.baseUrl).origin:n.baseUrl);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=["username","email","password","domain"],de="acl:agentClass",fe=["acl:Append","acl:Write","acl:Control"],pe=["acl:Append","acl:Write","acl:Control"],me=["acl:Write","acl:Control"],he=["acl:Control"],ve={show:["acl:Read","acl:Append","acl:Write","acl:Control"],list:["acl:Read","acl:Append","acl:Write","acl:Control"],create:fe,edit:pe,delete:me,control:he},ge={show:"auth.message.resource_show_forbidden",edit:"auth.message.resource_edit_forbidden",delete:"auth.message.resource_delete_forbidden",control:"auth.message.resource_control_forbidden",list:"auth.message.container_list_forbidden",create:"auth.message.container_create_forbidden"},ye=(M(ne={},"acl:Read","auth.right.resource.read"),M(ne,"acl:Append","auth.right.resource.append"),M(ne,"acl:Write","auth.right.resource.write"),M(ne,"acl:Control","auth.right.resource.control"),ne),be=(M(ae={},"acl:Read","auth.right.container.read"),M(ae,"acl:Write","auth.right.container.write"),M(ae,"acl:Control","auth.right.container.control"),ae),we=function(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",o=t.useGetIdentity(),i=o.identity,s=o.loading,c=t.usePermissionsOptimized(r),u=c.permissions,l=t.useNotify(),d=t.useRedirect();return e.useEffect((function(){!s&&i&&u&&!u.some((function(e){return ve[n].includes(e["acl:mode"])}))&&(l(ge[n],"error"),d(a))}),[u,i,d,l,s]),u},_e=function(e){var n=r.useCreateContainer(e.resource);return we(n,"create"),x.default.createElement(t.Create,e)};_e.defaultProps={actions:x.default.createElement(t.CreateActions,null)};var Ee=a.makeStyles((function(){return{list:{padding:0,width:"100%"},option:{padding:0}}})),xe=function(r){var n=r.agents,o=r.addPermission,i=Ee(),s=t.useTranslate(),c=Y(e.useState(null),2),u=c[0],l=c[1],d=Y(e.useState(""),2),f=d[0],p=d[1],m=Y(e.useState([]),2),h=m[0],v=m[1],g=t.useGetList("Person",{page:1,perPage:100},{field:"pair:label",order:"ASC"},{q:f},{enabled:f.length>0}),y=g.ids,b=g.data;return e.useEffect((function(){v(y.length>0?Object.values(b):[])}),[y,b]),x.default.createElement(P.default,{classes:{option:i.option},getOptionLabel:function(e){return e["pair:label"]},filterOptions:function(e){return e.filter((function(e){return!Object.keys(n).includes(e.id)}))},options:h,noOptionsText:s("ra.navigation.no_results"),autoComplete:!0,blurOnSelect:!0,clearOnBlur:!0,disableClearable:!0,value:u,onChange:function(e,t){o(t.id||t["@id"],"acl:agent","acl:Read"),l(null),p(""),v([])},onInputChange:function(e,t){p(t)},renderInput:function(e){return x.default.createElement(a.TextField,V({},e,{label:s("auth.input.agent_select"),variant:"filled",margin:"dense",fullWidth:!0}))},renderOption:function(e){return x.default.createElement(a.List,{dense:!0,className:i.list},x.default.createElement(a.ListItem,{button:!0},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,{src:e.image},x.default.createElement(O.default,null))),x.default.createElement(a.ListItemText,{primary:e["pair:label"]})))}})},ke=function(e){var t=e.agent;switch(t.predicate){case de:return"foaf:Agent"===t.id?x.default.createElement(A.default,null):x.default.createElement(T.default,null);case"acl:agent":return x.default.createElement(O.default,null);case"acl:agentGroup":return x.default.createElement(I.default,null);default:throw new Error("Unknown agent predicate: "+t.predicate)}},je=a.makeStyles((function(){return{listItem:{paddingLeft:4,paddingRight:36},primaryText:{width:"30%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},secondaryText:{textAlign:"center",width:"60%",fontStyle:"italic",color:"grey"}}})),Pe=function(r){var n=r.isContainer,o=r.agent,i=r.addPermission,s=r.removePermission,c=je(),u=t.useTranslate(),l=t.useDataProvider(),d=Y(x.default.useState(null),2),f=d[0],p=d[1],m=Y(e.useState(),2),h=m[0],v=m[1],g=Y(e.useState(!0),2),y=g[0],b=g[1],w=Y(e.useState(),2),_=w[0],E=w[1];if(e.useEffect((function(){"acl:agent"===o.predicate?l.getOne("Person",{id:o.id}).then((function(e){var t=e.data;v(t),b(!1)})).catch((function(e){E(e),b(!1)})):b(!1)}),[o.id,o.predicate]),"acl:agentGroup"===o.predicate)return null;var k=function(){return p(null)},j=n?be:ye;return y?x.default.createElement(t.Loading,null):_?x.default.createElement(t.Error,null):x.default.createElement(a.ListItem,{className:c.listItem},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,{src:null==h?void 0:h.image},x.default.createElement(ke,{agent:o}))),x.default.createElement(a.ListItemText,{className:c.primaryText,primary:h?h["pair:label"]:u("foaf:Agent"===o.id?"auth.agent.anonymous":"auth.agent.authenticated")}),x.default.createElement(a.ListItemText,{className:c.secondaryText,primary:o.permissions&&o.permissions.map((function(e){return u(j[e])})).join(", ")}),x.default.createElement(a.ListItemSecondaryAction,null,x.default.createElement(a.IconButton,{onClick:function(e){return p(e.currentTarget)}},x.default.createElement(S.default,null)),x.default.createElement(a.Menu,{anchorEl:f,keepMounted:!0,open:Boolean(f),onClose:k},Object.entries(j).map((function(e){var t=Y(e,2),r=t[0],n=t[1],c=o.permissions&&o.permissions.includes(r);return x.default.createElement(a.MenuItem,{key:r,onClick:function(){c?s(o.id,o.predicate,r):i(o.id,o.predicate,r),k()}},x.default.createElement(a.ListItemIcon,null,c?x.default.createElement(C.default,null):null),x.default.createElement(a.ListItemText,{primary:u(n)}))})))))},Oe=a.makeStyles((function(e){return{list:{width:"100%",maxWidth:"100%",backgroundColor:e.palette.background.paper}}})),Se=function(e){var t=e.isContainer,r=e.agents,n=e.addPermission,o=e.removePermission,i=Oe();return x.default.createElement(a.List,{dense:!0,className:i.list},Object.entries(r).map((function(e){var r=Y(e,2),a=r[0],i=r[1];return x.default.createElement(Pe,{key:a,isContainer:t,agent:i,addPermission:n,removePermission:o})})))},Ce=function(r){var n=t.usePermissionsOptimized(r).permissions,a=t.useAuthProvider(),o=Y(e.useState({}),2),i=o[0],s=o[1];e.useEffect((function(){var e,t=(M(e={},"foaf:Agent",{id:"foaf:Agent",predicate:de,permissions:[]}),M(e,"acl:AuthenticatedAgent",{id:"acl:AuthenticatedAgent",predicate:de,permissions:[]}),e),r=function(e,r,n){t[e]?t[e].permissions.push(n):t[e]={id:e,predicate:r,permissions:[n]}};if(n){var a,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=H(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}(n);try{var i=function(){var e=a.value;e[de]&&ie(e[de]).forEach((function(t){return r(t,de,e["acl:mode"])})),e["acl:agent"]&&ie(e["acl:agent"]).forEach((function(t){return r(t,"acl:agent",e["acl:mode"])})),e["acl:agentGroup"]&&ie(e["acl:agentGroup"]).forEach((function(t){return r(t,"acl:agentGroup",e["acl:mode"])}))};for(o.s();!(a=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}s(t)}}),[n]);var c=e.useCallback((function(e,t,n){var o,c=W({},i);s(W(W({},i),{},M({},e,{id:e,predicate:t,permissions:i[e]?[].concat($(null===(o=i[e])||void 0===o?void 0:o.permissions),[n]):[n]}))),a.addPermission(r,e,t,n).catch((function(e){s(c)}))}),[i,s,r,a]),u=e.useCallback((function(e,t,n){var o=W({},i);s(Object.fromEntries(Object.entries(i).map((function(t){var r=Y(t,2),a=r[0],o=r[1];return o.id===e&&(o.permissions=o.permissions.filter((function(e){return e!==n}))),[a,o]})).filter((function(e){var t=Y(e,2);t[0];var r=t[1];return r.predicate===de||r.permissions.length>0})))),a.removePermission(r,e,t,n).catch((function(e){s(o)}))}),[i,s,r,a]);return{agents:i,addPermission:c,removePermission:u}},Ae=a.makeStyles((function(){return{title:{paddingBottom:8},actions:{padding:15},addForm:{paddingTop:0},listForm:{paddingTop:0,paddingBottom:0,paddingRight:0,maxHeight:210}}})),Te=function(e){var r=e.open,n=e.onClose,o=e.uri,i=e.isContainer,s=Ae(),c=t.useTranslate(),u=Ce(o),l=u.agents,d=u.addPermission,f=u.removePermission;return x.default.createElement(a.Dialog,{fullWidth:!0,open:r,onClose:n},x.default.createElement(a.DialogTitle,{className:s.title},c(i?"auth.dialog.container_permissions":"auth.dialog.resource_permissions")),x.default.createElement(a.DialogContent,{className:s.addForm},x.default.createElement(xe,{agents:l,addPermission:d})),x.default.createElement(a.DialogContent,{className:s.listForm},x.default.createElement(Se,{isContainer:i,agents:l,addPermission:d,removePermission:f})),x.default.createElement(a.DialogActions,{className:s.actions},x.default.createElement(t.Button,{label:"ra.action.close",variant:"text",onClick:n})))},Ie=function(n){var a=n.record,o=n.resource,i=Y(e.useState(!1),2),s=i[0],c=i[1],u=r.useCreateContainer(o),l=!!o,d=l?u:a.id||a["@id"];return x.default.createElement(x.default.Fragment,null,x.default.createElement(t.Button,{label:"auth.action.permissions",onClick:function(){return c(!0)}},x.default.createElement(j.default,null)),x.default.createElement(Te,{uri:d,isContainer:!!l,open:s,onClose:function(){return c(!1)}}))},Le=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasShow,i=t.usePermissionsOptimized(null==n?void 0:n.id).permissions;return x.default.createElement(t.TopToolbar,null,a&&x.default.createElement(t.ListButton,{basePath:r,record:n}),o&&x.default.createElement(t.ShowButton,{basePath:r,record:n}),!!i&&i.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:r,record:n}))},Ne=function(e){var r=t.useRecordContext(),n=t.usePermissionsOptimized(null==r?void 0:r.id).permissions;return n&&n.some((function(e){return me.includes(e["acl:mode"])}))?x.default.createElement(t.DeleteButton,e):null},Re=a.makeStyles((function(){return{toolbar:{flex:1,display:"flex",justifyContent:"space-between"}}})),Ue=function(e){var r=Re();return x.default.createElement(t.Toolbar,V({},e,{className:r.toolbar}),x.default.createElement(t.SaveButton,null),x.default.createElement(Ne,{undoable:!1}),"}")},De=function(e){return we(e.id,"edit"),x.default.createElement(t.Edit,e,x.default.cloneElement(e.children,W({toolbar:x.default.createElement(Ue,null)},e.children.props)))};De.defaultProps={actions:x.default.createElement(Le,null)};var ze=["bulkActions","basePath","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","resource","selectedIds","showFilter","total"],We=function(e){var n=e.bulkActions,o=e.basePath,i=e.currentSort,s=e.displayedFilters,c=e.exporter,u=e.filters,l=e.filterValues,d=e.onUnselectItems,f=e.resource,p=e.selectedIds,m=e.showFilter,h=e.total,v=G(e,ze),g=a.useMediaQuery((function(e){return e.breakpoints.down("xs")})),y=t.useResourceDefinition(v),b=r.useCreateContainer(f),w=t.usePermissionsOptimized(b).permissions;return x.default.createElement(t.TopToolbar,null,u&&x.default.cloneElement(u,{resource:f,showFilter:m,displayedFilters:s,filterValues:l,context:"button"}),y.hasCreate&&w&&w.some((function(e){return fe.includes(e["acl:mode"])}))&&x.default.createElement(t.CreateButton,{basePath:o}),w&&w.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:o,record:b}),!g&&!1!==c&&x.default.createElement(t.ExportButton,{disabled:0===h,resource:f,sort:i,filter:l,exporter:c}),n&&x.default.cloneElement(n,{basePath:o,filterValues:l,resource:f,selectedIds:p,onUnselectItems:d}))},qe=function(e){return x.default.createElement(t.List,e)};qe.defaultProps={actions:x.default.createElement(We,null)};var Be=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasEdit,i=t.usePermissionsOptimized(null==n?void 0:n.id).permissions;return x.default.createElement(t.TopToolbar,null,a&&x.default.createElement(t.ListButton,{basePath:r,record:n}),o&&i&&i.some((function(e){return pe.includes(e["acl:mode"])}))&&x.default.createElement(t.EditButton,{basePath:r,record:n}),i&&i.some((function(e){return he.includes(e["acl:mode"])}))&&x.default.createElement(Ie,{basePath:r,record:n}))},Fe=function(e){return we(e.id,"edit"),x.default.createElement(t.Show,e)};Fe.defaultProps={actions:x.default.createElement(Be,null)};var Me=["open","onClose","title","message","redirect"],Ve=function(e){var r=e.open,n=e.onClose,o=e.title,i=e.message,s=e.redirect,c=G(e,Me),u=t.useLogin(),l=t.useTranslate();return x.default.createElement(a.Dialog,V({open:r,onClose:n},c),x.default.createElement(a.DialogTitle,null,l(o)),x.default.createElement(a.DialogContent,null,x.default.createElement(a.DialogContentText,null,l(i))),x.default.createElement(a.DialogActions,null,x.default.createElement(a.Button,{onClick:n},l("ra.action.cancel")),x.default.createElement(a.Button,{onClick:function(){return u({redirect:s||window.location.pathname+window.location.search})},color:"primary",variant:"contained"},l("auth.action.login"))))};Ve.defaultProps={title:"auth.dialog.login_required",message:"auth.message.login_to_continue"};var Ge=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Ye=p.makeStyles((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.grey[300]},text:{maxWidth:300,textAlign:"center",padding:"4px 8px 8px"},card:{minWidth:300,marginTop:"6em"},lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]}}})),$e=function(r){var n=r.theme,o=r.history,i=r.location,s=r.buttons,c=r.userResource,u=r.propertiesExist,l=r.text,d=Ye(),m=t.useNotify(),h=t.useLogin(),v=t.useDataProvider(),g=t.useAuthProvider();return e.useEffect((function(){F(q().mark((function e(){var t;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=new URLSearchParams(i.search)).has("login")){e.next=8;break}if(!t.has("error")){e.next=6;break}"registration.not-allowed"===t.get("error")?m("auth.message.user_email_not_found","error"):m("auth.message.bad_request","error",{error:t.get("error")}),e.next=8;break;case 6:if(!t.has("token")){e.next=8;break}return e.delegateYield(q().mark((function e(){var r,n,a,i,s,l,d;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.get("token"),n=ee(r),a=n.webId,e.next=4,v.getOne(c,{id:a});case 4:if(s=e.sent,i=s.data,!(u.length>0)){e.next=19;break}l=u.every((function(e){return i[e]}));case 8:if(l){e.next=19;break}return console.log("Waiting for all properties to have been created",u),e.next=12,Ge(500);case 12:return e.next=14,v.getOne(c,{id:a});case 14:d=e.sent,i=d.data,l=u.every((function(e){return i[e]})),e.next=8;break;case 19:g.checkUser(i)?(localStorage.setItem("token",r),t.has("redirect")?(m("auth.message.user_connected","info"),o.push(t.get("redirect"))):t.has("new")&&"true"===t.get("new")?(m("auth.message.new_user_created","info"),o.push("/"+c+"/"+encodeURIComponent(a)+"/edit")):(m("auth.message.user_connected","info"),o.push("/"))):(m("auth.message.user_not_allowed_to_login","error"),o.replace("/login"));case 20:case"end":return e.stop()}}),e)}))(),"t0",8);case 8:t.has("logout")&&(localStorage.clear(),m("auth.message.user_disconnected","info"),o.push("/"));case 9:case"end":return e.stop()}}),e)})))()}),[i.search]),x.default.createElement(f.ThemeProvider,{theme:p.createTheme(n)},x.default.createElement("div",{className:d.main},x.default.createElement(a.Card,{className:d.card},x.default.createElement("div",{className:d.lockIconAvatar},x.default.createElement(a.Avatar,{className:d.lockIcon},x.default.createElement(L.default,null))),l&&x.default.createElement(a.Typography,{variant:"body2",className:d.text},l),s&&s.map((function(e,t){return x.default.createElement(a.CardActions,{key:t},x.default.cloneElement(e,{fullWidth:!0,variant:"outlined",type:"submit",onClick:function(){return h({},"/login")}}))})))),x.default.createElement(t.Notification,null))};$e.defaultProps={propertiesExist:[],buttons:[x.default.createElement(a.Button,{startIcon:x.default.createElement(a.Avatar,{src:"/lescommuns.jpg"})},"Les Communs")],userResource:"Person"};var He=a.makeStyles((function(e){return{"@global":{body:{backgroundColor:e.palette.primary.main}},text:{textAlign:"center",padding:"4px 8px 8px"},card:M({minWidth:300,maxWidth:350,marginTop:"6em"},e.breakpoints.down("sm"),{margin:"1em"}),lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]},list:{paddingTop:0,paddingBottom:0},listItem:{paddingTop:5,paddingBottom:5}}})),Je=function(r){var n=r.history,o=r.location,i=r.text,s=r.customPodProviders,c=He(),u=t.useNotify(),l=t.useLocale(),d=t.useTranslate(),f=t.useAuthProvider(),p=t.useDataProvider(),m=Y(e.useState(s||[]),2),h=m[0],v=m[1],g=new URLSearchParams(o.search);return e.useEffect((function(){F(q().mark((function e(){var t,r,n;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==h.length){e.next=13;break}return e.next=3,fetch("https://data.activitypods.org/pod-providers",{headers:{Accept:"application/ld+json"}});case 3:if(!(t=e.sent).ok){e.next=12;break}return e.next=7,t.json();case 7:r=e.sent,n=r["ldp:contains"].filter((function(e){return Array.isArray(e["apods:locales"])?e["apods:locales"].includes(l):e["apods:locales"]===l})),v(n),e.next=13;break;case 12:u("auth.message.pod_providers_not_loaded","error");case 13:case"end":return e.stop()}}),e)})))()}),[h,v,u,l]),e.useEffect((function(){F(q().mark((function e(){var t,r,a,o,i;return q().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!g.has("token")){e.next=16;break}return t=g.get("token"),r=ee(t),a=r.webId,e.next=5,fetch(a,{headers:{Accept:"application/json"}});case 5:if((o=e.sent).ok){e.next=10;break}u("auth.message.unable_to_fetch_user_data","error"),e.next=14;break;case 10:return e.next=12,o.json();case 12:i=e.sent,f.checkUser(i)?(localStorage.setItem("token",t),u("auth.message.user_connected","info"),window.location.reload(),window.location.href="/?addUser=true"):(u("auth.message.user_not_allowed_to_login","error"),n.replace("/login"));case 14:e.next=17;break;case 16:g.has("logout")&&(localStorage.clear(),u("auth.message.user_disconnected","info"),n.push("/"));case 17:case"end":return e.stop()}}),e)})))()}),[g,p]),g.has("token")||g.has("addUser")||g.has("logout")?null:x.default.createElement(a.Box,{display:"flex",flexDirection:"column",alignItems:"center"},x.default.createElement(a.Card,{className:c.card},x.default.createElement("div",{className:c.lockIconAvatar},x.default.createElement(a.Avatar,{className:c.lockIcon},x.default.createElement(L.default,null))),x.default.createElement(a.Box,{pl:2,pr:2},x.default.createElement(a.Typography,{variant:"body2",className:c.text},i||d("auth.message.choose_pod_provider"))),x.default.createElement(a.Box,{m:2},x.default.createElement(a.List,{className:c.list},h.map((function(e,t){var r=new URL("/auth",(e["apods:domainName"].includes(":")?"http://":"https://")+e["apods:domainName"]);return g.has("signup")&&r.searchParams.set("signup","true"),r.searchParams.set("redirect",window.location.href),x.default.createElement(x.default.Fragment,{key:t},x.default.createElement(a.Divider,null),x.default.createElement(a.ListItem,{key:t,button:!0,onClick:function(){return window.location.href=r.toString()},className:c.listItem},x.default.createElement(a.ListItemAvatar,null,x.default.createElement(a.Avatar,null,x.default.createElement(N.default,null))),x.default.createElement(a.ListItemText,{primary:e["apods:domainName"],secondary:e["apods:area"]})))}))))))};function Qe(){}function Ke(){}Ke.resetWarningCache=Qe;var Xe=function(){function e(e,t,r,n,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Ke,resetWarningCache:Qe};return r.PropTypes=r,r},Ze=re((function(e){e.exports=Xe()})),et=function(){var r=t.useAuthProvider();return e.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r.signup(e)}),[r])},tt=["meta","input"],rt=a.makeStyles((function(e){return{form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},button:{width:"100%"},icon:{marginRight:e.spacing(1)}}})),nt=function(e){var t=e.meta,r=t.touched,n=t.error,o=e.input,i=G(e,tt);return k.createElement(a.TextField,V({error:!(!r||!n),helperText:r&&n},o,i,{fullWidth:!0}))},at=function(e){var r=e.redirectTo,n=e.delayBeforeRedirect,o=Y(t.useSafeSetState(!1),2),i=o[0],s=o[1],c=et(),u=t.useTranslate(),l=t.useNotify(),d=rt(),f=g.useLocation(),p=new URLSearchParams(f.search);return k.createElement(y.Form,{onSubmit:function(e){s(!0),c(e).then((function(e){n?setTimeout((function(){window.location.reload(),window.location.href=r||"/",s(!1)}),n):(window.location.reload(),window.location.href=r||"/",s(!1)),l("auth.message.new_user_created","info")})).catch((function(e){s(!1),l("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning",{_:"string"==typeof e?e:e&&e.message?e.message:void 0})}))},validate:function(e){var t={email:void 0,password:void 0};return e.email||(t.email=u("ra.validation.required")),e.password||(t.password=u("ra.validation.required")),t},initialValues:{email:p.get("email")},render:function(e){var t=e.handleSubmit;return k.createElement("form",{onSubmit:t,noValidate:!0},k.createElement("div",{className:d.form},k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"username",name:"username",component:nt,label:u("auth.input.username"),disabled:i})),k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"email",name:"email",component:nt,label:u("auth.input.email"),disabled:i||p.has("email")&&p.has("force-email")})),k.createElement("div",{className:d.input},k.createElement(y.Field,{id:"password",name:"password",component:nt,label:u("ra.auth.password"),type:"password",disabled:i}))),k.createElement(a.CardActions,null,k.createElement(a.Button,{variant:"contained",type:"submit",color:"primary",disabled:i,className:d.button},i&&k.createElement(a.CircularProgress,{className:d.icon,size:18,thickness:2}),u("auth.action.signup"))))}})};at.propTypes={redirectTo:Ze.string};var ot=["theme","title","classes","className"],it=a.makeStyles((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",height:"1px",alignItems:"center",justifyContent:"flex-start",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundImage:"radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary[500]},switch:{margin:"1em",display:"flex",justifyContent:"center"}}})),st=function(r){var n=r.theme;r.title,r.classes;var o=r.className,i=G(r,ot),s=it(r),c=g.useLocation(),u=t.useTranslate(),l=e.useMemo((function(){return a.createTheme(n)}),[n]),d=new URLSearchParams(c.search),f=d.has("signup"),p=d.get("redirect"),m=t.useGetIdentity(),h=m.identity;return m.loading?null:null!=h&&h.id?x.default.createElement(g.Redirect,{to:p||"/"}):x.default.createElement(a.ThemeProvider,{theme:l},x.default.createElement("div",V({className:R.default(s.main,o)},i),x.default.createElement(a.Card,{className:s.card},x.default.createElement("div",{className:s.avatar},x.default.createElement(a.Avatar,{className:s.icon},x.default.createElement(L.default,null))),f?x.default.createElement(at,{redirectTo:p,delayBeforeRedirect:3e3}):x.default.createElement(t.LoginForm,{redirectTo:p}),x.default.createElement("div",{className:s.switch},f?x.default.createElement(g.Link,{to:"/login"},x.default.createElement(a.Typography,{variant:"body2"},u("auth.action.login"))):x.default.createElement(g.Link,{to:"/login?signup=true"},x.default.createElement(a.Typography,{variant:"body2"},u("auth.action.signup"))))),x.default.createElement(t.Notification,null)))};st.propTypes={children:Ze.node,classes:Ze.object,className:Ze.string,theme:Ze.object};var ct=a.makeStyles((function(e){return{root:{color:e.palette.text.secondary},active:{color:e.palette.text.primary},icon:{minWidth:e.spacing(5)}}})),ut=e.forwardRef((function(e,r){var n=ct(),o=t.useLogout(),i=t.useTranslate();return x.default.createElement(a.MenuItem,{onClick:function(){return o()},ref:r,className:n.root,activeClassName:n.active},x.default.createElement(a.ListItemIcon,{className:n.icon},x.default.createElement(U.default,null)),i("auth.action.logout"))})),lt=["name","create"],dt=["logout","profileResource"],ft=e.forwardRef((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i),"/show"),primaryText:o,leftIcon:x.default.createElement(D.default,null),onClick:n})})),pt=e.forwardRef((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i)),primaryText:o,leftIcon:x.default.createElement(S.default,null),onClick:n})})),mt=e.forwardRef((function(e,r){var n=e.onClick,a=e.label;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/login",primaryText:a,onClick:n})})),ht=e.forwardRef((function(e,r){var n=e.onClick,a=e.label;return x.default.createElement(t.MenuItemLink,{ref:r,to:"/login?signup=true",primaryText:a,onClick:n})})),vt=function(e){var r,n,a=e.logout,o=e.profileResource,i=G(e,dt),s=t.useGetIdentity().identity,c=t.useTranslate();return x.default.createElement(t.UserMenu,i,s&&""!==s.id?[x.default.createElement(ft,{webId:(null==s||null===(r=s.profileData)||void 0===r?void 0:r.id)||s.id,label:c("auth.action.view_my_profile"),profileResource:o,key:"view"}),x.default.createElement(pt,{webId:(null==s||null===(n=s.profileData)||void 0===n?void 0:n.id)||s.id,label:c("auth.action.edit_my_profile"),profileResource:o,key:"edit"}),x.default.cloneElement(a,{key:"logout"})]:[x.default.createElement(ht,{label:c("auth.action.signup"),key:"signup"}),x.default.createElement(mt,{label:c("auth.action.login"),key:"login"})])};vt.defaultProps={profileResource:"Person"};var gt=function(){this.__data__=[],this.size=0};var yt=function(e,t){return e===t||e!=e&&t!=t};var bt=function(e,t){for(var r=e.length;r--;)if(yt(e[r][0],t))return r;return-1},wt=Array.prototype.splice;var _t=function(e){var t=this.__data__,r=bt(t,e);return!(r<0)&&(r==t.length-1?t.pop():wt.call(t,r,1),--this.size,!0)};var Et=function(e){var t=this.__data__,r=bt(t,e);return r<0?void 0:t[r][1]};var xt=function(e){return bt(this.__data__,e)>-1};var kt=function(e,t){var r=this.__data__,n=bt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function jt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ts))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,f=!0,p=2&r?new Lr:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},ln={};ln["[object Float32Array]"]=ln["[object Float64Array]"]=ln["[object Int8Array]"]=ln["[object Int16Array]"]=ln["[object Int32Array]"]=ln["[object Uint8Array]"]=ln["[object Uint8ClampedArray]"]=ln["[object Uint16Array]"]=ln["[object Uint32Array]"]=!0,ln["[object Arguments]"]=ln["[object Array]"]=ln["[object ArrayBuffer]"]=ln["[object Boolean]"]=ln["[object DataView]"]=ln["[object Date]"]=ln["[object Error]"]=ln["[object Function]"]=ln["[object Map]"]=ln["[object Number]"]=ln["[object Object]"]=ln["[object RegExp]"]=ln["[object Set]"]=ln["[object String]"]=ln["[object WeakMap]"]=!1;var dn=function(e){return Xr(e)&&un(e.length)&&!!ln[Mt(e)]};var fn=function(e){return function(t){return e(t)}},pn=re((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,a=n&&n.exports===r&&Tt.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o})),mn=pn&&pn.isTypedArray,hn=mn?fn(mn):dn,vn=Object.prototype.hasOwnProperty;var gn=function(e,t){var r=Vr(e),n=!r&&nn(e),a=!r&&!n&&on(e),o=!r&&!n&&!a&&hn(e),i=r||n||a||o,s=i?Kr(e.length,String):[],c=s.length;for(var u in e)!t&&!vn.call(e,u)||i&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||cn(u,c))||s.push(u);return s},yn=Object.prototype;var bn=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||yn)};var wn=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),_n=Object.prototype.hasOwnProperty;var En=function(e){if(!bn(e))return wn(e);var t=[];for(var r in Object(e))_n.call(e,r)&&"constructor"!=r&&t.push(r);return t};var xn=function(e){return null!=e&&un(e.length)&&!Yt(e)};var kn=function(e){return xn(e)?gn(e):En(e)};var jn=function(e){return Gr(e,kn,Qr)},Pn=Object.prototype.hasOwnProperty;var On=function(e,t,r,n,a,o){var i=1&r,s=jn(e),c=s.length;if(c!=jn(t).length&&!i)return!1;for(var u=c;u--;){var l=s[u];if(!(i?l in t:Pn.call(t,l)))return!1}var d=o.get(e),f=o.get(t);if(d&&f)return d==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=i;++u0&&void 0!==arguments[0]?arguments[0]:Vn,n=JSON.stringify(r),a=t.useSafeSetState({permissions:Gn[n]}),o=Y(a,2),i=o[0],s=o[1],c=t.useGetPermissions(),u=e.useCallback((function(){return c(r).then((function(e){Mn(e,i.permissions)||(Gn[n]=e,s({permissions:e}))})).catch((function(e){s({error:e})}))}),[n,r,c]);return e.useEffect((function(){u()}),[n]),W(W({},i),{},{refetch:u})},exports.useSignup=et; //# sourceMappingURL=index.cjs.js.map diff --git a/src/frontend/packages/auth-provider/dist/index.cjs.js.map b/src/frontend/packages/auth-provider/dist/index.cjs.js.map index 28851ebed..05de9199a 100644 --- a/src/frontend/packages/auth-provider/dist/index.cjs.js.map +++ b/src/frontend/packages/auth-provider/dist/index.cjs.js.map @@ -1 +1 @@ -{"version":3,"file":"index.cjs.js","sources":["../../../node_modules/jwt-decode/build/jwt-decode.esm.js","../../../node_modules/url-join/lib/url-join.js","../src/utils.js","../src/constants.js","../src/hooks/useCheckPermissions.js","../src/crud/create/CreateWithPermissions.js","../src/components/PermissionsButton/AddPermissionsForm.js","../src/components/PermissionsButton/AgentIcon.js","../src/components/PermissionsButton/AgentItem.js","../src/components/PermissionsButton/EditPermissionsForm.js","../src/hooks/useAgents.js","../src/components/PermissionsButton/PermissionsDialog.js","../src/components/PermissionsButton/PermissionsButton.js","../src/crud/edit/EditActionsWithPermissions.js","../src/crud/edit/DeleteButtonWithPermissions.js","../src/crud/edit/EditToolbarWithPermissions.js","../src/crud/edit/EditWithPermissions.js","../src/crud/list/ListActionsWithPermissions.js","../src/crud/list/ListWithPermissions.js","../src/crud/show/ShowActionsWithPermissions.js","../src/crud/show/ShowWithPermissions.js","../src/components/AuthDialog.js","../src/components/SsoLoginPage.js","../src/components/PodLoginPage/PodLoginPageView.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/index.js","../src/hooks/useSignup.js","../src/components/SignupForm.js","../src/components/LocalLoginPage.js","../src/components/LogoutButton.js","../src/components/UserMenu.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/isEqual.js","../src/hooks/usePermissionsWithRefetch.js","../src/components/PodLoginPage/PodLoginPage.js","../src/components/ResourceWithPermissions.js","../src/authProvider.js","../src/messages/english.js","../src/messages/french.js","../src/hooks/useCheckAuthenticated.js"],"sourcesContent":["function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","(function (name, context, definition) {\n if (typeof module !== 'undefined' && module.exports) module.exports = definition();\n else if (typeof define === 'function' && define.amd) define(definition);\n else context[name] = definition();\n})('urljoin', this, function () {\n\n function normalize (strArray) {\n var resultArray = [];\n if (strArray.length === 0) { return ''; }\n\n if (typeof strArray[0] !== 'string') {\n throw new TypeError('Url must be a string. Received ' + strArray[0]);\n }\n\n // If the first part is a plain protocol, we combine it with the next part.\n if (strArray[0].match(/^[^/:]+:\\/*$/) && strArray.length > 1) {\n var first = strArray.shift();\n strArray[0] = first + strArray[0];\n }\n\n // There must be two or three slashes in the file protocol, two slashes in anything else.\n if (strArray[0].match(/^file:\\/\\/\\//)) {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1:///');\n } else {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1://');\n }\n\n for (var i = 0; i < strArray.length; i++) {\n var component = strArray[i];\n\n if (typeof component !== 'string') {\n throw new TypeError('Url must be a string. Received ' + component);\n }\n\n if (component === '') { continue; }\n\n if (i > 0) {\n // Removing the starting slashes for each component but the first.\n component = component.replace(/^[\\/]+/, '');\n }\n if (i < strArray.length - 1) {\n // Removing the ending slashes for each component but the last.\n component = component.replace(/[\\/]+$/, '');\n } else {\n // For the last component we will combine multiple slashes to a single one.\n component = component.replace(/[\\/]+$/, '/');\n }\n\n resultArray.push(component);\n\n }\n\n var str = resultArray.join('/');\n // Each input component is now separated by a single slash except the possible first plain protocol part.\n\n // remove trailing slash before parameters or hash\n str = str.replace(/\\/(\\?|&|#[^!])/g, '$1');\n\n // replace ? in parameters with &\n var parts = str.split('?');\n str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');\n\n return str;\n }\n\n return function () {\n var input;\n\n if (typeof arguments[0] === 'object') {\n input = arguments[0];\n } else {\n input = [].slice.call(arguments);\n }\n\n return normalize(input);\n };\n\n});\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? (new URL(authServer.baseUrl)).origin : authServer.baseUrl;\n};\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React, { useEffect } from 'react';\nimport { usePermissionsOptimized, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, loading } = useGetIdentity();\n const { permissions } = usePermissionsOptimized(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!loading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], 'error');\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, loading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import React from 'react';\nimport { Create, CreateActions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const createContainerUri = useCreateContainer(props.resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, makeStyles, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport PersonIcon from '@material-ui/icons/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { ids, data } = useGetList(\n 'Person',\n { page: 1, perPage: 100 },\n { field: 'pair:label', order: 'ASC' },\n { q: inputValue },\n { enabled: inputValue.length > 0 }\n );\n\n useEffect(() => {\n setOptions(ids.length > 0 ? Object.values(data) : []);\n }, [ids, data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={option => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport PublicIcon from '@material-ui/icons/Public';\nimport VpnLockIcon from '@material-ui/icons/VpnLock';\nimport PersonIcon from '@material-ui/icons/Person';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error('Unknown agent predicate: ' + agent.predicate);\n }\n};\n\nexport default AgentIcon;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n makeStyles,\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@material-ui/core';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CheckIcon from '@material-ui/icons/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport { List, makeStyles } from '@material-ui/core';\nimport AgentItem from './AgentItem';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n }\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n const classes = useStyles();\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissionsOptimized, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissionsOptimized(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n let result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (let p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions, makeStyles } from '@material-ui/core';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useState } from 'react';\nimport { Button } from 'react-admin';\nimport ShareIcon from '@material-ui/icons/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ record, resource }) => {\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const isContainer = !!resource;\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { usePermissionsOptimized, ShowButton, ListButton, TopToolbar } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = ({ basePath, record, hasList, hasShow }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useRecordContext, usePermissionsOptimized } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n if (!!permissions && permissions.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n } else {\n return null;\n }\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { SaveButton, Toolbar } from 'react-admin';\nimport { makeStyles } from '@material-ui/core';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst useStyles = makeStyles(() => ({\n toolbar: {\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n }\n}));\n\nconst EditToolbarWithPermissions = props => {\n const classes = useStyles();\n return (\n \n \n }\n \n );\n};\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { Edit } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport { CreateButton, ExportButton, useResourceDefinition, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport { useMediaQuery } from '@material-ui/core';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n basePath,\n currentSort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n resource,\n selectedIds,\n showFilter,\n total,\n ...rest\n}) => {\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition(rest);\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissionsOptimized(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n basePath,\n filterValues,\n resource,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport { EditButton, ListButton, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = ({ basePath, record, hasList, hasEdit }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { Show } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@material-ui/core';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useLogin, useNotify, useDataProvider, useAuthProvider, Notification } from 'react-admin';\nimport { ThemeProvider } from '@material-ui/styles';\nimport { createTheme, makeStyles } from '@material-ui/core/styles';\nimport { Avatar, Button, Card, CardActions, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\n\nconst delay = t => new Promise(resolve => setTimeout(resolve, t));\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundColor: theme.palette.grey['300']\n },\n text: {\n maxWidth: 300,\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n }\n}));\n\nconst SsoLoginPage = ({ theme, history, location, buttons, userResource, propertiesExist, text }) => {\n const classes = useStyles();\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n (async () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', 'error');\n } else {\n notify('auth.message.bad_request', 'error', { error: searchParams.get('error') });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', 'info');\n history.push(searchParams.get('redirect'));\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', 'info');\n history.push('/' + userResource + '/' + encodeURIComponent(webId) + '/edit');\n } else {\n notify('auth.message.user_connected', 'info');\n history.push('/');\n }\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [location.search]);\n\n return (\n \n
\n \n
\n \n \n \n
\n {text && (\n \n {text}\n \n )}\n {buttons &&\n buttons.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n \n
\n );\n};\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useState } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNotify, useAuthProvider, useDataProvider, useLocale, useTranslate } from 'react-admin';\nimport { Box, List, ListItem, ListItemText, ListItemAvatar, Avatar, makeStyles, Divider } from '@material-ui/core';\nimport { Card, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport StorageIcon from '@material-ui/icons/Storage';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.primary.main\n }\n },\n text: {\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n maxWidth: 350,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em',\n },\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n },\n list: {\n paddingTop: 0,\n paddingBottom: 0\n },\n listItem: {\n paddingTop: 5,\n paddingBottom: 5\n }\n}));\n\nconst PodLoginPageView = ({ history, location, text, customPodProviders }) => {\n const classes = useStyles();\n const notify = useNotify();\n const locale = useLocale();\n const translate = useTranslate();\n const authProvider = useAuthProvider();\n const dataProvider = useDataProvider();\n const [podProviders, setPodProviders] = useState(customPodProviders || []);\n const searchParams = new URLSearchParams(location.search);\n\n useEffect(() => {\n (async () => {\n if (podProviders.length === 0) {\n const results = await fetch('https://data.activitypods.org/pod-providers', {\n headers: {\n Accept: 'application/ld+json'\n }\n });\n if (results.ok) {\n const json = await results.json();\n // Filter POD providers by available locales\n const podProviders = json['ldp:contains'].filter(provider =>\n Array.isArray(provider['apods:locales'])\n ? provider['apods:locales'].includes(locale)\n : provider['apods:locales'] === locale\n );\n setPodProviders(podProviders);\n } else {\n notify('auth.message.pod_providers_not_loaded', 'error');\n }\n }\n })();\n }, [podProviders, setPodProviders, notify, locale]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n const response = await fetch(webId, {\n headers: {\n Accept: 'application/json'\n }\n });\n if (!response.ok) {\n notify('auth.message.unable_to_fetch_user_data', 'error');\n } else {\n const data = await response.json();\n if (!authProvider.checkUser(data)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n notify('auth.message.user_connected', 'info');\n // Reload to ensure the dataServers config is reset\n window.location.reload();\n window.location.href = '/?addUser=true';\n }\n }\n } else if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [searchParams, dataProvider]);\n\n if (searchParams.has('token') || searchParams.has('addUser') || searchParams.has('logout') ) {\n return null;\n }\n\n return (\n \n \n
\n \n \n \n
\n \n \n {text || translate('auth.message.choose_pod_provider')}\n \n \n \n \n {podProviders.map((podProvider, i) => {\n const url = new URL('/auth', (podProvider['apods:domainName'].includes(':') ? 'http://' : 'https://') + podProvider['apods:domainName']);\n if (searchParams.has('signup')) url.searchParams.set('signup', 'true');\n url.searchParams.set('redirect', window.location.href);\n return (\n \n \n (window.location.href = url.toString())}\n className={classes.listItem}\n >\n \n \n \n \n \n \n \n \n );\n })}\n \n \n
\n
\n );\n};\n\nexport default PodLoginPageView;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, Form } from 'react-final-form';\nimport { useTranslate, useNotify, useSafeSetState } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardActions, CircularProgress, TextField, makeStyles } from '@material-ui/core';\nimport { default as useSignup } from '../hooks/useSignup';\n\nconst useStyles = makeStyles(theme => ({\n form: {\n padding: '0 1em 1em 1em'\n },\n input: {\n marginTop: '1em'\n },\n button: {\n width: '100%'\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n}));\n\nconst Input = ({ meta: { touched, error }, input: inputProps, ...props }) => (\n \n);\n\nconst SignupForm = ({ redirectTo, delayBeforeRedirect }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n\n const validate = values => {\n const errors = { email: undefined, password: undefined };\n\n if (!values.email) {\n errors.email = translate('ra.validation.required');\n }\n if (!values.password) {\n errors.password = translate('ra.validation.required');\n }\n return errors;\n };\n\n const submit = values => {\n setLoading(true);\n signup(values)\n .then(webId => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', 'info');\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n 'warning',\n {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n (\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n )}\n />\n );\n};\n\nSignupForm.propTypes = {\n redirectTo: PropTypes.string\n};\n\nexport default SignupForm;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { LoginForm, Notification, useGetIdentity, useTranslate } from 'react-admin';\nimport { Card, Avatar, makeStyles, createTheme, ThemeProvider, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport { Link, useLocation, Redirect } from 'react-router-dom';\nimport SignupForm from './SignupForm';\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n avatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n icon: {\n backgroundColor: theme.palette.secondary[500]\n },\n switch: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nconst LocalLoginPage = props => {\n const { theme, title, classes: classesOverride, className, ...rest } = props;\n const classes = useStyles(props);\n const location = useLocation();\n const translate = useTranslate();\n const muiTheme = useMemo(() => createTheme(theme), [theme]);\n const searchParams = new URLSearchParams(location.search);\n const isSignup = searchParams.has('signup');\n const redirectTo = searchParams.get('redirect');\n const { identity, loading } = useGetIdentity();\n\n if (loading) {\n return null;\n } else if (identity?.id) {\n // Do not show login page if user is already connected\n return ;\n } else {\n return (\n \n
\n \n
\n \n \n \n
\n {isSignup ? (\n \n ) : (\n \n )}\n
\n {isSignup ? (\n \n {translate('auth.action.login')}\n \n ) : (\n \n {translate('auth.action.signup')}\n \n )}\n
\n
\n \n
\n
\n );\n }\n};\n\nLocalLoginPage.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n theme: PropTypes.object\n};\n\nexport default LocalLoginPage;\n","import React, { forwardRef } from 'react';\nimport { useLogout, useTranslate } from 'react-admin';\nimport { MenuItem, makeStyles, ListItemIcon } from '@material-ui/core';\nimport ExitIcon from '@material-ui/icons/PowerSettingsNew';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.secondary\n },\n active: {\n color: theme.palette.text.primary\n },\n icon: { minWidth: theme.spacing(5) }\n}));\n\nconst LogoutButton = forwardRef((props, ref) => {\n const classes = useStyles();\n const logout = useLogout();\n const translate = useTranslate();\n return (\n logout()} ref={ref} className={classes.root} activeClassName={classes.active}>\n \n \n \n {translate('auth.action.logout')}\n \n );\n});\n\nexport default LogoutButton;\n","import React, { forwardRef } from 'react';\nimport { UserMenu as RaUserMenu, MenuItemLink, useGetIdentity, useTranslate } from 'react-admin';\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport EditIcon from '@material-ui/icons/Edit';\n\nconst ViewProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst EditProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst LoginMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst SignupMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n const translate = useTranslate();\n return (\n \n {identity && identity.id !== ''\n ? [\n ,\n ,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","import React, { useMemo } from 'react';\nimport { Notification } from 'react-admin';\nimport { createTheme, ThemeProvider } from '@material-ui/core';\nimport PodLoginPageView from \"./PodLoginPageView\";\n\nconst PodLoginPage = (props) => {\n const muiTheme = useMemo(() => createTheme(props.theme), [props.theme]);\n return (\n \n \n \n \n );\n};\n\nexport default PodLoginPage;\n","import React from 'react';\nimport { Resource, usePermissionsOptimized } from 'react-admin';\nimport { rightsToCreate } from '../constants';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissionsOptimized(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst authProvider = ({\n dataProvider,\n allowAnonymous = true,\n localAccounts = false,\n checkUser,\n checkPermissions = false\n}) => ({\n login: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, password } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({ username: username.trim(), password: password.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else {\n let redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n if (params.redirect) redirectUrl += '&redirect=' + encodeURIComponent(params.redirect);\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, email, password, domain, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n logout: async () => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n // Delete token but also any other value in local storage\n localStorage.clear();\n if (localAccounts) {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n } else {\n const baseUrl = (new URL(window.location.href)).origin;\n if (!allowAnonymous) {\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login'));\n } else {\n // Redirect to login page after disconnecting from SSO\n // The login page will remove the token, display a notification and redirect to the homepage\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login?logout=true'));\n }\n }\n\n // Avoid displaying immediately the login page\n return '/';\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n } else {\n return true;\n }\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return true;\n\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const { json } = await dataProvider.fetch(aclUri);\n\n return json['@graph'];\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n let authorization = {\n '@id': '#' + mode.replace('acl:', ''),\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n let { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName: profileData?.['vcard:given-name'] || profileData?.['pair:label'] || webIdData['foaf:name'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('app.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({ currentPassword, email: email.trim(), newPassword }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('app.notification.invalid_password');\n }\n\n throw new Error('app.notification.update_settings_error');\n }\n }\n});\n\nexport default authProvider;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider: 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la resource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider: \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n }\n }\n};\n\nexport default frenchMessages;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = () => {\n const { identity, loading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!loading && !identity?.id) {\n notify('ra.auth.auth_check_error', 'error');\n redirect('/login?redirect=' + encodeURIComponent(location.pathname + location.search));\n }\n }, [loading, identity, redirect, notify, location]);\n\n return { identity, loading };\n};\n\nexport default useCheckAuthenticated;\n"],"names":["InvalidCharacterError","message","this","prototype","Error","name","r","window","atob","bind","input","str","String","replace","length","bs","buffer","bc","idx","output","charAt","fromCharCode","indexOf","context","definition","normalize","strArray","resultArray","TypeError","match","first","shift","i","component","push","join","parts","split","arguments","slice","call","module","exports","defaultToArray","value","Array","isArray","undefined","getAclUri","resourceUri","parsedUrl","URL","urlJoin","origin","pathname","getAclContext","baseUri","@base","acl","foaf","acl:agent","@type","acl:agentGroup","acl:agentClass","acl:mode","acl:accessTo","getAuthServerUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","dataProvider","dataServers","authServer","wrap","_context","prev","next","getDataServers","sent","Object","values","find","server","abrupt","pod","baseUrl","stop","_callee","_x","apply","CLASS_AGENT","rightsToCreate","rightsToEdit","rightsToDelete","rightsToControl","rights","show","list","create","edit","delete","control","forbiddenErrors","resourceRightsLabels","_defineProperty","_resourceRightsLabels","containerRightsLabels","ACL_READ","_containerRightsLabel","useCheckPermissions","uri","mode","redirectUrl","_useGetIdentity","useGetIdentity","identity","loading","usePermissionsOptimized","permissions","notify","useNotify","redirect","useRedirect","useEffect","some","p","includes","CreateWithPermissions","props","createContainerUri","useCreateContainer","resource","React","createElement","Create","defaultProps","actions","CreateActions","useStyles","makeStyles","padding","width","option","AddPermissionsForm","agents","addPermission","classes","translate","useTranslate","_useState2","_slicedToArray","useState","setValue","_useState4","inputValue","setInputValue","_useState6","options","setOptions","useGetList","page","perPage","field","order","q","enabled","ids","data","Autocomplete","getOptionLabel","filterOptions","x","filter","agent","keys","id","noOptionsText","autoComplete","blurOnSelect","clearOnBlur","disableClearable","onChange","event","record","onInputChange","newInputValue","renderInput","params","TextField","_extends","label","variant","margin","fullWidth","renderOption","List","dense","className","ListItem","button","ListItemAvatar","Avatar","src","image","PersonIcon","ListItemText","primary","AgentIcon","predicate","PublicIcon","VpnLockIcon","GroupIcon","listItem","paddingLeft","paddingRight","primaryText","whiteSpace","overflow","textOverflow","secondaryText","textAlign","fontStyle","color","AgentItem","isContainer","removePermission","useDataProvider","_React$useState2","anchorEl","setAnchorEl","user","setUser","setLoading","error","setError","getOne","then","_ref2","closeMenu","labels","Loading","map","ListItemSecondaryAction","IconButton","onClick","currentTarget","EditIcon","Menu","keepMounted","open","Boolean","onClose","entries","_ref3","_ref4","rightKey","rightLabel","hasPermission","MenuItem","key","ListItemIcon","CheckIcon","theme","maxWidth","backgroundColor","palette","background","paper","EditPermissionsForm","agentId","useAgents","authProvider","useAuthProvider","setAgents","_result","result","ANONYMOUS_AGENT","appendPermission","_step","_iterator","_createForOfIteratorHelper","_loop","forEach","userUri","groupUri","s","n","done","err","e","f","useCallback","_agents$agentId","prevAgents","fromEntries","m","title","paddingBottom","addForm","paddingTop","listForm","maxHeight","PermissionsDialog","Dialog","DialogTitle","DialogContent","DialogActions","Button","PermissionsButton","showDialog","setShowDialog","createContainer","Fragment","ShareIcon","EditActionsWithPermissions","basePath","hasList","hasShow","TopToolbar","ListButton","ShowButton","DeleteButtonWithPermissions","useRecordContext","DeleteButton","toolbar","flex","display","justifyContent","EditToolbarWithPermissions","Toolbar","SaveButton","undoable","EditWithPermissions","Edit","cloneElement","children","_objectSpread","ListActionsWithPermissions","bulkActions","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","selectedIds","showFilter","total","rest","_objectWithoutProperties","_excluded","xs","useMediaQuery","breakpoints","down","resourceDefinition","useResourceDefinition","hasCreate","CreateButton","ExportButton","disabled","sort","ListWithPermissions","ShowActionsWithPermissions","hasEdit","EditButton","ShowWithPermissions","Show","AuthDialog","login","useLogin","DialogContentText","location","search","delay","t","Promise","resolve","setTimeout","main","flexDirection","minHeight","alignItems","grey","text","card","minWidth","marginTop","lockIconAvatar","lockIcon","SsoLoginPage","history","buttons","userResource","propertiesExist","_callee2","searchParams","_context2","URLSearchParams","has","get","delegateYield","token","_jwtDecode","webId","userData","_yield$dataProvider$g","allPropertiesExist","_yield$dataProvider$g2","jwtDecode","every","console","log","checkUser","localStorage","setItem","encodeURIComponent","clear","ThemeProvider","createTheme","Card","LockIcon","Typography","CardActions","type","Notification","startIcon","@global","body","PodLoginPageView","customPodProviders","locale","useLocale","podProviders","setPodProviders","results","json","_podProviders","fetch","headers","Accept","ok","provider","response","reload","href","Box","pl","pr","podProvider","url","set","Divider","toString","StorageIcon","secondary","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require","useSignup","signup","form","icon","marginRight","spacing","Input","_ref$meta","meta","touched","inputProps","helperText","SignupForm","redirectTo","delayBeforeRedirect","_useSafeSetState2","useSafeSetState","useLocation","Form","onSubmit","_","validate","errors","email","password","initialValues","render","handleSubmit","noValidate","Field","CircularProgress","size","thickness","propTypes","height","backgroundRepeat","backgroundSize","backgroundImage","avatar","switch","LocalLoginPage","muiTheme","useMemo","isSignup","Redirect","to","classnames","LoginForm","Link","root","active","LogoutButton","forwardRef","ref","logout","useLogout","activeClassName","ExitIcon","ViewProfileMenu","profileResource","MenuItemLink","concat","leftIcon","AccountCircleIcon","EditProfileMenu","LoginMenu","SignupMenu","UserMenu","_ref5","_identity$profileData","_identity$profileData2","otherProps","RaUserMenu","profileData","__data__","other","eq","splice","index","assocIndexOf","pop","ListCache","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","global","freeSelf","self","freeGlobal","Function","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","toStringTag","isOwn","tag","unmasked","getRawTag","objectToString","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","IE_PROTO","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","isMasked","isFunction","test","toSource","getValue","baseIsNative","getNative","nativeCreate","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","hash","Map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","pairs","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","SetCache","add","setCacheAdd","setCacheHas","cache","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","arraySome","othIndex","cacheHas","Uint8Array","symbolProto","symbolValueOf","valueOf","byteLength","byteOffset","convert","mapToArray","setToArray","stacked","equalArrays","offset","keysFunc","symbolsFunc","arrayPush","resIndex","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","arrayFilter","stubArray","iteratee","isObjectLike","baseIsArguments","freeExports","nodeType","freeModule","Buffer","isBuffer","stubFalse","reIsUint","typedArrayTags","isLength","freeProcess","process","nodeUtil","types","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","isIndex","Ctor","constructor","transform","arg","overArg","isPrototype","nativeKeys","isArrayLike","arrayLikeKeys","baseKeys","baseGetAllKeys","getSymbols","objProps","getAllKeys","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","dataViewCtorString","DataView","mapCtorString","promiseCtorString","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","ctorString","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqual","baseIsEqualDeep","emptyParams","alreadyFetchedPermissions","{}","Resource","_updateAccountSettings","_getAccountSettings","_setNewPassword","_resetPassword","_getIdentity","_removePermission","_addPermission","_getPermissions","_checkAuth","_logout","_signup","_login","_ref$allowAnonymous","allowAnonymous","_ref$localAccounts","localAccounts","_ref$checkPermissions","checkPermissions","authServerUrl","username","_yield$dataProvider$f","method","JSON","stringify","trim","Headers","Content-Type","t0","_yield$dataProvider$f2","domain","_x2","_callee3","_context3","checkAuth","_callee4","_context4","getItem","checkError","getPermissions","aclUri","_yield$dataProvider$f3","_context5","startsWith","_callee5","_x3","_authorization","authorization","_context6","@id","@context","@graph","_callee6","_x4","_x5","_x6","_x7","_yield$dataProvider$f4","updatedPermissions","_context7","modes","_callee7","_x8","_x9","_x10","_x11","getIdentity","_callee8","_jwtDecode2","_yield$dataProvider$f5","webIdData","_context8","fullName","resetPassword","_context9","_callee9","_x12","setNewPassword","_context10","_callee10","_x13","getAccountSettings","_yield$dataProvider$f6","_context11","_callee11","_x14","updateAccountSettings","currentPassword","newPassword","_context12","_callee12","_x15","auth","dialog","container_permissions","resource_permissions","login_required","action","view_my_profile","edit_my_profile","right","read","append","write","container","anonymous","authenticated","agent_select","username_or_email","resource_show_forbidden","resource_edit_forbidden","resource_delete_forbidden","resource_control_forbidden","container_create_forbidden","container_list_forbidden","user_not_allowed_to_login","user_email_not_found","user_email_exist","username_exist","username_invalid","new_user_created","user_connected","user_disconnected","bad_request","account_settings_updated","login_to_continue","choose_pod_provider","_useSafeSetState","state","setState","useGetPermissions","fetchPermissions","isEqual","refetch"],"mappings":";;wlRAOA,SAASA,EAAsBC,GAC3BC,KAAKD,QAAUA,EAGnBD,EAAsBG,UAAY,IAAIC,MACtCJ,EAAsBG,UAAUE,KAAO,wBA6BvC,IAAAC,EAAkC,oBAAXC,QACnBA,OAAOC,MACPD,OAAOC,KAAKC,KAAKF,SA7BrB,SAAkBG,GACd,IAAIC,EAAMC,OAAOF,GAAOG,QAAQ,MAAO,IACvC,GAAIF,EAAIG,OAAS,GAAK,EAClB,MAAM,IAAId,EACN,qEAGR,IAEI,IAAYe,EAAIC,EAAZC,EAAK,EAAeC,EAAM,EAAGC,EAAS,GAEzCH,EAASL,EAAIS,OAAOF,MAEpBF,IACCD,EAAKE,EAAK,EAAS,GAALF,EAAUC,EAASA,EAG/BC,IAAO,GACVE,GAAUP,OAAOS,aAAa,IAAON,KAAS,EAAIE,EAAM,IACzD,EAGAD,EA/BI,oEA+BWM,QAAQN,GAE3B,OAAOG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B5C,EAAS/T,SAAW+T,EAASC,YAE/E,CAACjQ,EAASD,EAAUM,EAAUF,EAAQ6P,IAElC,CAAEjQ,SAAAA,EAAUC,QAAAA,qENNa,WAA0B,IAAzBuE,yDAASyjB,GACpCjf,EAAM2gB,KAAKC,UAAUplB,GAC3B2rB,EAA0B7X,EAAAA,gBAAgB,CACxCnY,YAAa+nB,GAA0Blf,KADzCqP,EAAAlW,EAAAguB,EAAA,GAAOC,EAAP/X,EAAA,GAAcgY,EAAdhY,EAAA,GAGMsS,EAAiB2F,EAAAA,oBAEjBC,EAAmBvlB,EAAAA,aACvB,WAAA,OACE2f,EAAenmB,GACZiD,MAAK,SAAAtH,GACCqwB,GAAQrwB,EAAaiwB,EAAMjwB,eAC9B+nB,GAA0Blf,GAAO7I,EACjCkwB,EAAS,CAAElwB,YAAAA,QAJjB,OAOS,SAAAmH,GACL+oB,EAAS,CACP/oB,MAAAA,SAGR,CAAC0B,EAAKxE,EAAQmmB,IAOhB,OAJAnqB,EAAAA,WAAU,WACR+vB,MACC,CAACvnB,IAEJ6E,EAAAA,EAAA,GAAYuiB,GAAZ,GAAA,CAAmBK,QAASF"} \ No newline at end of file +{"version":3,"file":"index.cjs.js","sources":["../../../node_modules/jwt-decode/build/jwt-decode.esm.js","../../../node_modules/url-join/lib/url-join.js","../src/utils.js","../src/constants.js","../src/hooks/useCheckPermissions.js","../src/crud/create/CreateWithPermissions.js","../src/components/PermissionsButton/AddPermissionsForm.js","../src/components/PermissionsButton/AgentIcon.js","../src/components/PermissionsButton/AgentItem.js","../src/components/PermissionsButton/EditPermissionsForm.js","../src/hooks/useAgents.js","../src/components/PermissionsButton/PermissionsDialog.js","../src/components/PermissionsButton/PermissionsButton.js","../src/crud/edit/EditActionsWithPermissions.js","../src/crud/edit/DeleteButtonWithPermissions.js","../src/crud/edit/EditToolbarWithPermissions.js","../src/crud/edit/EditWithPermissions.js","../src/crud/list/ListActionsWithPermissions.js","../src/crud/list/ListWithPermissions.js","../src/crud/show/ShowActionsWithPermissions.js","../src/crud/show/ShowWithPermissions.js","../src/components/AuthDialog.js","../src/components/SsoLoginPage.js","../src/components/PodLoginPage/PodLoginPageView.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/index.js","../src/hooks/useSignup.js","../src/components/SignupForm.js","../src/components/LocalLoginPage.js","../src/components/LogoutButton.js","../src/components/UserMenu.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/isEqual.js","../src/hooks/usePermissionsWithRefetch.js","../src/components/PodLoginPage/PodLoginPage.js","../src/components/ResourceWithPermissions.js","../src/authProvider.js","../src/messages/english.js","../src/messages/french.js","../src/hooks/useCheckAuthenticated.js"],"sourcesContent":["function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","(function (name, context, definition) {\n if (typeof module !== 'undefined' && module.exports) module.exports = definition();\n else if (typeof define === 'function' && define.amd) define(definition);\n else context[name] = definition();\n})('urljoin', this, function () {\n\n function normalize (strArray) {\n var resultArray = [];\n if (strArray.length === 0) { return ''; }\n\n if (typeof strArray[0] !== 'string') {\n throw new TypeError('Url must be a string. Received ' + strArray[0]);\n }\n\n // If the first part is a plain protocol, we combine it with the next part.\n if (strArray[0].match(/^[^/:]+:\\/*$/) && strArray.length > 1) {\n var first = strArray.shift();\n strArray[0] = first + strArray[0];\n }\n\n // There must be two or three slashes in the file protocol, two slashes in anything else.\n if (strArray[0].match(/^file:\\/\\/\\//)) {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1:///');\n } else {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1://');\n }\n\n for (var i = 0; i < strArray.length; i++) {\n var component = strArray[i];\n\n if (typeof component !== 'string') {\n throw new TypeError('Url must be a string. Received ' + component);\n }\n\n if (component === '') { continue; }\n\n if (i > 0) {\n // Removing the starting slashes for each component but the first.\n component = component.replace(/^[\\/]+/, '');\n }\n if (i < strArray.length - 1) {\n // Removing the ending slashes for each component but the last.\n component = component.replace(/[\\/]+$/, '');\n } else {\n // For the last component we will combine multiple slashes to a single one.\n component = component.replace(/[\\/]+$/, '/');\n }\n\n resultArray.push(component);\n\n }\n\n var str = resultArray.join('/');\n // Each input component is now separated by a single slash except the possible first plain protocol part.\n\n // remove trailing slash before parameters or hash\n str = str.replace(/\\/(\\?|&|#[^!])/g, '$1');\n\n // replace ? in parameters with &\n var parts = str.split('?');\n str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');\n\n return str;\n }\n\n return function () {\n var input;\n\n if (typeof arguments[0] === 'object') {\n input = arguments[0];\n } else {\n input = [].slice.call(arguments);\n }\n\n return normalize(input);\n };\n\n});\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? (new URL(authServer.baseUrl)).origin : authServer.baseUrl;\n};\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React, { useEffect } from 'react';\nimport { usePermissionsOptimized, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, loading } = useGetIdentity();\n const { permissions } = usePermissionsOptimized(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!loading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], 'error');\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, loading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import React from 'react';\nimport { Create, CreateActions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const createContainerUri = useCreateContainer(props.resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, makeStyles, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport PersonIcon from '@material-ui/icons/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { ids, data } = useGetList(\n 'Person',\n { page: 1, perPage: 100 },\n { field: 'pair:label', order: 'ASC' },\n { q: inputValue },\n { enabled: inputValue.length > 0 }\n );\n\n useEffect(() => {\n setOptions(ids.length > 0 ? Object.values(data) : []);\n }, [ids, data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={option => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport PublicIcon from '@material-ui/icons/Public';\nimport VpnLockIcon from '@material-ui/icons/VpnLock';\nimport PersonIcon from '@material-ui/icons/Person';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error('Unknown agent predicate: ' + agent.predicate);\n }\n};\n\nexport default AgentIcon;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n makeStyles,\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@material-ui/core';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CheckIcon from '@material-ui/icons/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport { List, makeStyles } from '@material-ui/core';\nimport AgentItem from './AgentItem';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n }\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n const classes = useStyles();\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissionsOptimized, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissionsOptimized(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n let result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (let p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions, makeStyles } from '@material-ui/core';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useState } from 'react';\nimport { Button } from 'react-admin';\nimport ShareIcon from '@material-ui/icons/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ record, resource }) => {\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const isContainer = !!resource;\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { usePermissionsOptimized, ShowButton, ListButton, TopToolbar } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = ({ basePath, record, hasList, hasShow }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useRecordContext, usePermissionsOptimized } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n if (!!permissions && permissions.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n } else {\n return null;\n }\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { SaveButton, Toolbar } from 'react-admin';\nimport { makeStyles } from '@material-ui/core';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst useStyles = makeStyles(() => ({\n toolbar: {\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n }\n}));\n\nconst EditToolbarWithPermissions = props => {\n const classes = useStyles();\n return (\n \n \n }\n \n );\n};\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { Edit } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport { CreateButton, ExportButton, useResourceDefinition, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport { useMediaQuery } from '@material-ui/core';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n basePath,\n currentSort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n resource,\n selectedIds,\n showFilter,\n total,\n ...rest\n}) => {\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition(rest);\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissionsOptimized(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n basePath,\n filterValues,\n resource,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport { EditButton, ListButton, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = ({ basePath, record, hasList, hasEdit }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { Show } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@material-ui/core';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useLogin, useNotify, useDataProvider, useAuthProvider, Notification } from 'react-admin';\nimport { ThemeProvider } from '@material-ui/styles';\nimport { createTheme, makeStyles } from '@material-ui/core/styles';\nimport { Avatar, Button, Card, CardActions, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\n\nconst delay = t => new Promise(resolve => setTimeout(resolve, t));\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundColor: theme.palette.grey['300']\n },\n text: {\n maxWidth: 300,\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n }\n}));\n\nconst SsoLoginPage = ({ theme, history, location, buttons, userResource, propertiesExist, text }) => {\n const classes = useStyles();\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n (async () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', 'error');\n } else {\n notify('auth.message.bad_request', 'error', { error: searchParams.get('error') });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', 'info');\n history.push(searchParams.get('redirect'));\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', 'info');\n history.push('/' + userResource + '/' + encodeURIComponent(webId) + '/edit');\n } else {\n notify('auth.message.user_connected', 'info');\n history.push('/');\n }\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [location.search]);\n\n return (\n \n
\n \n
\n \n \n \n
\n {text && (\n \n {text}\n \n )}\n {buttons &&\n buttons.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n \n
\n );\n};\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useState } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNotify, useAuthProvider, useDataProvider, useLocale, useTranslate } from 'react-admin';\nimport { Box, List, ListItem, ListItemText, ListItemAvatar, Avatar, makeStyles, Divider } from '@material-ui/core';\nimport { Card, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport StorageIcon from '@material-ui/icons/Storage';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.primary.main\n }\n },\n text: {\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n maxWidth: 350,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em',\n },\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n },\n list: {\n paddingTop: 0,\n paddingBottom: 0\n },\n listItem: {\n paddingTop: 5,\n paddingBottom: 5\n }\n}));\n\nconst PodLoginPageView = ({ history, location, text, customPodProviders }) => {\n const classes = useStyles();\n const notify = useNotify();\n const locale = useLocale();\n const translate = useTranslate();\n const authProvider = useAuthProvider();\n const dataProvider = useDataProvider();\n const [podProviders, setPodProviders] = useState(customPodProviders || []);\n const searchParams = new URLSearchParams(location.search);\n\n useEffect(() => {\n (async () => {\n if (podProviders.length === 0) {\n const results = await fetch('https://data.activitypods.org/pod-providers', {\n headers: {\n Accept: 'application/ld+json'\n }\n });\n if (results.ok) {\n const json = await results.json();\n // Filter POD providers by available locales\n const podProviders = json['ldp:contains'].filter(provider =>\n Array.isArray(provider['apods:locales'])\n ? provider['apods:locales'].includes(locale)\n : provider['apods:locales'] === locale\n );\n setPodProviders(podProviders);\n } else {\n notify('auth.message.pod_providers_not_loaded', 'error');\n }\n }\n })();\n }, [podProviders, setPodProviders, notify, locale]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n const response = await fetch(webId, {\n headers: {\n Accept: 'application/json'\n }\n });\n if (!response.ok) {\n notify('auth.message.unable_to_fetch_user_data', 'error');\n } else {\n const data = await response.json();\n if (!authProvider.checkUser(data)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n notify('auth.message.user_connected', 'info');\n // Reload to ensure the dataServers config is reset\n window.location.reload();\n window.location.href = '/?addUser=true';\n }\n }\n } else if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [searchParams, dataProvider]);\n\n if (searchParams.has('token') || searchParams.has('addUser') || searchParams.has('logout') ) {\n return null;\n }\n\n return (\n \n \n
\n \n \n \n
\n \n \n {text || translate('auth.message.choose_pod_provider')}\n \n \n \n \n {podProviders.map((podProvider, i) => {\n const url = new URL('/auth', (podProvider['apods:domainName'].includes(':') ? 'http://' : 'https://') + podProvider['apods:domainName']);\n if (searchParams.has('signup')) url.searchParams.set('signup', 'true');\n url.searchParams.set('redirect', window.location.href);\n return (\n \n \n (window.location.href = url.toString())}\n className={classes.listItem}\n >\n \n \n \n \n \n \n \n \n );\n })}\n \n \n
\n
\n );\n};\n\nexport default PodLoginPageView;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, Form } from 'react-final-form';\nimport { useTranslate, useNotify, useSafeSetState } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardActions, CircularProgress, TextField, makeStyles } from '@material-ui/core';\nimport { default as useSignup } from '../hooks/useSignup';\n\nconst useStyles = makeStyles(theme => ({\n form: {\n padding: '0 1em 1em 1em'\n },\n input: {\n marginTop: '1em'\n },\n button: {\n width: '100%'\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n}));\n\nconst Input = ({ meta: { touched, error }, input: inputProps, ...props }) => (\n \n);\n\nconst SignupForm = ({ redirectTo, delayBeforeRedirect }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n\n const validate = values => {\n const errors = { email: undefined, password: undefined };\n\n if (!values.email) {\n errors.email = translate('ra.validation.required');\n }\n if (!values.password) {\n errors.password = translate('ra.validation.required');\n }\n return errors;\n };\n\n const submit = values => {\n setLoading(true);\n signup(values)\n .then(webId => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', 'info');\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n 'warning',\n {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n (\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n )}\n />\n );\n};\n\nSignupForm.propTypes = {\n redirectTo: PropTypes.string\n};\n\nexport default SignupForm;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { LoginForm, Notification, useGetIdentity, useTranslate } from 'react-admin';\nimport { Card, Avatar, makeStyles, createTheme, ThemeProvider, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport { Link, useLocation, Redirect } from 'react-router-dom';\nimport SignupForm from './SignupForm';\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n avatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n icon: {\n backgroundColor: theme.palette.secondary[500]\n },\n switch: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nconst LocalLoginPage = props => {\n const { theme, title, classes: classesOverride, className, ...rest } = props;\n const classes = useStyles(props);\n const location = useLocation();\n const translate = useTranslate();\n const muiTheme = useMemo(() => createTheme(theme), [theme]);\n const searchParams = new URLSearchParams(location.search);\n const isSignup = searchParams.has('signup');\n const redirectTo = searchParams.get('redirect');\n const { identity, loading } = useGetIdentity();\n\n if (loading) {\n return null;\n } else if (identity?.id) {\n // Do not show login page if user is already connected\n return ;\n } else {\n return (\n \n
\n \n
\n \n \n \n
\n {isSignup ? (\n \n ) : (\n \n )}\n
\n {isSignup ? (\n \n {translate('auth.action.login')}\n \n ) : (\n \n {translate('auth.action.signup')}\n \n )}\n
\n
\n \n
\n
\n );\n }\n};\n\nLocalLoginPage.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n theme: PropTypes.object\n};\n\nexport default LocalLoginPage;\n","import React, { forwardRef } from 'react';\nimport { useLogout, useTranslate } from 'react-admin';\nimport { MenuItem, makeStyles, ListItemIcon } from '@material-ui/core';\nimport ExitIcon from '@material-ui/icons/PowerSettingsNew';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.secondary\n },\n active: {\n color: theme.palette.text.primary\n },\n icon: { minWidth: theme.spacing(5) }\n}));\n\nconst LogoutButton = forwardRef((props, ref) => {\n const classes = useStyles();\n const logout = useLogout();\n const translate = useTranslate();\n return (\n logout()} ref={ref} className={classes.root} activeClassName={classes.active}>\n \n \n \n {translate('auth.action.logout')}\n \n );\n});\n\nexport default LogoutButton;\n","import React, { forwardRef } from 'react';\nimport { UserMenu as RaUserMenu, MenuItemLink, useGetIdentity, useTranslate } from 'react-admin';\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport EditIcon from '@material-ui/icons/Edit';\n\nconst ViewProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst EditProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst LoginMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst SignupMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n const translate = useTranslate();\n return (\n \n {identity && identity.id !== ''\n ? [\n ,\n ,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","import React, { useMemo } from 'react';\nimport { Notification } from 'react-admin';\nimport { createTheme, ThemeProvider } from '@material-ui/core';\nimport PodLoginPageView from \"./PodLoginPageView\";\n\nconst PodLoginPage = (props) => {\n const muiTheme = useMemo(() => createTheme(props.theme), [props.theme]);\n return (\n \n \n \n \n );\n};\n\nexport default PodLoginPage;\n","import React from 'react';\nimport { Resource, usePermissionsOptimized } from 'react-admin';\nimport { rightsToCreate } from '../constants';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissionsOptimized(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst authProvider = ({\n dataProvider,\n allowAnonymous = true,\n localAccounts = false,\n checkUser,\n checkPermissions = false\n}) => ({\n login: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, password } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({ username: username.trim(), password: password.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else {\n let redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n if (params.redirect) redirectUrl += '&redirect=' + encodeURIComponent(params.redirect);\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, email, password, domain, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n logout: async () => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n // Delete token but also any other value in local storage\n localStorage.clear();\n if (localAccounts) {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n } else {\n const baseUrl = (new URL(window.location.href)).origin;\n if (!allowAnonymous) {\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login'));\n } else {\n // Redirect to login page after disconnecting from SSO\n // The login page will remove the token, display a notification and redirect to the homepage\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login?logout=true'));\n }\n }\n\n // Avoid displaying immediately the login page\n return '/';\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n } else {\n return true;\n }\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return true;\n\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch(e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n let authorization = {\n '@id': '#' + mode.replace('acl:', ''),\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n let { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName: profileData?.['vcard:given-name'] || profileData?.['pair:label'] || webIdData['foaf:name'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('app.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({ currentPassword, email: email.trim(), newPassword }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('app.notification.invalid_password');\n }\n\n throw new Error('app.notification.update_settings_error');\n }\n }\n});\n\nexport default authProvider;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider: 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la resource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider: \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n }\n }\n};\n\nexport default frenchMessages;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = () => {\n const { identity, loading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!loading && !identity?.id) {\n notify('ra.auth.auth_check_error', 'error');\n redirect('/login?redirect=' + encodeURIComponent(location.pathname + location.search));\n }\n }, [loading, identity, redirect, notify, location]);\n\n return { identity, loading };\n};\n\nexport default useCheckAuthenticated;\n"],"names":["InvalidCharacterError","message","this","prototype","Error","name","r","window","atob","bind","input","str","String","replace","length","bs","buffer","bc","idx","output","charAt","fromCharCode","indexOf","context","definition","normalize","strArray","resultArray","TypeError","match","first","shift","i","component","push","join","parts","split","arguments","slice","call","module","exports","defaultToArray","value","Array","isArray","undefined","getAclUri","resourceUri","parsedUrl","URL","urlJoin","origin","pathname","getAclContext","baseUri","@base","acl","foaf","acl:agent","@type","acl:agentGroup","acl:agentClass","acl:mode","acl:accessTo","getAuthServerUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","dataProvider","dataServers","authServer","wrap","_context","prev","next","getDataServers","sent","Object","values","find","server","abrupt","pod","baseUrl","stop","_callee","_x","apply","CLASS_AGENT","rightsToCreate","rightsToEdit","rightsToDelete","rightsToControl","rights","show","list","create","edit","delete","control","forbiddenErrors","resourceRightsLabels","_defineProperty","_resourceRightsLabels","containerRightsLabels","ACL_READ","_containerRightsLabel","useCheckPermissions","uri","mode","redirectUrl","_useGetIdentity","useGetIdentity","identity","loading","usePermissionsOptimized","permissions","notify","useNotify","redirect","useRedirect","useEffect","some","p","includes","CreateWithPermissions","props","createContainerUri","useCreateContainer","resource","React","createElement","Create","defaultProps","actions","CreateActions","useStyles","makeStyles","padding","width","option","AddPermissionsForm","agents","addPermission","classes","translate","useTranslate","_useState2","_slicedToArray","useState","setValue","_useState4","inputValue","setInputValue","_useState6","options","setOptions","useGetList","page","perPage","field","order","q","enabled","ids","data","Autocomplete","getOptionLabel","filterOptions","x","filter","agent","keys","id","noOptionsText","autoComplete","blurOnSelect","clearOnBlur","disableClearable","onChange","event","record","onInputChange","newInputValue","renderInput","params","TextField","_extends","label","variant","margin","fullWidth","renderOption","List","dense","className","ListItem","button","ListItemAvatar","Avatar","src","image","PersonIcon","ListItemText","primary","AgentIcon","predicate","PublicIcon","VpnLockIcon","GroupIcon","listItem","paddingLeft","paddingRight","primaryText","whiteSpace","overflow","textOverflow","secondaryText","textAlign","fontStyle","color","AgentItem","isContainer","removePermission","useDataProvider","_React$useState2","anchorEl","setAnchorEl","user","setUser","setLoading","error","setError","getOne","then","_ref2","closeMenu","labels","Loading","map","ListItemSecondaryAction","IconButton","onClick","currentTarget","EditIcon","Menu","keepMounted","open","Boolean","onClose","entries","_ref3","_ref4","rightKey","rightLabel","hasPermission","MenuItem","key","ListItemIcon","CheckIcon","theme","maxWidth","backgroundColor","palette","background","paper","EditPermissionsForm","agentId","useAgents","authProvider","useAuthProvider","setAgents","_result","result","ANONYMOUS_AGENT","appendPermission","_step","_iterator","_createForOfIteratorHelper","_loop","forEach","userUri","groupUri","s","n","done","err","e","f","useCallback","_agents$agentId","prevAgents","fromEntries","m","title","paddingBottom","addForm","paddingTop","listForm","maxHeight","PermissionsDialog","Dialog","DialogTitle","DialogContent","DialogActions","Button","PermissionsButton","showDialog","setShowDialog","createContainer","Fragment","ShareIcon","EditActionsWithPermissions","basePath","hasList","hasShow","TopToolbar","ListButton","ShowButton","DeleteButtonWithPermissions","useRecordContext","DeleteButton","toolbar","flex","display","justifyContent","EditToolbarWithPermissions","Toolbar","SaveButton","undoable","EditWithPermissions","Edit","cloneElement","children","_objectSpread","ListActionsWithPermissions","bulkActions","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","selectedIds","showFilter","total","rest","_objectWithoutProperties","_excluded","xs","useMediaQuery","breakpoints","down","resourceDefinition","useResourceDefinition","hasCreate","CreateButton","ExportButton","disabled","sort","ListWithPermissions","ShowActionsWithPermissions","hasEdit","EditButton","ShowWithPermissions","Show","AuthDialog","login","useLogin","DialogContentText","location","search","delay","t","Promise","resolve","setTimeout","main","flexDirection","minHeight","alignItems","grey","text","card","minWidth","marginTop","lockIconAvatar","lockIcon","SsoLoginPage","history","buttons","userResource","propertiesExist","_callee2","searchParams","_context2","URLSearchParams","has","get","delegateYield","token","_jwtDecode","webId","userData","_yield$dataProvider$g","allPropertiesExist","_yield$dataProvider$g2","jwtDecode","every","console","log","checkUser","localStorage","setItem","encodeURIComponent","clear","ThemeProvider","createTheme","Card","LockIcon","Typography","CardActions","type","Notification","startIcon","@global","body","PodLoginPageView","customPodProviders","locale","useLocale","podProviders","setPodProviders","results","json","_podProviders","fetch","headers","Accept","ok","provider","response","reload","href","Box","pl","pr","podProvider","url","set","Divider","toString","StorageIcon","secondary","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require","useSignup","signup","form","icon","marginRight","spacing","Input","_ref$meta","meta","touched","inputProps","helperText","SignupForm","redirectTo","delayBeforeRedirect","_useSafeSetState2","useSafeSetState","useLocation","Form","onSubmit","_","validate","errors","email","password","initialValues","render","handleSubmit","noValidate","Field","CircularProgress","size","thickness","propTypes","height","backgroundRepeat","backgroundSize","backgroundImage","avatar","switch","LocalLoginPage","muiTheme","useMemo","isSignup","Redirect","to","classnames","LoginForm","Link","root","active","LogoutButton","forwardRef","ref","logout","useLogout","activeClassName","ExitIcon","ViewProfileMenu","profileResource","MenuItemLink","concat","leftIcon","AccountCircleIcon","EditProfileMenu","LoginMenu","SignupMenu","UserMenu","_ref5","_identity$profileData","_identity$profileData2","otherProps","RaUserMenu","profileData","__data__","other","eq","splice","index","assocIndexOf","pop","ListCache","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","global","freeSelf","self","freeGlobal","Function","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","toStringTag","isOwn","tag","unmasked","getRawTag","objectToString","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","IE_PROTO","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","isMasked","isFunction","test","toSource","getValue","baseIsNative","getNative","nativeCreate","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","hash","Map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","pairs","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","SetCache","add","setCacheAdd","setCacheHas","cache","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","arraySome","othIndex","cacheHas","Uint8Array","symbolProto","symbolValueOf","valueOf","byteLength","byteOffset","convert","mapToArray","setToArray","stacked","equalArrays","offset","keysFunc","symbolsFunc","arrayPush","resIndex","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","arrayFilter","stubArray","iteratee","isObjectLike","baseIsArguments","freeExports","nodeType","freeModule","Buffer","isBuffer","stubFalse","reIsUint","typedArrayTags","isLength","freeProcess","process","nodeUtil","types","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","isIndex","Ctor","constructor","transform","arg","overArg","isPrototype","nativeKeys","isArrayLike","arrayLikeKeys","baseKeys","baseGetAllKeys","getSymbols","objProps","getAllKeys","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","dataViewCtorString","DataView","mapCtorString","promiseCtorString","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","ctorString","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqual","baseIsEqualDeep","emptyParams","alreadyFetchedPermissions","{}","Resource","_updateAccountSettings","_getAccountSettings","_setNewPassword","_resetPassword","_getIdentity","_removePermission","_addPermission","_getPermissions","_checkAuth","_logout","_signup","_login","_ref$allowAnonymous","allowAnonymous","_ref$localAccounts","localAccounts","_ref$checkPermissions","checkPermissions","authServerUrl","username","_yield$dataProvider$f","method","JSON","stringify","trim","Headers","Content-Type","t0","_yield$dataProvider$f2","domain","_x2","_callee3","_context3","checkAuth","_callee4","_context4","getItem","checkError","getPermissions","aclUri","_yield$dataProvider$f3","_context5","startsWith","warn","_callee5","_x3","_authorization","authorization","_context6","@id","@context","@graph","_callee6","_x4","_x5","_x6","_x7","_yield$dataProvider$f4","updatedPermissions","_context7","modes","_callee7","_x8","_x9","_x10","_x11","getIdentity","_callee8","_jwtDecode2","_yield$dataProvider$f5","webIdData","_context8","fullName","resetPassword","_context9","_callee9","_x12","setNewPassword","_context10","_callee10","_x13","getAccountSettings","_yield$dataProvider$f6","_context11","_callee11","_x14","updateAccountSettings","currentPassword","newPassword","_context12","_callee12","_x15","auth","dialog","container_permissions","resource_permissions","login_required","action","view_my_profile","edit_my_profile","right","read","append","write","container","anonymous","authenticated","agent_select","username_or_email","resource_show_forbidden","resource_edit_forbidden","resource_delete_forbidden","resource_control_forbidden","container_create_forbidden","container_list_forbidden","user_not_allowed_to_login","user_email_not_found","user_email_exist","username_exist","username_invalid","new_user_created","user_connected","user_disconnected","bad_request","account_settings_updated","login_to_continue","choose_pod_provider","_useSafeSetState","state","setState","useGetPermissions","fetchPermissions","isEqual","refetch"],"mappings":";;wlRAOA,SAASA,EAAsBC,GAC3BC,KAAKD,QAAUA,EAGnBD,EAAsBG,UAAY,IAAIC,MACtCJ,EAAsBG,UAAUE,KAAO,wBA6BvC,IAAAC,EAAkC,oBAAXC,QACnBA,OAAOC,MACPD,OAAOC,KAAKC,KAAKF,SA7BrB,SAAkBG,GACd,IAAIC,EAAMC,OAAOF,GAAOG,QAAQ,MAAO,IACvC,GAAIF,EAAIG,OAAS,GAAK,EAClB,MAAM,IAAId,EACN,qEAGR,IAEI,IAAYe,EAAIC,EAAZC,EAAK,EAAeC,EAAM,EAAGC,EAAS,GAEzCH,EAASL,EAAIS,OAAOF,MAEpBF,IACCD,EAAKE,EAAK,EAAS,GAALF,EAAUC,EAASA,EAG/BC,IAAO,GACVE,GAAUP,OAAOS,aAAa,IAAON,KAAS,EAAIE,EAAM,IACzD,EAGAD,EA/BI,oEA+BWM,QAAQN,GAE3B,OAAOG,m5BCtCX,IAAiBI,EAASC,EAATD,EAIHrB,GAJYsB,EAIN,WAElB,SAASC,EAAWC,GAClB,IAAIC,EAAc,GAClB,GAAwB,IAApBD,EAASZ,OAAgB,MAAO,GAEpC,GAA2B,iBAAhBY,EAAS,GAClB,MAAM,IAAIE,UAAU,kCAAoCF,EAAS,IAInE,GAAIA,EAAS,GAAGG,MAAM,iBAAmBH,EAASZ,OAAS,EAAG,CAC5D,IAAIgB,EAAQJ,EAASK,QACrBL,EAAS,GAAKI,EAAQJ,EAAS,GAI7BA,EAAS,GAAGG,MAAM,gBACpBH,EAAS,GAAKA,EAAS,GAAGb,QAAQ,gBAAiB,UAEnDa,EAAS,GAAKA,EAAS,GAAGb,QAAQ,gBAAiB,SAGrD,IAAK,IAAImB,EAAI,EAAGA,EAAIN,EAAS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AciY,EAAdjY,EAAA,GAGMsS,EAAiB4F,EAAAA,oBAEjBC,EAAmBxlB,EAAAA,aACvB,WAAA,OACE2f,EAAenmB,GACZiD,MAAK,SAAAtH,GACCswB,GAAQtwB,EAAakwB,EAAMlwB,eAC9B+nB,GAA0Blf,GAAO7I,EACjCmwB,EAAS,CAAEnwB,YAAAA,QAJjB,OAOS,SAAAmH,GACLgpB,EAAS,CACPhpB,MAAAA,SAGR,CAAC0B,EAAKxE,EAAQmmB,IAOhB,OAJAnqB,EAAAA,WAAU,WACRgwB,MACC,CAACxnB,IAEJ6E,EAAAA,EAAA,GAAYwiB,GAAZ,GAAA,CAAmBK,QAASF"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/dist/index.es.js b/src/frontend/packages/auth-provider/dist/index.es.js index ace1aeedf..4892035bd 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js +++ b/src/frontend/packages/auth-provider/dist/index.es.js @@ -1,4 +1,4 @@ import*as e from"react";import t,{useEffect as r,useState as n,useCallback as a,useMemo as o,forwardRef as i}from"react";import{useGetIdentity as c,usePermissionsOptimized as s,useNotify as u,useRedirect as l,Create as d,CreateActions as p,useTranslate as f,useGetList as m,useDataProvider as h,Loading as v,Error as g,useAuthProvider as y,Button as b,TopToolbar as w,ListButton as _,ShowButton as E,useRecordContext as x,DeleteButton as j,Toolbar as k,SaveButton as O,Edit as P,useResourceDefinition as S,CreateButton as C,ExportButton as A,List as I,EditButton as T,Show as N,useLogin as L,Notification as R,useLocale as U,useSafeSetState as z,LoginForm as W,useLogout as D,Resource as F,UserMenu as V,MenuItemLink as B,useGetPermissions as q}from"react-admin";import{useCreateContainer as G}from"@semapps/semantic-data-provider";import Y from"@material-ui/icons/Share";import{makeStyles as M,TextField as $,List as H,ListItem as J,ListItemAvatar as K,Avatar as Q,ListItemText as X,ListItemSecondaryAction as Z,IconButton as ee,Menu as te,MenuItem as re,ListItemIcon as ne,Dialog as ae,DialogTitle as oe,DialogContent as ie,DialogActions as ce,useMediaQuery as se,DialogContentText as ue,Button as le,Card as de,Typography as pe,CardActions as fe,Box as me,Divider as he,createTheme as ve,ThemeProvider as ge,CircularProgress as ye}from"@material-ui/core";import be from"@material-ui/lab/Autocomplete";import we from"@material-ui/icons/Person";import _e from"@material-ui/icons/Edit";import Ee from"@material-ui/icons/Check";import xe from"@material-ui/icons/Public";import je from"@material-ui/icons/VpnLock";import ke from"@material-ui/icons/Group";import{ThemeProvider as Oe}from"@material-ui/styles";import{makeStyles as Pe,createTheme as Se}from"@material-ui/core/styles";import Ce from"@material-ui/icons/Lock";import Ae from"@material-ui/icons/Storage";import Ie from"classnames";import{useLocation as Te,Redirect as Ne,Link as Le}from"react-router-dom";import{Form as Re,Field as Ue}from"react-final-form";import ze from"@material-ui/icons/PowerSettingsNew";import We from"@material-ui/icons/AccountCircle";function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function Be(e,t,r,n,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function qe(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Be(o,n,a,i,c,"next",e)}function c(e){Be(o,n,a,i,c,"throw",e)}i(void 0)}))}}function Ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ye(){return(Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}(e,t)||Je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function He(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Je(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){if(e){if("string"==typeof e)return Ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i};function Ze(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(Xe(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return Xe(t)}}function et(e){this.message=e}function tt(e,t){if("string"!=typeof e)throw new et("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(Ze(e.split(".")[r]))}catch(e){throw new et("Invalid token specified: "+e.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";var rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function nt(e,t){return e(t={exports:{}},t.exports),t.exports}var at,ot,it=nt((function(e){var t,r;t=rt,r=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n0&&(a=a.replace(/^[\/]+/,"")),a=n0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=r():t.urljoin=r()})),ct=function(e){return e?Array.isArray(e)?e:[e]:void 0},st=function(e){var t=new URL(e);return it(t.origin,"_acl",t.pathname)},ut=function(e){return{"@base":e,acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/","acl:agent":{"@type":"@id"},"acl:agentGroup":{"@type":"@id"},"acl:agentClass":{"@type":"@id"},"acl:mode":{"@type":"@id"},"acl:accessTo":{"@type":"@id"}}},lt=function(){var e=qe(Ve().mark((function e(t){var r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getDataServers();case 2:if(r=e.sent,n=Object.values(r).find((function(e){return!0===e.authServer}))){e.next=6;break}throw new Error("Could not find a server with authServer: true. Check your dataServers config.");case 6:return e.abrupt("return",n.pod?new URL(n.baseUrl).origin:n.baseUrl);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),dt=["username","email","password","domain"],pt=function(e){var t,r,n,a,o,i,c,s,u,l,d,p,f=e.dataProvider,m=e.allowAnonymous,h=void 0===m||m,v=e.localAccounts,g=void 0!==v&&v,y=e.checkUser,b=e.checkPermissions,w=void 0!==b&&b;return{login:(p=qe(Ve().mark((function e(t){var r,n,a,o,i,c,s;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:if(r=e.sent,!g){e.next=20;break}return n=t.username,a=t.password,e.prev=5,e.next=8,f.fetch(it(r,"auth/login"),{method:"POST",body:JSON.stringify({username:n.trim(),password:a.trim()}),headers:new Headers({"Content-Type":"application/json"})});case 8:o=e.sent,i=o.json,c=i.token,localStorage.setItem("token",c),window.location.reload(),e.next=18;break;case 15:throw e.prev=15,e.t0=e.catch(5),new Error("ra.auth.sign_in_error");case 18:e.next=23;break;case 20:s=new URL(window.location.href).origin+"/login?login=true",t.redirect&&(s+="&redirect="+encodeURIComponent(t.redirect)),window.location.href=it(r,"auth?redirectUrl="+encodeURIComponent(s));case 23:case"end":return e.stop()}}),e,null,[[5,15]])}))),function(e){return p.apply(this,arguments)}),signup:(d=qe(Ve().mark((function e(t){var r,n,a,o,i,c,s,u,l,d,p;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:if(r=e.sent,!g){e.next=33;break}return n=t.username,a=t.email,o=t.password,t.domain,i=Me(t,dt),e.prev=5,e.next=8,f.fetch(it(r,"auth/signup"),{method:"POST",body:JSON.stringify(Fe({username:n.trim(),email:a.trim(),password:o.trim()},i)),headers:new Headers({"Content-Type":"application/json"})});case 8:return c=e.sent,s=c.json,u=s.token,localStorage.setItem("token",u),l=tt(u),d=l.webId,e.abrupt("return",d);case 16:if(e.prev=16,e.t0=e.catch(5),"email.already.exists"!==e.t0.message){e.next=22;break}throw new Error("auth.message.user_email_exist");case 22:if("username.already.exists"!==e.t0.message){e.next=26;break}throw new Error("auth.message.username_exist");case 26:if("username.invalid"!==e.t0.message){e.next=30;break}throw new Error("auth.message.username_invalid");case 30:throw new Error(e.t0.message||"ra.auth.sign_in_error");case 31:e.next=35;break;case 33:p=new URL(window.location.href).origin+"/login?login=true",window.location.href=it(r,"auth?redirectUrl="+encodeURIComponent(p));case 35:case"end":return e.stop()}}),e,null,[[5,16]])}))),function(e){return d.apply(this,arguments)}),logout:(l=qe(Ve().mark((function e(){var t,r;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return t=e.sent,localStorage.clear(),g?(window.location.reload(),window.location.href="/"):(r=new URL(window.location.href).origin,window.location.href=it(t,h?"auth/logout?redirectUrl="+encodeURIComponent(r+"/login?logout=true"):"auth/logout?redirectUrl="+encodeURIComponent(r+"/login"))),e.abrupt("return","/");case 6:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)}),checkAuth:(u=qe(Ve().mark((function e(){return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(localStorage.getItem("token")||h){e.next=3;break}throw new Error;case 3:case"end":return e.stop()}}),e)}))),function(){return u.apply(this,arguments)}),checkUser:function(e){return!y||y(e)},checkError:function(e){return Promise.resolve()},getPermissions:(s=qe(Ve().mark((function e(t){var r,n,a;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}return e.abrupt("return",!0);case 2:if(t&&t.startsWith("http")){e.next=4;break}throw new Error("The first parameter passed to getPermissions must be an URL");case 4:return r=st(t),e.next=7,f.fetch(r);case 7:return n=e.sent,a=n.json,e.abrupt("return",a["@graph"]);case 10:case"end":return e.stop()}}),e)}))),function(e){return s.apply(this,arguments)}),addPermission:(c=qe(Ve().mark((function e(t,r,n,a){var o,i,c;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.startsWith("http")){e.next=2;break}throw new Error("The first parameter passed to addPermission must be an URL");case 2:return i=st(t),Ge(o={"@id":"#"+a.replace("acl:",""),"@type":"acl:Authorization"},n,r),Ge(o,"acl:accessTo",t),Ge(o,"acl:mode",a),c=o,e.next=6,f.fetch(i,{method:"PATCH",body:JSON.stringify({"@context":ut(i),"@graph":[c]})});case 6:case"end":return e.stop()}}),e)}))),function(e,t,r,n){return c.apply(this,arguments)}),removePermission:(i=qe(Ve().mark((function e(t,r,n,a){var o,i,c,s;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.startsWith("http")){e.next=2;break}throw new Error("The first parameter passed to removePermission must be an URL");case 2:return o=st(t),e.next=5,f.fetch(o);case 5:return i=e.sent,c=i.json,s=c["@graph"].filter((function(e){return!e["@id"].includes("#Default")})).map((function(e){var t=ct(e["acl:mode"]),o=ct(e[n]);return a&&t.includes(a)&&o&&o.includes(r)&&(o=o.filter((function(e){return e!==r}))),Fe(Fe({},e),{},Ge({},n,o))})),e.next=10,f.fetch(o,{method:"PUT",body:JSON.stringify({"@context":ut(o),"@graph":s})});case 10:case"end":return e.stop()}}),e)}))),function(e,t,r,n){return i.apply(this,arguments)}),getIdentity:(o=qe(Ve().mark((function e(){var t,r,n,a,o,i,c;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=localStorage.getItem("token"))){e.next=17;break}return r=tt(t),n=r.webId,e.next=5,f.fetch(n);case 5:if(a=e.sent,!(o=a.json).url){e.next=13;break}return e.next=10,f.fetch(o.url);case 10:e.t0=e.sent,e.next=14;break;case 13:e.t0={};case 14:return i=e.t0,c=i.json,e.abrupt("return",{id:n,fullName:(null==c?void 0:c["vcard:given-name"])||(null==c?void 0:c["pair:label"])||o["foaf:name"],profileData:c,webIdData:o});case 17:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),resetPassword:(a=qe(Ve().mark((function e(t){var r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.email,e.next=3,lt(f);case 3:return n=e.sent,e.prev=4,e.next=7,f.fetch(it(n,"auth/reset_password"),{method:"POST",body:JSON.stringify({email:r.trim()}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(4),new Error("app.notification.reset_password_error");case 12:case"end":return e.stop()}}),e,null,[[4,9]])}))),function(e){return a.apply(this,arguments)}),setNewPassword:(n=qe(Ve().mark((function e(t){var r,n,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.email,n=t.token,a=t.password,e.next=3,lt(f);case 3:return o=e.sent,e.prev=4,e.next=7,f.fetch(it(o,"auth/new_password"),{method:"POST",body:JSON.stringify({email:r.trim(),token:n,password:a}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(4),new Error("app.notification.new_password_error");case 12:case"end":return e.stop()}}),e,null,[[4,9]])}))),function(e){return n.apply(this,arguments)}),getAccountSettings:(r=qe(Ve().mark((function e(t){var r,n,a;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return r=e.sent,e.prev=3,e.next=6,f.fetch(it(r,"auth/account"));case 6:return n=e.sent,a=n.json,e.abrupt("return",a);case 11:throw e.prev=11,e.t0=e.catch(3),new Error("app.notification.get_settings_error");case 14:case"end":return e.stop()}}),e,null,[[3,11]])}))),function(e){return r.apply(this,arguments)}),updateAccountSettings:(t=qe(Ve().mark((function e(t){var r,n,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return r=e.sent,e.prev=3,n=t.email,a=t.currentPassword,o=t.newPassword,e.next=7,f.fetch(it(r,"auth/account"),{method:"POST",body:JSON.stringify({currentPassword:a,email:n.trim(),newPassword:o}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(3),"auth.account.invalid_password"!==e.t0.message){e.next=13;break}throw new Error("app.notification.invalid_password");case 13:throw new Error("app.notification.update_settings_error");case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e){return t.apply(this,arguments)})}},ft="acl:agentClass",mt=["acl:Append","acl:Write","acl:Control"],ht=["acl:Append","acl:Write","acl:Control"],vt=["acl:Write","acl:Control"],gt=["acl:Control"],yt={show:["acl:Read","acl:Append","acl:Write","acl:Control"],list:["acl:Read","acl:Append","acl:Write","acl:Control"],create:mt,edit:ht,delete:vt,control:gt},bt={show:"auth.message.resource_show_forbidden",edit:"auth.message.resource_edit_forbidden",delete:"auth.message.resource_delete_forbidden",control:"auth.message.resource_control_forbidden",list:"auth.message.container_list_forbidden",create:"auth.message.container_create_forbidden"},wt=(Ge(at={},"acl:Read","auth.right.resource.read"),Ge(at,"acl:Append","auth.right.resource.append"),Ge(at,"acl:Write","auth.right.resource.write"),Ge(at,"acl:Control","auth.right.resource.control"),at),_t=(Ge(ot={},"acl:Read","auth.right.container.read"),Ge(ot,"acl:Write","auth.right.container.write"),Ge(ot,"acl:Control","auth.right.container.control"),ot),Et=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",a=c(),o=a.identity,i=a.loading,d=s(e),p=d.permissions,f=u(),m=l();return r((function(){!i&&o&&p&&!p.some((function(e){return yt[t].includes(e["acl:mode"])}))&&(f(bt[t],"error"),m(n))}),[p,o,m,f,i]),p},xt=function(e){var r=G(e.resource);return Et(r,"create"),t.createElement(d,e)};xt.defaultProps={actions:t.createElement(p,null)};var jt=M((function(){return{list:{padding:0,width:"100%"},option:{padding:0}}})),kt=function(e){var a=e.agents,o=e.addPermission,i=jt(),c=f(),s=$e(n(null),2),u=s[0],l=s[1],d=$e(n(""),2),p=d[0],h=d[1],v=$e(n([]),2),g=v[0],y=v[1],b=m("Person",{page:1,perPage:100},{field:"pair:label",order:"ASC"},{q:p},{enabled:p.length>0}),w=b.ids,_=b.data;return r((function(){y(w.length>0?Object.values(_):[])}),[w,_]),t.createElement(be,{classes:{option:i.option},getOptionLabel:function(e){return e["pair:label"]},filterOptions:function(e){return e.filter((function(e){return!Object.keys(a).includes(e.id)}))},options:g,noOptionsText:c("ra.navigation.no_results"),autoComplete:!0,blurOnSelect:!0,clearOnBlur:!0,disableClearable:!0,value:u,onChange:function(e,t){o(t.id||t["@id"],"acl:agent","acl:Read"),l(null),h(""),y([])},onInputChange:function(e,t){h(t)},renderInput:function(e){return t.createElement($,Ye({},e,{label:c("auth.input.agent_select"),variant:"filled",margin:"dense",fullWidth:!0}))},renderOption:function(e){return t.createElement(H,{dense:!0,className:i.list},t.createElement(J,{button:!0},t.createElement(K,null,t.createElement(Q,{src:e.image},t.createElement(we,null))),t.createElement(X,{primary:e["pair:label"]})))}})},Ot=function(e){var r=e.agent;switch(r.predicate){case ft:return"foaf:Agent"===r.id?t.createElement(xe,null):t.createElement(je,null);case"acl:agent":return t.createElement(we,null);case"acl:agentGroup":return t.createElement(ke,null);default:throw new Error("Unknown agent predicate: "+r.predicate)}},Pt=M((function(){return{listItem:{paddingLeft:4,paddingRight:36},primaryText:{width:"30%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},secondaryText:{textAlign:"center",width:"60%",fontStyle:"italic",color:"grey"}}})),St=function(e){var a=e.isContainer,o=e.agent,i=e.addPermission,c=e.removePermission,s=Pt(),u=f(),l=h(),d=$e(t.useState(null),2),p=d[0],m=d[1],y=$e(n(),2),b=y[0],w=y[1],_=$e(n(!0),2),E=_[0],x=_[1],j=$e(n(),2),k=j[0],O=j[1];if(r((function(){"acl:agent"===o.predicate?l.getOne("Person",{id:o.id}).then((function(e){var t=e.data;w(t),x(!1)})).catch((function(e){O(e),x(!1)})):x(!1)}),[o.id,o.predicate]),"acl:agentGroup"===o.predicate)return null;var P=function(){return m(null)},S=a?_t:wt;return E?t.createElement(v,null):k?t.createElement(g,null):t.createElement(J,{className:s.listItem},t.createElement(K,null,t.createElement(Q,{src:null==b?void 0:b.image},t.createElement(Ot,{agent:o}))),t.createElement(X,{className:s.primaryText,primary:b?b["pair:label"]:u("foaf:Agent"===o.id?"auth.agent.anonymous":"auth.agent.authenticated")}),t.createElement(X,{className:s.secondaryText,primary:o.permissions&&o.permissions.map((function(e){return u(S[e])})).join(", ")}),t.createElement(Z,null,t.createElement(ee,{onClick:function(e){return m(e.currentTarget)}},t.createElement(_e,null)),t.createElement(te,{anchorEl:p,keepMounted:!0,open:Boolean(p),onClose:P},Object.entries(S).map((function(e){var r=$e(e,2),n=r[0],a=r[1],s=o.permissions&&o.permissions.includes(n);return t.createElement(re,{key:n,onClick:function(){s?c(o.id,o.predicate,n):i(o.id,o.predicate,n),P()}},t.createElement(ne,null,s?t.createElement(Ee,null):null),t.createElement(X,{primary:u(a)}))})))))},Ct=M((function(e){return{list:{width:"100%",maxWidth:"100%",backgroundColor:e.palette.background.paper}}})),At=function(e){var r=e.isContainer,n=e.agents,a=e.addPermission,o=e.removePermission,i=Ct();return t.createElement(H,{dense:!0,className:i.list},Object.entries(n).map((function(e){var n=$e(e,2),i=n[0],c=n[1];return t.createElement(St,{key:i,isContainer:r,agent:c,addPermission:a,removePermission:o})})))},It=function(e){var t=s(e).permissions,o=y(),i=$e(n({}),2),c=i[0],u=i[1];r((function(){var e,r=(Ge(e={},"foaf:Agent",{id:"foaf:Agent",predicate:ft,permissions:[]}),Ge(e,"acl:AuthenticatedAgent",{id:"acl:AuthenticatedAgent",predicate:ft,permissions:[]}),e),n=function(e,t,n){r[e]?r[e].permissions.push(n):r[e]={id:e,predicate:t,permissions:[n]}};if(t){var a,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Je(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{var i=function(){var e=a.value;e[ft]&&ct(e[ft]).forEach((function(t){return n(t,ft,e["acl:mode"])})),e["acl:agent"]&&ct(e["acl:agent"]).forEach((function(t){return n(t,"acl:agent",e["acl:mode"])})),e["acl:agentGroup"]&&ct(e["acl:agentGroup"]).forEach((function(t){return n(t,"acl:agentGroup",e["acl:mode"])}))};for(o.s();!(a=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}u(r)}}),[t]);var l=a((function(t,r,n){var a,i=Fe({},c);u(Fe(Fe({},c),{},Ge({},t,{id:t,predicate:r,permissions:c[t]?[].concat(He(null===(a=c[t])||void 0===a?void 0:a.permissions),[n]):[n]}))),o.addPermission(e,t,r,n).catch((function(e){u(i)}))}),[c,u,e,o]),d=a((function(t,r,n){var a=Fe({},c);u(Object.fromEntries(Object.entries(c).map((function(e){var r=$e(e,2),a=r[0],o=r[1];return o.id===t&&(o.permissions=o.permissions.filter((function(e){return e!==n}))),[a,o]})).filter((function(e){var t=$e(e,2);t[0];var r=t[1];return r.predicate===ft||r.permissions.length>0})))),o.removePermission(e,t,r,n).catch((function(e){u(a)}))}),[c,u,e,o]);return{agents:c,addPermission:l,removePermission:d}},Tt=M((function(){return{title:{paddingBottom:8},actions:{padding:15},addForm:{paddingTop:0},listForm:{paddingTop:0,paddingBottom:0,paddingRight:0,maxHeight:210}}})),Nt=function(e){var r=e.open,n=e.onClose,a=e.uri,o=e.isContainer,i=Tt(),c=f(),s=It(a),u=s.agents,l=s.addPermission,d=s.removePermission;return t.createElement(ae,{fullWidth:!0,open:r,onClose:n},t.createElement(oe,{className:i.title},c(o?"auth.dialog.container_permissions":"auth.dialog.resource_permissions")),t.createElement(ie,{className:i.addForm},t.createElement(kt,{agents:u,addPermission:l})),t.createElement(ie,{className:i.listForm},t.createElement(At,{isContainer:o,agents:u,addPermission:l,removePermission:d})),t.createElement(ce,{className:i.actions},t.createElement(b,{label:"ra.action.close",variant:"text",onClick:n})))},Lt=function(e){var r=e.record,a=e.resource,o=$e(n(!1),2),i=o[0],c=o[1],s=G(a),u=!!a,l=u?s:r.id||r["@id"];return t.createElement(t.Fragment,null,t.createElement(b,{label:"auth.action.permissions",onClick:function(){return c(!0)}},t.createElement(Y,null)),t.createElement(Nt,{uri:l,isContainer:!!u,open:i,onClose:function(){return c(!1)}}))},Rt=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasShow,i=s(null==n?void 0:n.id).permissions;return t.createElement(w,null,a&&t.createElement(_,{basePath:r,record:n}),o&&t.createElement(E,{basePath:r,record:n}),!!i&&i.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:r,record:n}))},Ut=function(e){var r=x(),n=s(null==r?void 0:r.id).permissions;return n&&n.some((function(e){return vt.includes(e["acl:mode"])}))?t.createElement(j,e):null},zt=M((function(){return{toolbar:{flex:1,display:"flex",justifyContent:"space-between"}}})),Wt=function(e){var r=zt();return t.createElement(k,Ye({},e,{className:r.toolbar}),t.createElement(O,null),t.createElement(Ut,{undoable:!1}),"}")},Dt=function(e){return Et(e.id,"edit"),t.createElement(P,e,t.cloneElement(e.children,Fe({toolbar:t.createElement(Wt,null)},e.children.props)))};Dt.defaultProps={actions:t.createElement(Rt,null)};var Ft=["bulkActions","basePath","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","resource","selectedIds","showFilter","total"],Vt=function(e){var r=e.bulkActions,n=e.basePath,a=e.currentSort,o=e.displayedFilters,i=e.exporter,c=e.filters,u=e.filterValues,l=e.onUnselectItems,d=e.resource,p=e.selectedIds,f=e.showFilter,m=e.total,h=Me(e,Ft),v=se((function(e){return e.breakpoints.down("xs")})),g=S(h),y=G(d),b=s(y).permissions;return t.createElement(w,null,c&&t.cloneElement(c,{resource:d,showFilter:f,displayedFilters:o,filterValues:u,context:"button"}),g.hasCreate&&b&&b.some((function(e){return mt.includes(e["acl:mode"])}))&&t.createElement(C,{basePath:n}),b&&b.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:n,record:y}),!v&&!1!==i&&t.createElement(A,{disabled:0===m,resource:d,sort:a,filter:u,exporter:i}),r&&t.cloneElement(r,{basePath:n,filterValues:u,resource:d,selectedIds:p,onUnselectItems:l}))},Bt=function(e){return t.createElement(I,e)};Bt.defaultProps={actions:t.createElement(Vt,null)};var qt=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasEdit,i=s(null==n?void 0:n.id).permissions;return t.createElement(w,null,a&&t.createElement(_,{basePath:r,record:n}),o&&i&&i.some((function(e){return ht.includes(e["acl:mode"])}))&&t.createElement(T,{basePath:r,record:n}),i&&i.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:r,record:n}))},Gt=function(e){return Et(e.id,"edit"),t.createElement(N,e)};Gt.defaultProps={actions:t.createElement(qt,null)};var Yt=["open","onClose","title","message","redirect"],Mt=function(e){var r=e.open,n=e.onClose,a=e.title,o=e.message,i=e.redirect,c=Me(e,Yt),s=L(),u=f();return t.createElement(ae,Ye({open:r,onClose:n},c),t.createElement(oe,null,u(a)),t.createElement(ie,null,t.createElement(ue,null,u(o))),t.createElement(ce,null,t.createElement(le,{onClick:n},u("ra.action.cancel")),t.createElement(le,{onClick:function(){return s({redirect:i||window.location.pathname+window.location.search})},color:"primary",variant:"contained"},u("auth.action.login"))))};Mt.defaultProps={title:"auth.dialog.login_required",message:"auth.message.login_to_continue"};var $t=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Ht=Pe((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.grey[300]},text:{maxWidth:300,textAlign:"center",padding:"4px 8px 8px"},card:{minWidth:300,marginTop:"6em"},lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]}}})),Jt=function(e){var n=e.theme,a=e.history,o=e.location,i=e.buttons,c=e.userResource,s=e.propertiesExist,l=e.text,d=Ht(),p=u(),f=L(),m=h(),v=y();return r((function(){qe(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=new URLSearchParams(o.search)).has("login")){e.next=8;break}if(!t.has("error")){e.next=6;break}"registration.not-allowed"===t.get("error")?p("auth.message.user_email_not_found","error"):p("auth.message.bad_request","error",{error:t.get("error")}),e.next=8;break;case 6:if(!t.has("token")){e.next=8;break}return e.delegateYield(Ve().mark((function e(){var r,n,o,i,u,l,d;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.get("token"),n=tt(r),o=n.webId,e.next=4,m.getOne(c,{id:o});case 4:if(u=e.sent,i=u.data,!(s.length>0)){e.next=19;break}l=s.every((function(e){return i[e]}));case 8:if(l){e.next=19;break}return console.log("Waiting for all properties to have been created",s),e.next=12,$t(500);case 12:return e.next=14,m.getOne(c,{id:o});case 14:d=e.sent,i=d.data,l=s.every((function(e){return i[e]})),e.next=8;break;case 19:v.checkUser(i)?(localStorage.setItem("token",r),t.has("redirect")?(p("auth.message.user_connected","info"),a.push(t.get("redirect"))):t.has("new")&&"true"===t.get("new")?(p("auth.message.new_user_created","info"),a.push("/"+c+"/"+encodeURIComponent(o)+"/edit")):(p("auth.message.user_connected","info"),a.push("/"))):(p("auth.message.user_not_allowed_to_login","error"),a.replace("/login"));case 20:case"end":return e.stop()}}),e)}))(),"t0",8);case 8:t.has("logout")&&(localStorage.clear(),p("auth.message.user_disconnected","info"),a.push("/"));case 9:case"end":return e.stop()}}),e)})))()}),[o.search]),t.createElement(Oe,{theme:Se(n)},t.createElement("div",{className:d.main},t.createElement(de,{className:d.card},t.createElement("div",{className:d.lockIconAvatar},t.createElement(Q,{className:d.lockIcon},t.createElement(Ce,null))),l&&t.createElement(pe,{variant:"body2",className:d.text},l),i&&i.map((function(e,r){return t.createElement(fe,{key:r},t.cloneElement(e,{fullWidth:!0,variant:"outlined",type:"submit",onClick:function(){return f({},"/login")}}))})))),t.createElement(R,null))};Jt.defaultProps={propertiesExist:[],buttons:[t.createElement(le,{startIcon:t.createElement(Q,{src:"/lescommuns.jpg"})},"Les Communs")],userResource:"Person"};var Kt=M((function(e){return{"@global":{body:{backgroundColor:e.palette.primary.main}},text:{textAlign:"center",padding:"4px 8px 8px"},card:Ge({minWidth:300,maxWidth:350,marginTop:"6em"},e.breakpoints.down("sm"),{margin:"1em"}),lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]},list:{paddingTop:0,paddingBottom:0},listItem:{paddingTop:5,paddingBottom:5}}})),Qt=function(e){var a=e.history,o=e.location,i=e.text,c=e.customPodProviders,s=Kt(),l=u(),d=U(),p=f(),m=y(),v=h(),g=$e(n(c||[]),2),b=g[0],w=g[1],_=new URLSearchParams(o.search);return r((function(){qe(Ve().mark((function e(){var t,r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==b.length){e.next=13;break}return e.next=3,fetch("https://data.activitypods.org/pod-providers",{headers:{Accept:"application/ld+json"}});case 3:if(!(t=e.sent).ok){e.next=12;break}return e.next=7,t.json();case 7:r=e.sent,n=r["ldp:contains"].filter((function(e){return Array.isArray(e["apods:locales"])?e["apods:locales"].includes(d):e["apods:locales"]===d})),w(n),e.next=13;break;case 12:l("auth.message.pod_providers_not_loaded","error");case 13:case"end":return e.stop()}}),e)})))()}),[b,w,l,d]),r((function(){qe(Ve().mark((function e(){var t,r,n,o,i;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_.has("token")){e.next=16;break}return t=_.get("token"),r=tt(t),n=r.webId,e.next=5,fetch(n,{headers:{Accept:"application/json"}});case 5:if((o=e.sent).ok){e.next=10;break}l("auth.message.unable_to_fetch_user_data","error"),e.next=14;break;case 10:return e.next=12,o.json();case 12:i=e.sent,m.checkUser(i)?(localStorage.setItem("token",t),l("auth.message.user_connected","info"),window.location.reload(),window.location.href="/?addUser=true"):(l("auth.message.user_not_allowed_to_login","error"),a.replace("/login"));case 14:e.next=17;break;case 16:_.has("logout")&&(localStorage.clear(),l("auth.message.user_disconnected","info"),a.push("/"));case 17:case"end":return e.stop()}}),e)})))()}),[_,v]),_.has("token")||_.has("addUser")||_.has("logout")?null:t.createElement(me,{display:"flex",flexDirection:"column",alignItems:"center"},t.createElement(de,{className:s.card},t.createElement("div",{className:s.lockIconAvatar},t.createElement(Q,{className:s.lockIcon},t.createElement(Ce,null))),t.createElement(me,{pl:2,pr:2},t.createElement(pe,{variant:"body2",className:s.text},i||p("auth.message.choose_pod_provider"))),t.createElement(me,{m:2},t.createElement(H,{className:s.list},b.map((function(e,r){var n=new URL("/auth",(e["apods:domainName"].includes(":")?"http://":"https://")+e["apods:domainName"]);return _.has("signup")&&n.searchParams.set("signup","true"),n.searchParams.set("redirect",window.location.href),t.createElement(t.Fragment,{key:r},t.createElement(he,null),t.createElement(J,{key:r,button:!0,onClick:function(){return window.location.href=n.toString()},className:s.listItem},t.createElement(K,null,t.createElement(Q,null,t.createElement(Ae,null))),t.createElement(X,{primary:e["apods:domainName"],secondary:e["apods:area"]})))}))))))},Xt=function(e){var r=o((function(){return ve(e.theme)}),[e.theme]);return t.createElement(ge,{theme:r},t.createElement(Qt,e),t.createElement(R,null))};function Zt(){}function er(){}er.resetWarningCache=Zt;var tr=function(){function e(e,t,r,n,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:er,resetWarningCache:Zt};return r.PropTypes=r,r},rr=nt((function(e){e.exports=tr()})),nr=function(){var e=y();return a((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.signup(t)}),[e])},ar=["meta","input"],or=M((function(e){return{form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},button:{width:"100%"},icon:{marginRight:e.spacing(1)}}})),ir=function(t){var r=t.meta,n=r.touched,a=r.error,o=t.input,i=Me(t,ar);return e.createElement($,Ye({error:!(!n||!a),helperText:n&&a},o,i,{fullWidth:!0}))},cr=function(t){var r=t.redirectTo,n=t.delayBeforeRedirect,a=$e(z(!1),2),o=a[0],i=a[1],c=nr(),s=f(),l=u(),d=or(),p=Te(),m=new URLSearchParams(p.search);return e.createElement(Re,{onSubmit:function(e){i(!0),c(e).then((function(e){n?setTimeout((function(){window.location.reload(),window.location.href=r||"/",i(!1)}),n):(window.location.reload(),window.location.href=r||"/",i(!1)),l("auth.message.new_user_created","info")})).catch((function(e){i(!1),l("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning",{_:"string"==typeof e?e:e&&e.message?e.message:void 0})}))},validate:function(e){var t={email:void 0,password:void 0};return e.email||(t.email=s("ra.validation.required")),e.password||(t.password=s("ra.validation.required")),t},initialValues:{email:m.get("email")},render:function(t){var r=t.handleSubmit;return e.createElement("form",{onSubmit:r,noValidate:!0},e.createElement("div",{className:d.form},e.createElement("div",{className:d.input},e.createElement(Ue,{id:"username",name:"username",component:ir,label:s("auth.input.username"),disabled:o})),e.createElement("div",{className:d.input},e.createElement(Ue,{id:"email",name:"email",component:ir,label:s("auth.input.email"),disabled:o||m.has("email")&&m.has("force-email")})),e.createElement("div",{className:d.input},e.createElement(Ue,{id:"password",name:"password",component:ir,label:s("ra.auth.password"),type:"password",disabled:o}))),e.createElement(fe,null,e.createElement(le,{variant:"contained",type:"submit",color:"primary",disabled:o,className:d.button},o&&e.createElement(ye,{className:d.icon,size:18,thickness:2}),s("auth.action.signup"))))}})};cr.propTypes={redirectTo:rr.string};var sr=["theme","title","classes","className"],ur=M((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",height:"1px",alignItems:"center",justifyContent:"flex-start",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundImage:"radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary[500]},switch:{margin:"1em",display:"flex",justifyContent:"center"}}})),lr=function(e){var r=e.theme;e.title,e.classes;var n=e.className,a=Me(e,sr),i=ur(e),s=Te(),u=f(),l=o((function(){return ve(r)}),[r]),d=new URLSearchParams(s.search),p=d.has("signup"),m=d.get("redirect"),h=c(),v=h.identity;return h.loading?null:null!=v&&v.id?t.createElement(Ne,{to:m||"/"}):t.createElement(ge,{theme:l},t.createElement("div",Ye({className:Ie(i.main,n)},a),t.createElement(de,{className:i.card},t.createElement("div",{className:i.avatar},t.createElement(Q,{className:i.icon},t.createElement(Ce,null))),p?t.createElement(cr,{redirectTo:m,delayBeforeRedirect:3e3}):t.createElement(W,{redirectTo:m}),t.createElement("div",{className:i.switch},p?t.createElement(Le,{to:"/login"},t.createElement(pe,{variant:"body2"},u("auth.action.login"))):t.createElement(Le,{to:"/login?signup=true"},t.createElement(pe,{variant:"body2"},u("auth.action.signup"))))),t.createElement(R,null)))};lr.propTypes={children:rr.node,classes:rr.object,className:rr.string,theme:rr.object};var dr=M((function(e){return{root:{color:e.palette.text.secondary},active:{color:e.palette.text.primary},icon:{minWidth:e.spacing(5)}}})),pr=i((function(e,r){var n=dr(),a=D(),o=f();return t.createElement(re,{onClick:function(){return a()},ref:r,className:n.root,activeClassName:n.active},t.createElement(ne,{className:n.icon},t.createElement(ze,null)),o("auth.action.logout"))})),fr=["name","create"],mr=function(e){var r=e.name,n=e.create,a=Me(e,fr),o=G(r),i=s(o).permissions;return t.createElement(F,Ye({},a,{name:r,create:i&&i.some((function(e){return mt.includes(e["acl:mode"])}))?n:void 0}))},hr=["logout","profileResource"],vr=i((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return t.createElement(B,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i),"/show"),primaryText:o,leftIcon:t.createElement(We,null),onClick:n})})),gr=i((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return t.createElement(B,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i)),primaryText:o,leftIcon:t.createElement(_e,null),onClick:n})})),yr=i((function(e,r){var n=e.onClick,a=e.label;return t.createElement(B,{ref:r,to:"/login",primaryText:a,onClick:n})})),br=i((function(e,r){var n=e.onClick,a=e.label;return t.createElement(B,{ref:r,to:"/login?signup=true",primaryText:a,onClick:n})})),wr=function(e){var r,n,a=e.logout,o=e.profileResource,i=Me(e,hr),s=c().identity,u=f();return t.createElement(V,i,s&&""!==s.id?[t.createElement(vr,{webId:(null==s||null===(r=s.profileData)||void 0===r?void 0:r.id)||s.id,label:u("auth.action.view_my_profile"),profileResource:o,key:"view"}),t.createElement(gr,{webId:(null==s||null===(n=s.profileData)||void 0===n?void 0:n.id)||s.id,label:u("auth.action.edit_my_profile"),profileResource:o,key:"edit"}),t.cloneElement(a,{key:"logout"})]:[t.createElement(br,{label:u("auth.action.signup"),key:"signup"}),t.createElement(yr,{label:u("auth.action.login"),key:"login"})])};wr.defaultProps={profileResource:"Person"};var _r=function(){var e=c(),t=e.identity,n=e.loading,a=u(),o=l(),i=Te();return r((function(){n||null!=t&&t.id||(a("ra.auth.auth_check_error","error"),o("/login?redirect="+encodeURIComponent(i.pathname+i.search)))}),[n,t,o,a,i]),{identity:t,loading:n}};var Er=function(){this.__data__=[],this.size=0};var xr=function(e,t){return e===t||e!=e&&t!=t};var jr=function(e,t){for(var r=e.length;r--;)if(xr(e[r][0],t))return r;return-1},kr=Array.prototype.splice;var Or=function(e){var t=this.__data__,r=jr(t,e);return!(r<0)&&(r==t.length-1?t.pop():kr.call(t,r,1),--this.size,!0)};var Pr=function(e){var t=this.__data__,r=jr(t,e);return r<0?void 0:t[r][1]};var Sr=function(e){return jr(this.__data__,e)>-1};var Cr=function(e,t){var r=this.__data__,n=jr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ar(e){var t=-1,r=null==e?0:e.length;for(this.clear();++tc))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,p=!0,f=2&r?new Dn:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},ha={};ha["[object Float32Array]"]=ha["[object Float64Array]"]=ha["[object Int8Array]"]=ha["[object Int16Array]"]=ha["[object Int32Array]"]=ha["[object Uint8Array]"]=ha["[object Uint8ClampedArray]"]=ha["[object Uint16Array]"]=ha["[object Uint32Array]"]=!0,ha["[object Arguments]"]=ha["[object Array]"]=ha["[object ArrayBuffer]"]=ha["[object Boolean]"]=ha["[object DataView]"]=ha["[object Date]"]=ha["[object Error]"]=ha["[object Function]"]=ha["[object Map]"]=ha["[object Number]"]=ha["[object Object]"]=ha["[object RegExp]"]=ha["[object Set]"]=ha["[object String]"]=ha["[object WeakMap]"]=!1;var va=function(e){return aa(e)&&ma(e.length)&&!!ha[Hr(e)]};var ga=function(e){return function(t){return e(t)}},ya=nt((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,a=n&&n.exports===r&&Ur.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o})),ba=ya&&ya.isTypedArray,wa=ba?ga(ba):va,_a=Object.prototype.hasOwnProperty;var Ea=function(e,t){var r=Kn(e),n=!r&&ua(e),a=!r&&!n&&da(e),o=!r&&!n&&!a&&wa(e),i=r||n||a||o,c=i?na(e.length,String):[],s=c.length;for(var u in e)!t&&!_a.call(e,u)||i&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fa(u,s))||c.push(u);return c},xa=Object.prototype;var ja=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xa)};var ka=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),Oa=Object.prototype.hasOwnProperty;var Pa=function(e){if(!ja(e))return ka(e);var t=[];for(var r in Object(e))Oa.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Sa=function(e){return null!=e&&ma(e.length)&&!Qr(e)};var Ca=function(e){return Sa(e)?Ea(e):Pa(e)};var Aa=function(e){return Qn(e,Ca,ra)},Ia=Object.prototype.hasOwnProperty;var Ta=function(e,t,r,n,a,o){var i=1&r,c=Aa(e),s=c.length;if(s!=Aa(t).length&&!i)return!1;for(var u=s;u--;){var l=c[u];if(!(i?l in t:Ia.call(t,l)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=i;++u0&&void 0!==arguments[0]?arguments[0]:Ja,t=JSON.stringify(e),n=z({permissions:Ka[t]}),o=$e(n,2),i=o[0],c=o[1],s=q(),u=a((function(){return s(e).then((function(e){Ha(e,i.permissions)||(Ka[t]=e,c({permissions:e}))})).catch((function(e){c({error:e})}))}),[t,e,s]);return r((function(){u()}),[t]),Fe(Fe({},i),{},{refetch:u})},Xa={auth:{dialog:{container_permissions:"Container permissions",resource_permissions:"Resource permissions",login_required:"Login required"},action:{permissions:"Permissions",signup:"Signup",logout:"Logout",login:"Login",view_my_profile:"View my profile",edit_my_profile:"Edit my profile"},right:{resource:{read:"Read",append:"Append",write:"Write",control:"Control"},container:{read:"List",append:"Add",write:"Add",control:"Control"}},agent:{anonymous:"All users",authenticated:"Connected users"},input:{agent_select:"Add an user...",name:"Surname",username:"User ID",email:"Email address",username_or_email:"User ID or email address"},message:{resource_show_forbidden:"You are not allowed to view this resource",resource_edit_forbidden:"You are not allowed to edit this resource",resource_delete_forbidden:"You are not allowed to delete this resource",resource_control_forbidden:"You are not allowed to control this resource",container_create_forbidden:"You are not allowed to create new resource",container_list_forbidden:"You are not allowed to list these resources",user_not_allowed_to_login:"You are not allowed to login with this account",user_email_not_found:"No account found with this email address",user_email_exist:"An account already exist with this email address",username_exist:"An account already exist with this user ID",username_invalid:"This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized",new_user_created:"Your account has been successfully created",user_connected:"You are now connected",user_disconnected:"You are now disconnected",bad_request:"Bad request (Error message returned by the server: %{error})",account_settings_updated:"Your account settings have been successfully updated",login_to_continue:"Please login to continue",choose_pod_provider:"Please choose a POD provider in the list below. All application data will be saved on your POD."}}},Za={auth:{dialog:{container_permissions:"Permissions sur le container",resource_permissions:"Permissions sur la resource",login_required:"Connexion requise"},action:{permissions:"Permissions",signup:"S'inscrire",logout:"Se déconnecter",login:"Se connecter",view_my_profile:"Voir mon profil",edit_my_profile:"Éditer mon profil"},right:{resource:{read:"Lire",append:"Enrichir",write:"Modifier",control:"Administrer"},container:{read:"Lister",append:"Ajouter",write:"Ajouter",control:"Administrer"}},agent:{anonymous:"Tous les utilisateurs",authenticated:"Utilisateurs connectés"},input:{agent_select:"Ajouter un utilisateur...",name:"Prénom",username:"Identifiant unique",email:"Adresse e-mail",username_or_email:"Identifiant ou adresse e-mail"},message:{resource_show_forbidden:"Vous n'avez pas la permission de voir cette ressource",resource_edit_forbidden:"Vous n'avez pas la permission d'éditer cette ressource",resource_delete_forbidden:"Vous n'avez pas la permission d'effacer cette ressource",resource_control_forbidden:"Vous n'avez pas la permission d'administrer cette ressource",container_create_forbidden:"Vous n'avez pas la permission de créer des ressources",container_list_forbidden:"Vous n'avez pas la permission de voir ces ressources",user_not_allowed_to_login:"Vous n'avez pas le droit de vous connecter avec ce compte",user_email_not_found:"Aucun compte trouvé avec cette adresse mail",user_email_exist:"Un compte existe déjà avec cette adresse mail",username_exist:"Un compte existe déjà avec cet identifiant",username_invalid:"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés",new_user_created:"Votre compte a été créé avec succès",user_connected:"Vous êtes maintenant connecté",user_disconnected:"Vous êtes maintenant déconnecté",bad_request:"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})",account_settings_updated:"Les paramètres de votre compte ont été mis à jour avec succès",login_to_continue:"Veuillez vous connecter pour continuer",choose_pod_provider:"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD."}}};export{Mt as AuthDialog,xt as CreateWithPermissions,Ut as DeleteButtonWithPermissions,Rt as EditActionsWithPermissions,Wt as EditToolbarWithPermissions,Dt as EditWithPermissions,Vt as ListActionsWithPermissions,Bt as ListWithPermissions,lr as LocalLoginPage,Jt as LoginPage,pr as LogoutButton,Lt as PermissionsButton,Xt as PodLoginPage,mr as ResourceWithPermissions,qt as ShowActionsWithPermissions,Gt as ShowWithPermissions,Jt as SsoLoginPage,wr as UserMenu,pt as authProvider,Xa as englishMessages,Za as frenchMessages,It as useAgents,_r as useCheckAuthenticated,Et as useCheckPermissions,Qa as usePermissionsWithRefetch,nr as useSignup}; +Ve=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),i=new x(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return k()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=w(i,r);if(c){if(c===l)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=u(e,t,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===l)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(e,r,i),o}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var l={};function d(){}function p(){}function f(){}var m={};c(m,a,(function(){return this}));var h=Object.getPrototypeOf,v=h&&h(h(j([])));v&&v!==t&&r.call(v,a)&&(m=v);var g=f.prototype=d.prototype=Object.create(m);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var s=u(e[a],e,o);if("throw"!==s.type){var l=s.arg,d=l.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(d).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,c)}))}c(s.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,l;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(c&&s){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;E(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},e}function Be(e,t,r,n,a,o,i){try{var c=e[o](i),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function qe(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){Be(o,n,a,i,c,"next",e)}function c(e){Be(o,n,a,i,c,"throw",e)}i(void 0)}))}}function Ge(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ye(){return(Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,a,o=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){c=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw a}}return o}(e,t)||Je(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function He(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Je(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){if(e){if("string"==typeof e)return Ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ke(e,t):void 0}}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r>(-2*a&6)):0)n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return i};function Ze(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(Xe(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return Xe(t)}}function et(e){this.message=e}function tt(e,t){if("string"!=typeof e)throw new et("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(Ze(e.split(".")[r]))}catch(e){throw new et("Invalid token specified: "+e.message)}}et.prototype=new Error,et.prototype.name="InvalidTokenError";var rt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function nt(e,t){return e(t={exports:{}},t.exports),t.exports}var at,ot,it=nt((function(e){var t,r;t=rt,r=function(){function e(e){var t=[];if(0===e.length)return"";if("string"!=typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n0&&(a=a.replace(/^[\/]+/,"")),a=n0?"?":"")+i.join("&")}return function(){return e("object"==typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=r():t.urljoin=r()})),ct=function(e){return e?Array.isArray(e)?e:[e]:void 0},st=function(e){var t=new URL(e);return it(t.origin,"_acl",t.pathname)},ut=function(e){return{"@base":e,acl:"http://www.w3.org/ns/auth/acl#",foaf:"http://xmlns.com/foaf/0.1/","acl:agent":{"@type":"@id"},"acl:agentGroup":{"@type":"@id"},"acl:agentClass":{"@type":"@id"},"acl:mode":{"@type":"@id"},"acl:accessTo":{"@type":"@id"}}},lt=function(){var e=qe(Ve().mark((function e(t){var r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getDataServers();case 2:if(r=e.sent,n=Object.values(r).find((function(e){return!0===e.authServer}))){e.next=6;break}throw new Error("Could not find a server with authServer: true. Check your dataServers config.");case 6:return e.abrupt("return",n.pod?new URL(n.baseUrl).origin:n.baseUrl);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),dt=["username","email","password","domain"],pt=function(e){var t,r,n,a,o,i,c,s,u,l,d,p,f=e.dataProvider,m=e.allowAnonymous,h=void 0===m||m,v=e.localAccounts,g=void 0!==v&&v,y=e.checkUser,b=e.checkPermissions,w=void 0!==b&&b;return{login:(p=qe(Ve().mark((function e(t){var r,n,a,o,i,c,s;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:if(r=e.sent,!g){e.next=20;break}return n=t.username,a=t.password,e.prev=5,e.next=8,f.fetch(it(r,"auth/login"),{method:"POST",body:JSON.stringify({username:n.trim(),password:a.trim()}),headers:new Headers({"Content-Type":"application/json"})});case 8:o=e.sent,i=o.json,c=i.token,localStorage.setItem("token",c),window.location.reload(),e.next=18;break;case 15:throw e.prev=15,e.t0=e.catch(5),new Error("ra.auth.sign_in_error");case 18:e.next=23;break;case 20:s=new URL(window.location.href).origin+"/login?login=true",t.redirect&&(s+="&redirect="+encodeURIComponent(t.redirect)),window.location.href=it(r,"auth?redirectUrl="+encodeURIComponent(s));case 23:case"end":return e.stop()}}),e,null,[[5,15]])}))),function(e){return p.apply(this,arguments)}),signup:(d=qe(Ve().mark((function e(t){var r,n,a,o,i,c,s,u,l,d,p;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:if(r=e.sent,!g){e.next=33;break}return n=t.username,a=t.email,o=t.password,t.domain,i=Me(t,dt),e.prev=5,e.next=8,f.fetch(it(r,"auth/signup"),{method:"POST",body:JSON.stringify(Fe({username:n.trim(),email:a.trim(),password:o.trim()},i)),headers:new Headers({"Content-Type":"application/json"})});case 8:return c=e.sent,s=c.json,u=s.token,localStorage.setItem("token",u),l=tt(u),d=l.webId,e.abrupt("return",d);case 16:if(e.prev=16,e.t0=e.catch(5),"email.already.exists"!==e.t0.message){e.next=22;break}throw new Error("auth.message.user_email_exist");case 22:if("username.already.exists"!==e.t0.message){e.next=26;break}throw new Error("auth.message.username_exist");case 26:if("username.invalid"!==e.t0.message){e.next=30;break}throw new Error("auth.message.username_invalid");case 30:throw new Error(e.t0.message||"ra.auth.sign_in_error");case 31:e.next=35;break;case 33:p=new URL(window.location.href).origin+"/login?login=true",window.location.href=it(r,"auth?redirectUrl="+encodeURIComponent(p));case 35:case"end":return e.stop()}}),e,null,[[5,16]])}))),function(e){return d.apply(this,arguments)}),logout:(l=qe(Ve().mark((function e(){var t,r;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return t=e.sent,localStorage.clear(),g?(window.location.reload(),window.location.href="/"):(r=new URL(window.location.href).origin,window.location.href=it(t,h?"auth/logout?redirectUrl="+encodeURIComponent(r+"/login?logout=true"):"auth/logout?redirectUrl="+encodeURIComponent(r+"/login"))),e.abrupt("return","/");case 6:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)}),checkAuth:(u=qe(Ve().mark((function e(){return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(localStorage.getItem("token")||h){e.next=3;break}throw new Error;case 3:case"end":return e.stop()}}),e)}))),function(){return u.apply(this,arguments)}),checkUser:function(e){return!y||y(e)},checkError:function(e){return Promise.resolve()},getPermissions:(s=qe(Ve().mark((function e(t){var r,n,a;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}return e.abrupt("return",!0);case 2:if(t&&t.startsWith("http")){e.next=4;break}throw new Error("The first parameter passed to getPermissions must be an URL");case 4:return r=st(t),e.prev=5,e.next=8,f.fetch(r);case 8:return n=e.sent,a=n.json,e.abrupt("return",a["@graph"]);case 13:return e.prev=13,e.t0=e.catch(5),console.warn("Could not fetch ACL URI ".concat(t)),e.abrupt("return",[]);case 17:case"end":return e.stop()}}),e,null,[[5,13]])}))),function(e){return s.apply(this,arguments)}),addPermission:(c=qe(Ve().mark((function e(t,r,n,a){var o,i,c;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.startsWith("http")){e.next=2;break}throw new Error("The first parameter passed to addPermission must be an URL");case 2:return i=st(t),Ge(o={"@id":"#"+a.replace("acl:",""),"@type":"acl:Authorization"},n,r),Ge(o,"acl:accessTo",t),Ge(o,"acl:mode",a),c=o,e.next=6,f.fetch(i,{method:"PATCH",body:JSON.stringify({"@context":ut(i),"@graph":[c]})});case 6:case"end":return e.stop()}}),e)}))),function(e,t,r,n){return c.apply(this,arguments)}),removePermission:(i=qe(Ve().mark((function e(t,r,n,a){var o,i,c,s;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.startsWith("http")){e.next=2;break}throw new Error("The first parameter passed to removePermission must be an URL");case 2:return o=st(t),e.next=5,f.fetch(o);case 5:return i=e.sent,c=i.json,s=c["@graph"].filter((function(e){return!e["@id"].includes("#Default")})).map((function(e){var t=ct(e["acl:mode"]),o=ct(e[n]);return a&&t.includes(a)&&o&&o.includes(r)&&(o=o.filter((function(e){return e!==r}))),Fe(Fe({},e),{},Ge({},n,o))})),e.next=10,f.fetch(o,{method:"PUT",body:JSON.stringify({"@context":ut(o),"@graph":s})});case 10:case"end":return e.stop()}}),e)}))),function(e,t,r,n){return i.apply(this,arguments)}),getIdentity:(o=qe(Ve().mark((function e(){var t,r,n,a,o,i,c;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=localStorage.getItem("token"))){e.next=17;break}return r=tt(t),n=r.webId,e.next=5,f.fetch(n);case 5:if(a=e.sent,!(o=a.json).url){e.next=13;break}return e.next=10,f.fetch(o.url);case 10:e.t0=e.sent,e.next=14;break;case 13:e.t0={};case 14:return i=e.t0,c=i.json,e.abrupt("return",{id:n,fullName:(null==c?void 0:c["vcard:given-name"])||(null==c?void 0:c["pair:label"])||o["foaf:name"],profileData:c,webIdData:o});case 17:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)}),resetPassword:(a=qe(Ve().mark((function e(t){var r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.email,e.next=3,lt(f);case 3:return n=e.sent,e.prev=4,e.next=7,f.fetch(it(n,"auth/reset_password"),{method:"POST",body:JSON.stringify({email:r.trim()}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(4),new Error("app.notification.reset_password_error");case 12:case"end":return e.stop()}}),e,null,[[4,9]])}))),function(e){return a.apply(this,arguments)}),setNewPassword:(n=qe(Ve().mark((function e(t){var r,n,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.email,n=t.token,a=t.password,e.next=3,lt(f);case 3:return o=e.sent,e.prev=4,e.next=7,f.fetch(it(o,"auth/new_password"),{method:"POST",body:JSON.stringify({email:r.trim(),token:n,password:a}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(4),new Error("app.notification.new_password_error");case 12:case"end":return e.stop()}}),e,null,[[4,9]])}))),function(e){return n.apply(this,arguments)}),getAccountSettings:(r=qe(Ve().mark((function e(t){var r,n,a;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return r=e.sent,e.prev=3,e.next=6,f.fetch(it(r,"auth/account"));case 6:return n=e.sent,a=n.json,e.abrupt("return",a);case 11:throw e.prev=11,e.t0=e.catch(3),new Error("app.notification.get_settings_error");case 14:case"end":return e.stop()}}),e,null,[[3,11]])}))),function(e){return r.apply(this,arguments)}),updateAccountSettings:(t=qe(Ve().mark((function e(t){var r,n,a,o;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,lt(f);case 2:return r=e.sent,e.prev=3,n=t.email,a=t.currentPassword,o=t.newPassword,e.next=7,f.fetch(it(r,"auth/account"),{method:"POST",body:JSON.stringify({currentPassword:a,email:n.trim(),newPassword:o}),headers:new Headers({"Content-Type":"application/json"})});case 7:e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(3),"auth.account.invalid_password"!==e.t0.message){e.next=13;break}throw new Error("app.notification.invalid_password");case 13:throw new Error("app.notification.update_settings_error");case 14:case"end":return e.stop()}}),e,null,[[3,9]])}))),function(e){return t.apply(this,arguments)})}},ft="acl:agentClass",mt=["acl:Append","acl:Write","acl:Control"],ht=["acl:Append","acl:Write","acl:Control"],vt=["acl:Write","acl:Control"],gt=["acl:Control"],yt={show:["acl:Read","acl:Append","acl:Write","acl:Control"],list:["acl:Read","acl:Append","acl:Write","acl:Control"],create:mt,edit:ht,delete:vt,control:gt},bt={show:"auth.message.resource_show_forbidden",edit:"auth.message.resource_edit_forbidden",delete:"auth.message.resource_delete_forbidden",control:"auth.message.resource_control_forbidden",list:"auth.message.container_list_forbidden",create:"auth.message.container_create_forbidden"},wt=(Ge(at={},"acl:Read","auth.right.resource.read"),Ge(at,"acl:Append","auth.right.resource.append"),Ge(at,"acl:Write","auth.right.resource.write"),Ge(at,"acl:Control","auth.right.resource.control"),at),_t=(Ge(ot={},"acl:Read","auth.right.container.read"),Ge(ot,"acl:Write","auth.right.container.write"),Ge(ot,"acl:Control","auth.right.container.control"),ot),Et=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",a=c(),o=a.identity,i=a.loading,d=s(e),p=d.permissions,f=u(),m=l();return r((function(){!i&&o&&p&&!p.some((function(e){return yt[t].includes(e["acl:mode"])}))&&(f(bt[t],"error"),m(n))}),[p,o,m,f,i]),p},xt=function(e){var r=G(e.resource);return Et(r,"create"),t.createElement(d,e)};xt.defaultProps={actions:t.createElement(p,null)};var jt=M((function(){return{list:{padding:0,width:"100%"},option:{padding:0}}})),kt=function(e){var a=e.agents,o=e.addPermission,i=jt(),c=f(),s=$e(n(null),2),u=s[0],l=s[1],d=$e(n(""),2),p=d[0],h=d[1],v=$e(n([]),2),g=v[0],y=v[1],b=m("Person",{page:1,perPage:100},{field:"pair:label",order:"ASC"},{q:p},{enabled:p.length>0}),w=b.ids,_=b.data;return r((function(){y(w.length>0?Object.values(_):[])}),[w,_]),t.createElement(be,{classes:{option:i.option},getOptionLabel:function(e){return e["pair:label"]},filterOptions:function(e){return e.filter((function(e){return!Object.keys(a).includes(e.id)}))},options:g,noOptionsText:c("ra.navigation.no_results"),autoComplete:!0,blurOnSelect:!0,clearOnBlur:!0,disableClearable:!0,value:u,onChange:function(e,t){o(t.id||t["@id"],"acl:agent","acl:Read"),l(null),h(""),y([])},onInputChange:function(e,t){h(t)},renderInput:function(e){return t.createElement($,Ye({},e,{label:c("auth.input.agent_select"),variant:"filled",margin:"dense",fullWidth:!0}))},renderOption:function(e){return t.createElement(H,{dense:!0,className:i.list},t.createElement(J,{button:!0},t.createElement(K,null,t.createElement(Q,{src:e.image},t.createElement(we,null))),t.createElement(X,{primary:e["pair:label"]})))}})},Ot=function(e){var r=e.agent;switch(r.predicate){case ft:return"foaf:Agent"===r.id?t.createElement(xe,null):t.createElement(je,null);case"acl:agent":return t.createElement(we,null);case"acl:agentGroup":return t.createElement(ke,null);default:throw new Error("Unknown agent predicate: "+r.predicate)}},Pt=M((function(){return{listItem:{paddingLeft:4,paddingRight:36},primaryText:{width:"30%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},secondaryText:{textAlign:"center",width:"60%",fontStyle:"italic",color:"grey"}}})),St=function(e){var a=e.isContainer,o=e.agent,i=e.addPermission,c=e.removePermission,s=Pt(),u=f(),l=h(),d=$e(t.useState(null),2),p=d[0],m=d[1],y=$e(n(),2),b=y[0],w=y[1],_=$e(n(!0),2),E=_[0],x=_[1],j=$e(n(),2),k=j[0],O=j[1];if(r((function(){"acl:agent"===o.predicate?l.getOne("Person",{id:o.id}).then((function(e){var t=e.data;w(t),x(!1)})).catch((function(e){O(e),x(!1)})):x(!1)}),[o.id,o.predicate]),"acl:agentGroup"===o.predicate)return null;var P=function(){return m(null)},S=a?_t:wt;return E?t.createElement(v,null):k?t.createElement(g,null):t.createElement(J,{className:s.listItem},t.createElement(K,null,t.createElement(Q,{src:null==b?void 0:b.image},t.createElement(Ot,{agent:o}))),t.createElement(X,{className:s.primaryText,primary:b?b["pair:label"]:u("foaf:Agent"===o.id?"auth.agent.anonymous":"auth.agent.authenticated")}),t.createElement(X,{className:s.secondaryText,primary:o.permissions&&o.permissions.map((function(e){return u(S[e])})).join(", ")}),t.createElement(Z,null,t.createElement(ee,{onClick:function(e){return m(e.currentTarget)}},t.createElement(_e,null)),t.createElement(te,{anchorEl:p,keepMounted:!0,open:Boolean(p),onClose:P},Object.entries(S).map((function(e){var r=$e(e,2),n=r[0],a=r[1],s=o.permissions&&o.permissions.includes(n);return t.createElement(re,{key:n,onClick:function(){s?c(o.id,o.predicate,n):i(o.id,o.predicate,n),P()}},t.createElement(ne,null,s?t.createElement(Ee,null):null),t.createElement(X,{primary:u(a)}))})))))},Ct=M((function(e){return{list:{width:"100%",maxWidth:"100%",backgroundColor:e.palette.background.paper}}})),At=function(e){var r=e.isContainer,n=e.agents,a=e.addPermission,o=e.removePermission,i=Ct();return t.createElement(H,{dense:!0,className:i.list},Object.entries(n).map((function(e){var n=$e(e,2),i=n[0],c=n[1];return t.createElement(St,{key:i,isContainer:r,agent:c,addPermission:a,removePermission:o})})))},It=function(e){var t=s(e).permissions,o=y(),i=$e(n({}),2),c=i[0],u=i[1];r((function(){var e,r=(Ge(e={},"foaf:Agent",{id:"foaf:Agent",predicate:ft,permissions:[]}),Ge(e,"acl:AuthenticatedAgent",{id:"acl:AuthenticatedAgent",predicate:ft,permissions:[]}),e),n=function(e,t,n){r[e]?r[e].permissions.push(n):r[e]={id:e,predicate:t,permissions:[n]}};if(t){var a,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Je(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw o}}}}(t);try{var i=function(){var e=a.value;e[ft]&&ct(e[ft]).forEach((function(t){return n(t,ft,e["acl:mode"])})),e["acl:agent"]&&ct(e["acl:agent"]).forEach((function(t){return n(t,"acl:agent",e["acl:mode"])})),e["acl:agentGroup"]&&ct(e["acl:agentGroup"]).forEach((function(t){return n(t,"acl:agentGroup",e["acl:mode"])}))};for(o.s();!(a=o.n()).done;)i()}catch(e){o.e(e)}finally{o.f()}u(r)}}),[t]);var l=a((function(t,r,n){var a,i=Fe({},c);u(Fe(Fe({},c),{},Ge({},t,{id:t,predicate:r,permissions:c[t]?[].concat(He(null===(a=c[t])||void 0===a?void 0:a.permissions),[n]):[n]}))),o.addPermission(e,t,r,n).catch((function(e){u(i)}))}),[c,u,e,o]),d=a((function(t,r,n){var a=Fe({},c);u(Object.fromEntries(Object.entries(c).map((function(e){var r=$e(e,2),a=r[0],o=r[1];return o.id===t&&(o.permissions=o.permissions.filter((function(e){return e!==n}))),[a,o]})).filter((function(e){var t=$e(e,2);t[0];var r=t[1];return r.predicate===ft||r.permissions.length>0})))),o.removePermission(e,t,r,n).catch((function(e){u(a)}))}),[c,u,e,o]);return{agents:c,addPermission:l,removePermission:d}},Tt=M((function(){return{title:{paddingBottom:8},actions:{padding:15},addForm:{paddingTop:0},listForm:{paddingTop:0,paddingBottom:0,paddingRight:0,maxHeight:210}}})),Nt=function(e){var r=e.open,n=e.onClose,a=e.uri,o=e.isContainer,i=Tt(),c=f(),s=It(a),u=s.agents,l=s.addPermission,d=s.removePermission;return t.createElement(ae,{fullWidth:!0,open:r,onClose:n},t.createElement(oe,{className:i.title},c(o?"auth.dialog.container_permissions":"auth.dialog.resource_permissions")),t.createElement(ie,{className:i.addForm},t.createElement(kt,{agents:u,addPermission:l})),t.createElement(ie,{className:i.listForm},t.createElement(At,{isContainer:o,agents:u,addPermission:l,removePermission:d})),t.createElement(ce,{className:i.actions},t.createElement(b,{label:"ra.action.close",variant:"text",onClick:n})))},Lt=function(e){var r=e.record,a=e.resource,o=$e(n(!1),2),i=o[0],c=o[1],s=G(a),u=!!a,l=u?s:r.id||r["@id"];return t.createElement(t.Fragment,null,t.createElement(b,{label:"auth.action.permissions",onClick:function(){return c(!0)}},t.createElement(Y,null)),t.createElement(Nt,{uri:l,isContainer:!!u,open:i,onClose:function(){return c(!1)}}))},Rt=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasShow,i=s(null==n?void 0:n.id).permissions;return t.createElement(w,null,a&&t.createElement(_,{basePath:r,record:n}),o&&t.createElement(E,{basePath:r,record:n}),!!i&&i.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:r,record:n}))},Ut=function(e){var r=x(),n=s(null==r?void 0:r.id).permissions;return n&&n.some((function(e){return vt.includes(e["acl:mode"])}))?t.createElement(j,e):null},zt=M((function(){return{toolbar:{flex:1,display:"flex",justifyContent:"space-between"}}})),Wt=function(e){var r=zt();return t.createElement(k,Ye({},e,{className:r.toolbar}),t.createElement(O,null),t.createElement(Ut,{undoable:!1}),"}")},Dt=function(e){return Et(e.id,"edit"),t.createElement(P,e,t.cloneElement(e.children,Fe({toolbar:t.createElement(Wt,null)},e.children.props)))};Dt.defaultProps={actions:t.createElement(Rt,null)};var Ft=["bulkActions","basePath","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","resource","selectedIds","showFilter","total"],Vt=function(e){var r=e.bulkActions,n=e.basePath,a=e.currentSort,o=e.displayedFilters,i=e.exporter,c=e.filters,u=e.filterValues,l=e.onUnselectItems,d=e.resource,p=e.selectedIds,f=e.showFilter,m=e.total,h=Me(e,Ft),v=se((function(e){return e.breakpoints.down("xs")})),g=S(h),y=G(d),b=s(y).permissions;return t.createElement(w,null,c&&t.cloneElement(c,{resource:d,showFilter:f,displayedFilters:o,filterValues:u,context:"button"}),g.hasCreate&&b&&b.some((function(e){return mt.includes(e["acl:mode"])}))&&t.createElement(C,{basePath:n}),b&&b.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:n,record:y}),!v&&!1!==i&&t.createElement(A,{disabled:0===m,resource:d,sort:a,filter:u,exporter:i}),r&&t.cloneElement(r,{basePath:n,filterValues:u,resource:d,selectedIds:p,onUnselectItems:l}))},Bt=function(e){return t.createElement(I,e)};Bt.defaultProps={actions:t.createElement(Vt,null)};var qt=function(e){var r=e.basePath,n=e.record,a=e.hasList,o=e.hasEdit,i=s(null==n?void 0:n.id).permissions;return t.createElement(w,null,a&&t.createElement(_,{basePath:r,record:n}),o&&i&&i.some((function(e){return ht.includes(e["acl:mode"])}))&&t.createElement(T,{basePath:r,record:n}),i&&i.some((function(e){return gt.includes(e["acl:mode"])}))&&t.createElement(Lt,{basePath:r,record:n}))},Gt=function(e){return Et(e.id,"edit"),t.createElement(N,e)};Gt.defaultProps={actions:t.createElement(qt,null)};var Yt=["open","onClose","title","message","redirect"],Mt=function(e){var r=e.open,n=e.onClose,a=e.title,o=e.message,i=e.redirect,c=Me(e,Yt),s=L(),u=f();return t.createElement(ae,Ye({open:r,onClose:n},c),t.createElement(oe,null,u(a)),t.createElement(ie,null,t.createElement(ue,null,u(o))),t.createElement(ce,null,t.createElement(le,{onClick:n},u("ra.action.cancel")),t.createElement(le,{onClick:function(){return s({redirect:i||window.location.pathname+window.location.search})},color:"primary",variant:"contained"},u("auth.action.login"))))};Mt.defaultProps={title:"auth.dialog.login_required",message:"auth.message.login_to_continue"};var $t=function(e){return new Promise((function(t){return setTimeout(t,e)}))},Ht=Pe((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.grey[300]},text:{maxWidth:300,textAlign:"center",padding:"4px 8px 8px"},card:{minWidth:300,marginTop:"6em"},lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]}}})),Jt=function(e){var n=e.theme,a=e.history,o=e.location,i=e.buttons,c=e.userResource,s=e.propertiesExist,l=e.text,d=Ht(),p=u(),f=L(),m=h(),v=y();return r((function(){qe(Ve().mark((function e(){var t;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=new URLSearchParams(o.search)).has("login")){e.next=8;break}if(!t.has("error")){e.next=6;break}"registration.not-allowed"===t.get("error")?p("auth.message.user_email_not_found","error"):p("auth.message.bad_request","error",{error:t.get("error")}),e.next=8;break;case 6:if(!t.has("token")){e.next=8;break}return e.delegateYield(Ve().mark((function e(){var r,n,o,i,u,l,d;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.get("token"),n=tt(r),o=n.webId,e.next=4,m.getOne(c,{id:o});case 4:if(u=e.sent,i=u.data,!(s.length>0)){e.next=19;break}l=s.every((function(e){return i[e]}));case 8:if(l){e.next=19;break}return console.log("Waiting for all properties to have been created",s),e.next=12,$t(500);case 12:return e.next=14,m.getOne(c,{id:o});case 14:d=e.sent,i=d.data,l=s.every((function(e){return i[e]})),e.next=8;break;case 19:v.checkUser(i)?(localStorage.setItem("token",r),t.has("redirect")?(p("auth.message.user_connected","info"),a.push(t.get("redirect"))):t.has("new")&&"true"===t.get("new")?(p("auth.message.new_user_created","info"),a.push("/"+c+"/"+encodeURIComponent(o)+"/edit")):(p("auth.message.user_connected","info"),a.push("/"))):(p("auth.message.user_not_allowed_to_login","error"),a.replace("/login"));case 20:case"end":return e.stop()}}),e)}))(),"t0",8);case 8:t.has("logout")&&(localStorage.clear(),p("auth.message.user_disconnected","info"),a.push("/"));case 9:case"end":return e.stop()}}),e)})))()}),[o.search]),t.createElement(Oe,{theme:Se(n)},t.createElement("div",{className:d.main},t.createElement(de,{className:d.card},t.createElement("div",{className:d.lockIconAvatar},t.createElement(Q,{className:d.lockIcon},t.createElement(Ce,null))),l&&t.createElement(pe,{variant:"body2",className:d.text},l),i&&i.map((function(e,r){return t.createElement(fe,{key:r},t.cloneElement(e,{fullWidth:!0,variant:"outlined",type:"submit",onClick:function(){return f({},"/login")}}))})))),t.createElement(R,null))};Jt.defaultProps={propertiesExist:[],buttons:[t.createElement(le,{startIcon:t.createElement(Q,{src:"/lescommuns.jpg"})},"Les Communs")],userResource:"Person"};var Kt=M((function(e){return{"@global":{body:{backgroundColor:e.palette.primary.main}},text:{textAlign:"center",padding:"4px 8px 8px"},card:Ge({minWidth:300,maxWidth:350,marginTop:"6em"},e.breakpoints.down("sm"),{margin:"1em"}),lockIconAvatar:{margin:"1em",display:"flex",justifyContent:"center"},lockIcon:{backgroundColor:e.palette.grey[500]},list:{paddingTop:0,paddingBottom:0},listItem:{paddingTop:5,paddingBottom:5}}})),Qt=function(e){var a=e.history,o=e.location,i=e.text,c=e.customPodProviders,s=Kt(),l=u(),d=U(),p=f(),m=y(),v=h(),g=$e(n(c||[]),2),b=g[0],w=g[1],_=new URLSearchParams(o.search);return r((function(){qe(Ve().mark((function e(){var t,r,n;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==b.length){e.next=13;break}return e.next=3,fetch("https://data.activitypods.org/pod-providers",{headers:{Accept:"application/ld+json"}});case 3:if(!(t=e.sent).ok){e.next=12;break}return e.next=7,t.json();case 7:r=e.sent,n=r["ldp:contains"].filter((function(e){return Array.isArray(e["apods:locales"])?e["apods:locales"].includes(d):e["apods:locales"]===d})),w(n),e.next=13;break;case 12:l("auth.message.pod_providers_not_loaded","error");case 13:case"end":return e.stop()}}),e)})))()}),[b,w,l,d]),r((function(){qe(Ve().mark((function e(){var t,r,n,o,i;return Ve().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!_.has("token")){e.next=16;break}return t=_.get("token"),r=tt(t),n=r.webId,e.next=5,fetch(n,{headers:{Accept:"application/json"}});case 5:if((o=e.sent).ok){e.next=10;break}l("auth.message.unable_to_fetch_user_data","error"),e.next=14;break;case 10:return e.next=12,o.json();case 12:i=e.sent,m.checkUser(i)?(localStorage.setItem("token",t),l("auth.message.user_connected","info"),window.location.reload(),window.location.href="/?addUser=true"):(l("auth.message.user_not_allowed_to_login","error"),a.replace("/login"));case 14:e.next=17;break;case 16:_.has("logout")&&(localStorage.clear(),l("auth.message.user_disconnected","info"),a.push("/"));case 17:case"end":return e.stop()}}),e)})))()}),[_,v]),_.has("token")||_.has("addUser")||_.has("logout")?null:t.createElement(me,{display:"flex",flexDirection:"column",alignItems:"center"},t.createElement(de,{className:s.card},t.createElement("div",{className:s.lockIconAvatar},t.createElement(Q,{className:s.lockIcon},t.createElement(Ce,null))),t.createElement(me,{pl:2,pr:2},t.createElement(pe,{variant:"body2",className:s.text},i||p("auth.message.choose_pod_provider"))),t.createElement(me,{m:2},t.createElement(H,{className:s.list},b.map((function(e,r){var n=new URL("/auth",(e["apods:domainName"].includes(":")?"http://":"https://")+e["apods:domainName"]);return _.has("signup")&&n.searchParams.set("signup","true"),n.searchParams.set("redirect",window.location.href),t.createElement(t.Fragment,{key:r},t.createElement(he,null),t.createElement(J,{key:r,button:!0,onClick:function(){return window.location.href=n.toString()},className:s.listItem},t.createElement(K,null,t.createElement(Q,null,t.createElement(Ae,null))),t.createElement(X,{primary:e["apods:domainName"],secondary:e["apods:area"]})))}))))))},Xt=function(e){var r=o((function(){return ve(e.theme)}),[e.theme]);return t.createElement(ge,{theme:r},t.createElement(Qt,e),t.createElement(R,null))};function Zt(){}function er(){}er.resetWarningCache=Zt;var tr=function(){function e(e,t,r,n,a,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:er,resetWarningCache:Zt};return r.PropTypes=r,r},rr=nt((function(e){e.exports=tr()})),nr=function(){var e=y();return a((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.signup(t)}),[e])},ar=["meta","input"],or=M((function(e){return{form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},button:{width:"100%"},icon:{marginRight:e.spacing(1)}}})),ir=function(t){var r=t.meta,n=r.touched,a=r.error,o=t.input,i=Me(t,ar);return e.createElement($,Ye({error:!(!n||!a),helperText:n&&a},o,i,{fullWidth:!0}))},cr=function(t){var r=t.redirectTo,n=t.delayBeforeRedirect,a=$e(z(!1),2),o=a[0],i=a[1],c=nr(),s=f(),l=u(),d=or(),p=Te(),m=new URLSearchParams(p.search);return e.createElement(Re,{onSubmit:function(e){i(!0),c(e).then((function(e){n?setTimeout((function(){window.location.reload(),window.location.href=r||"/",i(!1)}),n):(window.location.reload(),window.location.href=r||"/",i(!1)),l("auth.message.new_user_created","info")})).catch((function(e){i(!1),l("string"==typeof e?e:void 0!==e&&e.message?e.message:"ra.auth.sign_in_error","warning",{_:"string"==typeof e?e:e&&e.message?e.message:void 0})}))},validate:function(e){var t={email:void 0,password:void 0};return e.email||(t.email=s("ra.validation.required")),e.password||(t.password=s("ra.validation.required")),t},initialValues:{email:m.get("email")},render:function(t){var r=t.handleSubmit;return e.createElement("form",{onSubmit:r,noValidate:!0},e.createElement("div",{className:d.form},e.createElement("div",{className:d.input},e.createElement(Ue,{id:"username",name:"username",component:ir,label:s("auth.input.username"),disabled:o})),e.createElement("div",{className:d.input},e.createElement(Ue,{id:"email",name:"email",component:ir,label:s("auth.input.email"),disabled:o||m.has("email")&&m.has("force-email")})),e.createElement("div",{className:d.input},e.createElement(Ue,{id:"password",name:"password",component:ir,label:s("ra.auth.password"),type:"password",disabled:o}))),e.createElement(fe,null,e.createElement(le,{variant:"contained",type:"submit",color:"primary",disabled:o,className:d.button},o&&e.createElement(ye,{className:d.icon,size:18,thickness:2}),s("auth.action.signup"))))}})};cr.propTypes={redirectTo:rr.string};var sr=["theme","title","classes","className"],ur=M((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"100vh",height:"1px",alignItems:"center",justifyContent:"flex-start",backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundImage:"radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)"},card:{minWidth:300,marginTop:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary[500]},switch:{margin:"1em",display:"flex",justifyContent:"center"}}})),lr=function(e){var r=e.theme;e.title,e.classes;var n=e.className,a=Me(e,sr),i=ur(e),s=Te(),u=f(),l=o((function(){return ve(r)}),[r]),d=new URLSearchParams(s.search),p=d.has("signup"),m=d.get("redirect"),h=c(),v=h.identity;return h.loading?null:null!=v&&v.id?t.createElement(Ne,{to:m||"/"}):t.createElement(ge,{theme:l},t.createElement("div",Ye({className:Ie(i.main,n)},a),t.createElement(de,{className:i.card},t.createElement("div",{className:i.avatar},t.createElement(Q,{className:i.icon},t.createElement(Ce,null))),p?t.createElement(cr,{redirectTo:m,delayBeforeRedirect:3e3}):t.createElement(W,{redirectTo:m}),t.createElement("div",{className:i.switch},p?t.createElement(Le,{to:"/login"},t.createElement(pe,{variant:"body2"},u("auth.action.login"))):t.createElement(Le,{to:"/login?signup=true"},t.createElement(pe,{variant:"body2"},u("auth.action.signup"))))),t.createElement(R,null)))};lr.propTypes={children:rr.node,classes:rr.object,className:rr.string,theme:rr.object};var dr=M((function(e){return{root:{color:e.palette.text.secondary},active:{color:e.palette.text.primary},icon:{minWidth:e.spacing(5)}}})),pr=i((function(e,r){var n=dr(),a=D(),o=f();return t.createElement(re,{onClick:function(){return a()},ref:r,className:n.root,activeClassName:n.active},t.createElement(ne,{className:n.icon},t.createElement(ze,null)),o("auth.action.logout"))})),fr=["name","create"],mr=function(e){var r=e.name,n=e.create,a=Me(e,fr),o=G(r),i=s(o).permissions;return t.createElement(F,Ye({},a,{name:r,create:i&&i.some((function(e){return mt.includes(e["acl:mode"])}))?n:void 0}))},hr=["logout","profileResource"],vr=i((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return t.createElement(B,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i),"/show"),primaryText:o,leftIcon:t.createElement(We,null),onClick:n})})),gr=i((function(e,r){var n=e.onClick,a=e.profileResource,o=e.label,i=e.webId;return t.createElement(B,{ref:r,to:"/".concat(a,"/").concat(encodeURIComponent(i)),primaryText:o,leftIcon:t.createElement(_e,null),onClick:n})})),yr=i((function(e,r){var n=e.onClick,a=e.label;return t.createElement(B,{ref:r,to:"/login",primaryText:a,onClick:n})})),br=i((function(e,r){var n=e.onClick,a=e.label;return t.createElement(B,{ref:r,to:"/login?signup=true",primaryText:a,onClick:n})})),wr=function(e){var r,n,a=e.logout,o=e.profileResource,i=Me(e,hr),s=c().identity,u=f();return t.createElement(V,i,s&&""!==s.id?[t.createElement(vr,{webId:(null==s||null===(r=s.profileData)||void 0===r?void 0:r.id)||s.id,label:u("auth.action.view_my_profile"),profileResource:o,key:"view"}),t.createElement(gr,{webId:(null==s||null===(n=s.profileData)||void 0===n?void 0:n.id)||s.id,label:u("auth.action.edit_my_profile"),profileResource:o,key:"edit"}),t.cloneElement(a,{key:"logout"})]:[t.createElement(br,{label:u("auth.action.signup"),key:"signup"}),t.createElement(yr,{label:u("auth.action.login"),key:"login"})])};wr.defaultProps={profileResource:"Person"};var _r=function(){var e=c(),t=e.identity,n=e.loading,a=u(),o=l(),i=Te();return r((function(){n||null!=t&&t.id||(a("ra.auth.auth_check_error","error"),o("/login?redirect="+encodeURIComponent(i.pathname+i.search)))}),[n,t,o,a,i]),{identity:t,loading:n}};var Er=function(){this.__data__=[],this.size=0};var xr=function(e,t){return e===t||e!=e&&t!=t};var jr=function(e,t){for(var r=e.length;r--;)if(xr(e[r][0],t))return r;return-1},kr=Array.prototype.splice;var Or=function(e){var t=this.__data__,r=jr(t,e);return!(r<0)&&(r==t.length-1?t.pop():kr.call(t,r,1),--this.size,!0)};var Pr=function(e){var t=this.__data__,r=jr(t,e);return r<0?void 0:t[r][1]};var Sr=function(e){return jr(this.__data__,e)>-1};var Cr=function(e,t){var r=this.__data__,n=jr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Ar(e){var t=-1,r=null==e?0:e.length;for(this.clear();++tc))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var d=-1,p=!0,f=2&r?new Dn:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},ha={};ha["[object Float32Array]"]=ha["[object Float64Array]"]=ha["[object Int8Array]"]=ha["[object Int16Array]"]=ha["[object Int32Array]"]=ha["[object Uint8Array]"]=ha["[object Uint8ClampedArray]"]=ha["[object Uint16Array]"]=ha["[object Uint32Array]"]=!0,ha["[object Arguments]"]=ha["[object Array]"]=ha["[object ArrayBuffer]"]=ha["[object Boolean]"]=ha["[object DataView]"]=ha["[object Date]"]=ha["[object Error]"]=ha["[object Function]"]=ha["[object Map]"]=ha["[object Number]"]=ha["[object Object]"]=ha["[object RegExp]"]=ha["[object Set]"]=ha["[object String]"]=ha["[object WeakMap]"]=!1;var va=function(e){return aa(e)&&ma(e.length)&&!!ha[Hr(e)]};var ga=function(e){return function(t){return e(t)}},ya=nt((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,a=n&&n.exports===r&&Ur.process,o=function(){try{var e=n&&n.require&&n.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=o})),ba=ya&&ya.isTypedArray,wa=ba?ga(ba):va,_a=Object.prototype.hasOwnProperty;var Ea=function(e,t){var r=Kn(e),n=!r&&ua(e),a=!r&&!n&&da(e),o=!r&&!n&&!a&&wa(e),i=r||n||a||o,c=i?na(e.length,String):[],s=c.length;for(var u in e)!t&&!_a.call(e,u)||i&&("length"==u||a&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||fa(u,s))||c.push(u);return c},xa=Object.prototype;var ja=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||xa)};var ka=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),Oa=Object.prototype.hasOwnProperty;var Pa=function(e){if(!ja(e))return ka(e);var t=[];for(var r in Object(e))Oa.call(e,r)&&"constructor"!=r&&t.push(r);return t};var Sa=function(e){return null!=e&&ma(e.length)&&!Qr(e)};var Ca=function(e){return Sa(e)?Ea(e):Pa(e)};var Aa=function(e){return Qn(e,Ca,ra)},Ia=Object.prototype.hasOwnProperty;var Ta=function(e,t,r,n,a,o){var i=1&r,c=Aa(e),s=c.length;if(s!=Aa(t).length&&!i)return!1;for(var u=s;u--;){var l=c[u];if(!(i?l in t:Ia.call(t,l)))return!1}var d=o.get(e),p=o.get(t);if(d&&p)return d==t&&p==e;var f=!0;o.set(e,t),o.set(t,e);for(var m=i;++u0&&void 0!==arguments[0]?arguments[0]:Ja,t=JSON.stringify(e),n=z({permissions:Ka[t]}),o=$e(n,2),i=o[0],c=o[1],s=q(),u=a((function(){return s(e).then((function(e){Ha(e,i.permissions)||(Ka[t]=e,c({permissions:e}))})).catch((function(e){c({error:e})}))}),[t,e,s]);return r((function(){u()}),[t]),Fe(Fe({},i),{},{refetch:u})},Xa={auth:{dialog:{container_permissions:"Container permissions",resource_permissions:"Resource permissions",login_required:"Login required"},action:{permissions:"Permissions",signup:"Signup",logout:"Logout",login:"Login",view_my_profile:"View my profile",edit_my_profile:"Edit my profile"},right:{resource:{read:"Read",append:"Append",write:"Write",control:"Control"},container:{read:"List",append:"Add",write:"Add",control:"Control"}},agent:{anonymous:"All users",authenticated:"Connected users"},input:{agent_select:"Add an user...",name:"Surname",username:"User ID",email:"Email address",username_or_email:"User ID or email address"},message:{resource_show_forbidden:"You are not allowed to view this resource",resource_edit_forbidden:"You are not allowed to edit this resource",resource_delete_forbidden:"You are not allowed to delete this resource",resource_control_forbidden:"You are not allowed to control this resource",container_create_forbidden:"You are not allowed to create new resource",container_list_forbidden:"You are not allowed to list these resources",user_not_allowed_to_login:"You are not allowed to login with this account",user_email_not_found:"No account found with this email address",user_email_exist:"An account already exist with this email address",username_exist:"An account already exist with this user ID",username_invalid:"This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized",new_user_created:"Your account has been successfully created",user_connected:"You are now connected",user_disconnected:"You are now disconnected",bad_request:"Bad request (Error message returned by the server: %{error})",account_settings_updated:"Your account settings have been successfully updated",login_to_continue:"Please login to continue",choose_pod_provider:"Please choose a POD provider in the list below. All application data will be saved on your POD."}}},Za={auth:{dialog:{container_permissions:"Permissions sur le container",resource_permissions:"Permissions sur la resource",login_required:"Connexion requise"},action:{permissions:"Permissions",signup:"S'inscrire",logout:"Se déconnecter",login:"Se connecter",view_my_profile:"Voir mon profil",edit_my_profile:"Éditer mon profil"},right:{resource:{read:"Lire",append:"Enrichir",write:"Modifier",control:"Administrer"},container:{read:"Lister",append:"Ajouter",write:"Ajouter",control:"Administrer"}},agent:{anonymous:"Tous les utilisateurs",authenticated:"Utilisateurs connectés"},input:{agent_select:"Ajouter un utilisateur...",name:"Prénom",username:"Identifiant unique",email:"Adresse e-mail",username_or_email:"Identifiant ou adresse e-mail"},message:{resource_show_forbidden:"Vous n'avez pas la permission de voir cette ressource",resource_edit_forbidden:"Vous n'avez pas la permission d'éditer cette ressource",resource_delete_forbidden:"Vous n'avez pas la permission d'effacer cette ressource",resource_control_forbidden:"Vous n'avez pas la permission d'administrer cette ressource",container_create_forbidden:"Vous n'avez pas la permission de créer des ressources",container_list_forbidden:"Vous n'avez pas la permission de voir ces ressources",user_not_allowed_to_login:"Vous n'avez pas le droit de vous connecter avec ce compte",user_email_not_found:"Aucun compte trouvé avec cette adresse mail",user_email_exist:"Un compte existe déjà avec cette adresse mail",username_exist:"Un compte existe déjà avec cet identifiant",username_invalid:"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés",new_user_created:"Votre compte a été créé avec succès",user_connected:"Vous êtes maintenant connecté",user_disconnected:"Vous êtes maintenant déconnecté",bad_request:"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})",account_settings_updated:"Les paramètres de votre compte ont été mis à jour avec succès",login_to_continue:"Veuillez vous connecter pour continuer",choose_pod_provider:"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD."}}};export{Mt as AuthDialog,xt as CreateWithPermissions,Ut as DeleteButtonWithPermissions,Rt as EditActionsWithPermissions,Wt as EditToolbarWithPermissions,Dt as EditWithPermissions,Vt as ListActionsWithPermissions,Bt as ListWithPermissions,lr as LocalLoginPage,Jt as LoginPage,pr as LogoutButton,Lt as PermissionsButton,Xt as PodLoginPage,mr as ResourceWithPermissions,qt as ShowActionsWithPermissions,Gt as ShowWithPermissions,Jt as SsoLoginPage,wr as UserMenu,pt as authProvider,Xa as englishMessages,Za as frenchMessages,It as useAgents,_r as useCheckAuthenticated,Et as useCheckPermissions,Qa as usePermissionsWithRefetch,nr as useSignup}; //# sourceMappingURL=index.es.js.map diff --git a/src/frontend/packages/auth-provider/dist/index.es.js.map b/src/frontend/packages/auth-provider/dist/index.es.js.map index 02a0679b9..83df8c35d 100644 --- a/src/frontend/packages/auth-provider/dist/index.es.js.map +++ b/src/frontend/packages/auth-provider/dist/index.es.js.map @@ -1 +1 @@ -{"version":3,"file":"index.es.js","sources":["../../../node_modules/jwt-decode/build/jwt-decode.esm.js","../../../node_modules/url-join/lib/url-join.js","../src/utils.js","../src/authProvider.js","../src/constants.js","../src/hooks/useCheckPermissions.js","../src/crud/create/CreateWithPermissions.js","../src/components/PermissionsButton/AddPermissionsForm.js","../src/components/PermissionsButton/AgentIcon.js","../src/components/PermissionsButton/AgentItem.js","../src/components/PermissionsButton/EditPermissionsForm.js","../src/hooks/useAgents.js","../src/components/PermissionsButton/PermissionsDialog.js","../src/components/PermissionsButton/PermissionsButton.js","../src/crud/edit/EditActionsWithPermissions.js","../src/crud/edit/DeleteButtonWithPermissions.js","../src/crud/edit/EditToolbarWithPermissions.js","../src/crud/edit/EditWithPermissions.js","../src/crud/list/ListActionsWithPermissions.js","../src/crud/list/ListWithPermissions.js","../src/crud/show/ShowActionsWithPermissions.js","../src/crud/show/ShowWithPermissions.js","../src/components/AuthDialog.js","../src/components/SsoLoginPage.js","../src/components/PodLoginPage/PodLoginPageView.js","../src/components/PodLoginPage/PodLoginPage.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/index.js","../src/hooks/useSignup.js","../src/components/SignupForm.js","../src/components/LocalLoginPage.js","../src/components/LogoutButton.js","../src/components/ResourceWithPermissions.js","../src/components/UserMenu.js","../src/hooks/useCheckAuthenticated.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/isEqual.js","../src/hooks/usePermissionsWithRefetch.js","../src/messages/english.js","../src/messages/french.js"],"sourcesContent":["function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","(function (name, context, definition) {\n if (typeof module !== 'undefined' && module.exports) module.exports = definition();\n else if (typeof define === 'function' && define.amd) define(definition);\n else context[name] = definition();\n})('urljoin', this, function () {\n\n function normalize (strArray) {\n var resultArray = [];\n if (strArray.length === 0) { return ''; }\n\n if (typeof strArray[0] !== 'string') {\n throw new TypeError('Url must be a string. Received ' + strArray[0]);\n }\n\n // If the first part is a plain protocol, we combine it with the next part.\n if (strArray[0].match(/^[^/:]+:\\/*$/) && strArray.length > 1) {\n var first = strArray.shift();\n strArray[0] = first + strArray[0];\n }\n\n // There must be two or three slashes in the file protocol, two slashes in anything else.\n if (strArray[0].match(/^file:\\/\\/\\//)) {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1:///');\n } else {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1://');\n }\n\n for (var i = 0; i < strArray.length; i++) {\n var component = strArray[i];\n\n if (typeof component !== 'string') {\n throw new TypeError('Url must be a string. Received ' + component);\n }\n\n if (component === '') { continue; }\n\n if (i > 0) {\n // Removing the starting slashes for each component but the first.\n component = component.replace(/^[\\/]+/, '');\n }\n if (i < strArray.length - 1) {\n // Removing the ending slashes for each component but the last.\n component = component.replace(/[\\/]+$/, '');\n } else {\n // For the last component we will combine multiple slashes to a single one.\n component = component.replace(/[\\/]+$/, '/');\n }\n\n resultArray.push(component);\n\n }\n\n var str = resultArray.join('/');\n // Each input component is now separated by a single slash except the possible first plain protocol part.\n\n // remove trailing slash before parameters or hash\n str = str.replace(/\\/(\\?|&|#[^!])/g, '$1');\n\n // replace ? in parameters with &\n var parts = str.split('?');\n str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');\n\n return str;\n }\n\n return function () {\n var input;\n\n if (typeof arguments[0] === 'object') {\n input = arguments[0];\n } else {\n input = [].slice.call(arguments);\n }\n\n return normalize(input);\n };\n\n});\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? (new URL(authServer.baseUrl)).origin : authServer.baseUrl;\n};\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst authProvider = ({\n dataProvider,\n allowAnonymous = true,\n localAccounts = false,\n checkUser,\n checkPermissions = false\n}) => ({\n login: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, password } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({ username: username.trim(), password: password.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else {\n let redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n if (params.redirect) redirectUrl += '&redirect=' + encodeURIComponent(params.redirect);\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, email, password, domain, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n logout: async () => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n // Delete token but also any other value in local storage\n localStorage.clear();\n if (localAccounts) {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n } else {\n const baseUrl = (new URL(window.location.href)).origin;\n if (!allowAnonymous) {\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login'));\n } else {\n // Redirect to login page after disconnecting from SSO\n // The login page will remove the token, display a notification and redirect to the homepage\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login?logout=true'));\n }\n }\n\n // Avoid displaying immediately the login page\n return '/';\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n } else {\n return true;\n }\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return true;\n\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n const { json } = await dataProvider.fetch(aclUri);\n\n return json['@graph'];\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n let authorization = {\n '@id': '#' + mode.replace('acl:', ''),\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n let { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName: profileData?.['vcard:given-name'] || profileData?.['pair:label'] || webIdData['foaf:name'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('app.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({ currentPassword, email: email.trim(), newPassword }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('app.notification.invalid_password');\n }\n\n throw new Error('app.notification.update_settings_error');\n }\n }\n});\n\nexport default authProvider;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React, { useEffect } from 'react';\nimport { usePermissionsOptimized, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, loading } = useGetIdentity();\n const { permissions } = usePermissionsOptimized(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!loading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], 'error');\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, loading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import React from 'react';\nimport { Create, CreateActions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const createContainerUri = useCreateContainer(props.resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, makeStyles, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport PersonIcon from '@material-ui/icons/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { ids, data } = useGetList(\n 'Person',\n { page: 1, perPage: 100 },\n { field: 'pair:label', order: 'ASC' },\n { q: inputValue },\n { enabled: inputValue.length > 0 }\n );\n\n useEffect(() => {\n setOptions(ids.length > 0 ? Object.values(data) : []);\n }, [ids, data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={option => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport PublicIcon from '@material-ui/icons/Public';\nimport VpnLockIcon from '@material-ui/icons/VpnLock';\nimport PersonIcon from '@material-ui/icons/Person';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error('Unknown agent predicate: ' + agent.predicate);\n }\n};\n\nexport default AgentIcon;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n makeStyles,\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@material-ui/core';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CheckIcon from '@material-ui/icons/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport { List, makeStyles } from '@material-ui/core';\nimport AgentItem from './AgentItem';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n }\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n const classes = useStyles();\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissionsOptimized, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissionsOptimized(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n let result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (let p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions, makeStyles } from '@material-ui/core';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useState } from 'react';\nimport { Button } from 'react-admin';\nimport ShareIcon from '@material-ui/icons/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ record, resource }) => {\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const isContainer = !!resource;\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { usePermissionsOptimized, ShowButton, ListButton, TopToolbar } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = ({ basePath, record, hasList, hasShow }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useRecordContext, usePermissionsOptimized } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n if (!!permissions && permissions.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n } else {\n return null;\n }\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { SaveButton, Toolbar } from 'react-admin';\nimport { makeStyles } from '@material-ui/core';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst useStyles = makeStyles(() => ({\n toolbar: {\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n }\n}));\n\nconst EditToolbarWithPermissions = props => {\n const classes = useStyles();\n return (\n \n \n }\n \n );\n};\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { Edit } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport { CreateButton, ExportButton, useResourceDefinition, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport { useMediaQuery } from '@material-ui/core';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n basePath,\n currentSort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n resource,\n selectedIds,\n showFilter,\n total,\n ...rest\n}) => {\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition(rest);\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissionsOptimized(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n basePath,\n filterValues,\n resource,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport { EditButton, ListButton, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = ({ basePath, record, hasList, hasEdit }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { Show } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@material-ui/core';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useLogin, useNotify, useDataProvider, useAuthProvider, Notification } from 'react-admin';\nimport { ThemeProvider } from '@material-ui/styles';\nimport { createTheme, makeStyles } from '@material-ui/core/styles';\nimport { Avatar, Button, Card, CardActions, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\n\nconst delay = t => new Promise(resolve => setTimeout(resolve, t));\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundColor: theme.palette.grey['300']\n },\n text: {\n maxWidth: 300,\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n }\n}));\n\nconst SsoLoginPage = ({ theme, history, location, buttons, userResource, propertiesExist, text }) => {\n const classes = useStyles();\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n (async () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', 'error');\n } else {\n notify('auth.message.bad_request', 'error', { error: searchParams.get('error') });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', 'info');\n history.push(searchParams.get('redirect'));\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', 'info');\n history.push('/' + userResource + '/' + encodeURIComponent(webId) + '/edit');\n } else {\n notify('auth.message.user_connected', 'info');\n history.push('/');\n }\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [location.search]);\n\n return (\n \n
\n \n
\n \n \n \n
\n {text && (\n \n {text}\n \n )}\n {buttons &&\n buttons.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n \n
\n );\n};\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useState } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNotify, useAuthProvider, useDataProvider, useLocale, useTranslate } from 'react-admin';\nimport { Box, List, ListItem, ListItemText, ListItemAvatar, Avatar, makeStyles, Divider } from '@material-ui/core';\nimport { Card, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport StorageIcon from '@material-ui/icons/Storage';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.primary.main\n }\n },\n text: {\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n maxWidth: 350,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em',\n },\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n },\n list: {\n paddingTop: 0,\n paddingBottom: 0\n },\n listItem: {\n paddingTop: 5,\n paddingBottom: 5\n }\n}));\n\nconst PodLoginPageView = ({ history, location, text, customPodProviders }) => {\n const classes = useStyles();\n const notify = useNotify();\n const locale = useLocale();\n const translate = useTranslate();\n const authProvider = useAuthProvider();\n const dataProvider = useDataProvider();\n const [podProviders, setPodProviders] = useState(customPodProviders || []);\n const searchParams = new URLSearchParams(location.search);\n\n useEffect(() => {\n (async () => {\n if (podProviders.length === 0) {\n const results = await fetch('https://data.activitypods.org/pod-providers', {\n headers: {\n Accept: 'application/ld+json'\n }\n });\n if (results.ok) {\n const json = await results.json();\n // Filter POD providers by available locales\n const podProviders = json['ldp:contains'].filter(provider =>\n Array.isArray(provider['apods:locales'])\n ? provider['apods:locales'].includes(locale)\n : provider['apods:locales'] === locale\n );\n setPodProviders(podProviders);\n } else {\n notify('auth.message.pod_providers_not_loaded', 'error');\n }\n }\n })();\n }, [podProviders, setPodProviders, notify, locale]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n const response = await fetch(webId, {\n headers: {\n Accept: 'application/json'\n }\n });\n if (!response.ok) {\n notify('auth.message.unable_to_fetch_user_data', 'error');\n } else {\n const data = await response.json();\n if (!authProvider.checkUser(data)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n notify('auth.message.user_connected', 'info');\n // Reload to ensure the dataServers config is reset\n window.location.reload();\n window.location.href = '/?addUser=true';\n }\n }\n } else if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [searchParams, dataProvider]);\n\n if (searchParams.has('token') || searchParams.has('addUser') || searchParams.has('logout') ) {\n return null;\n }\n\n return (\n \n \n
\n \n \n \n
\n \n \n {text || translate('auth.message.choose_pod_provider')}\n \n \n \n \n {podProviders.map((podProvider, i) => {\n const url = new URL('/auth', (podProvider['apods:domainName'].includes(':') ? 'http://' : 'https://') + podProvider['apods:domainName']);\n if (searchParams.has('signup')) url.searchParams.set('signup', 'true');\n url.searchParams.set('redirect', window.location.href);\n return (\n \n \n (window.location.href = url.toString())}\n className={classes.listItem}\n >\n \n \n \n \n \n \n \n \n );\n })}\n \n \n
\n
\n );\n};\n\nexport default PodLoginPageView;\n","import React, { useMemo } from 'react';\nimport { Notification } from 'react-admin';\nimport { createTheme, ThemeProvider } from '@material-ui/core';\nimport PodLoginPageView from \"./PodLoginPageView\";\n\nconst PodLoginPage = (props) => {\n const muiTheme = useMemo(() => createTheme(props.theme), [props.theme]);\n return (\n \n \n \n \n );\n};\n\nexport default PodLoginPage;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, Form } from 'react-final-form';\nimport { useTranslate, useNotify, useSafeSetState } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardActions, CircularProgress, TextField, makeStyles } from '@material-ui/core';\nimport { default as useSignup } from '../hooks/useSignup';\n\nconst useStyles = makeStyles(theme => ({\n form: {\n padding: '0 1em 1em 1em'\n },\n input: {\n marginTop: '1em'\n },\n button: {\n width: '100%'\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n}));\n\nconst Input = ({ meta: { touched, error }, input: inputProps, ...props }) => (\n \n);\n\nconst SignupForm = ({ redirectTo, delayBeforeRedirect }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n\n const validate = values => {\n const errors = { email: undefined, password: undefined };\n\n if (!values.email) {\n errors.email = translate('ra.validation.required');\n }\n if (!values.password) {\n errors.password = translate('ra.validation.required');\n }\n return errors;\n };\n\n const submit = values => {\n setLoading(true);\n signup(values)\n .then(webId => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', 'info');\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n 'warning',\n {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n (\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n )}\n />\n );\n};\n\nSignupForm.propTypes = {\n redirectTo: PropTypes.string\n};\n\nexport default SignupForm;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { LoginForm, Notification, useGetIdentity, useTranslate } from 'react-admin';\nimport { Card, Avatar, makeStyles, createTheme, ThemeProvider, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport { Link, useLocation, Redirect } from 'react-router-dom';\nimport SignupForm from './SignupForm';\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n avatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n icon: {\n backgroundColor: theme.palette.secondary[500]\n },\n switch: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nconst LocalLoginPage = props => {\n const { theme, title, classes: classesOverride, className, ...rest } = props;\n const classes = useStyles(props);\n const location = useLocation();\n const translate = useTranslate();\n const muiTheme = useMemo(() => createTheme(theme), [theme]);\n const searchParams = new URLSearchParams(location.search);\n const isSignup = searchParams.has('signup');\n const redirectTo = searchParams.get('redirect');\n const { identity, loading } = useGetIdentity();\n\n if (loading) {\n return null;\n } else if (identity?.id) {\n // Do not show login page if user is already connected\n return ;\n } else {\n return (\n \n
\n \n
\n \n \n \n
\n {isSignup ? (\n \n ) : (\n \n )}\n
\n {isSignup ? (\n \n {translate('auth.action.login')}\n \n ) : (\n \n {translate('auth.action.signup')}\n \n )}\n
\n
\n \n
\n
\n );\n }\n};\n\nLocalLoginPage.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n theme: PropTypes.object\n};\n\nexport default LocalLoginPage;\n","import React, { forwardRef } from 'react';\nimport { useLogout, useTranslate } from 'react-admin';\nimport { MenuItem, makeStyles, ListItemIcon } from '@material-ui/core';\nimport ExitIcon from '@material-ui/icons/PowerSettingsNew';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.secondary\n },\n active: {\n color: theme.palette.text.primary\n },\n icon: { minWidth: theme.spacing(5) }\n}));\n\nconst LogoutButton = forwardRef((props, ref) => {\n const classes = useStyles();\n const logout = useLogout();\n const translate = useTranslate();\n return (\n logout()} ref={ref} className={classes.root} activeClassName={classes.active}>\n \n \n \n {translate('auth.action.logout')}\n \n );\n});\n\nexport default LogoutButton;\n","import React from 'react';\nimport { Resource, usePermissionsOptimized } from 'react-admin';\nimport { rightsToCreate } from '../constants';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissionsOptimized(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef } from 'react';\nimport { UserMenu as RaUserMenu, MenuItemLink, useGetIdentity, useTranslate } from 'react-admin';\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport EditIcon from '@material-ui/icons/Edit';\n\nconst ViewProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst EditProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst LoginMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst SignupMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n const translate = useTranslate();\n return (\n \n {identity && identity.id !== ''\n ? [\n ,\n ,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = () => {\n const { identity, loading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!loading && !identity?.id) {\n notify('ra.auth.auth_check_error', 'error');\n redirect('/login?redirect=' + encodeURIComponent(location.pathname + location.search));\n }\n }, [loading, identity, redirect, notify, location]);\n\n return { identity, loading };\n};\n\nexport default useCheckAuthenticated;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider: 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la resource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider: \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":["InvalidCharacterError","message","this","prototype","Error","name","r","window","atob","bind","input","str","String","replace","length","bs","buffer","bc","idx","output","charAt","fromCharCode","indexOf","context","definition","normalize","strArray","resultArray","TypeError","match","first","shift","i","component","push","join","parts","split","arguments","slice","call","module","exports","defaultToArray","value","Array","isArray","undefined","getAclUri","resourceUri","parsedUrl","URL","urlJoin","origin","pathname","getAclContext","baseUri","@base","acl","foaf","acl:agent","@type","acl:agentGroup","acl:agentClass","acl:mode","acl:accessTo","getAuthServerUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","dataProvider","dataServers","authServer","wrap","_context","prev","next","getDataServers","sent","Object","values","find","server","abrupt","pod","baseUrl","stop","_callee","_x","apply","authProvider","_updateAccountSettings","_getAccountSettings","_setNewPassword","_resetPassword","_getIdentity","_removePermission","_addPermission","_getPermissions","_checkAuth","_logout","_signup","_login","_ref$allowAnonymous","allowAnonymous","_ref$localAccounts","localAccounts","checkUser","_ref$checkPermissions","checkPermissions","login","params","authServerUrl","username","password","_yield$dataProvider$f","json","token","redirectUrl","fetch","method","body","JSON","stringify","trim","headers","Headers","Content-Type","localStorage","setItem","location","reload","t0","href","redirect","encodeURIComponent","signup","email","profileData","_yield$dataProvider$f2","_jwtDecode","webId","_context2","domain","_objectWithoutProperties","_excluded","_objectSpread","jwtDecode","_callee2","_x2","logout","_callee3","_context3","clear","checkAuth","_callee4","_context4","getItem","userData","checkError","error","Promise","resolve","getPermissions","uri","aclUri","_yield$dataProvider$f3","_context5","startsWith","_callee5","_x3","addPermission","agentId","predicate","mode","_authorization","authorization","_context6","@id","_defineProperty","@context","@graph","_callee6","_x4","_x5","_x6","_x7","removePermission","_yield$dataProvider$f4","updatedPermissions","_context7","filter","includes","map","modes","agents","agent","_callee7","_x8","_x9","_x10","_x11","getIdentity","_callee8","_jwtDecode2","_yield$dataProvider$f5","webIdData","_ref2","_context8","url","id","fullName","resetPassword","_context9","_callee9","_x12","setNewPassword","_context10","_callee10","_x13","getAccountSettings","_yield$dataProvider$f6","_context11","_callee11","_x14","updateAccountSettings","currentPassword","newPassword","_context12","_callee12","_x15","CLASS_AGENT","rightsToCreate","rightsToEdit","rightsToDelete","rightsToControl","rights","show","list","create","edit","delete","control","forbiddenErrors","resourceRightsLabels","_resourceRightsLabels","containerRightsLabels","ACL_READ","_containerRightsLabel","useCheckPermissions","_useGetIdentity","useGetIdentity","identity","loading","usePermissionsOptimized","permissions","notify","useNotify","useRedirect","useEffect","some","p","CreateWithPermissions","props","createContainerUri","useCreateContainer","resource","React","createElement","Create","defaultProps","actions","CreateActions","useStyles","makeStyles","padding","width","option","AddPermissionsForm","classes","translate","useTranslate","_useState2","_slicedToArray","useState","setValue","_useState4","inputValue","setInputValue","_useState6","options","setOptions","useGetList","page","perPage","field","order","q","enabled","ids","data","Autocomplete","getOptionLabel","filterOptions","x","keys","noOptionsText","autoComplete","blurOnSelect","clearOnBlur","disableClearable","onChange","event","record","onInputChange","newInputValue","renderInput","TextField","_extends","label","variant","margin","fullWidth","renderOption","List","dense","className","ListItem","button","ListItemAvatar","Avatar","src","image","PersonIcon","ListItemText","primary","AgentIcon","PublicIcon","VpnLockIcon","GroupIcon","listItem","paddingLeft","paddingRight","primaryText","whiteSpace","overflow","textOverflow","secondaryText","textAlign","fontStyle","color","AgentItem","isContainer","useDataProvider","_React$useState2","anchorEl","setAnchorEl","user","setUser","setLoading","setError","getOne","then","closeMenu","labels","Loading","ListItemSecondaryAction","IconButton","onClick","currentTarget","EditIcon","Menu","keepMounted","open","Boolean","onClose","entries","_ref3","_ref4","rightKey","rightLabel","hasPermission","MenuItem","key","ListItemIcon","CheckIcon","theme","maxWidth","backgroundColor","palette","background","paper","EditPermissionsForm","useAgents","useAuthProvider","setAgents","_result","result","ANONYMOUS_AGENT","appendPermission","_step","_iterator","_createForOfIteratorHelper","_loop","forEach","userUri","groupUri","s","n","done","err","e","f","useCallback","_agents$agentId","prevAgents","fromEntries","m","title","paddingBottom","addForm","paddingTop","listForm","maxHeight","PermissionsDialog","Dialog","DialogTitle","DialogContent","DialogActions","Button","PermissionsButton","showDialog","setShowDialog","createContainer","Fragment","ShareIcon","EditActionsWithPermissions","basePath","hasList","hasShow","TopToolbar","ListButton","ShowButton","DeleteButtonWithPermissions","useRecordContext","DeleteButton","toolbar","flex","display","justifyContent","EditToolbarWithPermissions","Toolbar","SaveButton","undoable","EditWithPermissions","Edit","cloneElement","children","ListActionsWithPermissions","bulkActions","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","selectedIds","showFilter","total","rest","xs","useMediaQuery","breakpoints","down","resourceDefinition","useResourceDefinition","hasCreate","CreateButton","ExportButton","disabled","sort","ListWithPermissions","ShowActionsWithPermissions","hasEdit","EditButton","ShowWithPermissions","Show","AuthDialog","useLogin","DialogContentText","search","delay","t","setTimeout","main","flexDirection","minHeight","alignItems","grey","text","card","minWidth","marginTop","lockIconAvatar","lockIcon","SsoLoginPage","history","buttons","userResource","propertiesExist","searchParams","URLSearchParams","has","get","delegateYield","_yield$dataProvider$g","allPropertiesExist","_yield$dataProvider$g2","every","console","log","ThemeProvider","createTheme","Card","LockIcon","Typography","CardActions","type","Notification","startIcon","@global","PodLoginPageView","customPodProviders","locale","useLocale","podProviders","setPodProviders","results","_podProviders","Accept","ok","provider","response","Box","pl","pr","podProvider","set","Divider","toString","StorageIcon","secondary","PodLoginPage","muiTheme","useMemo","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require","useSignup","form","icon","marginRight","spacing","Input","_ref$meta","meta","touched","inputProps","helperText","SignupForm","redirectTo","delayBeforeRedirect","_useSafeSetState2","useSafeSetState","useLocation","Form","onSubmit","_","validate","errors","initialValues","render","handleSubmit","noValidate","Field","CircularProgress","size","thickness","propTypes","height","backgroundRepeat","backgroundSize","backgroundImage","avatar","switch","LocalLoginPage","isSignup","Redirect","to","classnames","LoginForm","Link","root","active","LogoutButton","forwardRef","ref","useLogout","activeClassName","ExitIcon","ResourceWithPermission","Resource","ViewProfileMenu","profileResource","MenuItemLink","concat","leftIcon","AccountCircleIcon","EditProfileMenu","LoginMenu","SignupMenu","UserMenu","_ref5","_identity$profileData","_identity$profileData2","otherProps","RaUserMenu","useCheckAuthenticated","__data__","other","eq","splice","index","assocIndexOf","pop","ListCache","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","global","freeSelf","self","freeGlobal","Function","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","toStringTag","isOwn","tag","unmasked","getRawTag","objectToString","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","IE_PROTO","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","isMasked","isFunction","test","toSource","getValue","baseIsNative","getNative","nativeCreate","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","hash","Map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","pairs","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","SetCache","add","setCacheAdd","setCacheHas","cache","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","arraySome","othIndex","cacheHas","Uint8Array","symbolProto","symbolValueOf","valueOf","byteLength","byteOffset","convert","mapToArray","setToArray","stacked","equalArrays","offset","keysFunc","symbolsFunc","arrayPush","resIndex","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","arrayFilter","stubArray","iteratee","isObjectLike","baseIsArguments","freeExports","nodeType","freeModule","Buffer","isBuffer","stubFalse","reIsUint","typedArrayTags","isLength","freeProcess","process","nodeUtil","types","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","isIndex","Ctor","constructor","transform","arg","overArg","isPrototype","nativeKeys","isArrayLike","arrayLikeKeys","baseKeys","baseGetAllKeys","getSymbols","objProps","getAllKeys","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","dataViewCtorString","DataView","mapCtorString","promiseCtorString","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","ctorString","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqual","baseIsEqualDeep","emptyParams","alreadyFetchedPermissions","{}","usePermissionsWithRefetch","_useSafeSetState","state","setState","useGetPermissions","fetchPermissions","isEqual","refetch","englishMessages","auth","dialog","container_permissions","resource_permissions","login_required","action","view_my_profile","edit_my_profile","right","read","append","write","container","anonymous","authenticated","agent_select","username_or_email","resource_show_forbidden","resource_edit_forbidden","resource_delete_forbidden","resource_control_forbidden","container_create_forbidden","container_list_forbidden","user_not_allowed_to_login","user_email_not_found","user_email_exist","username_exist","username_invalid","new_user_created","user_connected","user_disconnected","bad_request","account_settings_updated","login_to_continue","choose_pod_provider","frenchMessages"],"mappings":";;0mRAOA,SAASA,GAAsBC,GAC3BC,KAAKD,QAAUA,EAGnBD,GAAsBG,UAAY,IAAIC,MACtCJ,GAAsBG,UAAUE,KAAO,wBA6BvC,IAAAC,GAAkC,oBAAXC,QACnBA,OAAOC,MACPD,OAAOC,KAAKC,KAAKF,SA7BrB,SAAkBG,GACd,IAAIC,EAAMC,OAAOF,GAAOG,QAAQ,MAAO,IACvC,GAAIF,EAAIG,OAAS,GAAK,EAClB,MAAM,IAAId,GACN,qEAGR,IAEI,IAAYe,EAAIC,EAAZC,EAAK,EAAeC,EAAM,EAAGC,EAAS,GAEzCH,EAASL,EAAIS,OAAOF,MAEpBF,IACCD,EAAKE,EAAK,EAAS,GAALF,EAAUC,EAASA,EAG/BC,IAAO,GACVE,GAAUP,OAAOS,aAAa,IAAON,KAAS,EAAIE,EAAM,IACzD,EAGAD,EA/BI,oEA+BWM,QAAQN,GAE3B,OAAOG,45BCtCX,IAAiBI,EAASC,EAATD,EAIHrB,GAJYsB,EAIN,WAElB,SAASC,EAAWC,GAClB,IAAIC,EAAc,GAClB,GAAwB,IAApBD,EAASZ,OAAgB,MAAO,GAEpC,GAA2B,iBAAhBY,EAAS,GAClB,MAAM,IAAIE,UAAU,kCAAoCF,EAAS,IAInE,GAAIA,EAAS,GAAGG,MAAM,iBAAmBH,EAASZ,OAAS,EAAG,CAC5D,IAAIgB,EAAQJ,EAASK,QACrBL,EAAS,GAAKI,EAAQJ,EAAS,GAI7BA,EAAS,GAAGG,MAAM,gBACpBH,EAAS,GAAKA,EAAS,GAAGb,QAAQ,gBAAiB,UAEnDa,EAAS,GAAKA,EAAS,GAAGb,QAAQ,gBA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,UACN6G,SAAU,UACVwB,MAAO,gBACPsuB,kBAAmB,4BAErB/2B,QAAS,CACPg3B,wBAAyB,4CACzBC,wBAAyB,4CACzBC,0BAA2B,8CAC3BC,2BAA4B,+CAC5BC,2BAA4B,6CAC5BC,yBAA0B,8CAC1BC,0BAA2B,iDAC3BC,qBAAsB,2CACtBC,iBAAkB,mDAClBC,eAAgB,6CAChBC,iBAAkB,gGAClBC,iBAAkB,6CAClBC,eAAgB,wBAChBC,kBAAmB,2BACnBC,YAAa,+DACbC,yBAA0B,uDAC1BC,kBAAmB,2BACnBC,oBAAqB,qGC1DrBC,GAAiB,CACrBnC,KAAM,CACJC,OAAQ,CACNC,sBAAuB,+BACvBC,qBAAsB,8BACtBC,eAAgB,qBAElBC,OAAQ,CACNrmB,YAAa,cACbvH,OAAQ,aACRc,OAAQ,iBACRxC,MAAO,eACPuvB,gBAAiB,kBACjBC,gBAAiB,qBAEnBC,MAAO,CACL7lB,SAAU,CACR8lB,KAAM,OACNC,OAAQ,WACRC,MAAO,WACPxnB,QAAS,eAEXynB,UAAW,CACTH,KAAM,SACNC,OAAQ,UACRC,MAAO,UACPxnB,QAAS,gBAGb9C,MAAO,CACLwqB,UAAW,wBACXC,cAAe,0BAEjBp2B,MAAO,CACLq2B,aAAc,4BACd12B,KAAM,SACN6G,SAAU,qBACVwB,MAAO,iBACPsuB,kBAAmB,iCAErB/2B,QAAS,CACPg3B,wBAAyB,wDACzBC,wBAAyB,yDACzBC,0BAA2B,0DAC3BC,2BAA4B,8DAC5BC,2BAA4B,wDAC5BC,yBAA0B,uDAC1BC,0BAA2B,4DAC3BC,qBAAsB,8CACtBC,iBAAkB,gDAClBC,eAAgB,6CAChBC,iBACE,wHACFC,iBAAkB,sCAClBC,eAAgB,gCAChBC,kBAAmB,kCACnBC,YAAa,sEACbC,yBAA0B,gEAC1BC,kBAAmB,yCACnBC,oBAAqB"} \ No newline at end of file +{"version":3,"file":"index.es.js","sources":["../../../node_modules/jwt-decode/build/jwt-decode.esm.js","../../../node_modules/url-join/lib/url-join.js","../src/utils.js","../src/authProvider.js","../src/constants.js","../src/hooks/useCheckPermissions.js","../src/crud/create/CreateWithPermissions.js","../src/components/PermissionsButton/AddPermissionsForm.js","../src/components/PermissionsButton/AgentIcon.js","../src/components/PermissionsButton/AgentItem.js","../src/components/PermissionsButton/EditPermissionsForm.js","../src/hooks/useAgents.js","../src/components/PermissionsButton/PermissionsDialog.js","../src/components/PermissionsButton/PermissionsButton.js","../src/crud/edit/EditActionsWithPermissions.js","../src/crud/edit/DeleteButtonWithPermissions.js","../src/crud/edit/EditToolbarWithPermissions.js","../src/crud/edit/EditWithPermissions.js","../src/crud/list/ListActionsWithPermissions.js","../src/crud/list/ListWithPermissions.js","../src/crud/show/ShowActionsWithPermissions.js","../src/crud/show/ShowWithPermissions.js","../src/components/AuthDialog.js","../src/components/SsoLoginPage.js","../src/components/PodLoginPage/PodLoginPageView.js","../src/components/PodLoginPage/PodLoginPage.js","../../../node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/prop-types/index.js","../src/hooks/useSignup.js","../src/components/SignupForm.js","../src/components/LocalLoginPage.js","../src/components/LogoutButton.js","../src/components/ResourceWithPermissions.js","../src/components/UserMenu.js","../src/hooks/useCheckAuthenticated.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_stackClear.js","../../../node_modules/lodash/_stackDelete.js","../../../node_modules/lodash/_stackGet.js","../../../node_modules/lodash/_stackHas.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/_stackSet.js","../../../node_modules/lodash/_Stack.js","../../../node_modules/lodash/_setCacheAdd.js","../../../node_modules/lodash/_setCacheHas.js","../../../node_modules/lodash/_SetCache.js","../../../node_modules/lodash/_arraySome.js","../../../node_modules/lodash/_cacheHas.js","../../../node_modules/lodash/_equalArrays.js","../../../node_modules/lodash/_Uint8Array.js","../../../node_modules/lodash/_mapToArray.js","../../../node_modules/lodash/_setToArray.js","../../../node_modules/lodash/_equalByTag.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/_baseGetAllKeys.js","../../../node_modules/lodash/_arrayFilter.js","../../../node_modules/lodash/stubArray.js","../../../node_modules/lodash/_getSymbols.js","../../../node_modules/lodash/_baseTimes.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/keys.js","../../../node_modules/lodash/_getAllKeys.js","../../../node_modules/lodash/_equalObjects.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/_baseIsEqualDeep.js","../../../node_modules/lodash/_baseIsEqual.js","../../../node_modules/lodash/isEqual.js","../src/hooks/usePermissionsWithRefetch.js","../src/messages/english.js","../src/messages/french.js"],"sourcesContent":["function e(e){this.message=e}e.prototype=new Error,e.prototype.name=\"InvalidCharacterError\";var r=\"undefined\"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,\"\");if(t.length%4==1)throw new e(\"'atob' failed: The string to be decoded is not correctly encoded.\");for(var n,o,a=0,i=0,c=\"\";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\".indexOf(o);return c};function t(e){var t=e.replace(/-/g,\"+\").replace(/_/g,\"/\");switch(t.length%4){case 0:break;case 2:t+=\"==\";break;case 3:t+=\"=\";break;default:throw\"Illegal base64url string!\"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t=\"0\"+t),\"%\"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if(\"string\"!=typeof e)throw new n(\"Invalid token specified\");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(\".\")[o]))}catch(e){throw new n(\"Invalid token specified: \"+e.message)}}n.prototype=new Error,n.prototype.name=\"InvalidTokenError\";export default o;export{n as InvalidTokenError};\n//# sourceMappingURL=jwt-decode.esm.js.map\n","(function (name, context, definition) {\n if (typeof module !== 'undefined' && module.exports) module.exports = definition();\n else if (typeof define === 'function' && define.amd) define(definition);\n else context[name] = definition();\n})('urljoin', this, function () {\n\n function normalize (strArray) {\n var resultArray = [];\n if (strArray.length === 0) { return ''; }\n\n if (typeof strArray[0] !== 'string') {\n throw new TypeError('Url must be a string. Received ' + strArray[0]);\n }\n\n // If the first part is a plain protocol, we combine it with the next part.\n if (strArray[0].match(/^[^/:]+:\\/*$/) && strArray.length > 1) {\n var first = strArray.shift();\n strArray[0] = first + strArray[0];\n }\n\n // There must be two or three slashes in the file protocol, two slashes in anything else.\n if (strArray[0].match(/^file:\\/\\/\\//)) {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1:///');\n } else {\n strArray[0] = strArray[0].replace(/^([^/:]+):\\/*/, '$1://');\n }\n\n for (var i = 0; i < strArray.length; i++) {\n var component = strArray[i];\n\n if (typeof component !== 'string') {\n throw new TypeError('Url must be a string. Received ' + component);\n }\n\n if (component === '') { continue; }\n\n if (i > 0) {\n // Removing the starting slashes for each component but the first.\n component = component.replace(/^[\\/]+/, '');\n }\n if (i < strArray.length - 1) {\n // Removing the ending slashes for each component but the last.\n component = component.replace(/[\\/]+$/, '');\n } else {\n // For the last component we will combine multiple slashes to a single one.\n component = component.replace(/[\\/]+$/, '/');\n }\n\n resultArray.push(component);\n\n }\n\n var str = resultArray.join('/');\n // Each input component is now separated by a single slash except the possible first plain protocol part.\n\n // remove trailing slash before parameters or hash\n str = str.replace(/\\/(\\?|&|#[^!])/g, '$1');\n\n // replace ? in parameters with &\n var parts = str.split('?');\n str = parts.shift() + (parts.length > 0 ? '?': '') + parts.join('&');\n\n return str;\n }\n\n return function () {\n var input;\n\n if (typeof arguments[0] === 'object') {\n input = arguments[0];\n } else {\n input = [].slice.call(arguments);\n }\n\n return normalize(input);\n };\n\n});\n","import urlJoin from 'url-join';\n\nexport const defaultToArray = value => (!value ? undefined : Array.isArray(value) ? value : [value]);\n\n// Transform the URI to the one used to find the ACL\n// To be compatible with all servers, we should do a HEAD request to the resource URI\nexport const getAclUri = resourceUri => {\n const parsedUrl = new URL(resourceUri);\n return urlJoin(parsedUrl.origin, '_acl', parsedUrl.pathname);\n};\n\nexport const getAclContext = baseUri => ({\n '@base': baseUri,\n acl: 'http://www.w3.org/ns/auth/acl#',\n foaf: 'http://xmlns.com/foaf/0.1/',\n 'acl:agent': { '@type': '@id' },\n 'acl:agentGroup': { '@type': '@id' },\n 'acl:agentClass': { '@type': '@id' },\n 'acl:mode': { '@type': '@id' },\n 'acl:accessTo': { '@type': '@id' }\n});\n\nexport const getAuthServerUrl = async dataProvider => {\n const dataServers = await dataProvider.getDataServers();\n const authServer = Object.values(dataServers).find(server => server.authServer === true);\n if (!authServer) throw new Error('Could not find a server with authServer: true. Check your dataServers config.');\n // If the server is a POD, return the root URL instead of https://domain.com/user/data\n return authServer.pod ? (new URL(authServer.baseUrl)).origin : authServer.baseUrl;\n};\n","import jwtDecode from 'jwt-decode';\nimport urlJoin from 'url-join';\nimport { defaultToArray, getAclUri, getAclContext, getAuthServerUrl } from './utils';\n\nconst authProvider = ({\n dataProvider,\n allowAnonymous = true,\n localAccounts = false,\n checkUser,\n checkPermissions = false\n}) => ({\n login: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, password } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/login'), {\n method: 'POST',\n body: JSON.stringify({ username: username.trim(), password: password.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n } catch (e) {\n throw new Error('ra.auth.sign_in_error');\n }\n } else {\n let redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n if (params.redirect) redirectUrl += '&redirect=' + encodeURIComponent(params.redirect);\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n signup: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n if (localAccounts) {\n const { username, email, password, domain, ...profileData } = params;\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/signup'), {\n method: 'POST',\n body: JSON.stringify({\n username: username.trim(),\n email: email.trim(),\n password: password.trim(),\n ...profileData\n }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n const { token } = json;\n localStorage.setItem('token', token);\n const { webId } = jwtDecode(token);\n return webId;\n } catch (e) {\n if (e.message === 'email.already.exists') {\n throw new Error('auth.message.user_email_exist');\n } else if (e.message === 'username.already.exists') {\n throw new Error('auth.message.username_exist');\n } else if (e.message === 'username.invalid') {\n throw new Error('auth.message.username_invalid');\n } else {\n throw new Error(e.message || 'ra.auth.sign_in_error');\n }\n }\n } else {\n const redirectUrl = (new URL(window.location.href)).origin + '/login?login=true';\n window.location.href = urlJoin(authServerUrl, 'auth?redirectUrl=' + encodeURIComponent(redirectUrl));\n }\n },\n logout: async () => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n // Delete token but also any other value in local storage\n localStorage.clear();\n if (localAccounts) {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = '/';\n } else {\n const baseUrl = (new URL(window.location.href)).origin;\n if (!allowAnonymous) {\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login'));\n } else {\n // Redirect to login page after disconnecting from SSO\n // The login page will remove the token, display a notification and redirect to the homepage\n window.location.href = urlJoin(authServerUrl, 'auth/logout?redirectUrl=' + encodeURIComponent(baseUrl + '/login?logout=true'));\n }\n }\n\n // Avoid displaying immediately the login page\n return '/';\n },\n checkAuth: async () => {\n const token = localStorage.getItem('token');\n if (!token && !allowAnonymous) throw new Error();\n },\n checkUser: userData => {\n if (checkUser) {\n return checkUser(userData);\n } else {\n return true;\n }\n },\n checkError: error => Promise.resolve(),\n getPermissions: async uri => {\n if (!checkPermissions) return true;\n\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to getPermissions must be an URL');\n\n const aclUri = getAclUri(uri);\n\n try {\n const { json } = await dataProvider.fetch(aclUri);\n return json['@graph'];\n } catch(e) {\n console.warn(`Could not fetch ACL URI ${uri}`);\n return [];\n }\n },\n addPermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to addPermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n let authorization = {\n '@id': '#' + mode.replace('acl:', ''),\n '@type': 'acl:Authorization',\n [predicate]: agentId,\n 'acl:accessTo': uri,\n 'acl:mode': mode\n };\n\n await dataProvider.fetch(aclUri, {\n method: 'PATCH',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': [authorization]\n })\n });\n },\n removePermission: async (uri, agentId, predicate, mode) => {\n if (!uri || !uri.startsWith('http'))\n throw new Error('The first parameter passed to removePermission must be an URL');\n\n const aclUri = getAclUri(uri);\n\n // Fetch current permissions\n let { json } = await dataProvider.fetch(aclUri);\n\n const updatedPermissions = json['@graph']\n .filter(authorization => !authorization['@id'].includes('#Default'))\n .map(authorization => {\n const modes = defaultToArray(authorization['acl:mode']);\n let agents = defaultToArray(authorization[predicate]);\n if (mode && modes.includes(mode) && agents && agents.includes(agentId)) {\n agents = agents.filter(agent => agent !== agentId);\n }\n return { ...authorization, [predicate]: agents };\n });\n\n await dataProvider.fetch(aclUri, {\n method: 'PUT',\n body: JSON.stringify({\n '@context': getAclContext(aclUri),\n '@graph': updatedPermissions\n })\n });\n },\n getIdentity: async () => {\n const token = localStorage.getItem('token');\n if (token) {\n const { webId } = jwtDecode(token);\n\n const { json: webIdData } = await dataProvider.fetch(webId);\n const { json: profileData } = webIdData.url ? await dataProvider.fetch(webIdData.url) : {};\n\n return {\n id: webId,\n fullName: profileData?.['vcard:given-name'] || profileData?.['pair:label'] || webIdData['foaf:name'],\n profileData,\n webIdData\n };\n }\n },\n resetPassword: async params => {\n const { email } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/reset_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim() }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.reset_password_error');\n }\n },\n setNewPassword: async params => {\n const { email, token, password } = params;\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/new_password'), {\n method: 'POST',\n body: JSON.stringify({ email: email.trim(), token, password }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n throw new Error('app.notification.new_password_error');\n }\n },\n getAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { json } = await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'));\n return json;\n } catch (e) {\n throw new Error('app.notification.get_settings_error');\n }\n },\n updateAccountSettings: async params => {\n const authServerUrl = await getAuthServerUrl(dataProvider);\n try {\n const { email, currentPassword, newPassword } = params;\n\n await dataProvider.fetch(urlJoin(authServerUrl, 'auth/account'), {\n method: 'POST',\n body: JSON.stringify({ currentPassword, email: email.trim(), newPassword }),\n headers: new Headers({ 'Content-Type': 'application/json' })\n });\n } catch (e) {\n if (e.message === 'auth.account.invalid_password') {\n throw new Error('app.notification.invalid_password');\n }\n\n throw new Error('app.notification.update_settings_error');\n }\n }\n});\n\nexport default authProvider;\n","export const ACL_READ = 'acl:Read';\nexport const ACL_APPEND = 'acl:Append';\nexport const ACL_WRITE = 'acl:Write';\nexport const ACL_CONTROL = 'acl:Control';\n\nexport const USER_AGENT = 'acl:agent';\nexport const GROUP_AGENT = 'acl:agentGroup';\nexport const CLASS_AGENT = 'acl:agentClass';\n\nexport const ANONYMOUS_AGENT = 'foaf:Agent';\nexport const AUTHENTICATED_AGENT = 'acl:AuthenticatedAgent';\n\nexport const rightsToShow = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToList = [ACL_READ, ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToCreate = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToEdit = [ACL_APPEND, ACL_WRITE, ACL_CONTROL];\nexport const rightsToDelete = [ACL_WRITE, ACL_CONTROL];\nexport const rightsToControl = [ACL_CONTROL];\n\nexport const rights = {\n show: rightsToShow,\n list: rightsToList,\n create: rightsToCreate,\n edit: rightsToEdit,\n delete: rightsToDelete,\n control: rightsToControl\n};\n\nexport const forbiddenErrors = {\n show: 'auth.message.resource_show_forbidden',\n edit: 'auth.message.resource_edit_forbidden',\n delete: 'auth.message.resource_delete_forbidden',\n control: 'auth.message.resource_control_forbidden',\n list: 'auth.message.container_list_forbidden',\n create: 'auth.message.container_create_forbidden'\n};\n\nexport const resourceRightsLabels = {\n [ACL_READ]: 'auth.right.resource.read',\n [ACL_APPEND]: 'auth.right.resource.append',\n [ACL_WRITE]: 'auth.right.resource.write',\n [ACL_CONTROL]: 'auth.right.resource.control'\n};\n\nexport const containerRightsLabels = {\n [ACL_READ]: 'auth.right.container.read',\n [ACL_WRITE]: 'auth.right.container.write',\n [ACL_CONTROL]: 'auth.right.container.control'\n};\n","import React, { useEffect } from 'react';\nimport { usePermissionsOptimized, useRedirect, useNotify, useGetIdentity } from 'react-admin';\nimport { rights, forbiddenErrors } from '../constants';\n\nconst useCheckPermissions = (uri, mode, redirectUrl = '/') => {\n const { identity, loading } = useGetIdentity();\n const { permissions } = usePermissionsOptimized(uri);\n const notify = useNotify();\n const redirect = useRedirect();\n\n useEffect(() => {\n if (!loading && identity && permissions && !permissions.some(p => rights[mode].includes(p['acl:mode']))) {\n notify(forbiddenErrors[mode], 'error');\n redirect(redirectUrl);\n }\n }, [permissions, identity, redirect, notify, loading]);\n\n return permissions;\n};\n\nexport default useCheckPermissions;\n","import React from 'react';\nimport { Create, CreateActions } from 'react-admin';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst CreateWithPermissions = props => {\n const createContainerUri = useCreateContainer(props.resource);\n useCheckPermissions(createContainerUri, 'create');\n return ;\n};\n\nCreateWithPermissions.defaultProps = {\n actions: \n};\n\nexport default CreateWithPermissions;\n","import React, { useEffect, useState } from 'react';\nimport { useGetList, useTranslate } from 'react-admin';\nimport { TextField, makeStyles, List, ListItem, ListItemAvatar, ListItemText, Avatar } from '@material-ui/core';\nimport Autocomplete from '@material-ui/lab/Autocomplete';\nimport PersonIcon from '@material-ui/icons/Person';\nimport { USER_AGENT, ACL_READ } from '../../constants';\n\nconst useStyles = makeStyles(() => ({\n list: {\n padding: 0,\n width: '100%'\n },\n option: {\n padding: 0\n }\n}));\n\nconst AddPermissionsForm = ({ agents, addPermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const [value, setValue] = useState(null);\n const [inputValue, setInputValue] = useState('');\n const [options, setOptions] = useState([]);\n\n const { ids, data } = useGetList(\n 'Person',\n { page: 1, perPage: 100 },\n { field: 'pair:label', order: 'ASC' },\n { q: inputValue },\n { enabled: inputValue.length > 0 }\n );\n\n useEffect(() => {\n setOptions(ids.length > 0 ? Object.values(data) : []);\n }, [ids, data]);\n\n return (\n option['pair:label']}\n // Do not return agents which have already been added\n filterOptions={x => x.filter(agent => !Object.keys(agents).includes(agent.id))}\n options={options}\n noOptionsText={translate('ra.navigation.no_results')}\n autoComplete\n blurOnSelect\n clearOnBlur\n disableClearable\n value={value}\n onChange={(event, record) => {\n addPermission(record.id || record['@id'], USER_AGENT, ACL_READ);\n setValue(null);\n setInputValue('');\n setOptions([]);\n }}\n onInputChange={(event, newInputValue) => {\n setInputValue(newInputValue);\n }}\n renderInput={params => (\n \n )}\n renderOption={option => (\n \n \n \n \n \n \n \n \n \n \n )}\n />\n );\n};\n\nexport default AddPermissionsForm;\n","import React from 'react';\nimport PublicIcon from '@material-ui/icons/Public';\nimport VpnLockIcon from '@material-ui/icons/VpnLock';\nimport PersonIcon from '@material-ui/icons/Person';\nimport GroupIcon from '@material-ui/icons/Group';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT } from '../../constants';\n\nconst AgentIcon = ({ agent }) => {\n switch (agent.predicate) {\n case CLASS_AGENT:\n return agent.id === ANONYMOUS_AGENT ? : ;\n case USER_AGENT:\n return ;\n case GROUP_AGENT:\n return ;\n default:\n throw new Error('Unknown agent predicate: ' + agent.predicate);\n }\n};\n\nexport default AgentIcon;\n","import React, { useState, useEffect } from 'react';\nimport { useDataProvider, useTranslate, Loading, Error } from 'react-admin';\nimport {\n makeStyles,\n Avatar,\n ListItem,\n ListItemIcon,\n ListItemAvatar,\n ListItemText,\n ListItemSecondaryAction,\n IconButton,\n Menu,\n MenuItem\n} from '@material-ui/core';\nimport EditIcon from '@material-ui/icons/Edit';\nimport CheckIcon from '@material-ui/icons/Check';\nimport { GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, resourceRightsLabels, containerRightsLabels } from '../../constants';\nimport AgentIcon from './AgentIcon';\n\nconst useStyles = makeStyles(() => ({\n listItem: {\n paddingLeft: 4,\n paddingRight: 36\n },\n primaryText: {\n width: '30%',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n },\n secondaryText: {\n textAlign: 'center',\n width: '60%',\n fontStyle: 'italic',\n color: 'grey'\n }\n}));\n\nconst AgentItem = ({ isContainer, agent, addPermission, removePermission }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const dataProvider = useDataProvider();\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [user, setUser] = useState();\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState();\n\n useEffect(() => {\n if (agent.predicate === USER_AGENT) {\n dataProvider\n .getOne('Person', { id: agent.id })\n .then(({ data }) => {\n setUser(data);\n setLoading(false);\n })\n .catch(error => {\n setError(error);\n setLoading(false);\n });\n } else {\n setLoading(false);\n }\n }, [agent.id, agent.predicate]);\n\n // For now, do not display groups\n if (agent.predicate === GROUP_AGENT) return null;\n\n const openMenu = event => setAnchorEl(event.currentTarget);\n const closeMenu = () => setAnchorEl(null);\n\n const labels = isContainer ? containerRightsLabels : resourceRightsLabels;\n\n if (loading) return ;\n if (error) return ;\n\n return (\n \n \n \n \n \n \n \n translate(labels[p])).join(', ')}\n />\n \n \n \n \n \n {Object.entries(labels).map(([rightKey, rightLabel]) => {\n const hasPermission = agent.permissions && agent.permissions.includes(rightKey);\n return (\n {\n if (hasPermission) {\n removePermission(agent.id, agent.predicate, rightKey);\n } else {\n addPermission(agent.id, agent.predicate, rightKey);\n }\n closeMenu();\n }}\n >\n {hasPermission ? : null}\n \n \n );\n })}\n \n \n \n );\n};\n\nexport default AgentItem;\n","import React from 'react';\nimport { List, makeStyles } from '@material-ui/core';\nimport AgentItem from './AgentItem';\n\nconst useStyles = makeStyles(theme => ({\n list: {\n width: '100%',\n maxWidth: '100%',\n backgroundColor: theme.palette.background.paper\n }\n}));\n\nconst EditPermissionsForm = ({ isContainer, agents, addPermission, removePermission }) => {\n const classes = useStyles();\n return (\n \n {Object.entries(agents).map(([agentId, agent]) => (\n \n ))}\n \n );\n};\n\nexport default EditPermissionsForm;\n","import { useEffect, useCallback, useState } from 'react';\nimport { usePermissionsOptimized, useAuthProvider } from 'react-admin';\nimport { defaultToArray } from '../utils';\nimport { CLASS_AGENT, GROUP_AGENT, USER_AGENT, ANONYMOUS_AGENT, AUTHENTICATED_AGENT } from '../constants';\n\nconst useAgents = uri => {\n const { permissions } = usePermissionsOptimized(uri);\n const authProvider = useAuthProvider();\n const [agents, setAgents] = useState({});\n\n // Format list of authorized agents, based on the permissions returned for the resource\n useEffect(() => {\n let result = {\n [ANONYMOUS_AGENT]: {\n id: ANONYMOUS_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n },\n [AUTHENTICATED_AGENT]: {\n id: AUTHENTICATED_AGENT,\n predicate: CLASS_AGENT,\n permissions: []\n }\n };\n\n const appendPermission = (agentId, predicate, mode) => {\n if (result[agentId]) {\n result[agentId].permissions.push(mode);\n } else {\n result[agentId] = {\n id: agentId,\n predicate,\n permissions: [mode]\n };\n }\n };\n\n if (permissions) {\n for (let p of permissions) {\n if (p[CLASS_AGENT]) {\n defaultToArray(p[CLASS_AGENT]).forEach(agentId => appendPermission(agentId, CLASS_AGENT, p['acl:mode']));\n }\n if (p[USER_AGENT]) {\n defaultToArray(p[USER_AGENT]).forEach(userUri => appendPermission(userUri, USER_AGENT, p['acl:mode']));\n }\n if (p[GROUP_AGENT]) {\n defaultToArray(p[GROUP_AGENT]).forEach(groupUri => appendPermission(groupUri, GROUP_AGENT, p['acl:mode']));\n }\n }\n setAgents(result);\n }\n }, [permissions]);\n\n const addPermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents({\n ...agents,\n [agentId]: {\n id: agentId,\n predicate,\n permissions: agents[agentId] ? [...agents[agentId]?.permissions, mode] : [mode]\n }\n });\n authProvider.addPermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n const removePermission = useCallback(\n (agentId, predicate, mode) => {\n const prevAgents = { ...agents };\n setAgents(\n Object.fromEntries(\n Object.entries(agents)\n .map(([key, agent]) => {\n if (agent.id === agentId) {\n agent.permissions = agent.permissions.filter(m => m !== mode);\n }\n return [key, agent];\n })\n // Remove agents if they have no permissions (except if they are class agents)\n .filter(([_, agent]) => agent.predicate === CLASS_AGENT || agent.permissions.length > 0)\n )\n );\n authProvider.removePermission(uri, agentId, predicate, mode).catch(e => {\n // If there was an error, revert the optimistic update\n setAgents(prevAgents);\n });\n },\n [agents, setAgents, uri, authProvider]\n );\n\n return { agents, addPermission, removePermission };\n};\n\nexport default useAgents;\n","import React from 'react';\nimport { Button, useTranslate } from 'react-admin';\nimport { Dialog, DialogTitle, DialogContent, DialogActions, makeStyles } from '@material-ui/core';\nimport AddPermissionsForm from './AddPermissionsForm';\nimport EditPermissionsForm from './EditPermissionsForm';\nimport useAgents from '../../hooks/useAgents';\n\nconst useStyles = makeStyles(() => ({\n title: {\n paddingBottom: 8\n },\n actions: {\n padding: 15\n },\n addForm: {\n paddingTop: 0\n },\n listForm: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n maxHeight: 210\n }\n}));\n\nconst PermissionsDialog = ({ open, onClose, uri, isContainer }) => {\n const classes = useStyles();\n const translate = useTranslate();\n const { agents, addPermission, removePermission } = useAgents(uri);\n\n return (\n \n \n {translate(isContainer ? 'auth.dialog.container_permissions' : 'auth.dialog.resource_permissions')}\n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default PermissionsDialog;\n","import React, { useState } from 'react';\nimport { Button } from 'react-admin';\nimport ShareIcon from '@material-ui/icons/Share';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsDialog from './PermissionsDialog';\n\nconst PermissionsButton = ({ record, resource }) => {\n const [showDialog, setShowDialog] = useState(false);\n const createContainer = useCreateContainer(resource);\n const isContainer = !!resource;\n const uri = isContainer ? createContainer : record.id || record['@id'];\n return (\n <>\n \n setShowDialog(false)} />\n \n );\n};\n\nexport default PermissionsButton;\n","import React from 'react';\nimport { usePermissionsOptimized, ShowButton, ListButton, TopToolbar } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl } from '../../constants';\n\nconst EditActionsWithPermissions = ({ basePath, record, hasList, hasShow }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasShow && }\n {!!permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default EditActionsWithPermissions;\n","import React from 'react';\nimport { DeleteButton, useRecordContext, usePermissionsOptimized } from 'react-admin';\nimport { rightsToDelete } from '../../constants';\n\nconst DeleteButtonWithPermissions = props => {\n const record = useRecordContext();\n const { permissions } = usePermissionsOptimized(record?.id);\n if (!!permissions && permissions.some(p => rightsToDelete.includes(p['acl:mode']))) {\n return ;\n } else {\n return null;\n }\n};\n\nexport default DeleteButtonWithPermissions;\n","import React from 'react';\nimport { SaveButton, Toolbar } from 'react-admin';\nimport { makeStyles } from '@material-ui/core';\nimport DeleteButtonWithPermissions from './DeleteButtonWithPermissions';\n\nconst useStyles = makeStyles(() => ({\n toolbar: {\n flex: 1,\n display: 'flex',\n justifyContent: 'space-between'\n }\n}));\n\nconst EditToolbarWithPermissions = props => {\n const classes = useStyles();\n return (\n \n \n }\n \n );\n};\n\nexport default EditToolbarWithPermissions;\n","import React from 'react';\nimport { Edit } from 'react-admin';\nimport EditActionsWithPermissions from './EditActionsWithPermissions';\nimport EditToolbarWithPermissions from './EditToolbarWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst EditWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return (\n \n {React.cloneElement(props.children, {\n toolbar: ,\n // Allow to override toolbar\n ...props.children.props\n })}\n \n );\n};\n\nEditWithPermissions.defaultProps = {\n actions: \n};\n\nexport default EditWithPermissions;\n","import React from 'react';\nimport { CreateButton, ExportButton, useResourceDefinition, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport { useMediaQuery } from '@material-ui/core';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToCreate, rightsToControl } from '../../constants';\n\n// Do not show Export and Refresh buttons on mobile\nconst ListActionsWithPermissions = ({\n bulkActions,\n basePath,\n currentSort,\n displayedFilters,\n exporter,\n filters,\n filterValues,\n onUnselectItems,\n resource,\n selectedIds,\n showFilter,\n total,\n ...rest\n}) => {\n const xs = useMediaQuery(theme => theme.breakpoints.down('xs'));\n const resourceDefinition = useResourceDefinition(rest);\n const createContainerUri = useCreateContainer(resource);\n const { permissions } = usePermissionsOptimized(createContainerUri);\n return (\n \n {filters &&\n React.cloneElement(filters, {\n resource,\n showFilter,\n displayedFilters,\n filterValues,\n context: 'button'\n })}\n {resourceDefinition.hasCreate && permissions && permissions.some(p => rightsToCreate.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n {!xs && exporter !== false && (\n \n )}\n {bulkActions &&\n React.cloneElement(bulkActions, {\n basePath,\n filterValues,\n resource,\n selectedIds,\n onUnselectItems\n })}\n \n );\n};\n\nexport default ListActionsWithPermissions;\n","import React from 'react';\nimport { List } from 'react-admin';\nimport ListActionsWithPermissions from './ListActionsWithPermissions';\n\nconst ListWithPermissions = props => ;\n\nListWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ListWithPermissions;\n","import React from 'react';\nimport { EditButton, ListButton, TopToolbar, usePermissionsOptimized } from 'react-admin';\nimport PermissionsButton from '../../components/PermissionsButton/PermissionsButton';\nimport { rightsToControl, rightsToEdit } from '../../constants';\n\nconst ShowActionsWithPermissions = ({ basePath, record, hasList, hasEdit }) => {\n const { permissions } = usePermissionsOptimized(record?.id);\n return (\n \n {hasList && }\n {hasEdit && permissions && permissions.some(p => rightsToEdit.includes(p['acl:mode'])) && (\n \n )}\n {permissions && permissions.some(p => rightsToControl.includes(p['acl:mode'])) && (\n \n )}\n \n );\n};\n\nexport default ShowActionsWithPermissions;\n","import React from 'react';\nimport { Show } from 'react-admin';\nimport ShowActionsWithPermissions from './ShowActionsWithPermissions';\nimport useCheckPermissions from '../../hooks/useCheckPermissions';\n\nconst ShowWithPermissions = props => {\n useCheckPermissions(props.id, 'edit');\n return ;\n};\n\nShowWithPermissions.defaultProps = {\n actions: \n};\n\nexport default ShowWithPermissions;\n","import React from 'react';\nimport { useLogin, useTranslate } from 'react-admin';\nimport { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle } from '@material-ui/core';\n\nconst AuthDialog = ({ open, onClose, title, message, redirect, ...rest }) => {\n const login = useLogin();\n const translate = useTranslate();\n return (\n \n {translate(title)}\n \n {translate(message)}\n \n \n \n login({ redirect: redirect || window.location.pathname + window.location.search })}\n color=\"primary\"\n variant=\"contained\"\n >\n {translate('auth.action.login')}\n \n \n \n );\n};\n\nAuthDialog.defaultProps = {\n title: 'auth.dialog.login_required',\n message: 'auth.message.login_to_continue'\n};\n\nexport default AuthDialog;\n","import React, { useEffect } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useLogin, useNotify, useDataProvider, useAuthProvider, Notification } from 'react-admin';\nimport { ThemeProvider } from '@material-ui/styles';\nimport { createTheme, makeStyles } from '@material-ui/core/styles';\nimport { Avatar, Button, Card, CardActions, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\n\nconst delay = t => new Promise(resolve => setTimeout(resolve, t));\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundColor: theme.palette.grey['300']\n },\n text: {\n maxWidth: 300,\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n }\n}));\n\nconst SsoLoginPage = ({ theme, history, location, buttons, userResource, propertiesExist, text }) => {\n const classes = useStyles();\n const notify = useNotify();\n const login = useLogin();\n const dataProvider = useDataProvider();\n const authProvider = useAuthProvider();\n\n useEffect(() => {\n (async () => {\n const searchParams = new URLSearchParams(location.search);\n\n if (searchParams.has('login')) {\n if (searchParams.has('error')) {\n if (searchParams.get('error') === 'registration.not-allowed') {\n notify('auth.message.user_email_not_found', 'error');\n } else {\n notify('auth.message.bad_request', 'error', { error: searchParams.get('error') });\n }\n } else if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n\n let userData;\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n\n if (propertiesExist.length > 0) {\n let allPropertiesExist = propertiesExist.every(p => userData[p]);\n while (!allPropertiesExist) {\n console.log('Waiting for all properties to have been created', propertiesExist);\n await delay(500);\n ({ data: userData } = await dataProvider.getOne(userResource, { id: webId }));\n allPropertiesExist = propertiesExist.every(p => userData[p]);\n }\n }\n\n if (!authProvider.checkUser(userData)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n if (searchParams.has('redirect')) {\n notify('auth.message.user_connected', 'info');\n history.push(searchParams.get('redirect'));\n } else if (searchParams.has('new') && searchParams.get('new') === 'true') {\n notify('auth.message.new_user_created', 'info');\n history.push('/' + userResource + '/' + encodeURIComponent(webId) + '/edit');\n } else {\n notify('auth.message.user_connected', 'info');\n history.push('/');\n }\n }\n }\n }\n\n if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [location.search]);\n\n return (\n \n
\n \n
\n \n \n \n
\n {text && (\n \n {text}\n \n )}\n {buttons &&\n buttons.map((button, i) => (\n \n {React.cloneElement(button, {\n fullWidth: true,\n variant: 'outlined',\n type: 'submit',\n onClick: () => login({}, '/login')\n })}\n \n ))}\n
\n
\n \n
\n );\n};\n\nSsoLoginPage.defaultProps = {\n propertiesExist: [],\n // TODO deprecate this\n buttons: [],\n userResource: 'Person'\n};\n\nexport default SsoLoginPage;\n","import React, { useEffect, useState } from 'react';\nimport jwtDecode from 'jwt-decode';\nimport { useNotify, useAuthProvider, useDataProvider, useLocale, useTranslate } from 'react-admin';\nimport { Box, List, ListItem, ListItemText, ListItemAvatar, Avatar, makeStyles, Divider } from '@material-ui/core';\nimport { Card, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport StorageIcon from '@material-ui/icons/Storage';\n\nconst useStyles = makeStyles(theme => ({\n '@global': {\n body: {\n backgroundColor: theme.palette.primary.main\n }\n },\n text: {\n textAlign: 'center',\n padding: '4px 8px 8px'\n },\n card: {\n minWidth: 300,\n maxWidth: 350,\n marginTop: '6em',\n [theme.breakpoints.down('sm')]: {\n margin: '1em',\n },\n },\n lockIconAvatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n lockIcon: {\n backgroundColor: theme.palette.grey['500']\n },\n list: {\n paddingTop: 0,\n paddingBottom: 0\n },\n listItem: {\n paddingTop: 5,\n paddingBottom: 5\n }\n}));\n\nconst PodLoginPageView = ({ history, location, text, customPodProviders }) => {\n const classes = useStyles();\n const notify = useNotify();\n const locale = useLocale();\n const translate = useTranslate();\n const authProvider = useAuthProvider();\n const dataProvider = useDataProvider();\n const [podProviders, setPodProviders] = useState(customPodProviders || []);\n const searchParams = new URLSearchParams(location.search);\n\n useEffect(() => {\n (async () => {\n if (podProviders.length === 0) {\n const results = await fetch('https://data.activitypods.org/pod-providers', {\n headers: {\n Accept: 'application/ld+json'\n }\n });\n if (results.ok) {\n const json = await results.json();\n // Filter POD providers by available locales\n const podProviders = json['ldp:contains'].filter(provider =>\n Array.isArray(provider['apods:locales'])\n ? provider['apods:locales'].includes(locale)\n : provider['apods:locales'] === locale\n );\n setPodProviders(podProviders);\n } else {\n notify('auth.message.pod_providers_not_loaded', 'error');\n }\n }\n })();\n }, [podProviders, setPodProviders, notify, locale]);\n\n useEffect(() => {\n (async () => {\n if (searchParams.has('token')) {\n const token = searchParams.get('token');\n const { webId } = jwtDecode(token);\n const response = await fetch(webId, {\n headers: {\n Accept: 'application/json'\n }\n });\n if (!response.ok) {\n notify('auth.message.unable_to_fetch_user_data', 'error');\n } else {\n const data = await response.json();\n if (!authProvider.checkUser(data)) {\n notify('auth.message.user_not_allowed_to_login', 'error');\n history.replace('/login');\n } else {\n localStorage.setItem('token', token);\n notify('auth.message.user_connected', 'info');\n // Reload to ensure the dataServers config is reset\n window.location.reload();\n window.location.href = '/?addUser=true';\n }\n }\n } else if (searchParams.has('logout')) {\n // Delete token and any other value in local storage\n localStorage.clear();\n notify('auth.message.user_disconnected', 'info');\n history.push('/');\n }\n })();\n }, [searchParams, dataProvider]);\n\n if (searchParams.has('token') || searchParams.has('addUser') || searchParams.has('logout') ) {\n return null;\n }\n\n return (\n \n \n
\n \n \n \n
\n \n \n {text || translate('auth.message.choose_pod_provider')}\n \n \n \n \n {podProviders.map((podProvider, i) => {\n const url = new URL('/auth', (podProvider['apods:domainName'].includes(':') ? 'http://' : 'https://') + podProvider['apods:domainName']);\n if (searchParams.has('signup')) url.searchParams.set('signup', 'true');\n url.searchParams.set('redirect', window.location.href);\n return (\n \n \n (window.location.href = url.toString())}\n className={classes.listItem}\n >\n \n \n \n \n \n \n \n \n );\n })}\n \n \n
\n
\n );\n};\n\nexport default PodLoginPageView;\n","import React, { useMemo } from 'react';\nimport { Notification } from 'react-admin';\nimport { createTheme, ThemeProvider } from '@material-ui/core';\nimport PodLoginPageView from \"./PodLoginPageView\";\n\nconst PodLoginPage = (props) => {\n const muiTheme = useMemo(() => createTheme(props.theme), [props.theme]);\n return (\n \n \n \n \n );\n};\n\nexport default PodLoginPage;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","import { useCallback } from 'react';\nimport { useAuthProvider } from 'react-admin';\n\nconst useSignup = () => {\n const authProvider = useAuthProvider();\n\n return useCallback((params = {}) => authProvider.signup(params), [authProvider]);\n};\n\nexport default useSignup;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Field, Form } from 'react-final-form';\nimport { useTranslate, useNotify, useSafeSetState } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\nimport { Button, CardActions, CircularProgress, TextField, makeStyles } from '@material-ui/core';\nimport { default as useSignup } from '../hooks/useSignup';\n\nconst useStyles = makeStyles(theme => ({\n form: {\n padding: '0 1em 1em 1em'\n },\n input: {\n marginTop: '1em'\n },\n button: {\n width: '100%'\n },\n icon: {\n marginRight: theme.spacing(1)\n }\n}));\n\nconst Input = ({ meta: { touched, error }, input: inputProps, ...props }) => (\n \n);\n\nconst SignupForm = ({ redirectTo, delayBeforeRedirect }) => {\n const [loading, setLoading] = useSafeSetState(false);\n const signup = useSignup();\n const translate = useTranslate();\n const notify = useNotify();\n const classes = useStyles();\n const location = useLocation();\n const searchParams = new URLSearchParams(location.search);\n\n const validate = values => {\n const errors = { email: undefined, password: undefined };\n\n if (!values.email) {\n errors.email = translate('ra.validation.required');\n }\n if (!values.password) {\n errors.password = translate('ra.validation.required');\n }\n return errors;\n };\n\n const submit = values => {\n setLoading(true);\n signup(values)\n .then(webId => {\n if (delayBeforeRedirect) {\n setTimeout(() => {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }, delayBeforeRedirect);\n } else {\n // Reload to ensure the dataServer config is reset\n window.location.reload();\n window.location.href = redirectTo || '/';\n setLoading(false);\n }\n notify('auth.message.new_user_created', 'info');\n })\n .catch(error => {\n setLoading(false);\n notify(\n typeof error === 'string'\n ? error\n : typeof error === 'undefined' || !error.message\n ? 'ra.auth.sign_in_error'\n : error.message,\n 'warning',\n {\n _: typeof error === 'string' ? error : error && error.message ? error.message : undefined\n }\n );\n });\n };\n\n return (\n (\n
\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n \n \n \n
\n )}\n />\n );\n};\n\nSignupForm.propTypes = {\n redirectTo: PropTypes.string\n};\n\nexport default SignupForm;\n","import React, { useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport { LoginForm, Notification, useGetIdentity, useTranslate } from 'react-admin';\nimport { Card, Avatar, makeStyles, createTheme, ThemeProvider, Typography } from '@material-ui/core';\nimport LockIcon from '@material-ui/icons/Lock';\nimport { Link, useLocation, Redirect } from 'react-router-dom';\nimport SignupForm from './SignupForm';\n\nconst useStyles = makeStyles(theme => ({\n main: {\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100vh',\n height: '1px',\n alignItems: 'center',\n justifyContent: 'flex-start',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n backgroundImage: 'radial-gradient(circle at 50% 14em, #313264 0%, #00023b 60%, #00023b 100%)'\n },\n card: {\n minWidth: 300,\n marginTop: '6em'\n },\n avatar: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n },\n icon: {\n backgroundColor: theme.palette.secondary[500]\n },\n switch: {\n margin: '1em',\n display: 'flex',\n justifyContent: 'center'\n }\n}));\n\nconst LocalLoginPage = props => {\n const { theme, title, classes: classesOverride, className, ...rest } = props;\n const classes = useStyles(props);\n const location = useLocation();\n const translate = useTranslate();\n const muiTheme = useMemo(() => createTheme(theme), [theme]);\n const searchParams = new URLSearchParams(location.search);\n const isSignup = searchParams.has('signup');\n const redirectTo = searchParams.get('redirect');\n const { identity, loading } = useGetIdentity();\n\n if (loading) {\n return null;\n } else if (identity?.id) {\n // Do not show login page if user is already connected\n return ;\n } else {\n return (\n \n
\n \n
\n \n \n \n
\n {isSignup ? (\n \n ) : (\n \n )}\n
\n {isSignup ? (\n \n {translate('auth.action.login')}\n \n ) : (\n \n {translate('auth.action.signup')}\n \n )}\n
\n
\n \n
\n
\n );\n }\n};\n\nLocalLoginPage.propTypes = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n theme: PropTypes.object\n};\n\nexport default LocalLoginPage;\n","import React, { forwardRef } from 'react';\nimport { useLogout, useTranslate } from 'react-admin';\nimport { MenuItem, makeStyles, ListItemIcon } from '@material-ui/core';\nimport ExitIcon from '@material-ui/icons/PowerSettingsNew';\n\nconst useStyles = makeStyles(theme => ({\n root: {\n color: theme.palette.text.secondary\n },\n active: {\n color: theme.palette.text.primary\n },\n icon: { minWidth: theme.spacing(5) }\n}));\n\nconst LogoutButton = forwardRef((props, ref) => {\n const classes = useStyles();\n const logout = useLogout();\n const translate = useTranslate();\n return (\n logout()} ref={ref} className={classes.root} activeClassName={classes.active}>\n \n \n \n {translate('auth.action.logout')}\n \n );\n});\n\nexport default LogoutButton;\n","import React from 'react';\nimport { Resource, usePermissionsOptimized } from 'react-admin';\nimport { rightsToCreate } from '../constants';\nimport { useCreateContainer } from '@semapps/semantic-data-provider';\n\n// Not used for now. The ListWithPermissions component will handle the conditional display of the Create button.\nconst ResourceWithPermission = ({ name, create, ...rest }) => {\n const createContainer = useCreateContainer(name);\n const { permissions } = usePermissionsOptimized(createContainer);\n return (\n rightsToCreate.includes(p['acl:mode'])) ? create : undefined}\n // Requesting permissions to list container is too long, we will avoid that for now\n // list={permissions && permissions.some(p => rightsToList.includes(p['acl:mode'])) ? list : undefined}\n />\n );\n};\n\nexport default ResourceWithPermission;\n","import React, { forwardRef } from 'react';\nimport { UserMenu as RaUserMenu, MenuItemLink, useGetIdentity, useTranslate } from 'react-admin';\nimport AccountCircleIcon from '@material-ui/icons/AccountCircle';\nimport EditIcon from '@material-ui/icons/Edit';\n\nconst ViewProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst EditProfileMenu = forwardRef(({ onClick, profileResource, label, webId }, ref) => (\n }\n onClick={onClick}\n />\n));\n\nconst LoginMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst SignupMenu = forwardRef(({ onClick, label }, ref) => (\n \n));\n\nconst UserMenu = ({ logout, profileResource, ...otherProps }) => {\n const { identity } = useGetIdentity();\n const translate = useTranslate();\n return (\n \n {identity && identity.id !== ''\n ? [\n ,\n ,\n React.cloneElement(logout, { key: 'logout' })\n ]\n : [\n ,\n \n ]}\n \n );\n};\n\nUserMenu.defaultProps = {\n profileResource: 'Person'\n};\n\nexport default UserMenu;\n","import React, { useEffect } from 'react';\nimport { useGetIdentity, useNotify, useRedirect } from 'react-admin';\nimport { useLocation } from 'react-router-dom';\n\nconst useCheckAuthenticated = () => {\n const { identity, loading } = useGetIdentity();\n const notify = useNotify();\n const redirect = useRedirect();\n const location = useLocation();\n\n useEffect(() => {\n if (!loading && !identity?.id) {\n notify('ra.auth.auth_check_error', 'error');\n redirect('/login?redirect=' + encodeURIComponent(location.pathname + location.search));\n }\n }, [loading, identity, redirect, notify, location]);\n\n return { identity, loading };\n};\n\nexport default useCheckAuthenticated;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","import { useEffect, useCallback } from 'react';\nimport isEqual from 'lodash/isEqual';\nimport { useGetPermissions, useSafeSetState } from 'react-admin';\n\nconst emptyParams = {};\n\n// keep a cache of already fetched permissions to initialize state for new\n// components and avoid a useless rerender if the permissions haven't changed\nconst alreadyFetchedPermissions = { '{}': undefined };\n\n// Fork of usePermissionsOptimized, with a refetch option\nconst usePermissionsWithRefetch = (params = emptyParams) => {\n const key = JSON.stringify(params);\n const [state, setState] = useSafeSetState({\n permissions: alreadyFetchedPermissions[key]\n });\n const getPermissions = useGetPermissions();\n\n const fetchPermissions = useCallback(\n () =>\n getPermissions(params)\n .then(permissions => {\n if (!isEqual(permissions, state.permissions)) {\n alreadyFetchedPermissions[key] = permissions;\n setState({ permissions });\n }\n })\n .catch(error => {\n setState({\n error\n });\n }),\n [key, params, getPermissions]\n );\n\n useEffect(() => {\n fetchPermissions();\n }, [key]);\n\n return { ...state, refetch: fetchPermissions };\n};\n\nexport default usePermissionsWithRefetch;\n","const englishMessages = {\n auth: {\n dialog: {\n container_permissions: 'Container permissions',\n resource_permissions: 'Resource permissions',\n login_required: 'Login required'\n },\n action: {\n permissions: 'Permissions',\n signup: 'Signup',\n logout: 'Logout',\n login: 'Login',\n view_my_profile: 'View my profile',\n edit_my_profile: 'Edit my profile'\n },\n right: {\n resource: {\n read: 'Read',\n append: 'Append',\n write: 'Write',\n control: 'Control'\n },\n container: {\n read: 'List',\n append: 'Add',\n write: 'Add',\n control: 'Control'\n }\n },\n agent: {\n anonymous: 'All users',\n authenticated: 'Connected users'\n },\n input: {\n agent_select: 'Add an user...',\n name: 'Surname',\n username: 'User ID',\n email: 'Email address',\n username_or_email: 'User ID or email address'\n },\n message: {\n resource_show_forbidden: 'You are not allowed to view this resource',\n resource_edit_forbidden: 'You are not allowed to edit this resource',\n resource_delete_forbidden: 'You are not allowed to delete this resource',\n resource_control_forbidden: 'You are not allowed to control this resource',\n container_create_forbidden: 'You are not allowed to create new resource',\n container_list_forbidden: 'You are not allowed to list these resources',\n user_not_allowed_to_login: 'You are not allowed to login with this account',\n user_email_not_found: 'No account found with this email address',\n user_email_exist: 'An account already exist with this email address',\n username_exist: 'An account already exist with this user ID',\n username_invalid: 'This username is invalid. Only lowercase characters, numbers, dots and hyphens are authorized',\n new_user_created: 'Your account has been successfully created',\n user_connected: 'You are now connected',\n user_disconnected: 'You are now disconnected',\n bad_request: 'Bad request (Error message returned by the server: %{error})',\n account_settings_updated: 'Your account settings have been successfully updated',\n login_to_continue: 'Please login to continue',\n choose_pod_provider: 'Please choose a POD provider in the list below. All application data will be saved on your POD.'\n }\n }\n};\n\nexport default englishMessages;\n","const frenchMessages = {\n auth: {\n dialog: {\n container_permissions: 'Permissions sur le container',\n resource_permissions: 'Permissions sur la resource',\n login_required: 'Connexion requise'\n },\n action: {\n permissions: 'Permissions',\n signup: \"S'inscrire\",\n logout: 'Se déconnecter',\n login: 'Se connecter',\n view_my_profile: 'Voir mon profil',\n edit_my_profile: 'Éditer mon profil'\n },\n right: {\n resource: {\n read: 'Lire',\n append: 'Enrichir',\n write: 'Modifier',\n control: 'Administrer'\n },\n container: {\n read: 'Lister',\n append: 'Ajouter',\n write: 'Ajouter',\n control: 'Administrer'\n }\n },\n agent: {\n anonymous: 'Tous les utilisateurs',\n authenticated: 'Utilisateurs connectés'\n },\n input: {\n agent_select: 'Ajouter un utilisateur...',\n name: 'Prénom',\n username: 'Identifiant unique',\n email: 'Adresse e-mail',\n username_or_email: 'Identifiant ou adresse e-mail'\n },\n message: {\n resource_show_forbidden: \"Vous n'avez pas la permission de voir cette ressource\",\n resource_edit_forbidden: \"Vous n'avez pas la permission d'éditer cette ressource\",\n resource_delete_forbidden: \"Vous n'avez pas la permission d'effacer cette ressource\",\n resource_control_forbidden: \"Vous n'avez pas la permission d'administrer cette ressource\",\n container_create_forbidden: \"Vous n'avez pas la permission de créer des ressources\",\n container_list_forbidden: \"Vous n'avez pas la permission de voir ces ressources\",\n user_not_allowed_to_login: \"Vous n'avez pas le droit de vous connecter avec ce compte\",\n user_email_not_found: 'Aucun compte trouvé avec cette adresse mail',\n user_email_exist: 'Un compte existe déjà avec cette adresse mail',\n username_exist: 'Un compte existe déjà avec cet identifiant',\n username_invalid:\n \"Cet identifiant n'est pas valide. Seuls les lettres minuscules, les chiffres, les points et les tirets sont autorisés\",\n new_user_created: 'Votre compte a été créé avec succès',\n user_connected: 'Vous êtes maintenant connecté',\n user_disconnected: 'Vous êtes maintenant déconnecté',\n bad_request: \"Requête erronée (Message d'erreur renvoyé par le serveur: %{error})\",\n account_settings_updated: 'Les paramètres de votre compte ont été mis à jour avec succès',\n login_to_continue: 'Veuillez vous connecter pour continuer',\n choose_pod_provider: \"Veuillez choisir un fournisseur de PODs dans la liste ci-dessous. Toutes les données de l'application seront enregistrées sur votre POD.\"\n }\n }\n};\n\nexport default frenchMessages;\n"],"names":["InvalidCharacterError","message","this","prototype","Error","name","r","window","atob","bind","input","str","String","replace","length","bs","buffer","bc","idx","output","charAt","fromCharCode","indexOf","context","definition","normalize","strArray","resultArray","TypeError","match","first","shift","i","component","push","join","parts","split","arguments","slice","call","module","exports","defaultToArray","value","Array","isArray","undefined","getAclUri","resourceUri","parsedUrl","URL","urlJoin","origin","pathname","getAclContext","baseUri","@base","acl","foaf","acl:agent","@type","acl:agentGroup","acl:agentClass","acl:mode","acl:accessTo","getAuthServerUrl","_ref","_asyncToGenerator","_regeneratorRuntime","mark","dataProvider","dataServers","authServer","wrap","_context","prev","next","getDataServers","sent","Object","values","find","server","abrupt","pod","baseUrl","stop","_callee","_x","apply","authProvider","_updateAccountSettings","_getAccountSettings","_setNewPassword","_resetPassword","_getIdentity","_removePermission","_addPermission","_getPermissions","_checkAuth","_logout","_signup","_login","_ref$allowAnonymous","allowAnonymous","_ref$localAccounts","localAccounts","checkUser","_ref$checkPermissions","checkPermissions","login","params","authServerUrl","username","password","_yield$dataProvider$f","json","token","redirectUrl","fetch","method","body","JSON","stringify","trim","headers","Headers","Content-Type","localStorage","setItem","location","reload","t0","href","redirect","encodeURIComponent","signup","email","profileData","_yield$dataProvider$f2","_jwtDecode","webId","_context2","domain","_objectWithoutProperties","_excluded","_objectSpread","jwtDecode","_callee2","_x2","logout","_callee3","_context3","clear","checkAuth","_callee4","_context4","getItem","userData","checkError","error","Promise","resolve","getPermissions","uri","aclUri","_yield$dataProvider$f3","_context5","startsWith","console","warn","concat","_callee5","_x3","addPermission","agentId","predicate","mode","_authorization","authorization","_context6","@id","_defineProperty","@context","@graph","_callee6","_x4","_x5","_x6","_x7","removePermission","_yield$dataProvider$f4","updatedPermissions","_context7","filter","includes","map","modes","agents","agent","_callee7","_x8","_x9","_x10","_x11","getIdentity","_callee8","_jwtDecode2","_yield$dataProvider$f5","webIdData","_ref2","_context8","url","id","fullName","resetPassword","_context9","_callee9","_x12","setNewPassword","_context10","_callee10","_x13","getAccountSettings","_yield$dataProvider$f6","_context11","_callee11","_x14","updateAccountSettings","currentPassword","newPassword","_context12","_callee12","_x15","CLASS_AGENT","rightsToCreate","rightsToEdit","rightsToDelete","rightsToControl","rights","show","list","create","edit","delete","control","forbiddenErrors","resourceRightsLabels","_resourceRightsLabels","containerRightsLabels","ACL_READ","_containerRightsLabel","useCheckPermissions","_useGetIdentity","useGetIdentity","identity","loading","usePermissionsOptimized","permissions","notify","useNotify","useRedirect","useEffect","some","p","CreateWithPermissions","props","createContainerUri","useCreateContainer","resource","React","createElement","Create","defaultProps","actions","CreateActions","useStyles","makeStyles","padding","width","option","AddPermissionsForm","classes","translate","useTranslate","_useState2","_slicedToArray","useState","setValue","_useState4","inputValue","setInputValue","_useState6","options","setOptions","useGetList","page","perPage","field","order","q","enabled","ids","data","Autocomplete","getOptionLabel","filterOptions","x","keys","noOptionsText","autoComplete","blurOnSelect","clearOnBlur","disableClearable","onChange","event","record","onInputChange","newInputValue","renderInput","TextField","_extends","label","variant","margin","fullWidth","renderOption","List","dense","className","ListItem","button","ListItemAvatar","Avatar","src","image","PersonIcon","ListItemText","primary","AgentIcon","PublicIcon","VpnLockIcon","GroupIcon","listItem","paddingLeft","paddingRight","primaryText","whiteSpace","overflow","textOverflow","secondaryText","textAlign","fontStyle","color","AgentItem","isContainer","useDataProvider","_React$useState2","anchorEl","setAnchorEl","user","setUser","setLoading","setError","getOne","then","closeMenu","labels","Loading","ListItemSecondaryAction","IconButton","onClick","currentTarget","EditIcon","Menu","keepMounted","open","Boolean","onClose","entries","_ref3","_ref4","rightKey","rightLabel","hasPermission","MenuItem","key","ListItemIcon","CheckIcon","theme","maxWidth","backgroundColor","palette","background","paper","EditPermissionsForm","useAgents","useAuthProvider","setAgents","_result","result","ANONYMOUS_AGENT","appendPermission","_step","_iterator","_createForOfIteratorHelper","_loop","forEach","userUri","groupUri","s","n","done","err","e","f","useCallback","_agents$agentId","prevAgents","fromEntries","m","title","paddingBottom","addForm","paddingTop","listForm","maxHeight","PermissionsDialog","Dialog","DialogTitle","DialogContent","DialogActions","Button","PermissionsButton","showDialog","setShowDialog","createContainer","Fragment","ShareIcon","EditActionsWithPermissions","basePath","hasList","hasShow","TopToolbar","ListButton","ShowButton","DeleteButtonWithPermissions","useRecordContext","DeleteButton","toolbar","flex","display","justifyContent","EditToolbarWithPermissions","Toolbar","SaveButton","undoable","EditWithPermissions","Edit","cloneElement","children","ListActionsWithPermissions","bulkActions","currentSort","displayedFilters","exporter","filters","filterValues","onUnselectItems","selectedIds","showFilter","total","rest","xs","useMediaQuery","breakpoints","down","resourceDefinition","useResourceDefinition","hasCreate","CreateButton","ExportButton","disabled","sort","ListWithPermissions","ShowActionsWithPermissions","hasEdit","EditButton","ShowWithPermissions","Show","AuthDialog","useLogin","DialogContentText","search","delay","t","setTimeout","main","flexDirection","minHeight","alignItems","grey","text","card","minWidth","marginTop","lockIconAvatar","lockIcon","SsoLoginPage","history","buttons","userResource","propertiesExist","searchParams","URLSearchParams","has","get","delegateYield","_yield$dataProvider$g","allPropertiesExist","_yield$dataProvider$g2","every","log","ThemeProvider","createTheme","Card","LockIcon","Typography","CardActions","type","Notification","startIcon","@global","PodLoginPageView","customPodProviders","locale","useLocale","podProviders","setPodProviders","results","_podProviders","Accept","ok","provider","response","Box","pl","pr","podProvider","set","Divider","toString","StorageIcon","secondary","PodLoginPage","muiTheme","useMemo","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","propFullName","secret","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require","useSignup","form","icon","marginRight","spacing","Input","_ref$meta","meta","touched","inputProps","helperText","SignupForm","redirectTo","delayBeforeRedirect","_useSafeSetState2","useSafeSetState","useLocation","Form","onSubmit","_","validate","errors","initialValues","render","handleSubmit","noValidate","Field","CircularProgress","size","thickness","propTypes","height","backgroundRepeat","backgroundSize","backgroundImage","avatar","switch","LocalLoginPage","isSignup","Redirect","to","classnames","LoginForm","Link","root","active","LogoutButton","forwardRef","ref","useLogout","activeClassName","ExitIcon","ResourceWithPermission","Resource","ViewProfileMenu","profileResource","MenuItemLink","leftIcon","AccountCircleIcon","EditProfileMenu","LoginMenu","SignupMenu","UserMenu","_ref5","_identity$profileData","_identity$profileData2","otherProps","RaUserMenu","useCheckAuthenticated","__data__","other","eq","splice","index","assocIndexOf","pop","ListCache","entry","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","global","freeSelf","self","freeGlobal","Function","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","toStringTag","isOwn","tag","unmasked","getRawTag","objectToString","uid","isObject","baseGetTag","maskSrcKey","exec","coreJsData","IE_PROTO","funcToString","reIsHostCtor","funcProto","reIsNative","RegExp","isMasked","isFunction","test","toSource","getValue","baseIsNative","getNative","nativeCreate","Hash","hashClear","hashDelete","hashGet","hashHas","hashSet","hash","Map","isKeyable","getMapData","MapCache","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","pairs","LARGE_ARRAY_SIZE","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","SetCache","add","setCacheAdd","setCacheHas","cache","bitmask","customizer","equalFunc","stack","isPartial","arrLength","othLength","arrStacked","othStacked","seen","arrValue","othValue","compared","arraySome","othIndex","cacheHas","Uint8Array","symbolProto","symbolValueOf","valueOf","byteLength","byteOffset","convert","mapToArray","setToArray","stacked","equalArrays","offset","keysFunc","symbolsFunc","arrayPush","resIndex","propertyIsEnumerable","nativeGetSymbols","getOwnPropertySymbols","arrayFilter","stubArray","iteratee","isObjectLike","baseIsArguments","freeExports","nodeType","freeModule","Buffer","isBuffer","stubFalse","reIsUint","typedArrayTags","isLength","freeProcess","process","nodeUtil","types","binding","nodeIsTypedArray","isTypedArray","baseUnary","baseIsTypedArray","inherited","isArr","isArg","isArguments","isBuff","isType","skipIndexes","baseTimes","isIndex","Ctor","constructor","transform","arg","overArg","isPrototype","nativeKeys","isArrayLike","arrayLikeKeys","baseKeys","baseGetAllKeys","getSymbols","objProps","getAllKeys","objLength","objStacked","skipCtor","objValue","objCtor","othCtor","dataViewCtorString","DataView","mapCtorString","promiseCtorString","setCtorString","Set","weakMapCtorString","WeakMap","getTag","ArrayBuffer","ctorString","objectTag","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsEqual","baseIsEqualDeep","emptyParams","alreadyFetchedPermissions","{}","usePermissionsWithRefetch","_useSafeSetState","state","setState","useGetPermissions","fetchPermissions","isEqual","refetch","englishMessages","auth","dialog","container_permissions","resource_permissions","login_required","action","view_my_profile","edit_my_profile","right","read","append","write","container","anonymous","authenticated","agent_select","username_or_email","resource_show_forbidden","resource_edit_forbidden","resource_delete_forbidden","resource_control_forbidden","container_create_forbidden","container_list_forbidden","user_not_allowed_to_login","user_email_not_found","user_email_exist","username_exist","username_invalid","new_user_created","user_connected","user_disconnected","bad_request","account_settings_updated","login_to_continue","choose_pod_provider","frenchMessages"],"mappings":";;0mRAOA,SAASA,GAAsBC,GAC3BC,KAAKD,QAAUA,EAGnBD,GAAsBG,UAAY,IAAIC,MACtCJ,GAAsBG,UAAUE,KAAO,wBA6BvC,IAAAC,GAAkC,oBAAXC,QACnBA,OAAOC,MACPD,OAAOC,KAAKC,KAAKF,SA7BrB,SAAkBG,GACd,IAAIC,EAAMC,OAAOF,GAAOG,QAAQ,MAAO,IACvC,GAAIF,EAAIG,OAAS,GAAK,EAClB,MAAM,IAAId,GACN,qEAGR,IAEI,IAAYe,EAAIC,EAAZC,EAAK,EAAeC,EAAM,EAAGC,EAAS,GAEzCH,EAASL,EAAIS,OAAOF,MAEpBF,IACCD,EAAKE,EAAK,EAAS,GAALF,EAAUC,EAASA,EAG/BC,IAAO,GACVE,GAAUP,OAAOS,aAAa,IAAON,KAAS,EAAIE,EAAM,IACzD,EAGAD,EA/BI,oEA+BWM,QAA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C,gBAAiB,qBAEnBC,MAAO,CACL3lB,SAAU,CACR4lB,KAAM,OACNC,OAAQ,WACRC,MAAO,WACPtnB,QAAS,eAEXunB,UAAW,CACTH,KAAM,SACNC,OAAQ,UACRC,MAAO,UACPtnB,QAAS,gBAGb9C,MAAO,CACLsqB,UAAW,wBACXC,cAAe,0BAEjBr2B,MAAO,CACLs2B,aAAc,4BACd32B,KAAM,SACN6G,SAAU,qBACVwB,MAAO,iBACPuuB,kBAAmB,iCAErBh3B,QAAS,CACPi3B,wBAAyB,wDACzBC,wBAAyB,yDACzBC,0BAA2B,0DAC3BC,2BAA4B,8DAC5BC,2BAA4B,wDAC5BC,yBAA0B,uDAC1BC,0BAA2B,4DAC3BC,qBAAsB,8CACtBC,iBAAkB,gDAClBC,eAAgB,6CAChBC,iBACE,wHACFC,iBAAkB,sCAClBC,eAAgB,gCAChBC,kBAAmB,kCACnBC,YAAa,sEACbC,yBAA0B,gEAC1BC,kBAAmB,yCACnBC,oBAAqB"} \ No newline at end of file diff --git a/src/frontend/packages/auth-provider/src/authProvider.js b/src/frontend/packages/auth-provider/src/authProvider.js index 78a718bfb..d40e1c5d8 100644 --- a/src/frontend/packages/auth-provider/src/authProvider.js +++ b/src/frontend/packages/auth-provider/src/authProvider.js @@ -108,9 +108,13 @@ const authProvider = ({ const aclUri = getAclUri(uri); - const { json } = await dataProvider.fetch(aclUri); - - return json['@graph']; + try { + const { json } = await dataProvider.fetch(aclUri); + return json['@graph']; + } catch(e) { + console.warn(`Could not fetch ACL URI ${uri}`); + return []; + } }, addPermission: async (uri, agentId, predicate, mode) => { if (!uri || !uri.startsWith('http')) throw new Error('The first parameter passed to addPermission must be an URL');