source: CMESS/mediaplayer/branches/zmsgraphic_extedit/zmsgraphic_extedit.metaobj.xml @ 1339

Revision 1339, 160.3 KB checked in by cmeier, 16 months ago (diff)

refreshed metaobj-xml-export using ZMS2-2.13

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<list>
3    <item type="dictionary">
4      <dictionary>
5        <item key="key"><![CDATA[ZMSGraphic_extEdit]]></item>
6        <item key="value" type="dictionary">
7          <dictionary>
8            <item key="__obj_attrs__" type="list">
9              <list>
10                <item type="dictionary">
11                  <dictionary>
12                    <item key="custom">
13                      <data content_type="image/png" filename="ZMSGraphic_extEdit.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000004084944415478da62aeabab7b2d2e219ac6101119a6f1e9d3a7ff0001c49c9a91a6cfcfc7c3c720d9cbfb7fc5e2ed7f00028831232b55534b27f4da7786ff0c7c7fdffe61707377fb6f616ee5dedadafa9f8181c11d2000004400bbff037878753e23242389191a18de191819dc02e7df02892c326057364368cdeeeded55020101010392f791000bfbdb00ecededf2003c3b423324232397dadadaff131213ff020084007bff017777763dd6cdf20b282a227f000000f70000000000000109e7e6ebb1d8e0bdce04ececebc2121316bea41a9d380009f2005be35b0013458b0024dba931c78fac0704e8e9e728130b179bc656bb0014141500fafbf6001212000061a6ba07e8e8e8520141414100fbfafb00f6f7f600f5f6f600dcdbdb00070707892a2a2a47cccccc5b02000801f7fe01797979fff3f3f130f5f5f5effafbfbe1f1f1f127f6f6f602fdfeffbdfcfafa5b04e6e2f11f13101ea9090d0204000000bf1a1201a301020000c9cac424fafce60304f5f5f824939769389ba1d300fc02f40000010100736742003e38b935f8f7f7c202fdfcfd2b0303030084fc4900d9cdaa00354b460003020400e6ebdf0af6f7f74702fafafac0010102000c190d000c0c0c003c19fb00dddddd00171321eaf3f3f4bc02fdfefe18f6f5f800c63bcc0000ff010005050500f4f4f300e8eadf11eaeae9fd04f8fce89b50505148fcfcfedf060701c62424241341414100f3f4ee550404041102fdfcfe20fafbf7b9f5f6f1da01010114dddddd0129292900eeefefb0fcfcfcb902b44835a14d0451f8dbdffcac886d2d09c55550bc780b5a44113c19a222280a6aa01e02de84e02925e0c583de3cf45028e941055b73f7a022355a0c146cc09c244805aba9ad855893dd99eececcfa363ac38337bc99f77df3be6f3807a5e4ebadae7f47839151a02d55378ad46582e75434a5940da5d4581445bf99cf559f6d5c0865f0806a051a43ffd8c6379e4d58230b8f9f3f3ce10d3ce8ba86f8638438cc4139f902b66d617666110bcf9e9c657ce722d55e999cf33121c26e3a6180f90c8f1a4b18b8dfe11a277166ff24fe887ffe58f90c4ce701cb309469257b5eaf9f24c67b4cc6d90b29b532ddf1745dc77ca70c2d8890b076b1fe740ad56a15b55a0df973f41a39621389f51f9d7119a9454d8bae9aa4fda9503823c4d089291e3f7214d943a7e16cdd87547787e8954a05c414b5f939743adbc68189c37cf5d3db1b9ec71a5ae17cfe960a521f6c6d7c62efbed4140d0aa6611bbd9dcd010bb6afbc597ae9b6db6d388e8352a984e5e5f7ef2cdbbe944c24af93d08dd8ae2b2214a3a4c4b5200c7e92340882900b21cbee41f7e6d7b5b58f24ddbd5c2eb7da6ab5468bc5e26ebd5ef7d3e9f42fc6fcdb43bf5303c4c8d400718390ce719ecd64d06c36e91ce2ff2a506c52a42814c597bf1496e7ea0dafa8440000000049454e44ae426082</data>
14                    </item>
15                    <item key="id"><![CDATA[icon]]></item>
16                    <item key="mandatory" type="int">0</item>
17                    <item key="multilang" type="int">0</item>
18                    <item key="name"><![CDATA[icon]]></item>
19                    <item key="repetitive" type="int">0</item>
20                    <item key="type"><![CDATA[resource]]></item>
21                  </dictionary>
22                </item>
23                <item type="dictionary">
24                  <dictionary>
25                    <item key="custom">
26                      <data content_type="application/x-javascript" filename="handleEdit.js" type="file">7661722074656d705f6163745f6865696768740909090909093d20303b0d0a7661722074656d705f6163745f77696474680909090909093d20303b0d0a7661722074656d705f6163745f7468756d625f6865696768740909093d20303b0d0a7661722074656d705f6163745f7468756d625f77696474680909093d20303b0d0a7661722074656d705f63726f705f617069090909090909093d206e756c6c3b0d0a7661722074656d705f63726f705f68697265730909090909093d206e756c6c3b0d0a766172202474656d705f627574746f6e735f63726f70090909093d206e756c6c3b0d0a766172202474656d705f627574746f6e735f64696d09090909093d206e756c6c3b0d0a766172202474656d705f627574746f6e735f6d61696e090909093d206e756c6c3b0d0a766172202474656d705f627574746f6e735f726573697a650909093d206e756c6c3b0d0a766172202474656d705f616374696f6e5f6c69737409090909093d206e756c6c3b0d0a766172202474656d705f666f726d2009090909090909093d206e756c6c3b0d0a766172202474656d705f696d675f636f6e7461696e6572090909093d206e756c6c3b0d0a766172202474656d705f696e707574735f64696d09090909093d206e756c6c3b0d0a766172202474656d705f6c6162656c5f686972657309090909093d206e756c6c3b0d0a766172202474656d705f6c6162656c5f68697265735f726573697a65093d206e756c6c3b0d0a766172202474656d705f6c6162656c5f7468756d6209090909093d206e756c6c3b0d0a766172202474656d705f6c6162656c5f7468756d625f63726f7009093d206e756c6c3b0d0a766172202474656d705f7069706509090909090909093d206e756c6c3b0d0a766172202474656d705f7468756d625f636f6e7461696e65720909093d206e756c6c3b0d0a766172202474656d705f7468756d625f776964746809090909093d206e756c6c3b0d0a766172202474656d705f7468756d625f686569676874090909093d206e756c6c3b0d0a766172202474656d705f776f726b73706163655f64696d090909093d206e756c6c3b0d0a0d0a66756e6374696f6e206368616e6765427574746f6e417661696c6162696c69747928617661696c61626c652c2024627574746f6e732c206368616e67655f7374796c65290d0a7b0d0a0969662028617661696c61626c65290d0a090924627574746f6e732e636c69636b28636c69636b6564416374696f6e293b0d0a09656c73650d0a090924627574746f6e732e756e62696e642827636c69636b272c20636c69636b6564416374696f6e293b0d0a090d0a09696620286368616e67655f7374796c65290d0a097b0d0a090924627574746f6e732e656163682866756e6374696f6e28696e6465782c20627574746f6e290d0a09097b0d0a09092020766172202474656d705f627574746f6e203d202428627574746f6e293b0d0a090920200d0a090920206966202821617661696c61626c65290d0a09092020092474656d705f627574746f6e2e72656d6f76654174747228277374796c6527293b0d0a09092020090d0a09092020696620282474656d705f627574746f6e2e69732827696d672729290d0a09092020092474656d705f627574746f6e2e617474722827737263272c202474656d705f627574746f6e2e61747472282773726327292e7265706c6163652828617661696c61626c65203f202f5f64697361626c65642f67203a202f2e706e672f67292c2028617661696c61626c65203f202727203a20275f64697361626c65642e706e67272929293b0d0a09092020656c73650d0a090920207b0d0a090920200969662028617661696c61626c65290d0a09092020097b0d0a0909202009092474656d705f627574746f6e2e72656d6f766541747472282764697361626c656427293b0d0a0909202009092474656d705f627574746f6e2e72656d6f76654174747228277374796c6527293b0d0a09092020097d0d0a0909202009656c73650d0a09092020097b0d0a0909092020092474656d705f627574746f6e2e61747472282764697361626c6564272c202764697361626c656427293b0d0a0909092020092474656d705f627574746f6e2e6373732827636f6c6f72272c20272363636327293b0d0a09092020097d0d0a090920207d0d0a09092020090d0a0909202069662028617661696c61626c65290d0a09092020092474656d705f627574746f6e2e6373732827637572736f72272c2027706f696e74657227293b0d0a09097d293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e206368616e6765427574746f6e5669736962696c6974792876697369626c652c2024627574746f6e73290d0a7b0d0a096368616e6765427574746f6e417661696c6162696c6974792876697369626c652c2024627574746f6e732c2066616c7365293b0d0a090d0a096966202876697369626c65290d0a090924627574746f6e732e73686f7728293b0d0a09656c73650d0a090924627574746f6e732e6869646528293b0d0a7d0d0a0d0a66756e6374696f6e206368616e67654a63726f70417661696c6162696c69747928617661696c61626c652c2063726f7070696e672c2063726f705f6869726573290d0a7b0d0a096966202874656d705f63726f705f61706920213d206e756c6c290d0a090974656d705f63726f705f6170692e64657374726f7928293b0d0a0909090d0a0969662028617661696c61626c65290d0a097b0d0a09097661722074656d705f686569676874093d202863726f7070696e67202626202163726f705f686972657329203f207061727365496e74282474656d705f7468756d625f6865696768742e76616c282929203a2074656d705f6163745f6865696768743b0d0a09097661722074656d705f7769647468093d202863726f7070696e67202626202163726f705f686972657329203f207061727365496e74282474656d705f7468756d625f77696474682e76616c282929203a2074656d705f6163745f77696474683b0d0a09090d0a090974656d705f63726f705f617069203d20242e4a63726f70282474656d705f696d675f636f6e7461696e65722e66696e642827696d6727292e65712830292c200d0a0909097b200d0a09090909616c6c6f7753656c656374093a2066616c73652c0d0a09090909617370656374526174696f093a2074656d705f77696474682f74656d705f6865696768742c0d0a090909096d696e53697a650909093a205b32352c2032355d2c0d0a090909096d617853697a650909093a205b696d675f696e666f5b27776f726b7370616365275d5b277769647468275d2c20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d5d2c0d0a0909090968616e646c65730909093a20747275652c0d0a090909096f6e4368616e676509093a206368616e67656453656c656374696f6e0d0a0909097d293b0d0a090974656d705f63726f705f6170692e73657453656c656374285b302c20302c2074656d705f77696474682c2074656d705f6865696768745d293b0d0a090974656d705f63726f705f6170692e7365744f7074696f6e73287b20616c6c6f77526573697a653a20747275652c20616c6c6f774d6f76653a2063726f7070696e677d293b0d0a090974656d705f63726f705f6170692e666f63757328293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e206368616e67656453656c656374696f6e2864696d656e73696f6e73290d0a7b0d0a09696620282474656d705f6c6162656c5f68697265735f726573697a6520213d206e756c6c290d0a09092474656d705f6c6162656c5f68697265735f726573697a652e746578742864696d656e73696f6e732e77202b202720782027202b2064696d656e73696f6e732e68293b0d0a09656c736520696620282474656d705f6c6162656c5f7468756d625f63726f7020213d206e756c6c290d0a09092474656d705f6c6162656c5f7468756d625f63726f702e746578742864696d656e73696f6e732e77202b202720782027202b2064696d656e73696f6e732e68293b0d0a7d0d0a0d0a66756e6374696f6e206368616e676544696d656e73696f6e732872657365745f64696d73290d0a7b0d0a097661722074656d705f6368616e67655f776f726b73706163653b0d0a090d0a09696620282172657365745f64696d73290d0a097b0d0a09097661722074656d705f68656967687420090909093d097061727365496e74282474656d705f7468756d625f6865696768742e76616c2829293b0d0a09097661722074656d705f776964746809090909093d207061727365496e74282474656d705f7468756d625f77696474682e76616c2829293b0d0a09097661722074656d705f776f726b73706163655f64696d093d207061727365496e74282474656d705f776f726b73706163655f64696d2e76616c2829293b0d0a09090d0a090974656d705f68656967687420090909093d202874656d705f686569676874203d3d204e614e29203f2074656d705f6163745f7468756d625f686569676874203a2074656d705f6865696768743b0d0a090974656d705f776964746809090909093d202874656d705f7769647468203d3d204e614e29203f2074656d705f6163745f7468756d625f7769647468203a2074656d705f77696474683b0d0a090974656d705f776f726b73706163655f64696d093d202874656d705f776f726b73706163655f64696d203d3d204e614e29203f20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d203a2074656d705f776f726b73706163655f64696d3b0d0a09090d0a09097661722074656d705f6368616e67655f7468756d62093d202874656d705f68656967687420213d2074656d705f6163745f7468756d625f68656967687429207c7c202874656d705f776964746820213d2074656d705f6163745f7468756d625f7769647468293b0d0a090974656d705f6368616e67655f776f726b7370616365093d2074656d705f776f726b73706163655f64696d20213d20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d3b0d0a0d0a090969662028636f6e6669726d44696d656e73696f6e4368616e6765732874656d705f6368616e67655f7468756d622c2074656d705f6368616e67655f776f726b737061636529290d0a09097b0d0a0909096966202874656d705f6368616e67655f7468756d62290d0a0909097b0d0a090909097661722074656d705f7374796c65203d202474656d705f7468756d625f636f6e7461696e65722e6174747228277374796c6527293b0d0a090909090d0a0909090974656d705f6163745f7468756d625f686569676874203d204d6174682e6d61782832352c204d6174682e6d696e2874656d705f6865696768742c2074656d705f6163745f68656967687429293b0d0a0909090974656d705f6163745f7468756d625f7769647468093d204d6174682e6d61782832352c204d6174682e6d696e2874656d705f77696474682c2074656d705f6163745f776964746829293b0d0a090909090d0a0909090974656d705f7374796c65203d2074656d705f7374796c652e7265706c616365282f6d696e2d6865696768745b3a5c735c645c775d2a3b2f672c20276d696e2d6865696768743a2027202b2074656d705f6163745f7468756d625f686569676874202b202770783b2027293b0d0a0909090974656d705f7374796c65203d2074656d705f7374796c652e7265706c616365282f77696474685b3a5c735c645c775d2a3b2f672c202777696474683a2027202b2074656d705f6163745f7468756d625f7769647468202b202770783b2027293b0d0a090909090d0a090909092474656d705f7468756d625f636f6e7461696e65722e656d70747928293b0d0a090909092474656d705f7468756d625f636f6e7461696e65722e6174747228277374796c65272c2074656d705f7374796c65293b0d0a0909097d0d0a0909090d0a0909096966202874656d705f6368616e67655f776f726b7370616365290d0a0909097b0d0a090909097661722074656d705f7374796c65203d202474656d705f696d675f636f6e7461696e65722e6174747228277374796c6527293b0d0a090909090d0a09090909696d675f696e666f5b27776f726b7370616365275d5b277769647468275d203d204d6174682e6d696e28696d675f696e666f5b27776f726b7370616365275d5b2777696474685f6d6178275d2c2074656d705f776f726b73706163655f64696d290d0a090909090d0a0909090974656d705f7374796c65203d2074656d705f7374796c652e7265706c616365282f6d696e2d6865696768745b3a5c735c645c775d2a3b2f672c20276d696e2d6865696768743a2027202b20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d202b202770783b2027293b0d0a0909090974656d705f7374796c65203d2074656d705f7374796c652e7265706c616365282f77696474685b3a5c735c645c775d2a3b2f672c202777696474683a2027202b20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d202b202770783b2027293b0d0a090909090d0a090909092474656d705f616374696f6e5f6c6973742e656d70747928293b0d0a090909092474656d705f696d675f636f6e7461696e65722e656d70747928293b0d0a090909092474656d705f696d675f636f6e7461696e65722e6174747228277374796c65272c2074656d705f7374796c65293b0d0a090909092474656d705f7468756d625f636f6e7461696e65722e656d70747928293b0d0a0909097d0d0a09097d0d0a0909656c73650d0a09090974656d705f6368616e67655f776f726b7370616365203d2066616c73653b0d0a097d0d0a09656c73650d0a090974656d705f6368616e67655f776f726b7370616365203d2066616c73653b0d0a0d0a092474656d705f7468756d625f6865696768742e76616c2874656d705f6163745f7468756d625f686569676874293b0d0a092474656d705f7468756d625f77696474682e76616c2874656d705f6163745f7468756d625f7769647468293b0d0a092474656d705f776f726b73706163655f64696d2e76616c28696d675f696e666f5b27776f726b7370616365275d5b277769647468275d293b0d0a090d0a0972657475726e2074656d705f6368616e67655f776f726b73706163653b0d0a7d0d0a0d0a66756e6374696f6e20636c69636b6564416374696f6e28290d0a7b0d0a097661722074656d705f616374696f6e090909093d20242874686973292e617474722827696427292e746f4c6f7765724361736528292e7265706c616365282f7a6d73677261706869635f657874656469745f2f672c202727293b0d0a097661722074656d705f616a61785f72657175657374203d2066616c73653b0d0a090d0a09696620282874656d705f616374696f6e203d3d202763616e63656c2729207c7c202874656d705f616374696f6e203d3d20276f6b2729290d0a097b0d0a09092474656d705f666f726d2e66696e642827696e7075745b6e616d653d22616374696f6e225d27292e76616c2874656d705f616374696f6e293b0d0a09090d0a09096966202874656d705f616374696f6e203d3d20276f6b27290d0a0909092474656d705f666f726d2e66696e642827696e7075745b6e616d653d22696d675f696e666f225d27292e76616c2867657445646974506970654173584d4c28696d675f696e666f29293b0d0a09090d0a09092474656d705f666f726d2e7375626d697428293b0d0a097d0d0a09656c736520696620282874656d705f616374696f6e203d3d2027726f746174655f702729207c7c202874656d705f616374696f6e203d3d2027726f746174655f6d2729290d0a097b0d0a090969662028636f6e6669726d5468756d6252657365742829290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a6563742827726f74617465272c202874656d705f616374696f6e2e7265706c616365282f726f746174655f2f672c20272729203d3d20276d2729203f20202d31203a203129293b0d0a0909090d0a0909092474656d705f616374696f6e5f6c6973742e617070656e6428273c6f7074696f6e3e27202b20242874686973292e617474722827616c742729202b20273c2f6f7074696f6e3e27293b0d0a090909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027666c69705f6827290d0a097b0d0a090969662028636f6e6669726d5468756d6252657365742829290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a656374282766686f72697a6f6e74616c272c203129293b0d0a0909090d0a0909092474656d705f616374696f6e5f6c6973742e617070656e6428273c6f7074696f6e3e27202b20242874686973292e617474722827616c742729202b20273c2f6f7074696f6e3e27293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027666c69705f7627290d0a097b0d0a090969662028636f6e6669726d5468756d6252657365742829290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a656374282766766572746963616c272c203129293b0d0a0909090d0a0909092474656d705f616374696f6e5f6c6973742e617070656e6428273c6f7074696f6e3e27202b20242874686973292e617474722827616c742729202b20273c2f6f7074696f6e3e27293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027726573697a6527290d0a097b0d0a09092474656d705f6c6162656c5f68697265735f726573697a65203d202428273c6c6162656c207374796c653d22636f6c6f723a626c75653b223e27202b2074656d705f6163745f7769647468202b202720782027202b2074656d705f6163745f686569676874202b20273c2f6c6162656c3e27293b0d0a09092474656d705f6c6162656c5f68697265732e6e657874416c6c28273a6c61737427292e6166746572282474656d705f6c6162656c5f68697265735f726573697a65293b0d0a09090d0a09096368616e6765427574746f6e417661696c6162696c6974792866616c73652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c69747928747275652c202474656d705f627574746f6e735f726573697a65293b0d0a09096368616e67654a63726f70417661696c6162696c69747928747275652c2066616c73652c2066616c7365293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027726573697a655f6f6b27290d0a097b0d0a090964656c6574654c6162656c7328293b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f726573697a65293b0d0a09090d0a090969662028636f6e6669726d5468756d6252657365742829290d0a09097b0d0a0909097661722074656d705f61726561203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b200d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a6563742827726573697a65272c202874656d705f617265612e7832202d2074656d705f617265612e7829202b20272c27202b202874656d705f617265612e7932202d2074656d705f617265612e792929293b0d0a0909090d0a0909092474656d705f616374696f6e5f6c6973742e617070656e6428273c6f7074696f6e3e726573697a6520746f2027202b202874656d705f617265612e7832202d2074656d705f617265612e7829202b202720782027202b202874656d705f617265612e7932202d2074656d705f617265612e7929202b20273c2f6f7074696f6e3e27293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a09090d0a09096368616e67654a63726f70417661696c6162696c6974792866616c73652c2066616c73652c2066616c7365293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027726573697a655f63616e63656c27290d0a097b0d0a090964656c6574654c6162656c7328293b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f726573697a65293b0d0a09096368616e67654a63726f70417661696c6162696c6974792866616c73652c2066616c73652c2066616c7365293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202763726f7027290d0a097b0d0a090974656d705f63726f705f6869726573203d2066616c73653b0d0a09090d0a09092f2f206765742061637475616c207468756d622064696d656e73696f6e730d0a090974656d705f6163745f7468756d625f686569676874203d207061727365496e74282474656d705f7468756d625f6865696768742e76616c2829293b0d0a090974656d705f6163745f7468756d625f7769647468093d207061727365496e74282474656d705f7468756d625f77696474682e76616c2829293b0d0a09090d0a09092474656d705f6c6162656c5f7468756d625f63726f70203d202428273c6c6162656c207374796c653d22636f6c6f723a626c75653b223e27202b2074656d705f6163745f7468756d625f7769647468202b202720782027202b2074656d705f6163745f7468756d625f686569676874202b20273c2f6c6162656c3e27293b0d0a09092474656d705f6c6162656c5f7468756d622e6e657874416c6c28273a6c61737427292e6166746572282474656d705f6c6162656c5f7468756d625f63726f70293b0d0a09090d0a09096368616e6765427574746f6e417661696c6162696c6974792866616c73652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c69747928747275652c202474656d705f627574746f6e735f63726f70293b0d0a09096368616e67654a63726f70417661696c6162696c69747928747275652c20747275652c2066616c7365293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202763726f705f686972657327290d0a097b0d0a09096966202874656d705f63726f705f6869726573290d0a09097b0d0a0909096368616e6765427574746f6e417661696c6162696c6974792866616c73652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a0909096368616e6765427574746f6e5669736962696c69747928747275652c202474656d705f627574746f6e735f63726f70293b0d0a0909096368616e67654a63726f70417661696c6162696c69747928747275652c20747275652c2074727565293b0d0a09097d0d0a0909656c73650d0a09097b0d0a09090969662028636f6e6669726d486972657352657365742829290d0a0909097b0d0a0909090974656d705f63726f705f686972657309093d20747275653b0d0a0909090974656d705f616a61785f72657175657374203d20747275653b0d0a090909090d0a09090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a65637428277265736574272c203129293b0d0a0909097d0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202763726f705f6f6b27290d0a097b0d0a090964656c6574654c6162656c7328293b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f63726f70293b0d0a09090d0a09097661722074656d705f61726561203d2074656d705f63726f705f6170692e74656c6c53656c65637428293b200d0a0909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a656374282874656d705f63726f705f6869726573203f202763726f705f686972657327203a202763726f7027292c200d0a090909090909090909090909090974656d705f617265612e78202b20272c27202b2074656d705f617265612e79202b20272c27202b2074656d705f617265612e7832202b20272c27202b2074656d705f617265612e7932202b20272c27202b200d0a09090909090909090909090909092874656d705f63726f705f6869726573203f2074656d705f6163745f7769647468202b20272c27202b2074656d705f6163745f686569676874203a202474656d705f7468756d625f77696474682e76616c2829202b20272c27202b202474656d705f7468756d625f6865696768742e76616c28292929293b0d0a09090d0a09096368616e67654a63726f70417661696c6162696c6974792866616c73652c2066616c73652c2066616c7365293b0d0a09090d0a090974656d705f616a61785f72657175657374203d20747275653b0d0a090974656d705f63726f705f686972657309093d2066616c73653b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202763726f705f63616e63656c27290d0a097b0d0a090964656c6574654c6162656c7328293b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f63726f70293b0d0a09096368616e67654a63726f70417661696c6162696c6974792866616c73652c2066616c73652c2066616c7365293b0d0a09090d0a090974656d705f63726f705f6869726573203d2066616c73653b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202764696d656e73696f6e27290d0a097b0d0a09092f2f206765742061637475616c207468756d622064696d656e73696f6e730d0a090974656d705f6163745f7468756d625f686569676874203d207061727365496e74282474656d705f7468756d625f6865696768742e76616c2829293b0d0a090974656d705f6163745f7468756d625f7769647468093d207061727365496e74282474656d705f7468756d625f77696474682e76616c2829293b0d0a09092f2f206765742061637475616c20776f726b73706163652064696d656e73696f6e0d0a0909696d675f696e666f5b27776f726b7370616365275d5b277769647468275d093d207061727365496e74282474656d705f776f726b73706163655f64696d2e76616c2829293b0d0a09090d0a09096368616e6765427574746f6e417661696c6162696c6974792866616c73652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c69747928747275652c202474656d705f627574746f6e735f64696d293b0d0a09096368616e6765427574746f6e5669736962696c69747928747275652c202474656d705f696e707574735f64696d293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202764696d656e73696f6e5f6f6b27290d0a097b0d0a09097661722074656d705f776f726b73706163655f6368616e676564203d206368616e676544696d656e73696f6e7328293b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f64696d293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f696e707574735f64696d293b0d0a09090d0a09096966202874656d705f776f726b73706163655f6368616e676564290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a6563742827776f726b7370616365272c20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d29293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202764696d656e73696f6e5f63616e63656c27290d0a097b0d0a09096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e2c2074727565293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f64696d293b0d0a09096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f696e707574735f64696d293b0d0a09096368616e676544696d656e73696f6e732874727565293b0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d2027726573657427290d0a097b0d0a090969662028636f6e6669726d486972657352657365742829290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a65637428277265736574272c203129293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a09656c7365206966202874656d705f616374696f6e203d3d202764726f705f736861646f7727290d0a097b0d0a090969662028636f6e6669726d5468756d6252657365742829290d0a09097b0d0a090909696d675f696e666f5b277175657565275d2e707573682863726561746551756575654f626a656374282764726f705f736861646f77272c203129293b0d0a0909090d0a09090974656d705f616a61785f72657175657374203d20747275653b0d0a09097d0d0a097d0d0a090d0a096966202874656d705f616a61785f72657175657374290d0a097b0d0a09096a51756572792e706f7374287a6d73677261706869635f657874656469745f726571756573745f75726c2c207b616374696f6e203a202772657175657374272c20696d675f696e666f203a2067657445646974506970654173584d4c28696d675f696e666f297d2c2072656365697665446174612c20276a736f6e27293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e20636f6e6669726d44696d656e73696f6e4368616e676573287468756d625f64696d5f6368616e6765642c20776f726b73706163655f64696d5f6368616e676564290d0a7b0d0a097661722074656d705f7465787409093d2027417474656e74696f6e21273b0d0a097661722074656d705f726573756c74093d20747275653b0d0a090d0a09696620287468756d625f64696d5f6368616e67656420262620776f726b73706163655f64696d5f6368616e676564290d0a090974656d705f74657874202b3d2027205468756d622d44696d656e73696f6e7320616e6420576f726b73706163652d44696d656e73696f6e2077657265206368616e6765642e2050726576696f7573206368616e67657320616e64205468756d622d496d6167652077696c6c206265206c6f73742e273b0d0a09656c736520696620287468756d625f64696d5f6368616e676564290d0a090974656d705f74657874202b3d2027205468756d622d44696d656e73696f6e732077657265206368616e6765642e20205468756d622d696d6167652077696c6c206265206c6f7374273b0d0a09656c73652069662028776f726b73706163655f64696d5f6368616e676564290d0a090974656d705f74657874202b3d202720576f726b73706163652d44696d656e73696f6e20776173206368616e6765642e2050726576696f7573206368616e67657320616e64205468756d622d496d6167652077696c6c206265206c6f73742e273b0d0a0974656d705f74657874202b3d20275c6e446f20796f752077616e7420746f20636f6e74696e75653f273b0d0a090d0a09696620287468756d625f64696d5f6368616e676564207c7c20776f726b73706163655f64696d5f6368616e676564290d0a090974656d705f726573756c74203d20636f6e6669726d2874656d705f74657874293b0d0a09090d0a0972657475726e2074656d705f726573756c743b0d0a7d0d0a0d0a66756e6374696f6e20636f6e6669726d4869726573526573657428290d0a7b0d0a097661722074656d705f726573756c74203d20636f6e6669726d2827417474656e74696f6e2120496d6167652077696c6c206265207265637265617465642066726f6d204f726967696e616c2e2050726576696f7573206368616e67657320616e64205468756d622d496d6167652077696c6c206265206c6f73742e5c6e446f20796f752077616e7420746f20636f6e74696e75653f27293b0d0a090d0a09696620282874656d705f726573756c742920262620282474656d705f7468756d625f636f6e7461696e65722e66696e642827696d6727292e6c656e677468203e203029290d0a09092474656d705f7468756d625f636f6e7461696e65722e656d70747928293b0d0a090d0a0972657475726e2074656d705f726573756c743b0d0a7d0d0a0d0a66756e6374696f6e20636f6e6669726d5468756d62526573657428290d0a7b0d0a097661722074656d705f726573756c74203d20747275653b0d0a090d0a09696620282474656d705f7468756d625f636f6e7461696e65722e66696e642827696d6727292e6c656e677468203e2030290d0a097b0d0a090974656d705f726573756c74203d20636f6e6669726d2827417474656e74696f6e2120507265766965772077696c6c206265206c6f73742e5c6e446f20796f752077616e7420746f20636f6e74696e75653f27293b0d0a090d0a09096966202874656d705f726573756c74290d0a0909092474656d705f7468756d625f636f6e7461696e65722e656d70747928293b0d0a097d0d0a090d0a0972657475726e2074656d705f726573756c743b0d0a7d0d0a0d0a66756e6374696f6e2063726561746551756575654f626a65637428616374696f6e2c2076616c7565290d0a7b0d0a097661722074656d705f6f626a203d206e6577204f626a65637428293b0d0a090d0a0974656d705f6f626a5b27616374696f6e275d09093d20616374696f6e3b0d0a0974656d705f6f626a5b2776616c7565275d0909093d2076616c75653b0d0a0974656d705f6f626a5b2766696c656e616d65275d093d206e756c6c3b0d0a0974656d705f6f626a5b2775726c275d090909093d206e756c6c3b0d0a0974656d705f6f626a5b277769647468275d0909093d206e756c6c3b0d0a0974656d705f6f626a5b27686569676874275d09093d206e756c6c3b0d0a090d0a0972657475726e2074656d705f6f626a3b0d0a7d0d0a0d0a66756e6374696f6e2064656c6574654c6162656c7328290d0a7b0d0a09696620282474656d705f6c6162656c5f68697265735f726573697a6520213d206e756c6c290d0a097b0d0a09092474656d705f6c6162656c5f68697265735f726573697a652e72656d6f766528293b0d0a09092474656d705f6c6162656c5f68697265735f726573697a65203d206e756c6c3b0d0a097d0d0a09696620282474656d705f6c6162656c5f7468756d625f63726f7020213d206e756c6c290d0a097b0d0a09092474656d705f6c6162656c5f7468756d625f63726f702e72656d6f766528293b0d0a09092474656d705f6c6162656c5f7468756d625f63726f70203d206e756c6c3b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e2067657441637444696d46726f6d517565756528696d675f696e666f290d0a7b0d0a097661722074656d705f706f73203d20696d675f696e666f5b277175657565275d2e6c656e677468202d20313b0d0a090d0a0974656d705f6163745f686569676874093d20696d675f696e666f5b277175657565275d5b74656d705f706f735d5b27686569676874275d3b0d0a0974656d705f6163745f7769647468093d20696d675f696e666f5b277175657565275d5b74656d705f706f735d5b277769647468275d3b0d0a7d0d0a0d0a66756e6374696f6e2067657445646974506970654173584d4c28696d675f696e666f290d0a7b0d0a097661722074656d705f786d6c203d2027273b0d0a090d0a0974656d705f786d6c202b3d20273c64696374696f6e6172793e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d2271756575652220747970653d226c697374223e3c6c6973743e5c6e273b0d0a090d0a09666f7220287661722069203d20303b2069203c20696d675f696e666f5b277175657565275d2e6c656e6774683b20692b2b290d0a097b0d0a090974656d705f786d6c202b3d20273c6974656d20747970653d2264696374696f6e617279223e3c64696374696f6e6172793e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d22616374696f6e223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b27616374696f6e275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d2276616c7565223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b2776616c7565275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d2266696c656e616d65223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b2766696c656e616d65275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d2275726c223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b2775726c275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d227769647468223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b277769647468275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c6974656d206b65793d22686569676874223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277175657565275d5b695d5b27686569676874275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a090974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e273b0d0a097d0d0a090d0a0974656d705f786d6c202b3d20273c2f6c6973743e3c2f6974656d3e5c6e273b0d0a090d0a0974656d705f786d6c202b3d20273c6974656d206b65793d227468756d622220747970653d2264696374696f6e617279223e3c64696374696f6e6172793e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d2266696c656e616d65223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277468756d62275d5b2766696c656e616d65275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d2275726c223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277468756d62275d5b2775726c275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d2263726f705f626f78223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277468756d62275d5b2763726f705f626f78275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d227769647468223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277468756d62275d5b277769647468275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d22686569676874223e3c215b434441544127202b20275b27202b20696d675f696e666f5b277468756d62275d5b27686569676874275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e273b0d0a090d0a0974656d705f786d6c202b3d20273c6974656d206b65793d22776f726b73706163652220747970653d2264696374696f6e617279223e3c64696374696f6e6172793e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d227769647468223e3c215b434441544127202b20275b27202b20696d675f696e666f5b27776f726b7370616365275d5b277769647468275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c6974656d206b65793d2277696474685f6d6178223e3c215b434441544127202b20275b27202b20696d675f696e666f5b27776f726b7370616365275d5b2777696474685f6d6178275d202b20275d27202b20275d3e3c2f6974656d3e5c6e273b0d0a0974656d705f786d6c202b3d20273c2f64696374696f6e6172793e3c2f6974656d3e5c6e270d0a090d0a0974656d705f786d6c202b3d20273c2f64696374696f6e6172793e5c6e273b0d0a090d0a0972657475726e2074656d705f786d6c3b0d0a7d0d0a0d0a66756e6374696f6e20726563656976654461746128646174612c2074657874537461747573290d0a7b0d0a09696620282874657874537461747573203d3d20277375636365737327292026262028646174615b27726573756c74275d203e203029290d0a097b0d0a0909696d675f696e666f203d20646174615b27696d675f696e666f275d3b0d0a09090d0a09097661722074656d705f71756575655f706f73203d20696d675f696e666f5b277175657565275d2e6c656e677468202d20313b0d0a09090d0a0909696620282474656d705f696d675f636f6e7461696e65722e66696e642827696d6727292e6c656e677468203e2030290d0a09097b0d0a090909696620282474656d705f696d675f636f6e7461696e65722e66696e642827696d6727292e617474722827737263272920213d20696d675f696e666f5b277175657565275d5b74656d705f71756575655f706f735d5b2775726c275d290d0a090909092474656d705f696d675f636f6e7461696e65722e66696e642827696d6727292e617474722827737263272c20696d675f696e666f5b277175657565275d5b74656d705f71756575655f706f735d5b2775726c275d293b0d0a09097d0d0a0909656c73650d0a0909092474656d705f696d675f636f6e7461696e65722e617070656e6428273c696d67207372633d2227202b20696d675f696e666f5b277175657565275d5b74656d705f71756575655f706f735d5b2775726c275d202b202722202f3e27293b0d0a09090d0a090969662028696d675f696e666f5b277468756d62275d5b2775726c275d20213d20276e756c6c27290d0a09097b0d0a090909696620282474656d705f7468756d625f636f6e7461696e65722e66696e642827696d6727292e6c656e677468203e2030290d0a090909092474656d705f7468756d625f636f6e7461696e65722e66696e642827696d6727292e617474722827737263272c20696d675f696e666f5b277468756d62275d5b2775726c275d293b0d0a090909656c73650d0a090909092474656d705f7468756d625f636f6e7461696e65722e617070656e6428273c696d67207372633d2227202b20696d675f696e666f5b277468756d62275d5b2775726c275d202b202722202f3e27293b0d0a09097d0d0a0909090d0a090967657441637444696d46726f6d517565756528696d675f696e666f290d0a090972656e646572496d67496e666f28696d675f696e666f290d0a09090d0a09096966202874656d705f63726f705f6869726573290d0a090909242827235a4d53477261706869635f657874456469745f63726f705f686972657327292e636c69636b28293b0d0a097d0d0a7d0d0a0d0a66756e6374696f6e2072656e646572496d67496e666f28696d675f696e666f290d0a7b0d0a092474656d705f6c6162656c5f68697265732e746578742874656d705f6163745f7769647468202b202720782027202b2074656d705f6163745f686569676874293b0d0a0969662028696d675f696e666f5b277468756d62275d5b2775726c275d203d3d20276e756c6c27290d0a09092474656d705f6c6162656c5f7468756d622e7465787428274e6f6e6527293b0d0a09656c73650d0a09092474656d705f6c6162656c5f7468756d622e746578742874656d705f6163745f7468756d625f7769647468202b202720782027202b2074656d705f6163745f7468756d625f686569676874293b0d0a7d0d0a0d0a242827646f63756d656e7427292e72656164792866756e6374696f6e28290d0a7b0d0a092474656d705f666f726d0909090909093d20242827235a4d53477261706869635f657874456469745f666f726d27293b0d0a092474656d705f706970650909090909093d202474656d705f666f726d2e66696e642827696e7075745b6e616d653d2270697065225d27293b0d0a092474656d705f616374696f6e5f6c6973740909093d20242827235a4d53477261706869635f657874456469745f616374696f6e4c69737427293b0d0a092474656d705f696d675f636f6e7461696e657220093d20242827235a4d53477261706869635f657874456469745f696d61676527293b0d0a092474656d705f6c6162656c5f68697265730909093d20242827235a4d53477261706869635f657874456469745f696e666f5f686972657327293b0d0a092474656d705f6c6162656c5f7468756d620909093d20242827235a4d53477261706869635f657874456469745f696e666f5f7468756d6227293b0d0a092474656d705f7468756d625f636f6e7461696e6572093d20242827235a4d53477261706869635f657874456469745f7468756d625f696d6727293b0d0a092474656d705f7468756d625f68656967687409093d20242827235a4d53477261706869635f657874456469745f7468756d625f68656967687427293b0d0a092474656d705f7468756d625f77696474680909093d20242827235a4d53477261706869635f657874456469745f7468756d625f776964746827293b0d0a092474656d705f776f726b73706163655f64696d09093d20242827235a4d53477261706869635f657874456469745f776f726b737061636527293b0d0a090d0a092474656d705f627574746f6e735f63726f7009093d20242827235a4d53477261706869635f657874456469745f63726f705f63616e63656c2c20235a4d53477261706869635f657874456469745f63726f705f6f6b27293b0d0a092474656d705f627574746f6e735f64696d0909093d20242827235a4d53477261706869635f657874456469745f64696d656e73696f6e5f63616e63656c2c20235a4d53477261706869635f657874456469745f64696d656e73696f6e5f6f6b27293b0d0a09696620287a6d73677261706869635f657874656469745f6861735f7375706572726573290d0a09092474656d705f627574746f6e735f6d61696e093d20242827235a4d53477261706869635f657874456469745f63726f702c20235a4d53477261706869635f657874456469745f64696d656e73696f6e2c20235a4d53477261706869635f657874456469745f666c69705f682c20235a4d53477261706869635f657874456469745f666c69705f762c2027202b0d0a090909090909090909090909090927235a4d53477261706869635f657874456469745f726573697a652c20235a4d53477261706869635f657874456469745f726f746174655f6d2c20235a4d53477261706869635f657874456469745f726f746174655f702c20235a4d53477261706869635f657874456469745f72657365742c2027202b0d0a090909090909090909090909090927235a4d53477261706869635f657874456469745f63726f705f68697265732c20235a4d53477261706869635f657874456469745f64726f705f736861646f772c20235a4d53477261706869635f657874456469745f63616e63656c2c20235a4d53477261706869635f657874456469745f6f6b27293b0d0a09656c73650d0a097b0d0a09092474656d705f627574746f6e735f6d61696e093d20242827235a4d53477261706869635f657874456469745f63726f702c20235a4d53477261706869635f657874456469745f64696d656e73696f6e2c20235a4d53477261706869635f657874456469745f666c69705f682c20235a4d53477261706869635f657874456469745f666c69705f762c2027202b0d0a090909090909090909090909090927235a4d53477261706869635f657874456469745f726573697a652c20235a4d53477261706869635f657874456469745f726f746174655f6d2c20235a4d53477261706869635f657874456469745f726f746174655f702c2027202b0d0a090909090909090909090909090927235a4d53477261706869635f657874456469745f64726f705f736861646f772c20235a4d53477261706869635f657874456469745f63616e63656c2c20235a4d53477261706869635f657874456469745f6f6b27293b0d0a09090909090909090909090909090d0a09096368616e6765427574746f6e417661696c6162696c6974792866616c73652c20242827235a4d53477261706869635f657874456469745f72657365742c20235a4d53477261706869635f657874456469745f63726f705f686972657327292c2074727565293b0d0a097d0d0a09090d0a092474656d705f627574746f6e735f726573697a65093d20242827235a4d53477261706869635f657874456469745f726573697a655f63616e63656c2c20235a4d53477261706869635f657874456469745f726573697a655f6f6b27293b0d0a092474656d705f696e707574735f64696d0909093d20242827235a4d53477261706869635f657874456469745f7468756d625f64696d27293b0d0a090d0a096368616e6765427574746f6e417661696c6162696c69747928747275652c202474656d705f627574746f6e735f6d61696e293b0d0a096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f63726f70293b0d0a096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f64696d293b0d0a096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f627574746f6e735f726573697a65293b0d0a096368616e6765427574746f6e5669736962696c6974792866616c73652c202474656d705f696e707574735f64696d293b0d0a090d0a0967657441637444696d46726f6d517565756528696d675f696e666f293b0d0a7d293b</data>
27                    </item>
28                    <item key="id"><![CDATA[handleEdit.js]]></item>
29                    <item key="mandatory" type="int">0</item>
30                    <item key="multilang" type="int">0</item>
31                    <item key="name"><![CDATA[handleEdit.js]]></item>
32                    <item key="repetitive" type="int">0</item>
33                    <item key="type"><![CDATA[resource]]></item>
34                  </dictionary>
35                </item>
36                <item type="dictionary">
37                  <dictionary>
38                    <item key="custom">
39                      <data content_type="text/x-c" filename="jquery.Jcrop.js" type="file"><![CDATA[/**
40 * jquery.Jcrop.js v0.9.8
41 * jQuery Image Cropping Plugin
42 * @author Kelly Hallman <khallman@gmail.com>
43 * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{
44 *
45 * Permission is hereby granted, free of charge, to any person
46 * obtaining a copy of this software and associated documentation
47 * files (the "Software"), to deal in the Software without
48 * restriction, including without limitation the rights to use,
49 * copy, modify, merge, publish, distribute, sublicense, and/or sell
50 * copies of the Software, and to permit persons to whom the
51 * Software is furnished to do so, subject to the following
52 * conditions:
53
54 * The above copyright notice and this permission notice shall be
55 * included in all copies or substantial portions of the Software.
56
57 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
58 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
59 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
60 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
61 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
62 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
63 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
64 * OTHER DEALINGS IN THE SOFTWARE.
65
66 * }}}
67 */
68
69(function($) {
70
71$.Jcrop = function(obj,opt)
72{
73        // Initialization {{{
74
75        // Sanitize some options {{{
76        var obj = obj, opt = opt;
77
78        if (typeof(obj) !== 'object') obj = $(obj)[0];
79        if (typeof(opt) !== 'object') opt = { };
80
81        // Some on-the-fly fixes for MSIE...sigh
82        if (!('trackDocument' in opt))
83        {
84                opt.trackDocument = $.browser.msie ? false : true;
85                if ($.browser.msie && $.browser.version.split('.')[0] == '8')
86                        opt.trackDocument = true;
87        }
88
89        if (!('keySupport' in opt))
90                        opt.keySupport = $.browser.msie ? false : true;
91               
92        // }}}
93        // Extend the default options {{{
94        var defaults = {
95
96                // Basic Settings
97                trackDocument:          false,
98                baseClass:                      'jcrop',
99                addClass:                       null,
100
101                // Styling Options
102                bgColor:                        'black',
103                bgOpacity:                      .6,
104                borderOpacity:          .4,
105                handleOpacity:          .5,
106
107                handlePad:                      5,
108                handleSize:                     9,
109                handleOffset:           5,
110                edgeMargin:                     14,
111
112                aspectRatio:            0,
113                keySupport:                     true,
114                cornerHandles:          true,
115                sideHandles:            true,
116                drawBorders:            true,
117                dragEdges:                      true,
118
119                boxWidth:                       0,
120                boxHeight:                      0,
121
122                boundary:                       8,
123                animationDelay:         20,
124                swingSpeed:                     3,
125
126                allowSelect:            true,
127                allowMove:                      true,
128                allowResize:            true,
129
130                minSelect:                      [ 0, 0 ],
131                maxSize:                        [ 0, 0 ],
132                minSize:                        [ 0, 0 ],
133
134                // Callbacks / Event Handlers
135                onChange: function() { },
136                onSelect: function() { }
137
138        };
139        var options = defaults;
140        setOptions(opt);
141
142        // }}}
143        // Initialize some jQuery objects {{{
144
145        var $origimg = $(obj);
146        var $img = $origimg.clone().removeAttr('id').css({ position: 'absolute' });
147
148        $img.width($origimg.width());
149        $img.height($origimg.height());
150        $origimg.after($img).hide();
151
152        presize($img,options.boxWidth,options.boxHeight);
153
154        var boundx = $img.width(),
155                boundy = $img.height(),
156
157                $div = $('<div />')
158                        .width(boundx).height(boundy)
159                        .addClass(cssClass('holder'))
160                        .css({
161                                position: 'relative',
162                                backgroundColor: options.bgColor
163                        }).insertAfter($origimg).append($img);
164        ;
165       
166        if (options.addClass) $div.addClass(options.addClass);
167        //$img.wrap($div);
168
169        var $img2 = $('<img />')/*{{{*/
170                        .attr('src',$img.attr('src'))
171                        .css('position','absolute')
172                        .width(boundx).height(boundy)
173        ;/*}}}*/
174        var $img_holder = $('<div />')/*{{{*/
175                .width(pct(100)).height(pct(100))
176                .css({
177                        zIndex: 310,
178                        position: 'absolute',
179                        overflow: 'hidden'
180                })
181                .append($img2)
182        ;/*}}}*/
183        var $hdl_holder = $('<div />')/*{{{*/
184                .width(pct(100)).height(pct(100))
185                .css('zIndex',320);
186        /*}}}*/
187        var $sel = $('<div />')/*{{{*/
188                .css({
189                        position: 'absolute',
190                        zIndex: 300
191                })
192                .insertBefore($img)
193                .append($img_holder,$hdl_holder)
194        ;/*}}}*/
195
196        var bound = options.boundary;
197        var $trk = newTracker().width(boundx+(bound*2)).height(boundy+(bound*2))
198                .css({ position: 'absolute', top: px(-bound), left: px(-bound), zIndex: 290 })
199                .mousedown(newSelection);       
200       
201        /* }}} */
202        // Set more variables {{{
203
204        var xlimit, ylimit, xmin, ymin;
205        var xscale, yscale, enabled = true;
206        var docOffset = getPos($img),
207                // Internal states
208                btndown, lastcurs, dimmed, animating,
209                shift_down;
210
211        // }}}
212               
213
214                // }}}
215        // Internal Modules {{{
216
217        var Coords = function()/*{{{*/
218        {
219                var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy;
220
221                function setPressed(pos)/*{{{*/
222                {
223                        var pos = rebound(pos);
224                        x2 = x1 = pos[0];
225                        y2 = y1 = pos[1];
226                };
227                /*}}}*/
228                function setCurrent(pos)/*{{{*/
229                {
230                        var pos = rebound(pos);
231                        ox = pos[0] - x2;
232                        oy = pos[1] - y2;
233                        x2 = pos[0];
234                        y2 = pos[1];
235                };
236                /*}}}*/
237                function getOffset()/*{{{*/
238                {
239                        return [ ox, oy ];
240                };
241                /*}}}*/
242                function moveOffset(offset)/*{{{*/
243                {
244                        var ox = offset[0], oy = offset[1];
245
246                        if (0 > x1 + ox) ox -= ox + x1;
247                        if (0 > y1 + oy) oy -= oy + y1;
248
249                        if (boundy < y2 + oy) oy += boundy - (y2 + oy);
250                        if (boundx < x2 + ox) ox += boundx - (x2 + ox);
251
252                        x1 += ox;
253                        x2 += ox;
254                        y1 += oy;
255                        y2 += oy;
256                };
257                /*}}}*/
258                function getCorner(ord)/*{{{*/
259                {
260                        var c = getFixed();
261                        switch(ord)
262                        {
263                                case 'ne': return [ c.x2, c.y ];
264                                case 'nw': return [ c.x, c.y ];
265                                case 'se': return [ c.x2, c.y2 ];
266                                case 'sw': return [ c.x, c.y2 ];
267                        }
268                };
269                /*}}}*/
270                function getFixed()/*{{{*/
271                {
272                        if (!options.aspectRatio) return getRect();
273                        // This function could use some optimization I think...
274                        var aspect = options.aspectRatio,
275                                min_x = options.minSize[0]/xscale,
276                                min_y = options.minSize[1]/yscale,
277                                max_x = options.maxSize[0]/xscale,
278                                max_y = options.maxSize[1]/yscale,
279                                rw = x2 - x1,
280                                rh = y2 - y1,
281                                rwa = Math.abs(rw),
282                                rha = Math.abs(rh),
283                                real_ratio = rwa / rha,
284                                xx, yy
285                        ;
286                        if (max_x == 0) { max_x = boundx * 10 }
287                        if (max_y == 0) { max_y = boundy * 10 }
288                        if (real_ratio < aspect)
289                        {
290                                yy = y2;
291                                w = rha * aspect;
292                                xx = rw < 0 ? x1 - w : w + x1;
293
294                                if (xx < 0)
295                                {
296                                        xx = 0;
297                                        h = Math.abs((xx - x1) / aspect);
298                                        yy = rh < 0 ? y1 - h: h + y1;
299                                }
300                                else if (xx > boundx)
301                                {
302                                        xx = boundx;
303                                        h = Math.abs((xx - x1) / aspect);
304                                        yy = rh < 0 ? y1 - h : h + y1;
305                                }
306                        }
307                        else
308                        {
309                                xx = x2;
310                                h = rwa / aspect;
311                                yy = rh < 0 ? y1 - h : y1 + h;
312                                if (yy < 0)
313                                {
314                                        yy = 0;
315                                        w = Math.abs((yy - y1) * aspect);
316                                        xx = rw < 0 ? x1 - w : w + x1;
317                                }
318                                else if (yy > boundy)
319                                {
320                                        yy = boundy;
321                                        w = Math.abs(yy - y1) * aspect;
322                                        xx = rw < 0 ? x1 - w : w + x1;
323                                }
324                        }
325
326                        // Magic %-)
327                        if(xx > x1) { // right side
328                          if(xx - x1 < min_x) {
329                                xx = x1 + min_x;
330                          } else if (xx - x1 > max_x) {
331                                xx = x1 + max_x;
332                          }
333                          if(yy > y1) {
334                                yy = y1 + (xx - x1)/aspect;
335                          } else {
336                                yy = y1 - (xx - x1)/aspect;
337                          }
338                        } else if (xx < x1) { // left side
339                          if(x1 - xx < min_x) {
340                                xx = x1 - min_x
341                          } else if (x1 - xx > max_x) {
342                                xx = x1 - max_x;
343                          }
344                          if(yy > y1) {
345                                yy = y1 + (x1 - xx)/aspect;
346                          } else {
347                                yy = y1 - (x1 - xx)/aspect;
348                          }
349                        }
350
351                        if(xx < 0) {
352                                x1 -= xx;
353                                xx = 0;
354                        } else  if (xx > boundx) {
355                                x1 -= xx - boundx;
356                                xx = boundx;
357                        }
358
359                        if(yy < 0) {
360                                y1 -= yy;
361                                yy = 0;
362                        } else  if (yy > boundy) {
363                                y1 -= yy - boundy;
364                                yy = boundy;
365                        }
366
367                        return last = makeObj(flipCoords(x1,y1,xx,yy));
368                };
369                /*}}}*/
370                function rebound(p)/*{{{*/
371                {
372                        if (p[0] < 0) p[0] = 0;
373                        if (p[1] < 0) p[1] = 0;
374
375                        if (p[0] > boundx) p[0] = boundx;
376                        if (p[1] > boundy) p[1] = boundy;
377
378                        return [ p[0], p[1] ];
379                };
380                /*}}}*/
381                function flipCoords(x1,y1,x2,y2)/*{{{*/
382                {
383                        var xa = x1, xb = x2, ya = y1, yb = y2;
384                        if (x2 < x1)
385                        {
386                                xa = x2;
387                                xb = x1;
388                        }
389                        if (y2 < y1)
390                        {
391                                ya = y2;
392                                yb = y1;
393                        }
394                        return [ Math.round(xa), Math.round(ya), Math.round(xb), Math.round(yb) ];
395                };
396                /*}}}*/
397                function getRect()/*{{{*/
398                {
399                        var xsize = x2 - x1;
400                        var ysize = y2 - y1;
401
402                        if (xlimit && (Math.abs(xsize) > xlimit))
403                                x2 = (xsize > 0) ? (x1 + xlimit) : (x1 - xlimit);
404                        if (ylimit && (Math.abs(ysize) > ylimit))
405                                y2 = (ysize > 0) ? (y1 + ylimit) : (y1 - ylimit);
406
407                        if (ymin && (Math.abs(ysize) < ymin))
408                                y2 = (ysize > 0) ? (y1 + ymin) : (y1 - ymin);
409                        if (xmin && (Math.abs(xsize) < xmin))
410                                x2 = (xsize > 0) ? (x1 + xmin) : (x1 - xmin);
411
412                        if (x1 < 0) { x2 -= x1; x1 -= x1; }
413                        if (y1 < 0) { y2 -= y1; y1 -= y1; }
414                        if (x2 < 0) { x1 -= x2; x2 -= x2; }
415                        if (y2 < 0) { y1 -= y2; y2 -= y2; }
416                        if (x2 > boundx) { var delta = x2 - boundx; x1 -= delta; x2 -= delta; }
417                        if (y2 > boundy) { var delta = y2 - boundy; y1 -= delta; y2 -= delta; }
418                        if (x1 > boundx) { var delta = x1 - boundy; y2 -= delta; y1 -= delta; }
419                        if (y1 > boundy) { var delta = y1 - boundy; y2 -= delta; y1 -= delta; }
420
421                        return makeObj(flipCoords(x1,y1,x2,y2));
422                };
423                /*}}}*/
424                function makeObj(a)/*{{{*/
425                {
426                        return { x: a[0], y: a[1], x2: a[2], y2: a[3],
427                                w: a[2] - a[0], h: a[3] - a[1] };
428                };
429                /*}}}*/
430
431                return {
432                        flipCoords: flipCoords,
433                        setPressed: setPressed,
434                        setCurrent: setCurrent,
435                        getOffset: getOffset,
436                        moveOffset: moveOffset,
437                        getCorner: getCorner,
438                        getFixed: getFixed
439                };
440        }();
441
442        /*}}}*/
443        var Selection = function()/*{{{*/
444        {
445                var start, end, dragmode, awake, hdep = 370;
446                var borders = { };
447                var handle = { };
448                var seehandles = false;
449                var hhs = options.handleOffset;
450
451                /* Insert draggable elements {{{*/
452
453                // Insert border divs for outline
454                if (options.drawBorders) {
455                        borders = {
456                                        top: insertBorder('hline')
457                                                .css('top',$.browser.msie?px(-1):px(0)),
458                                        bottom: insertBorder('hline'),
459                                        left: insertBorder('vline'),
460                                        right: insertBorder('vline')
461                        };
462                }
463
464                // Insert handles on edges
465                if (options.dragEdges) {
466                        handle.t = insertDragbar('n');
467                        handle.b = insertDragbar('s');
468                        handle.r = insertDragbar('e');
469                        handle.l = insertDragbar('w');
470                }
471
472                // Insert side handles
473                options.sideHandles &&
474                        createHandles(['n','s','e','w']);
475
476                // Insert corner handles
477                options.cornerHandles &&
478                        createHandles(['sw','nw','ne','se']);
479
480                /*}}}*/
481                // Private Methods
482                function insertBorder(type)/*{{{*/
483                {
484                        var jq = $('<div />')
485                                .css({position: 'absolute', opacity: options.borderOpacity })
486                                .addClass(cssClass(type));
487                        $img_holder.append(jq);
488                        return jq;
489                };
490                /*}}}*/
491                function dragDiv(ord,zi)/*{{{*/
492                {
493                        var jq = $('<div />')
494                                .mousedown(createDragger(ord))
495                                .css({
496                                        cursor: ord+'-resize',
497                                        position: 'absolute',
498                                        zIndex: zi
499                                })
500                        ;
501                        $hdl_holder.append(jq);
502                        return jq;
503                };
504                /*}}}*/
505                function insertHandle(ord)/*{{{*/
506                {
507                        return dragDiv(ord,hdep++)
508                                .css({ top: px(-hhs+1), left: px(-hhs+1), opacity: options.handleOpacity })
509                                .addClass(cssClass('handle'));
510                };
511                /*}}}*/
512                function insertDragbar(ord)/*{{{*/
513                {
514                        var s = options.handleSize,
515                                o = hhs,
516                                h = s, w = s,
517                                t = o, l = o;
518
519                        switch(ord)
520                        {
521                                case 'n': case 's': w = pct(100); break;
522                                case 'e': case 'w': h = pct(100); break;
523                        }
524
525                        return dragDiv(ord,hdep++).width(w).height(h)
526                                .css({ top: px(-t+1), left: px(-l+1)});
527                };
528                /*}}}*/
529                function createHandles(li)/*{{{*/
530                {
531                        for(i in li) handle[li[i]] = insertHandle(li[i]);
532                };
533                /*}}}*/
534                function moveHandles(c)/*{{{*/
535                {
536                        var midvert  = Math.round((c.h / 2) - hhs),
537                                midhoriz = Math.round((c.w / 2) - hhs),
538                                north = west = -hhs+1,
539                                east = c.w - hhs,
540                                south = c.h - hhs,
541                                x, y;
542
543                        'e' in handle &&
544                                handle.e.css({ top: px(midvert), left: px(east) }) &&
545                                handle.w.css({ top: px(midvert) }) &&
546                                handle.s.css({ top: px(south), left: px(midhoriz) }) &&
547                                handle.n.css({ left: px(midhoriz) });
548
549                        'ne' in handle &&
550                                handle.ne.css({ left: px(east) }) &&
551                                handle.se.css({ top: px(south), left: px(east) }) &&
552                                handle.sw.css({ top: px(south) });
553
554                        'b' in handle &&
555                                handle.b.css({ top: px(south) }) &&
556                                handle.r.css({ left: px(east) });
557                };
558                /*}}}*/
559                function moveto(x,y)/*{{{*/
560                {
561                        $img2.css({ top: px(-y), left: px(-x) });
562                        $sel.css({ top: px(y), left: px(x) });
563                };
564                /*}}}*/
565                function resize(w,h)/*{{{*/
566                {
567                        $sel.width(w).height(h);
568                };
569                /*}}}*/
570                function refresh()/*{{{*/
571                {
572                        var c = Coords.getFixed();
573
574                        Coords.setPressed([c.x,c.y]);
575                        Coords.setCurrent([c.x2,c.y2]);
576
577                        updateVisible();
578                };
579                /*}}}*/
580
581                // Internal Methods
582                function updateVisible()/*{{{*/
583                        { if (awake) return update(); };
584                /*}}}*/
585                function update()/*{{{*/
586                {
587                        var c = Coords.getFixed();
588
589                        resize(c.w,c.h);
590                        moveto(c.x,c.y);
591
592                        options.drawBorders &&
593                                borders['right'].css({ left: px(c.w-1) }) &&
594                                        borders['bottom'].css({ top: px(c.h-1) });
595
596                        seehandles && moveHandles(c);
597                        awake || show();
598
599                        options.onChange(unscale(c));
600                };
601                /*}}}*/
602                function show()/*{{{*/
603                {
604                        $sel.show();
605                        $img.css('opacity',options.bgOpacity);
606                        awake = true;
607                };
608                /*}}}*/
609                function release()/*{{{*/
610                {
611                        disableHandles();
612                        $sel.hide();
613                        $img.css('opacity',1);
614                        awake = false;
615                };
616                /*}}}*/
617                function showHandles()//{{{
618                {
619                        if (seehandles)
620                        {
621                                moveHandles(Coords.getFixed());
622                                $hdl_holder.show();
623                        }
624                };
625                //}}}
626                function enableHandles()/*{{{*/
627                {
628                        seehandles = true;
629                        if (options.allowResize)
630                        {
631                                moveHandles(Coords.getFixed());
632                                $hdl_holder.show();
633                                return true;
634                        }
635                };
636                /*}}}*/
637                function disableHandles()/*{{{*/
638                {
639                        seehandles = false;
640                        $hdl_holder.hide();
641                };
642                /*}}}*/
643                function animMode(v)/*{{{*/
644                {
645                        (animating = v) ? disableHandles(): enableHandles();
646                };
647                /*}}}*/
648                function done()/*{{{*/
649                {
650                        animMode(false);
651                        refresh();
652                };
653                /*}}}*/
654
655                var $track = newTracker().mousedown(createDragger('move'))
656                                .css({ cursor: 'move', position: 'absolute', zIndex: 360 })
657
658                $img_holder.append($track);
659                disableHandles();
660
661                return {
662                        updateVisible: updateVisible,
663                        update: update,
664                        release: release,
665                        refresh: refresh,
666                        setCursor: function (cursor) { $track.css('cursor',cursor); },
667                        enableHandles: enableHandles,
668                        enableOnly: function() { seehandles = true; },
669                        showHandles: showHandles,
670                        disableHandles: disableHandles,
671                        animMode: animMode,
672                        done: done
673                };
674        }();
675        /*}}}*/
676        var Tracker = function()/*{{{*/
677        {
678                var onMove              = function() { },
679                        onDone          = function() { },
680                        trackDoc        = options.trackDocument;
681
682                if (!trackDoc)
683                {
684                        $trk
685                                .mousemove(trackMove)
686                                .mouseup(trackUp)
687                                .mouseout(trackUp)
688                        ;
689                }
690
691                function toFront()/*{{{*/
692                {
693                        $trk.css({zIndex:450});
694                        if (trackDoc)
695                        {
696                                $(document)
697                                        .mousemove(trackMove)
698                                        .mouseup(trackUp)
699                                ;
700                        }
701                }
702                /*}}}*/
703                function toBack()/*{{{*/
704                {
705                        $trk.css({zIndex:290});
706                        if (trackDoc)
707                        {
708                                $(document)
709                                        .unbind('mousemove',trackMove)
710                                        .unbind('mouseup',trackUp)
711                                ;
712                        }
713                }
714                /*}}}*/
715                function trackMove(e)/*{{{*/
716                {
717                        onMove(mouseAbs(e));
718                };
719                /*}}}*/
720                function trackUp(e)/*{{{*/
721                {
722                        e.preventDefault();
723                        e.stopPropagation();
724
725                        if (btndown)
726                        {
727                                btndown = false;
728
729                                onDone(mouseAbs(e));
730                                options.onSelect(unscale(Coords.getFixed()));
731                                toBack();
732                                onMove = function() { };
733                                onDone = function() { };
734                        }
735
736                        return false;
737                };
738                /*}}}*/
739
740                function activateHandlers(move,done)/* {{{ */
741                {
742                        btndown = true;
743                        onMove = move;
744                        onDone = done;
745                        toFront();
746                        return false;
747                };
748                /* }}} */
749
750                function setCursor(t) { $trk.css('cursor',t); };
751
752                $img.before($trk);
753                return {
754                        activateHandlers: activateHandlers,
755                        setCursor: setCursor
756                };
757        }();
758        /*}}}*/
759        var KeyManager = function()/*{{{*/
760        {
761                var $keymgr = $('<input type="radio" />')
762                                .css({ position: 'absolute', left: '-30px' })
763                                .keypress(parseKey)
764                                .blur(onBlur),
765
766                        $keywrap = $('<div />')
767                                .css({
768                                        position: 'absolute',
769                                        overflow: 'hidden'
770                                })
771                                .append($keymgr)
772                ;
773
774                function watchKeys()/*{{{*/
775                {
776                        if (options.keySupport)
777                        {
778                                $keymgr.show();
779                                $keymgr.focus();
780                        }
781                };
782                /*}}}*/
783                function onBlur(e)/*{{{*/
784                {
785                        $keymgr.hide();
786                };
787                /*}}}*/
788                function doNudge(e,x,y)/*{{{*/
789                {
790                        if (options.allowMove) {
791                                Coords.moveOffset([x,y]);
792                                Selection.updateVisible();
793                        };
794                        e.preventDefault();
795                        e.stopPropagation();
796                };
797                /*}}}*/
798                function parseKey(e)/*{{{*/
799                {
800                        if (e.ctrlKey) return true;
801                        shift_down = e.shiftKey ? true : false;
802                        var nudge = shift_down ? 10 : 1;
803                        switch(e.keyCode)
804                        {
805                                case 37: doNudge(e,-nudge,0); break;
806                                case 39: doNudge(e,nudge,0); break;
807                                case 38: doNudge(e,0,-nudge); break;
808                                case 40: doNudge(e,0,nudge); break;
809
810                                case 27: Selection.release(); break;
811
812                                case 9: return true;
813                        }
814
815                        return nothing(e);
816                };
817                /*}}}*/
818               
819                if (options.keySupport) $keywrap.insertBefore($img);
820                return {
821                        watchKeys: watchKeys
822                };
823        }();
824        /*}}}*/
825
826        // }}}
827        // Internal Methods {{{
828
829        function px(n) { return '' + parseInt(n) + 'px'; };
830        function pct(n) { return '' + parseInt(n) + '%'; };
831        function cssClass(cl) { return options.baseClass + '-' + cl; };
832        function getPos(obj)/*{{{*/
833        {
834                // Updated in v0.9.4 to use built-in dimensions plugin
835                var pos = $(obj).offset();
836                return [ pos.left, pos.top ];
837        };
838        /*}}}*/
839        function mouseAbs(e)/*{{{*/
840        {
841                return [ (e.pageX - docOffset[0]), (e.pageY - docOffset[1]) ];
842        };
843        /*}}}*/
844        function myCursor(type)/*{{{*/
845        {
846                if (type != lastcurs)
847                {
848                        Tracker.setCursor(type);
849                        //Handles.xsetCursor(type);
850                        lastcurs = type;
851                }
852        };
853        /*}}}*/
854        function startDragMode(mode,pos)/*{{{*/
855        {
856                docOffset = getPos($img);
857                Tracker.setCursor(mode=='move'?mode:mode+'-resize');
858
859                if (mode == 'move')
860                        return Tracker.activateHandlers(createMover(pos), doneSelect);
861
862                var fc = Coords.getFixed();
863                var opp = oppLockCorner(mode);
864                var opc = Coords.getCorner(oppLockCorner(opp));
865
866                Coords.setPressed(Coords.getCorner(opp));
867                Coords.setCurrent(opc);
868
869                Tracker.activateHandlers(dragmodeHandler(mode,fc),doneSelect);
870        };
871        /*}}}*/
872        function dragmodeHandler(mode,f)/*{{{*/
873        {
874                return function(pos) {
875                        if (!options.aspectRatio) switch(mode)
876                        {
877                                case 'e': pos[1] = f.y2; break;
878                                case 'w': pos[1] = f.y2; break;
879                                case 'n': pos[0] = f.x2; break;
880                                case 's': pos[0] = f.x2; break;
881                        }
882                        else switch(mode)
883                        {
884                                case 'e': pos[1] = f.y+1; break;
885                                case 'w': pos[1] = f.y+1; break;
886                                case 'n': pos[0] = f.x+1; break;
887                                case 's': pos[0] = f.x+1; break;
888                        }
889                        Coords.setCurrent(pos);
890                        Selection.update();
891                };
892        };
893        /*}}}*/
894        function createMover(pos)/*{{{*/
895        {
896                var lloc = pos;
897                KeyManager.watchKeys();
898
899                return function(pos)
900                {
901                        Coords.moveOffset([pos[0] - lloc[0], pos[1] - lloc[1]]);
902                        lloc = pos;
903                       
904                        Selection.update();
905                };
906        };
907        /*}}}*/
908        function oppLockCorner(ord)/*{{{*/
909        {
910                switch(ord)
911                {
912                        case 'n': return 'sw';
913                        case 's': return 'nw';
914                        case 'e': return 'nw';
915                        case 'w': return 'ne';
916                        case 'ne': return 'sw';
917                        case 'nw': return 'se';
918                        case 'se': return 'nw';
919                        case 'sw': return 'ne';
920                };
921        };
922        /*}}}*/
923        function createDragger(ord)/*{{{*/
924        {
925                return function(e) {
926                        if (options.disabled) return false;
927                        if ((ord == 'move') && !options.allowMove) return false;
928                        btndown = true;
929                        startDragMode(ord,mouseAbs(e));
930                        e.stopPropagation();
931                        e.preventDefault();
932                        return false;
933                };
934        };
935        /*}}}*/
936        function presize($obj,w,h)/*{{{*/
937        {
938                var nw = $obj.width(), nh = $obj.height();
939                if ((nw > w) && w > 0)
940                {
941                        nw = w;
942                        nh = (w/$obj.width()) * $obj.height();
943                }
944                if ((nh > h) && h > 0)
945                {
946                        nh = h;
947                        nw = (h/$obj.height()) * $obj.width();
948                }
949                xscale = $obj.width() / nw;
950                yscale = $obj.height() / nh;
951                $obj.width(nw).height(nh);
952        };
953        /*}}}*/
954        function unscale(c)/*{{{*/
955        {
956                return {
957                        x: parseInt(c.x * xscale), y: parseInt(c.y * yscale),
958                        x2: parseInt(c.x2 * xscale), y2: parseInt(c.y2 * yscale),
959                        w: parseInt(c.w * xscale), h: parseInt(c.h * yscale)
960                };
961        };
962        /*}}}*/
963        function doneSelect(pos)/*{{{*/
964        {
965                var c = Coords.getFixed();
966                if (c.w > options.minSelect[0] && c.h > options.minSelect[1])
967                {
968                        Selection.enableHandles();
969                        Selection.done();
970                }
971                else
972                {
973                        Selection.release();
974                }
975                Tracker.setCursor( options.allowSelect?'crosshair':'default' );
976        };
977        /*}}}*/
978        function newSelection(e)/*{{{*/
979        {
980                if (options.disabled) return false;
981                if (!options.allowSelect) return false;
982                btndown = true;
983                docOffset = getPos($img);
984                Selection.disableHandles();
985                myCursor('crosshair');
986                var pos = mouseAbs(e);
987                Coords.setPressed(pos);
988                Tracker.activateHandlers(selectDrag,doneSelect);
989                KeyManager.watchKeys();
990                Selection.update();
991
992                e.stopPropagation();
993                e.preventDefault();
994                return false;
995        };
996        /*}}}*/
997        function selectDrag(pos)/*{{{*/
998        {
999                Coords.setCurrent(pos);
1000                Selection.update();
1001        };
1002        /*}}}*/
1003        function newTracker()
1004        {
1005                var trk = $('<div></div>').addClass(cssClass('tracker'));
1006                $.browser.msie && trk.css({ opacity: 0, backgroundColor: 'white' });
1007                return trk;
1008        };
1009
1010        // }}}
1011        // API methods {{{
1012               
1013        function animateTo(a)/*{{{*/
1014        {
1015                var x1 = a[0] / xscale,
1016                        y1 = a[1] / yscale,
1017                        x2 = a[2] / xscale,
1018                        y2 = a[3] / yscale;
1019
1020                if (animating) return;
1021
1022                var animto = Coords.flipCoords(x1,y1,x2,y2);
1023                var c = Coords.getFixed();
1024                var animat = initcr = [ c.x, c.y, c.x2, c.y2 ];
1025                var interv = options.animationDelay;
1026
1027                var x = animat[0];
1028                var y = animat[1];
1029                var x2 = animat[2];
1030                var y2 = animat[3];
1031                var ix1 = animto[0] - initcr[0];
1032                var iy1 = animto[1] - initcr[1];
1033                var ix2 = animto[2] - initcr[2];
1034                var iy2 = animto[3] - initcr[3];
1035                var pcent = 0;
1036                var velocity = options.swingSpeed;
1037
1038                Selection.animMode(true);
1039
1040                var animator = function()
1041                {
1042                        return function()
1043                        {
1044                                pcent += (100 - pcent) / velocity;
1045
1046                                animat[0] = x + ((pcent / 100) * ix1);
1047                                animat[1] = y + ((pcent / 100) * iy1);
1048                                animat[2] = x2 + ((pcent / 100) * ix2);
1049                                animat[3] = y2 + ((pcent / 100) * iy2);
1050
1051                                if (pcent < 100) animateStart();
1052                                        else Selection.done();
1053
1054                                if (pcent >= 99.8) pcent = 100;
1055
1056                                setSelectRaw(animat);
1057                        };
1058                }();
1059
1060                function animateStart()
1061                        { window.setTimeout(animator,interv); };
1062
1063                animateStart();
1064        };
1065        /*}}}*/
1066        function setSelect(rect)//{{{
1067        {
1068                setSelectRaw([rect[0]/xscale,rect[1]/yscale,rect[2]/xscale,rect[3]/yscale]);
1069        };
1070        //}}}
1071        function setSelectRaw(l) /*{{{*/
1072        {
1073                Coords.setPressed([l[0],l[1]]);
1074                Coords.setCurrent([l[2],l[3]]);
1075                Selection.update();
1076        };
1077        /*}}}*/
1078        function setOptions(opt)/*{{{*/
1079        {
1080                if (typeof(opt) != 'object') opt = { };
1081                options = $.extend(options,opt);
1082
1083                if (typeof(options.onChange)!=='function')
1084                        options.onChange = function() { };
1085
1086                if (typeof(options.onSelect)!=='function')
1087                        options.onSelect = function() { };
1088
1089        };
1090        /*}}}*/
1091        function tellSelect()/*{{{*/
1092        {
1093                return unscale(Coords.getFixed());
1094        };
1095        /*}}}*/
1096        function tellScaled()/*{{{*/
1097        {
1098                return Coords.getFixed();
1099        };
1100        /*}}}*/
1101        function setOptionsNew(opt)/*{{{*/
1102        {
1103                setOptions(opt);
1104                interfaceUpdate();
1105        };
1106        /*}}}*/
1107        function disableCrop()//{{{
1108        {
1109                options.disabled = true;
1110                Selection.disableHandles();
1111                Selection.setCursor('default');
1112                Tracker.setCursor('default');
1113        };
1114        //}}}
1115        function enableCrop()//{{{
1116        {
1117                options.disabled = false;
1118                interfaceUpdate();
1119        };
1120        //}}}
1121        function cancelCrop()//{{{
1122        {
1123                Selection.done();
1124                Tracker.activateHandlers(null,null);
1125        };
1126        //}}}
1127        function destroy()//{{{
1128        {
1129                $div.remove();
1130                $origimg.show();
1131        };
1132        //}}}
1133
1134        function interfaceUpdate(alt)//{{{
1135        // This method tweaks the interface based on options object.
1136        // Called when options are changed and at end of initialization.
1137        {
1138                options.allowResize ?
1139                        alt?Selection.enableOnly():Selection.enableHandles():
1140                        Selection.disableHandles();
1141
1142                Tracker.setCursor( options.allowSelect? 'crosshair': 'default' );
1143                Selection.setCursor( options.allowMove? 'move': 'default' );
1144
1145                $div.css('backgroundColor',options.bgColor);
1146
1147                if ('setSelect' in options) {
1148                        setSelect(opt.setSelect);
1149                        Selection.done();
1150                        delete(options.setSelect);
1151                }
1152
1153                if ('trueSize' in options) {
1154                        xscale = options.trueSize[0] / boundx;
1155                        yscale = options.trueSize[1] / boundy;
1156                }
1157
1158                xlimit = options.maxSize[0] || 0;
1159                ylimit = options.maxSize[1] || 0;
1160                xmin = options.minSize[0] || 0;
1161                ymin = options.minSize[1] || 0;
1162
1163                if ('outerImage' in options)
1164                {
1165                        $img.attr('src',options.outerImage);
1166                        delete(options.outerImage);
1167                }
1168
1169                Selection.refresh();
1170        };
1171        //}}}
1172
1173        // }}}
1174
1175        $hdl_holder.hide();
1176        interfaceUpdate(true);
1177       
1178        var api = {
1179                animateTo: animateTo,
1180                setSelect: setSelect,
1181                setOptions: setOptionsNew,
1182                tellSelect: tellSelect,
1183                tellScaled: tellScaled,
1184
1185                disable: disableCrop,
1186                enable: enableCrop,
1187                cancel: cancelCrop,
1188
1189                focus: KeyManager.watchKeys,
1190
1191                getBounds: function() { return [ boundx * xscale, boundy * yscale ]; },
1192                getWidgetSize: function() { return [ boundx, boundy ]; },
1193
1194                release: Selection.release,
1195                destroy: destroy
1196
1197        };
1198
1199        $origimg.data('Jcrop',api);
1200        return api;
1201};
1202
1203$.fn.Jcrop = function(options)/*{{{*/
1204{
1205        function attachWhenDone(from)/*{{{*/
1206        {
1207                var loadsrc = options.useImg || from.src;
1208                var img = new Image();
1209                img.onload = function() { $.Jcrop(from,options); };
1210                img.src = loadsrc;
1211        };
1212        /*}}}*/
1213        if (typeof(options) !== 'object') options = { };
1214
1215        // Iterate over each object, attach Jcrop
1216        this.each(function()
1217        {
1218                // If we've already attached to this object
1219                if ($(this).data('Jcrop'))
1220                {
1221                        // The API can be requested this way (undocumented)
1222                        if (options == 'api') return $(this).data('Jcrop');
1223                        // Otherwise, we just reset the options...
1224                        else $(this).data('Jcrop').setOptions(options);
1225                }
1226                // If we haven't been attached, preload and attach
1227                else attachWhenDone(this);
1228        });
1229
1230        // Return "this" so we're chainable a la jQuery plugin-style!
1231        return this;
1232};
1233/*}}}*/
1234
1235})(jQuery);
1236]]></data>
1237                    </item>
1238                    <item key="id"><![CDATA[jquery.Jcrop.js]]></item>
1239                    <item key="mandatory" type="int">0</item>
1240                    <item key="multilang" type="int">0</item>
1241                    <item key="name"><![CDATA[jquery.Jcrop.js]]></item>
1242                    <item key="repetitive" type="int">0</item>
1243                    <item key="type"><![CDATA[resource]]></item>
1244                  </dictionary>
1245                </item>
1246                <item type="dictionary">
1247                  <dictionary>
1248                    <item key="custom">
1249                      <data content_type="text/css" filename="jcrop.css" type="file"><![CDATA[/* Fixes issue here http://code.google.com/p/jcrop/issues/detail?id=1 */
1250.jcrop-holder { text-align: left; }
1251
1252.jcrop-vline, .jcrop-hline
1253{
1254        font-size: 0;
1255        position: absolute;
1256        background: white url('metaobj_manager/ZMSMediaPlayerLib.Jcrop.gif') top left repeat;
1257}
1258.jcrop-vline { height: 100%; width: 1px !important; }
1259.jcrop-hline { width: 100%; height: 1px !important; }
1260.jcrop-handle {
1261        font-size: 1px;
1262        width: 7px !important;
1263        height: 7px !important;
1264        border: 1px #eee solid;
1265        background-color: #333;
1266        *width: 9px;
1267        *height: 9px;
1268}
1269
1270.jcrop-tracker { width: 100%; height: 100%; }
1271
1272.custom .jcrop-vline,
1273.custom .jcrop-hline
1274{
1275        background: yellow;
1276}
1277.custom .jcrop-handle
1278{
1279        border-color: black;
1280        background-color: #C7BB00;
1281        -moz-border-radius: 3px;
1282        -webkit-border-radius: 3px;
1283}
1284]]></data>
1285                    </item>
1286                    <item key="id"><![CDATA[jcrop.css]]></item>
1287                    <item key="mandatory" type="int">0</item>
1288                    <item key="multilang" type="int">0</item>
1289                    <item key="name"><![CDATA[jcrop.css]]></item>
1290                    <item key="repetitive" type="int">0</item>
1291                    <item key="type"><![CDATA[resource]]></item>
1292                  </dictionary>
1293                </item>
1294                <item type="dictionary">
1295                  <dictionary>
1296                    <item key="custom">
1297                      <data content_type="image/png" filename="action_cancel.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff61000002df49444154388da591cf6f93051cc63fdfb73fd76e6b69d7769d334b818d9529c34d37319081c651438c86838a07e3cd3f004ffe133a63e2851310885146341cf460444492893f8610f60bc9469a755db7b6ebf6b67ddbbeefd7033d78f7499ec373789e3cc9475495ff2331c487a3167160261cf9e8d94a7179d3e12701b2801fe804bcc00b7ee3953b9eaed1f3bb3b5fe6016f2088801b68e183d1fa6a7e9ec5bfb89ac978bdd05c6f0f0400033877f1b2eabe38c137a7276a70d7d5d181012d80973f1f9f9c275f82e421c64f4d352ca0d9b6054c4cbfa11c398e3c738099d732bf01276cdb4680fdd637bffce35d5d821bd7b183115c2fbdc8c2f50b5cbb775ffcc0eb63933a9a7987c6837b7869c1509afbd92d8e7cfdc58800b8c3bdd5f9547fc7c8d23285661d7c01623d514a6fbd4d3d9723393747a15281aa49cceb612d1c26b5b18d620900fb922980078f2351ad83de04fd19b43c98d64232a9b7406f835641174181b5ae6014fc7e04a0a37f905a768518cccd76754e9477f7d8005c6d542ea00710c3c5878efd7013467ca10456a382ac4d9ee4d7b99bec012b806730fd7da6563dbd905dc3fe0fefe76209be737b6e4b2e7b6298a73792dd118c0ddb660b2801267072b77cda32f7280135a00194818a5567dae53a6eb67311d802dc75c7a1da2e7f10ef532bbfce8ac22120d6be9f038a951d0e9a55de8f27f4c7cdbc00582846d36e5107f75430a84621c79ec2619e3a30368effd8319e075240d16ed2592c31150d690d022d47319a8d46f4934f3f6b769b26255506dae53fc261b61e3d9c5d5f98bf743712e228d00f145a0d42db3b7c7cf65db3a94e1f77cebcc7ad9e6efd1bf411a8057a251ed3accfbdfc4328c08d7080558febcf2b895e6d813e065dea0eeaefc95e9d11c170505444b68103c369ae0d0ff36aa1f0c48621074145b0616caa985ffc2a9e2095e8a35c3171c410c4c050041bc106991ddacfb9e953d8ca80a38ab671390ab6a3e9b343037c9b3e8803a2223822fc0b66623e7859e6be1b0000000049454e44ae426082</data>
1298                    </item>
1299                    <item key="id"><![CDATA[action_cancel.png]]></item>
1300                    <item key="mandatory" type="int">0</item>
1301                    <item key="multilang" type="int">0</item>
1302                    <item key="name"><![CDATA[action_cancel.png]]></item>
1303                    <item key="repetitive" type="int">0</item>
1304                    <item key="type"><![CDATA[resource]]></item>
1305                  </dictionary>
1306                </item>
1307                <item type="dictionary">
1308                  <dictionary>
1309                    <item key="custom">
1310                      <data content_type="image/png" filename="action_ok.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000022b49444154388da5925d48536118c7ffefcedee3ce39fb385b6a114462348cf6114ad6888cc4ba4b24280be903d2ba89c008eaaa8f9b6e92e8428ac8863692848a912d4b7375a1c30f2c299b36743484b4ac3575b60f3b7bbb9044ca6cd51f9e9be7e1f75cfcf911c618fe27aabf05845aa2fee707a29348f2a8a9db74506e995f32c6d21ae106a4e567e4fef6c15676c0b997a976e121630c249d0e846b44328464dfadc38db686ae3a8c25c721270d703f78dc3cff20ab915f064672272a12bd0b617d3d913286f43e5755a3cde5bf89d64f1e70318a592f0d2666a2052a00d0d4924cf3477b6043d8d121d593ed3fe095f725adf69dd1e73a7edbd634de805eda012dd521ec890d47a7239668cb6c449d7d51cc2e164bfcd5a5d5a6a812c5a427e2597157b35312b53d7448d75973e4b2adf9f33d0cd2d710133af89b42232495b2269eb03800708a4cae1795380a3f08ef892c1a5190974ffbbc03e508d1aa739567cd2fe33d08706fa04c11f43b03412e4bb1c6efccc100e64a14ca344ff376afda6a2fb4f3f9ba8da08487811a31a8bcc208de62facb0c9ed57407f94d494bf8a8125bd8911a0062ee780957a66a838c22b6f91b6fe6d721cc4d60821b833205745c7d11cca9c85c3f503c1ac74f99b74a71a776d03daa76596fda62dc66cc108880d424f0fc5257d071c26a79b4b6f31778519132f6a9dbca7b4b1317c2a759eea99ce1935f2b354b09b6e8527748f4ae39bfbaaf8e5d11fe64e86f0fc7e2fb693a8aa7a5f252f90efa3664491dd43f160000000049454e44ae426082</data>
1311                    </item>
1312                    <item key="id"><![CDATA[action_ok.png]]></item>
1313                    <item key="mandatory" type="int">0</item>
1314                    <item key="multilang" type="int">0</item>
1315                    <item key="name"><![CDATA[action_ok.png]]></item>
1316                    <item key="repetitive" type="int">0</item>
1317                    <item key="type"><![CDATA[resource]]></item>
1318                  </dictionary>
1319                </item>
1320                <item type="dictionary">
1321                  <dictionary>
1322                    <item key="custom">
1323                      <data content_type="image/png" filename="crop_thumb.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c0000022c4944415438cba553316c1261147e87475b0a346d358db9041988038cc2e4d068188993830446757070c048024c2e2c24b2903010244c3a19217173705131a665686cd11aad5e6bad06b1831e84fbffff7cef07da42bbf54fbeffddddffde77dffbee9d6259169c66a9b4e572391d893c88562a950a4c26a5d3e997a6695e1142b4f2f97ce018012e4f2412817abdee7fb662588203902e8a0263b7db85582c06954ac57fa202ce79b356ab5d72cc2dc1e2ac4d1659b80964a10ee7ce5d8052a9048cb1d79304cac883a7ef0cebaccb260bc411c87b24dbdd1770ebeaac72a2025aa3c437cf8bd0f9b503ea8c1b2e5fbb0bf619d7e08c0b99170e8757d08f2062b5d168846c2302d92f26b6f7748846a3f0fbe70eac6fb761ed5b07d6b6dab0f7671f1e3cd1ad5eaf17cc6432e44b704c01c3628eb03be6a1582cc29929272cb9559876d88123b3c0438ace050d92c924a082e68107894442ca72ce9f87e5ebf7e13dbe555b98c296b010fb22f51c374e2488cdef0614ee5c947ec816484e3c1e871ffa26ec76d8205958323286ea18450bd890c0340f874f12605fcd42a120e3edb04b3129918a381509093e2219c6b1af50ad5683473fcde06d87920f3c185e33c68fcfc168854221bddfef7bdc8b1adcb8f748169212f283a31f8f1fde842f1b6f69f85aa838609b1c0c7ce8c966b3e8c727f8b86dc007fd1fc2808daf7fa1b565c0e7f50694cb659a4aff7080ac31f87cbe55afd72b344d6b4c9e1154557da1280ac97e45f7ca697fe7ff1fa88b9df58d166d0000000049454e44ae426082</data>
1324                    </item>
1325                    <item key="id"><![CDATA[crop_thumb.png]]></item>
1326                    <item key="mandatory" type="int">0</item>
1327                    <item key="multilang" type="int">0</item>
1328                    <item key="name"><![CDATA[crop_thumb.png]]></item>
1329                    <item key="repetitive" type="int">0</item>
1330                    <item key="type"><![CDATA[resource]]></item>
1331                  </dictionary>
1332                </item>
1333                <item type="dictionary">
1334                  <dictionary>
1335                    <item key="custom">
1336                      <data content_type="image/png" filename="crop_thumb_disabled.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001d54944415478daa4533b6b0241109e8b117c3f40acb415b4cce507e417586a2188166ae70fd042106c142c2c6c6cb4b1162d530424218ddac981e0b310516c7deb6567c2ca79da39f0ddb2bb33dfce7c3327c8b20ccfd82b7e1289c48c11b919a44aa5e2533b050281afe3f1f8713e9fa566b3e9bb2360e60e854250abd5bcad564b3e9d4e74c8020033dc6c36f808944a25efc30c9863af5aadbe592c16406010e272b9101c0e07148b45f4fb5113085c8346a321dbed760ae0c14aa2e57209e170587898011a3a61caf57a9d9c753a1d04834130180c44c2cbf2783c1de627b27d773a9dbebf2809108bc50262b118ac562b180c06204912f4fb7ddae77239998929a65229381c0ee24d06f83a12e8f57a28140aa0d56ac166b381c964a23b0ea3d108e9749a74bb6ae0f7fb3bc88c024622117ad5e9745ecb52024b994c26282ae941256cb75b311e8fc37c3ea7127836e8cc886f564ec28d08f6fb7d2f9fcfc36eb7eb45a351e15100079e236ebad06eb745656b9401ea1278667773c0cde572cd98831bc54b2693d70cb81ee57299dacc4c629df0bda807831dba33990cacd76b188fc7301a8d681d0e87040cce66b348f63fd67cda38d83476ad56ebc56c36ffaaef101a8de613c318be712f3cfb3bff09300083719dbdbb82fb6f0000000049454e44ae426082</data>
1337                    </item>
1338                    <item key="id"><![CDATA[crop_thumb_disabled.png]]></item>
1339                    <item key="mandatory" type="int">0</item>
1340                    <item key="multilang" type="int">0</item>
1341                    <item key="name"><![CDATA[crop_thumb_disabled.png]]></item>
1342                    <item key="repetitive" type="int">0</item>
1343                    <item key="type"><![CDATA[resource]]></item>
1344                  </dictionary>
1345                </item>
1346                <item type="dictionary">
1347                  <dictionary>
1348                    <item key="custom">
1349                      <data content_type="image/png" filename="dimensions.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001b9494441541819a5c1bb6f8d7100c7e1cffbf6489d6a2369d579d5ed0f40a5b1da4874301106529168420c2cfe0e0993582462109741108989c9cad491440f272e71ab4b2fbfcf574739b1f579aa4b2fce85554948420c97f75faff88fb34f66a241c512546a567506b7b0bdbd93184c9a8bcf67439fb34f66a269103aed86ce50078bd449484267b0616b7b072dd6f534f4b388c5dea6f6385b87b73150b550a963e8fd7ecf9b85370c571bd8bd719228fd8a616af33e465a2374bf7779fdf935a5486d4229a579f7b3cb60ab4d950a4be8679104d6b786e87eeba23616a99270e1d999c4a04125866bd3372bfe71eadef1a868b088ca9d9907559584b5a859a39a35aa59a316ab661f9d8c068ba868b875ec6ec53f8edc389c182ca241e5f1f9a7553dfbe8642c36031960d7d81e26c7a7b0483f4b989cd8cbae89dda8689ae9ab07535b44d31b5b3fceb7df5f595e59c222fd5416cb125f7e7d61d3f03855e8a9d416698626181d1ce5c7e202afdebf44a59f45e6e6e7585a5ea1b3b1c3e8f01831b48af267f90ff38bf37c5cf84029366a8f3e1a8a8bcdfca7b73d4b210613aa13b78f46c5221a54ee9f7e58f11f87ae1c480c26c49084bf80a04a8daf86177c0000000049454e44ae426082</data>
1350                    </item>
1351                    <item key="id"><![CDATA[dimensions.png]]></item>
1352                    <item key="mandatory" type="int">0</item>
1353                    <item key="multilang" type="int">0</item>
1354                    <item key="name"><![CDATA[dimensions.png]]></item>
1355                    <item key="repetitive" type="int">0</item>
1356                    <item key="type"><![CDATA[resource]]></item>
1357                  </dictionary>
1358                </item>
1359                <item type="dictionary">
1360                  <dictionary>
1361                    <item key="custom">
1362                      <data content_type="image/png" filename="dimensions_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002104944415478da62983163c67f2060600411200010408c93274ffefffefd7b84084000318044d6ac5903563773e6ccff2caf5fbf668081070f1e30000410c3f4e9d3c1b2205c5b5bfb9fe5fbf7ef605910e7dbb76f1208c360a0abab0bac252d2ded7f7c7cfc7f8000629c366dda7f39393986fbf7ef33e4e4e4308214353535fde7e1e181380cc30834c002221a1a1afefffefd9ba1b5b5156c02d02430ffcf9f3f0c4c555555ff99989818be7cf92201d305741d03c8b59c9c9c0c0001082183130842188ac6b02028e2750f1e6ccc062c443cd9808d891578b2004166360117e6341f029204f3fe1794c6de1b628ce22ca494f8072ad45a8331064a297f181a78ef61ad0538e7fc2aa5b87944ae5a6bbcf0ea02e1451f0ae500e59c19f407ccbd5aab407a586bf9de91730e28c910c285524a18633c207bef9c09d9bf05289d8c51200462289a2c1e40d062402cbc98bd5858790f6f67215a47d1c24e1b353f8b8bbbec62b103824c3233c9cbffc601d980354d13e6eab66d93a228f85a8b52de75df695c90afff348e233d807b9e675ad795c230a4288ae4fada955d1cc71204811deefbdef6bc3ccfb9aaaa7d59162b09417c9f0b3dd675fd8a2357cff12de7bbf5f70536272dc731b338f7145cd77550fe1bc42ccbf624494ca26ddba20d83eda1379da34074b01c5cf98b41d334e4fbbe09711806511d129765691ec3cd272035337f2b374d538cd22c7c3e720001fe61e663879b410000000049454e44ae426082</data>
1363                    </item>
1364                    <item key="id"><![CDATA[dimensions_disabled.png]]></item>
1365                    <item key="mandatory" type="int">0</item>
1366                    <item key="multilang" type="int">0</item>
1367                    <item key="name"><![CDATA[dimensions_disabled.png]]></item>
1368                    <item key="repetitive" type="int">0</item>
1369                    <item key="type"><![CDATA[resource]]></item>
1370                  </dictionary>
1371                </item>
1372                <item type="dictionary">
1373                  <dictionary>
1374                    <item key="custom">
1375                      <data content_type="image/png" filename="flip_horizontal.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001254944415438cbddd33d4a03511405e033f9313e34112d02161681d94d202ec0d6ce7a208d6ec0664010449b20822ec24241b115c1c234294c69299949ee39d7c2898d8a9160e359c0f7de3bf7bec8dd314f4a98337f039cdd8dc3e96dde0780bd8b617ff7fc39fc0a203d31210600c963ca939981de4dde3279d7f85eae2490ea26bd416b26c0e8e9fa4a294c01936363ad128c4a7f044eaeb37623449d462dc214208550065697ca9d9da3a7f6b7c0f155168c9ed66b1172034cd31b09af19b15806cc946e1f3c862f01a327cd7a29ae9601a3832a9e60c2682c9811cd4635362af9041c5e8e5a46ef2e2f449814a753d38910d99818e502e420d5dddabfff28b452149552080fc309e88004a85871a33078c9200a9443ee41f214c0260044fff42ffc266f7edfb08cd6d90ddc0000000049454e44ae426082</data>
1376                    </item>
1377                    <item key="id"><![CDATA[flip_horizontal.png]]></item>
1378                    <item key="mandatory" type="int">0</item>
1379                    <item key="multilang" type="int">0</item>
1380                    <item key="name"><![CDATA[flip_horizontal.png]]></item>
1381                    <item key="repetitive" type="int">0</item>
1382                    <item key="type"><![CDATA[resource]]></item>
1383                  </dictionary>
1384                </item>
1385                <item type="dictionary">
1386                  <dictionary>
1387                    <item key="custom">
1388                      <data content_type="image/png" filename="flip_horizontal_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001764944415478da62fcffff3f03188018e5e5e5ff0102881126c2b27bf7eeff9b366de2020820b01408373737ff07d170253000104018024c2062c58a157051a6c58b17737efaf489a1ababeb3f562d00018421800e58608ca54b976efcfdfbb7dffdfbf71980f4a6b6b6367fb8a573e6ccf9262a2aeaf7f5eb5706907d2c2c2c7ee9e9e9df88b2022080082a60622000e00a56ae5c5907a281615687558190905023328da260e1c285b7595959c102402f32141414dc862b98376f9ea2949494cacf9f3fc102206ff2f1f1a9a4a6a62a52c717000146d004a2830119ac59b38673d5aa55608f00e3ec766b6b2b27d10600c353f1d7af5f6f819e5601f1fffcf9a302e2d7d6d62a1234009862bc393838eec9cbcb73023581c540b4b4b4342710dc2b2929f1c669c082050bea80c1bb058819be7dfbc60033e0c78f1f0cefdebd03b3797878b6646565d561a4576072dcf8efdf3fbf274f9e3000693086052e28fe1e3f7e0c1707e2c6e4e464e3b973e7fad32e164801000940cf2674e2ee1e0000000049454e44ae426082</data>
1389                    </item>
1390                    <item key="id"><![CDATA[flip_horizontal_disabled.png]]></item>
1391                    <item key="mandatory" type="int">0</item>
1392                    <item key="multilang" type="int">0</item>
1393                    <item key="name"><![CDATA[flip_horizontal_disabled.png]]></item>
1394                    <item key="repetitive" type="int">0</item>
1395                    <item key="type"><![CDATA[resource]]></item>
1396                  </dictionary>
1397                </item>
1398                <item type="dictionary">
1399                  <dictionary>
1400                    <item key="custom">
1401                      <data content_type="image/png" filename="flip_vertical.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001344944415438cbb591cf4a025118c5ddce63ccf3cc3e82a045d0a645d02208b2d9248558522061586161d21f12a609276160088220425393889b3496d40358e35c37a7332fa0ce448b0feee2fece39df776200627f99509fb34e5fcdd89e115a60efa6af10d6097b5b951f841220ac1116a5071f7673808df2f77802f95b5f256c9cddfbb0ea12f69384f52891bc1a2150b8930a619db067d6249cd600958644996fb32ab176d91b2e4058100663833b23d839881d380770c2e821720b236b5c39e96a1cc1c172f1034b850e160f5d2c1cb4319f1398cbbe6036f33c3c016185b04ed8dbb53e5174beb07fddc58ef98ef4858b99edd6782bd059a5b3913875b159ea2075fe86d5e336a6d38d7037606c8db145fce815f1bcc054aa1efe888cadd05927ec4d266bd15b20ac4eac578dffab31cafc027494fa973b52b3050000000049454e44ae426082</data>
1402                    </item>
1403                    <item key="id"><![CDATA[flip_vertical.png]]></item>
1404                    <item key="mandatory" type="int">0</item>
1405                    <item key="multilang" type="int">0</item>
1406                    <item key="name"><![CDATA[flip_vertical.png]]></item>
1407                    <item key="repetitive" type="int">0</item>
1408                    <item key="type"><![CDATA[resource]]></item>
1409                  </dictionary>
1410                </item>
1411                <item type="dictionary">
1412                  <dictionary>
1413                    <item key="custom">
1414                      <data content_type="image/png" filename="flip_vertical_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001934944415478da62fcffff3f03188018b5b5b5ff0102881126c2ccc6c6767beddab5930002082eb271e3c6ff8f1f3f86a885e1e4e4e4ff0001045701034c2062c58a158afbf7efff0f17b873e7cebd1d3b7620ec03e18c8c8c3a100d10402886c2f0c2850beb66cd9af51fc4668119be72e5cadbbf7efd52f9f1e307c3cf9f3f19fefefd8bb01404c2c3c3556fdfbeadf4e6cd1b866fdfbe31dcbc79132c8ee14c74001040041530a10b2c5dba9473debc79df607c1634c98d6262627ec8a6322149fe07bade0f18287007c24d686b6bf306d17ffefc017b1184b13ab2baba7aa3888888dfd7af5f196a6a6a18311cd9dadaea7fefde3d2e60bc7d27da9b000186352e70e1458b162902836023b2180b030100f4bdf7bf7fff26080a0aaa484b4ba38400463882003021720243a314882b84858539656464c0a103c2c0c4c0f0fbf76fd2a29210c07001304e388149ad14e8ec0a0909094e6e6e6e86efdfbf836d07c5cffdfbf719264f9ecc48b40b4a4a4abc81ce9fc0cfcfaf0252fbe2c50b06606267242b1680d950313131112516280e03000cee4f0564e6a9940000000049454e44ae426082</data>
1415                    </item>
1416                    <item key="id"><![CDATA[flip_vertical_disabled.png]]></item>
1417                    <item key="mandatory" type="int">0</item>
1418                    <item key="multilang" type="int">0</item>
1419                    <item key="name"><![CDATA[flip_vertical_disabled.png]]></item>
1420                    <item key="repetitive" type="int">0</item>
1421                    <item key="type"><![CDATA[resource]]></item>
1422                  </dictionary>
1423                </item>
1424                <item type="dictionary">
1425                  <dictionary>
1426                    <item key="custom">
1427                      <data content_type="image/png" filename="information.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c0000029c4944415438cba593cb6bd4571cc53f774cac644c26310a9989368fd1a82868a189522c08c54d21523b5441a22e5c74956d155cf91f080a3e56beb0a5749aae855a9a9486cea21b99c630d5c4348fd11833c924fdcddcefbdf7eb42487cb41b3dcb2f5f3e1c38e71855e57d54f3e6217375342dc11d57174e56adb4380d28a108e1a677e1cee0d94f1ebefa6f5e75f0c595918cb572b123a1c99eb6461ad6ae016021720c159e707f7a7906a3fdb9f39f65df021cbe9ccfd8486e1cda5617dfdd5acfd49ca5b810e18392a85b432ab18ec2b332033f3f5ca68653b90b87b32b80de4bf73b45dcd0a1adf1d4f6967a7263259c13f6b435812a7f8ecd6362865dc9f5fc335fe6a7bb8569347c9abb76f4510c4082ebeb68d0d48e6403c385e7d8c822d540efc7497abb5388136cd5929f2cd1be3141d7d6869446d2071003b0de9fd8d7decc587109114182c707c78fc313648727b062b1ceb214458ccf2e72606f1bc6da132b29d8c8b636d5d7509829e1bc47bca021d077b013058647a6d1100043716e91aed466d447adab0eaa160d8a53b0ae4af09e1094fce379fead38bc7578f13871382ba801bc6705007e6a6eb94273bc16a3313428c17b5e26a478710411825812f10f78b258c69830b50ab0eed6607e92b64d7108019c72647f3b3b3f6ca26e5d2dfd47f6202238113a5a120c0dfd0de8add52656a2db230fca5fa7938da99eae4dfc969fe4fb5f47f9f6de5fa83854038af2d1f62d8c971679942f4c1bb8fd5a91ba4f7f97d172e5c6e75fee8e776eace7c1e359669f97092eb0a1b18e6d5b9a192f2d71ef875f9631b5a77203df64dfaa72f7b1eb19d45e4cef4a260fec4bd3bc7e2da03c5da830f8fb2813f9c28c31b1fedcc099ec7f6e01a0e7ab2b69557f1c0d2709951634608c2902370d72e78f8173ff3fa677d10ba83f827b59b621b90000000049454e44ae426082</data>
1428                    </item>
1429                    <item key="id"><![CDATA[information.png]]></item>
1430                    <item key="mandatory" type="int">0</item>
1431                    <item key="multilang" type="int">0</item>
1432                    <item key="name"><![CDATA[information.png]]></item>
1433                    <item key="repetitive" type="int">0</item>
1434                    <item key="type"><![CDATA[resource]]></item>
1435                  </dictionary>
1436                </item>
1437                <item type="dictionary">
1438                  <dictionary>
1439                    <item key="custom">
1440                      <data content_type="image/png" filename="resize.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001ac4944415438cba592318b13511485bf9151d0425c0441d8147649204d7e8190c222ff2258e60784fc8480648b9449bf6582761636cada68e9244d24b3e8c2d6261998f7eed9226f2609460bbdf0e0f1de3d8773cebd9124fea76280c160904aaa484a7abd5efd6f806eb7fb21cff397ceb9643299d4e3f05e69b7dbcc66b3da9b7737320901de03029961026fb0dd6ee9743a8c46a35aa9c07bff753a9d36e3474f797e761f1908900913e880e4f6c939c3e110e7dc2780a8c860f0f6a7cecf1eec00069290c0a492c84c9889e54dc6a0f3222a1510e47a0324cc02b0b8db3149eeed38440079db350acc0c19016025b02074ee048133302f2c34ed9a8bbbed9508cce97702738637953e75e059c152a1c49d22700ebcb7d2ff31c95e9104ce4e59f01eefe3907a002a8cf2204049787f52c1eea3946b60c1fbe13815b22a2a9244abd54af33caf3c7cfc8c579d8ba3c40fa54be2f2e235df93cf78ef932ccbeaf700b22cabf4fb7d6e7f2c595caf595c6f98a76b16ab5fccd335f3d58664b52649372cbf5d311e8f71ced576f39768369b5f1a8d8655abd52b8505fad389e3f87d1445023e4adaaff2bfd61df935bc3c4be0dd6f0000000049454e44ae426082</data>
1441                    </item>
1442                    <item key="id"><![CDATA[resize.png]]></item>
1443                    <item key="mandatory" type="int">0</item>
1444                    <item key="multilang" type="int">0</item>
1445                    <item key="name"><![CDATA[resize.png]]></item>
1446                    <item key="repetitive" type="int">0</item>
1447                    <item key="type"><![CDATA[resource]]></item>
1448                  </dictionary>
1449                </item>
1450                <item type="dictionary">
1451                  <dictionary>
1452                    <item key="custom">
1453                      <data content_type="image/png" filename="resize_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001f44944415478da62fcffff3f0308308188499326fd070820469808cbac59b3fe7ffcf891012080c022cb962dfbffebd72f861f3f7e30b080a49f3f7fce00129832650a034000c1f5c0000bc824414141b08ae4e4644696cf9f3f33b0b0b030fcfcf91362dfbc79f318be7cf9c2f0f5eb57065656d66b0001981c77158041188adee2248a6bbecbafcdd049e8208ef91907b58fa4141a08e742c8e5584729e51211681e6360ad056646effd356cad21a5841002628cc69c336aad9b69a9b0f71e734efbfe68a3b544742affeb9cdb9ff3710b200c7fa003c6f4f4747030181818c08d066155555586e0e06046b0092b56acf88f6c37083f78f080a1b5b515e24890d74092300c52000a5870d08108901530ffc3681405a06084e94456080e5a7575f547d3a74f072b026198690b162c8078435a5afaac8888c871f4706004bbff3f03408042a9d80662100692868201e822d17ea6f896a168e85231405af6608cf44f89f42390f72119118a0fd2c920f0199faf7541ad7e28ae84f3388eed9f2ed6da4415def48d33a5b4b53fd2a11056a5d40b92d45adb63440045384a294529053d7d9bd03c8910c2a5b5ee8f39010dcfe79cb3d8f77de92acd528e243370c712df08e03da8385662a2718fc8eebe11f008e6044e1a4979869dc0187339e7044006eb897365ac18a3f0dec3cef0dff268e7a7f50312c8e53d339dcf5d0000000049454e44ae426082</data>
1454                    </item>
1455                    <item key="id"><![CDATA[resize_disabled.png]]></item>
1456                    <item key="mandatory" type="int">0</item>
1457                    <item key="multilang" type="int">0</item>
1458                    <item key="name"><![CDATA[resize_disabled.png]]></item>
1459                    <item key="repetitive" type="int">0</item>
1460                    <item key="type"><![CDATA[resource]]></item>
1461                  </dictionary>
1462                </item>
1463                <item type="dictionary">
1464                  <dictionary>
1465                    <item key="custom">
1466                      <data content_type="image/png" filename="rotate_anticlockwise.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002234944415438cba5934d68134114c7df24dba64bad6dd5c458518c06bc78118fea4d5189a4879e143c59c482b112680d28968282d54b842a6a110fa1e0a122112b5a2852150ca18a5a056bd2f48be650230561bb3b5f3bbe6d4dacf643b00b7f7666f6bddfbcf9ef1ba29482d53cae7f05b4a49adcd1d7a762ff0d105cdce1941f5fee3b59e908cd038d717fc5a66684c0c874ee1ba7ec2db5f87366b1878f9bfa2657049c7d71f2f2c60aff851d354190b604831950f8f11df2853c0c8f7e4d22a463e062ea8db654f2f9c478886d60e5ccc580490633e60c68ee72d03c1a6cdbbc1d4091faf4bb41d81ddd1559e4416b625c97d28edf3e9268cde6b39def473f806551c84c6480e29b0a0aebbd5ea8f3d7d55393362caa00935b504167dc7dec51e468e7813543c39ff660c9fd78fe86fd7bf76d712aa9aead0146f9a13f00d1fbb980b4550c01a535d3b01a3139f6aa2d7d054b86a7bdcfce712640a0a49087c131b1a8485726d9d133a64edffaa29c79cf204ba2020b63fe56c983485736b4aed21d2e23f8ef7f5710b6157c7e906697ba534c5fb691cedccda07132eec19961c912009361a78fe8be2ad22ea4fa78efa5155a12e018e7ab2a0b726e83c56c287a807ecc41aa3d04b6d692e05a9d3cb9d96f266ff4cd068a000dcf3b671c761498988c3b2d000030a1700dc0ed22e0ad24ce8ee1b1823878add7b88a79d7352c378e033d373dfb6b47943ddf9d0e6c680aa1f6fcb82804eb18db8e6127c86aaff34faf1c5f4f628956340000000049454e44ae426082</data>
1467                    </item>
1468                    <item key="id"><![CDATA[rotate_anticlockwise.png]]></item>
1469                    <item key="mandatory" type="int">0</item>
1470                    <item key="multilang" type="int">0</item>
1471                    <item key="name"><![CDATA[rotate_anticlockwise.png]]></item>
1472                    <item key="repetitive" type="int">0</item>
1473                    <item key="type"><![CDATA[resource]]></item>
1474                  </dictionary>
1475                </item>
1476                <item type="dictionary">
1477                  <dictionary>
1478                    <item key="custom">
1479                      <data content_type="image/png" filename="rotate_anticlockwise_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002614944415478da62fcffff3f03188018a1a1a1cc0001c40817292f2fff666363f31f2080e0225bb76efd7fe2c409062610a7b6b6f6bf8c8c0c83a2a2e226800042e881021610d1d7d7d722252555bd6ad52a2bb0f1306c6464f49fa1b1b1f13f8873e0c001300d1040282a4078d2a4497390f9704beaebeb3981babfb7b4b4fcfff3e70f83a4a424c3f1e3c7215e282d2df5eeeded051bb971e3c66f6bd6ace18499c0929b9bbb11a8c3effdfbf760933e7ffeccf9ebd7af6fd3a74f67f8fdfb3703400061f8031d30a10b00adba84cc473161ce9c39ffc5c4c4189e3c79c270e4c8918dcb962d0b802ba8a9a9b9fdf3e7cf1dcacaca39205f800050412158417575b522d061f7babbbb19030202aa3f7dfa24f2eddbb702a006881520bfbf7efd9ac1d5d59501a8bb1ea8a809eec8a2a2a2babf7fff328054838c9695956d0486c5ffd9b3672b821d999595f51fe45f902237373706a0550cdfbf7f07870150c31d8000c3880b743c63c60ce6c9932757e092c71b9013274e9cc0cbcb9b0fb2151834af7ffcf87116887702f15a60903dc60847180046bc373b3bbb3d1f1f5f2928e901438581959515ec7410b877ef1ec3d9b3673702fd9d8b610030bceb807e6bece8e86004f1131313e7036d34062ade0bc4c1b6b6b6b21c1c1c0c8f1e3d0245d60e1403805961a3888888dff3e7cf41c99a71f3e6cd1b81c205bebebef77179139c0780c991f3dfbf7f97809a5540d101c2d0dce6a7a0a0e077e8d02106a0a177803151101515b515c580c2c24245a0e6abc2c2c29cc0a4ca006483a30a044034d0f90c2c2c2c0cc04ca60294db028c639061df81deec00f2bb0926674200008520bdcee578a4df0000000049454e44ae426082</data>
1480                    </item>
1481                    <item key="id"><![CDATA[rotate_anticlockwise_disabled.png]]></item>
1482                    <item key="mandatory" type="int">0</item>
1483                    <item key="multilang" type="int">0</item>
1484                    <item key="name"><![CDATA[rotate_anticlockwise_disabled.png]]></item>
1485                    <item key="repetitive" type="int">0</item>
1486                    <item key="type"><![CDATA[resource]]></item>
1487                  </dictionary>
1488                </item>
1489                <item type="dictionary">
1490                  <dictionary>
1491                    <item key="custom">
1492                      <data content_type="image/png" filename="rotate_clockwise.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002334944415438cba5934f48545114c6bf3733da3cd4a9b034151782548b762da265b430109c85b4b1852ddc8404ba989a450589ae8298d2452e5c58040549498118862209b6186cec9f380a8a83082a44d17bf7de77cf392dc6812ca7202f9ccd3de7fcce772fdf714404fb39a162898e976dc9f66717c3ff0dd09e6ef33d3df82f80537842e7c4e5fa40db56a383a6409bd3d51535478d31c8ae2edd1bef9eeafa2be0caebf6b3810eaed796d5c663d1838896ba70e04091c6fb2f19649796fa667bd337f6028437ce2cd71b6dfa8e579e88d71daa43000b16c696b705471ce4d673d8dcd87cb7fe355e7aee542cfbc71f28dfb41e736be2956547a0ac86561a8bab5918df229d99c3e2427660eeeec76b0052379fe4dcdf0111e5a9a6f2ca7228abf0cdfb8ef1e9f135ad8291409bf34607e90ff717ae0200b334b2480240cf6e059ebef0363383e76f5e606c720cbea747667bd3ddca374fb50a3a0a85cc0c224e2686571a76491091a2f160d26f1898f046450489872bd2ff2a275d43cba3bfd6ece983a169e50e4ea95b96e4932569010022861b060e97855b3a07179b8b1a69685a355bc67c558573fb6475c4b594f78925c60f458886016b39d5d1ffd9058048a171784637589254cc755a2a0e38280903811510e7f3d6327cc3206654c54a1ad7b6fd04809ec8e359e35a9284254956c7426e79a903430213002400715e01114199100a8a883879e94ee651c492cc5b9246cbc0ea36c192c0527e32b160a71f96182bdb0a4cbc732f2eb3a49cfdaef34fd7d967e699b5fc230000000049454e44ae426082</data>
1493                    </item>
1494                    <item key="id"><![CDATA[rotate_clockwise.png]]></item>
1495                    <item key="mandatory" type="int">0</item>
1496                    <item key="multilang" type="int">0</item>
1497                    <item key="name"><![CDATA[rotate_clockwise.png]]></item>
1498                    <item key="repetitive" type="int">0</item>
1499                    <item key="type"><![CDATA[resource]]></item>
1500                  </dictionary>
1501                </item>
1502                <item type="dictionary">
1503                  <dictionary>
1504                    <item key="custom">
1505                      <data content_type="image/png" filename="rotate_clockwise_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000002854944415478da62fcffff3f0318a4a5a5fd07710002881126c27cf2e4c9fe9b376fde0208200690c8ecd9b3ffe7e6e622946cdcb8f1ff93274f183e7efcc8001040703d30c0ccc4c4b40128bb5c4f4faf112c121616f6dfc6c6a6bab1b11162c68a152b14c5c4c4ee6dddba95e1dbb76ff5000104b605864b4b4b2f21f34198f9cf9f3f056fdebc397ee4c89106666666f19a9a1a9167cf9e4db2b5b59d0cb202c5158b162daafbf1e347e3a3478f18b8b8b818aaaaaa184176defef9f3a70a1033fcfaf58b016822c39d3b77c03408030410863fd0011332273f3f7f0eba0296cece4e4b0e0e8e632222220c8686860c5e5e5e2fb66ddb56033701e872b0e4b56bd7180e1f3ecc00926c6d6de5849b70f9f265b0043080192d2c2c98418240c7be05525c6015b00059b26409e7bc79f3be81d83367cefc5f5c5cec0d62b380142d5dba74233078fd603e7af7ee1d030f0fcf165038b10025ff83c2e0eeddbbe0707073736300c525889d9c9cbc1120c018d0c31e861b1a1a2a2a2b2b9971c9c3303c20bbbbbb6581d1100cb4cd1d481b0b0a0a8a826cbe77efde44a0fb0b700534331b1b9bec9e3d7b16898a8ace949595f5e0e7e757111717e76664646400b2198009c1a2bfbf9ffbe9d3a76cc004701bdd00c6c2c2c2ed2a2a2a1e7c7c7c0c9f3f7f66d8bd7bf763a00bd6fefefddb19e8cfb3070f1e4c04296c6969f9ffefdfbffabababa261403f0a50560ea5204269809494949fef5f5f5ff8121cd0074c9a6b6b6367f7844a26b0286ba37d0a6090202022a402f31dcb871032c0e0a0fa0ab1880e27e050505b7816af4264d9af49d65cd9a359c7ffffe2d05da54212c2ccc292323034faa40af8035c10c006543a05a06a077555ebe7cf9363535559b60722604001067a1e996e25dee0000000049454e44ae426082</data>
1506                    </item>
1507                    <item key="id"><![CDATA[rotate_clockwise_disabled.png]]></item>
1508                    <item key="mandatory" type="int">0</item>
1509                    <item key="multilang" type="int">0</item>
1510                    <item key="name"><![CDATA[rotate_clockwise_disabled.png]]></item>
1511                    <item key="repetitive" type="int">0</item>
1512                    <item key="type"><![CDATA[resource]]></item>
1513                  </dictionary>
1514                </item>
1515                <item type="dictionary">
1516                  <dictionary>
1517                    <item key="custom">
1518                      <data content_type="image/png" filename="drop-shadow.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c0000022b4944415478da62fcffff3f0308308188ae558ffe030410234c8465f2e6a7ff6fbd78dc0e1040609185075efffffefd0f83b3ca1788da780751c6ab4f1eb64f3af0f62f4000c1f5c000cbd2c36ffefff8f997e11b508b8bca270696cf5f7e03397f197efcf8c3f0fbf76f060690969c59c79f82e8e3c78fff070820b019bd5b9effff0ba4fffc6100aafacbf0fbd77f8696183946b80b85b8981904d9991904d818809891418083812177f689a7d7af5fffcf025270e1e647869fbfff0175ff03ebfef3f72fc3b21a0be9b367cffec770263a00084008b92341080241740236357437dd886b791acb6beca10ce0161ba88038d80d456c303543cd87d7fd386008c822e722675649f82641e7327d1b24e9c7e18530f246fe20d337e75c5d342962235d0d3013b4c81e54acb5ed42c023e2640f0ec7705599f5c2769cb2fe231ada4c028baab2f7ab9454e1bd2fb077ee36f79af128f3166004151002e0a800859594201bd8ca7f40f3feff03b99381e12f9000d1ff80fcbf7fff33dc7df69da127458911c3805f7f4029e11f564d601a6420900d0a5f60e8b4815265960dbf94a6a6262338b5fc0426b69fc050fa090ac29f9060fd8114b4600c9407193039d5a20a14827f8109069edc402916972670dc4023f3e76f48fc800c01a76e788e4a5464ccf69162f4d1f9c970f7cd936745c1b28c8f3e3c6b7ff2e9d9b3ca2805c617df5fb4bffaf1f2d9d26a5d90ff1f020df9f30794fad16301967e40cefb070e0bdc1804acacac18298e46005292b72d500388820000000049454e44ae426082</data>
1519                    </item>
1520                    <item key="id"><![CDATA[drop-shadow.png]]></item>
1521                    <item key="mandatory" type="int">0</item>
1522                    <item key="multilang" type="int">0</item>
1523                    <item key="name"><![CDATA[drop-shadow.png]]></item>
1524                    <item key="repetitive" type="int">0</item>
1525                    <item key="type"><![CDATA[resource]]></item>
1526                  </dictionary>
1527                </item>
1528                <item type="dictionary">
1529                  <dictionary>
1530                    <item key="custom">
1531                      <data content_type="image/png" filename="drop-shadow_disabled.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001364944415478dac4533b6e83401065a2880a5120992647a1e4045c801c02941358b62c4143e18e821289825344200e815c844398cf86b7cae035c6958b8c34ccec8a37fbde63212184f64abc692fc63b1e49920822921bd33469e3386a60868a1c8661a9fbfd9e1e06006cdbb604610027405c9197cb659b817aea1690d760d0348de03dc771487aa00254ba7ddfcbca3d32cff3635114dd9d89ea4b003370dda3cef11945d1077b26076c01f8445506d60087617840bf78c00c54ddcf8c04182cd02f0caed7eb838cb5073c8025fcc9b93168dbf6ce489501df09044b705df7c6e0743a511cc7e4fbbea6eb7a773e9fc9308ca3699a5d9aa66459d671b7db755996d10cfe9e215f182e03d339ebba16a841101ce6fc79d20fe8cbb294ef92fa33555525f8abac0de48bc4d2109ee711fdfbdff82bc000ee88a508657ee4330000000049454e44ae426082</data>
1532                    </item>
1533                    <item key="id"><![CDATA[drop-shadow_disabled.png]]></item>
1534                    <item key="mandatory" type="int">0</item>
1535                    <item key="multilang" type="int">0</item>
1536                    <item key="name"><![CDATA[drop-shadow_disabled.png]]></item>
1537                    <item key="repetitive" type="int">0</item>
1538                    <item key="type"><![CDATA[resource]]></item>
1539                  </dictionary>
1540                </item>
1541                <item type="dictionary">
1542                  <dictionary>
1543                    <item key="custom">
1544                      <data content_type="image/png" filename="reset.png" type="file">89504e470d0a1a0a0000000d494844520000000f0000000f08060000003bd6954a000000097048597300000b1300000b1301009a9c180000000467414d410000b18e7cfb5193000000206348524d00007a25000080830000f9ff000080e9000075300000ea6000003a980000176f925fc5460000017e4944415478da62f8ffff3fc33f1cb865d3f3ffd8c4ff43314000b130e0004d1b9efffff4fd2f033e0010408c6053b069fcf69701843f7efbc7f01988bffdfccb70a05e8d11ac09aa0e20809870d9f8f1fb3f864fdf411aff327c06f1bffc6550cbb982620f40006168ae0b9064fcfae33fc3a7af7fc1f833d0802f4003be02e96fdfff3308c55c841b0010404cd8fc323d51961164e317a0730f37aa319eefd664fcf603a819887ffc40580e10404cb802635b850ae317a400fb0ed4f8f3e77f865fbffec1c50002081cdac5cb9ffefffced0fc3c7afff1856e629c2c283e11cd046181b64e34f248d2000104060cda050fdfcf51fd89930a09673f5ffad29da70cd5fd71830a2bb0e2080c0ce06070c346ae08a8101248c1438d800400081e3d9b3e3ce7fd45005c52bd08f207ffefacff06793118aad300e4000c1138951e9f5ff5fbe4342f43b18a3060eb201300640003121070e2c3abea3852a2e0010405893273824fdcec184ff006d65c5e66c800062c16732ba5fd101408001005a9410e9e22e4a040000000049454e44ae426082</data>
1545                    </item>
1546                    <item key="id"><![CDATA[reset.png]]></item>
1547                    <item key="mandatory" type="int">0</item>
1548                    <item key="multilang" type="int">0</item>
1549                    <item key="name"><![CDATA[reset.png]]></item>
1550                    <item key="repetitive" type="int">0</item>
1551                    <item key="type"><![CDATA[resource]]></item>
1552                  </dictionary>
1553                </item>
1554                <item type="dictionary">
1555                  <dictionary>
1556                    <item key="custom">
1557                      <data content_type="image/png" filename="reset_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000000f0000000f08060000003bd6954a0000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000000f64944415478da94923d0a84301085278b7b245b7b4bafe015bc818d95d8585b89ada547b0f03afe2bccee0b8c842509ec832191e49b9f678899c9155555b1ef3c2087cab2e46559c827850c36709e6702bcaeab8ef33ca96d5b65de7bb92a02d8b64daffbbeeb44711cb317ceb24c0192ca00f18df5380e8aa2889d305414854e80e8ba4ef57dafaeeb22092f0c354da3504d8499effbd621d26ee779aee744d475fd98828ab24745137c6001618e08e60cc3f0c0e338aadfee74db3047dc35db34cd71fee7344dd97415a0988356a76952de47922409db40912dc1cb34c705fef53ca1300ce5e0fe567ddbee04beccae59451f0106009e590f814d8292bd0000000049454e44ae426082</data>
1558                    </item>
1559                    <item key="id"><![CDATA[reset_disabled.png]]></item>
1560                    <item key="mandatory" type="int">0</item>
1561                    <item key="multilang" type="int">0</item>
1562                    <item key="name"><![CDATA[reset_disabled.png]]></item>
1563                    <item key="repetitive" type="int">0</item>
1564                    <item key="type"><![CDATA[resource]]></item>
1565                  </dictionary>
1566                </item>
1567                <item type="dictionary">
1568                  <dictionary>
1569                    <item key="custom">
1570                      <data content_type="image/png" filename="crop_hires.png" type="file">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000000467414d410000afc837058ae90000001974455874536f6674776172650041646f626520496d616765526561647971c9653c000001bb4944415438cb8d93318b53511085cf0bd1c228618dd8c816762a36bad67103428a54f901c2a691fc84b476a631ff42c8569b2e04c14a0392dd428b45d6425670cbd89817de9b33c7e2be17dfea433230ccdccbccc799b9dc68381c9e4bda95743a180c1e600bebf7fbefd234dd27795a01b0dbe97440f21eb6b4388ef77bbd1ee238be5f257932994c1e5dbd7e3b3a5aac24004e208f0ec00590c0f3e6b50800d6ebf5dbd168f4ccccde47920000478b95766a1540a1491e1aa5102f7e3a0e9e0640d1aa79420fc57943ee12e00e98978fb301e485ca24bbff0561396133c2e187956edea840023e9d2f832a0924203acc0137871960245e1ddc8d2e2930012c8c7067e74a50e1025d7086480a5f7fa4253b604136959d0577071d201d640024a99700045c2c1d740fc52e381d24b2bb3f4ad254ff028a4ff4f270299a6f24d31d6e0a7ba0c3ac04503433c10a92373bc87233fe1f9026845975d36854b64c8713971574bbdd4592247b248fa7d3e9130048cd71f6fd175207680e23604638c3d37e7cf302b75e7f91999da1dd6e6b369ba9d96c4a12b6f146a3a1f178ac5aada6a8d56a1d2749f298e4c97c3edfdbe637d6ebf5cf66f690e4b7df0925a260120fa46f0000000049454e44ae426082</data>
1571                    </item>
1572                    <item key="id"><![CDATA[crop_hires.png]]></item>
1573                    <item key="mandatory" type="int">0</item>
1574                    <item key="multilang" type="int">0</item>
1575                    <item key="name"><![CDATA[crop_hires.png]]></item>
1576                    <item key="repetitive" type="int">0</item>
1577                    <item key="type"><![CDATA[resource]]></item>
1578                  </dictionary>
1579                </item>
1580                <item type="dictionary">
1581                  <dictionary>
1582                    <item key="custom">
1583                      <data content_type="image/png" filename="crop_hires_disabled.png" type="file">89504e470d0a1a0a0000000d494844520000001000000010080600000168f4cff70000001974455874536f6674776172650041646f626520496d616765526561647971c9653c0000023d4944415478da62484b4b7bf4ffff7f060610316fdebcff0001c408e60101cbf6eddbffdfbe7d9b012080c052fbf6edfbbf63c78eff20365c497f7fffff2f5fbe30000410434a4aca359020083b3838fc675cbf7efd7f5e5e5e86a74f9f32c4c5c531b27cfbf68de1ebd7af0cdfbf7f076b658a8a8a627cfffe3dc3870f1fc0020001c4989c9c7c968b8bcbc8d5d595e1cf9f3f60fcfbf76f0690426363e3ff605b57af5efd5f505090e1faf5eb60c95fbf7e31fcf8f183a1a1a1819105644c68682823887ef8f0e17f9024131313188381a6a6e67f2525a5ff30a722e3aeaeaeff0001d8a09613864220b84210c4cbc37e3c8b0dd881955888455840b0018f292377216a9c25e6f416d483333b1f8a31de7e6e4f4f6bedebb1355729658d31d8e09c93420862a7f8f4dedf6cb2d6ca8003f2de0bfa0d9b8473240078b3a8b5b69022a524d8ea615ed745c618426434c8cde172ce09307050e979ff121830b4d62c816d00f1e49c6f632aa59694727d05e89b0a5218848160022d78cbc95ff4125a6ff9895e7c8d7e24979c7d800f684f0509f403e2231a77845d4c095d588c6633ceee4c14b922cdf39cfabeff960a4be99c4b90a7699a240ec1ac8c3159219ae3f5b66daaeb3a194f3626043b018161733200342e853008211c8ec17b8c51d5752d2c7e934ca3c671d4190388b5aeeb518049e28f67f9f9896fac5106d0b6adf4470a1f4ae35089814804006bed930aefb4f15a96e5c19ae2529e01788db6a66952defb448c3e17ba701af46943180cc3a0d59fa8aaea4df53702b8ee2e970b61db5e74010000000049454e44ae426082</data>
1584                    </item>
1585                    <item key="id"><![CDATA[crop_hires_disabled.png]]></item>
1586                    <item key="mandatory" type="int">0</item>
1587                    <item key="multilang" type="int">0</item>
1588                    <item key="name"><![CDATA[crop_hires_disabled.png]]></item>
1589                    <item key="repetitive" type="int">0</item>
1590                    <item key="type"><![CDATA[resource]]></item>
1591                  </dictionary>
1592                </item>
1593                <item type="dictionary">
1594                  <dictionary>
1595                    <item key="custom"><![CDATA[<dtml-comment>--// BO bodyContentZMSCustom_ZMSGraphic_extEdit //--</dtml-comment>
1596
1597
1598<dtml-comment>--// EO bodyContentZMSCustom_ZMSGraphic_extEdit //--</dtml-comment>]]>
1599                    </item>
1600                    <item key="id"><![CDATA[bodyContentZMSCustom_ZMSGraphic_extEdit]]></item>
1601                    <item key="mandatory" type="int">0</item>
1602                    <item key="multilang" type="int">0</item>
1603                    <item key="name"><![CDATA[Template: ZMSGraphic_extEdit]]></item>
1604                    <item key="repetitive" type="int">0</item>
1605                    <item key="type"><![CDATA[DTML Method]]></item>
1606                  </dictionary>
1607                </item>
1608                <item type="dictionary">
1609                  <dictionary>
1610                    <item key="custom"><![CDATA[<dtml-comment>--// BO ZMSGraphic_extEdit_Form //--</dtml-comment>
1611
1612<dtml-var manage_page_header>
1613        <script type="text/javascript">
1614                var img_info = new Object();
1615                var zmsgraphic_extedit_workspace_width                  = &dtml-workspace_width;
1616                var zmsgraphic_extedit_workspace_width_max      = &dtml-workspace_width_max;
1617                var zmsgraphic_extedit_request_url                                      = "<dtml-var "absolute_url()">/ZMSGraphic_extEdit_core";
1618                var zmsgraphic_extedit_has_superres                                     = <dtml-if "(img_info['imgsuperres'] is not None) and (img_info['imgsuperres']['filename'] is not None)">true<dtml-else>false</dtml-if>;
1619               
1620                img_info['queue'] = new Array();
1621                img_info['queue'].push(new Object());
1622                img_info['queue'][0]['action']                  = 'create';
1623                img_info['queue'][0]['value']                           = null;
1624                img_info['queue'][0]['filename']                = '<dtml-var "img_info['act']['filename']">';
1625                img_info['queue'][0]['url']                                     = '<dtml-var "ZMSGraphic_extEdit_getTempFolder().absolute_url()">/<dtml-var "img_info['act']['filename']">';
1626                img_info['queue'][0]['width']                           = <dtml-var "img_info['act']['width']">;
1627                img_info['queue'][0]['height']                  = <dtml-var "img_info['act']['height']">;
1628                img_info['thumb']                                                                       = new Object();
1629                img_info['thumb']['filename']                           = '<dtml-var "img_info['img']['filename']">';
1630                img_info['thumb']['url']                                                = '<dtml-var "ZMSGraphic_extEdit_getTempFolder().absolute_url()">/<dtml-var "img_info['img']['filename']">';
1631                img_info['thumb']['width']                                      = <dtml-var "img_info['img']['width']">;
1632                img_info['thumb']['height']                                     = <dtml-var "img_info['img']['height']">;
1633                img_info['thumb']['crop_box']                           = null;
1634                img_info['workspace']                                                           = new Object();
1635                img_info['workspace']['width']                  = &dtml-workspace_width;;
1636                img_info['workspace']['width_max']      = &dtml-workspace_width_max;;
1637        </script>
1638        <script type="text/javascript" src="<dtml-var "getDocumentElement().absolute_url()">/metaobj_manager/ZMSGraphic_extEdit.jquery.Jcrop.js"></script>
1639        <script src="<dtml-var "getDocumentElement().absolute_url()">/metaobj_manager/ZMSGraphic_extEdit.handleEdit.js" type="text/javascript"></script>
1640       
1641        <link type="text/css" href="<dtml-var "getDocumentElement().absolute_url()">/metaobj_manager/ZMSGraphic_extEdit.jcrop.css" rel="stylesheet" />
1642</head>
1643<dtml-var "manage_tabs(_,_,my_manage_options=[{'label':'Abbildung bearbeiten','action':''}])">
1644<dtml-var f_bo_area>
1645
1646<dtml-if "((img_info['act'].has_key('filename')) and (len(img_info['act']['filename']) > 0))">
1647<dtml-let resUrl="getDocumentElement().absolute_url()+'/metaobj_manager'"
1648                                        has_superres="(img_info['imgsuperres'] is not None) and (img_info['imgsuperres']['filename'] is not None)">
1649        <div id="ZMSGraphic_extEdit_main" style="text-align:left;">
1650                <div id="ZMSGraphic_extEdit_info">
1651                        <div class="form-label"><img src="<dtml-var resUrl>/ZMSGraphic_extEdit.information.png" id="ZMSGraphic_extEdit_info" alt="info" /> <dtml-if "img_info['imgsuperres'] is not None"><strong style="vertical-align:top;"><dtml-var "img_info['imgsuperres']['filename']"></strong></dtml-if></div>
1652                        <table cellspacing="0" cellpadding="3" border="0">
1653                        <tr>
1654                                <th><div class="form-label">Original (aka SuperRes)</div></th>
1655                                <td><div class="form-element"><label id="ZMSGraphic_extEdit_info_superres"><dtml-if "img_info['imgsuperres'] is not None"><dtml-var "img_info['imgsuperres']['width']"> x <dtml-var "img_info['imgsuperres']['height']"><dtml-else>None</dtml-if></label></div></td>
1656                                <td rowspan="3" align="right">
1657                                        <div id="ZMSGraphic_extEdit_thumb">
1658                                                <div id="ZMSGraphic_extEdit_thumb_img" style="border: 1px solid #000; min-height: <dtml-var "img_info['img']['height']">px; width: <dtml-var "img_info['img']['width']">px;">
1659                                                <dtml-if "thumb_filename is not None">
1660                                                        <img src="<dtml-var "ZMSGraphic_extEdit_getTempFolder().absolute_url()">/<dtml-var "img_info['img']['filename']">" />
1661                                                </dtml-if>
1662                                                </div>
1663                                        </div>
1664                                </td>
1665                        </tr>
1666                        <tr>
1667                                <th><div class="form-label">Image (aka HighRes)</div></th>
1668                                <td><div class="form-element"><label id="ZMSGraphic_extEdit_info_hires"><dtml-var "img_info['act']['width']"> x <dtml-var "img_info['act']['height']"></label><br /></div></td>
1669                        </tr>
1670                        <tr>
1671                                <th><div class="form-label">Preview (aka Thumbnail)</div></th>
1672                                <td><div class="form-element"><label id="ZMSGraphic_extEdit_info_thumb"><dtml-if "img_info['img'] is not None"><dtml-var "img_info['img']['width']"> x <dtml-var "img_info['img']['height']"><dtml-else>None</dtml-if></label><br /></div></td>
1673                        </tr>
1674                        <tr>
1675                                <th></th>
1676                                <td colspan="2">
1677                                        <div id="ZMSGraphic_extEdit_thumb_dim" class="form-element">
1678                                                <label>Preview (px) </label><input type="text" id="ZMSGraphic_extEdit_thumb_width" max-length="3" size="3" value="<dtml-var "img_info['img']['width']">" /> x <input type="text" id="ZMSGraphic_extEdit_thumb_height" max-length="3" size="3" value="<dtml-var "img_info['img']['height']">" /><br />
1679                                                <label>Working space (px) </label><input type="text" id="ZMSGraphic_extEdit_workspace" max-length="4" size="3" value="&dtml-workspace_width;" />
1680                                        </div> 
1681                                </td>
1682                        </tr>
1683                        <tr>
1684                                <th></th>
1685                                <td>
1686                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_ok.png" id="ZMSGraphic_extEdit_dimension_ok" alt="accept dimensions" style="cursor:pointer;" /> <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_cancel.png" id="ZMSGraphic_extEdit_dimension_cancel" alt="cancel dimensions" style="cursor:pointer;" />
1687                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_ok.png" id="ZMSGraphic_extEdit_crop_ok" alt="accept crop" style="cursor:pointer;" /> <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_cancel.png" id="ZMSGraphic_extEdit_crop_cancel" alt="cancel crop" style="cursor:pointer;" />
1688                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_ok.png" id="ZMSGraphic_extEdit_resize_ok" alt="accept resize" style="cursor:pointer;" /> <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.action_cancel.png" id="ZMSGraphic_extEdit_resize_cancel" alt="cancel resize" style="cursor:pointer;" />
1689                                </td>
1690                                <td></td>
1691                        </tr>
1692                        </table>
1693                </div>
1694                <div id="ZMSGraphic_extEdit_actions">
1695                        <table cellspacing="3" cellpadding="3" border="0">
1696                        <tr valign="top">               
1697                                <td>
1698                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.dimensions.png" id="ZMSGraphic_extEdit_dimension" alt="change dimensions" title="change dimensions" style="cursor:pointer;" /><br /><br />
1699                                        <br />
1700                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.resize.png" id="ZMSGraphic_extEdit_resize" alt="resize image" title="resize image" style="cursor:pointer;" /><br /><br />
1701                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.crop_hires.png" id="ZMSGraphic_extEdit_crop_hires" alt="crop image" title="crop image"<dtml-if "has_superres"> style="cursor:pointer;"</dtml-if> /><br /><br />
1702                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.crop_thumb.png" id="ZMSGraphic_extEdit_crop" alt="crop preview" title="crop preview" style="cursor:pointer;" /><br /><br />
1703                                        <br />
1704                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.drop-shadow.png" id="ZMSGraphic_extEdit_drop_shadow" alt="drop shadow" title="drop shadow" style="cursor:pointer;" /><br /><br />
1705                                        <br />
1706                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.rotate_clockwise.png" id="ZMSGraphic_extEdit_rotate_p" alt="rotate clockwise" title="rotate clockwise" style="cursor:pointer;" /><br /><br />
1707                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.rotate_anticlockwise.png" id="ZMSGraphic_extEdit_rotate_m" alt="rotate anticlockwise" title="rotate anticlockwise" style="cursor:pointer;" /><br /><br />
1708                                        <br />
1709                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.flip_vertical.png" id="ZMSGraphic_extEdit_flip_v" alt="flip vertical" title="flip vertical" style="cursor:pointer;" /><br />
1710                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.flip_horizontal.png" id="ZMSGraphic_extEdit_flip_h" alt="flip horizontal" title="flip horizontal" style="cursor:pointer;" /><br /><br />
1711                                        <br />
1712                                        <img src="<dtml-var resUrl>/ZMSGraphic_extEdit.reset.png" id="ZMSGraphic_extEdit_reset" alt="reset image" title="reset image"<dtml-if "has_superres"> style="cursor:pointer;"</dtml-if> /><br /><br />
1713                                </td>
1714                                <td>
1715                                        <div id="ZMSGraphic_extEdit_image" style="border: 1px solid #000; min-height: <dtml-var "workspace_width">px; width: <dtml-var "workspace_width">px;">
1716                                                <img src="<dtml-var "ZMSGraphic_extEdit_getTempFolder().absolute_url()">/<dtml-var "img_info['act']['filename']">" />
1717                                        </div>
1718                                </td>
1719                        </tr>
1720                        <tr>
1721                                <td></td>
1722                                <td>
1723                                        <div id="ZMSGraphic_extEdit_footer" class="form-element">
1724                                                <form action="<dtml-var "absolute_url()">/ZMSGraphic_extEdit?lang=<dtml-var "lang">" method="POST" id="ZMSGraphic_extEdit_form">
1725                                                        <input type="hidden" name="action" value="cancel" />
1726                                                        <input type="hidden" name="img_info" value="" />
1727                                                </form>
1728                                                <input type="button" id="ZMSGraphic_extEdit_ok" value="OK" title="OK" style="cursor:pointer;" />
1729                                                <input type="button" id="ZMSGraphic_extEdit_cancel" value="Cancel" title="Cancel" style="cursor:pointer;" />
1730                                        </div>
1731                                </td>                           
1732                        </tr>
1733                        </table>
1734                </div>
1735                <dtml-comment>
1736                <div id="ZMSGraphic_extEdit_actions">
1737                        <label>Actions:</label>
1738                        <select id="ZMSGraphic_extEdit_actionList" size="5" style="width: 150px;">
1739                        </select>
1740                </div>
1741                </dtml-comment>
1742        </div>
1743</dtml-let>
1744</dtml-if>
1745
1746<dtml-var f_eo_area>
1747<dtml-var manage_page_footer>
1748
1749<dtml-comment>--// EO ZMSGraphic_extEdit_Form //--</dtml-comment>]]>
1750                    </item>
1751                    <item key="id"><![CDATA[ZMSGraphic_extEdit_Form]]></item>
1752                    <item key="mandatory" type="int">0</item>
1753                    <item key="multilang" type="int">0</item>
1754                    <item key="name"><![CDATA[ZMSGraphic_extEdit_Form]]></item>
1755                    <item key="repetitive" type="int">0</item>
1756                    <item key="type"><![CDATA[DTML Method]]></item>
1757                  </dictionary>
1758                </item>
1759                <item type="dictionary">
1760                  <dictionary>
1761                    <item key="custom"><![CDATA[## Script (Python) "ZMSGraphic_extEdit_getTempFolder"
1762##bind container=container
1763##bind context=context
1764##bind namespace=
1765##bind script=script
1766##bind subpath=traverse_subpath
1767##parameters=createIt=False
1768##title=ZMSGraphic_extEdit_getTempFolder
1769##
1770# --// BO ZMSGraphic_extEdit_getTempFolder(createIt=False) //--
1771
1772temp_folder                     = context.temp_folder
1773temp_folder_id  = 'zmsgraphic_extedit'
1774
1775if (temp_folder_id not in temp_folder.objectIds()):
1776        if (createIt):
1777                temp_folder.manage_addFolder(temp_folder_id)
1778                temp_folder = getattr(temp_folder, temp_folder_id)
1779        else:
1780                temp_folder = None
1781else:
1782        temp_folder = getattr(temp_folder, temp_folder_id)
1783
1784return temp_folder
1785
1786# --// EO ZMSGraphic_extEdit_getTempFolder //--
1787]]>
1788                    </item>
1789                    <item key="id"><![CDATA[ZMSGraphic_extEdit_getTempFolder]]></item>
1790                    <item key="mandatory" type="int">0</item>
1791                    <item key="multilang" type="int">0</item>
1792                    <item key="name"><![CDATA[ZMSGraphic_extEdit_getTempFolder]]></item>
1793                    <item key="repetitive" type="int">0</item>
1794                    <item key="type"><![CDATA[Script (Python)]]></item>
1795                  </dictionary>
1796                </item>
1797                <item type="dictionary">
1798                  <dictionary>
1799                    <item key="custom"><![CDATA[from time import localtime, strftime
1800from PIL import Image
1801from cStringIO import StringIO
1802import os.path
1803
1804def ZMSGraphic_extEdit_crop(dest_folder, source_id, coords, dest_id = None, unique_filename = False):
1805        if (dest_folder is not None):
1806                if (not source_id in dest_folder.objectIds()):
1807                        raise 'ZMSGraphic_extEdit_crop: can\'t find source-image'
1808               
1809                temp_source = getattr(dest_folder, source_id)
1810                temp_source = StringIO(str(temp_source.data))
1811               
1812                temp_image = Image.open(temp_source)
1813                temp_image = temp_image.convert('RGB')
1814                temp_thumb = temp_image.crop(coords)
1815                temp_image_size = temp_thumb.size
1816       
1817                temp_dest = StringIO()
1818                temp_thumb.save(temp_dest, "JPEG")
1819                temp_dest.seek(0)
1820               
1821                temp_path, temp_ext = os.path.splitext(source_id)
1822                temp_dest_id = (dest_id is None) and temp_path or dest_id
1823                if (unique_filename):
1824                        temp_dest_id += '_%s'%strftime('%Y%m%d%H%M%S', localtime())
1825                temp_dest_id += '_crop.jpg'
1826               
1827                if (temp_dest_id in dest_folder.objectIds()):
1828                        dest_folder.manage_delObjects(temp_dest_id)
1829               
1830                dest_folder.manage_addImage(temp_dest_id, temp_dest)
1831               
1832                temp_result = temp_dest_id
1833                temp_result = (temp_dest_id, temp_image_size[0], temp_image_size[1])
1834        else:
1835                temp_result = None
1836               
1837        return temp_result]]>
1838                    </item>
1839                    <item key="id"><![CDATA[ZMSGraphic_extEdit_crop]]></item>
1840                    <item key="mandatory" type="int">0</item>
1841                    <item key="multilang" type="int">0</item>
1842                    <item key="name"><![CDATA[ZMSGraphic_extEdit_crop]]></item>
1843                    <item key="repetitive" type="int">0</item>
1844                    <item key="type"><![CDATA[External Method]]></item>
1845                  </dictionary>
1846                </item>
1847                <item type="dictionary">
1848                  <dictionary>
1849                    <item key="custom"><![CDATA[from time import localtime, strftime
1850from PIL import Image
1851from cStringIO import StringIO
1852import os.path
1853
1854def ZMSGraphic_extEdit_resize(dest_folder, source_id, max_width, max_height = None, dest_id = None, replace_source = False, unique_filename = False):
1855        if (dest_folder is not None):
1856                if (not source_id in dest_folder.objectIds()):
1857                        raise 'ZMSGraphic_extEdit_resize: can\'t find source-image'
1858               
1859                if (max_height is None):
1860                        max_height = max_width
1861               
1862                temp_source = getattr(dest_folder, source_id)
1863                temp_source = StringIO(str(temp_source.data))
1864               
1865                temp_image                      = Image.open(temp_source)
1866                temp_image                      = temp_image.convert('RGB')
1867                temp_resized            = temp_image.resize((max_width, max_height), Image.ANTIALIAS)
1868                temp_image_size = temp_resized.size
1869               
1870                temp_dest = StringIO()
1871                temp_resized.save(temp_dest, "JPEG")
1872                temp_dest.seek(0)
1873               
1874                temp_path, temp_ext = os.path.splitext(source_id)
1875                temp_dest_id = (dest_id is None) and temp_path or dest_id
1876                if (not replace_source):
1877                        temp_dest_id += '_preview'
1878                if (unique_filename):
1879                        temp_dest_id += '_%s'%strftime('%Y%m%d%H%M%S', localtime())
1880                temp_dest_id += '.jpg'
1881               
1882                if (replace_source):
1883                        dest_folder.manage_delObjects(source_id)
1884               
1885                if (temp_dest_id in dest_folder.objectIds()):
1886                        dest_folder.manage_delObjects(temp_dest_id)
1887               
1888                dest_folder.manage_addImage(temp_dest_id, temp_dest)
1889               
1890                temp_result = (temp_dest_id, temp_image_size[0], temp_image_size[1])
1891        else:
1892                temp_result = None
1893       
1894        return temp_result]]>
1895                    </item>
1896                    <item key="id"><![CDATA[ZMSGraphic_extEdit_resize]]></item>
1897                    <item key="mandatory" type="int">0</item>
1898                    <item key="multilang" type="int">0</item>
1899                    <item key="name"><![CDATA[ZMSGraphic_extEdit_resize]]></item>
1900                    <item key="repetitive" type="int">0</item>
1901                    <item key="type"><![CDATA[External Method]]></item>
1902                  </dictionary>
1903                </item>
1904                <item type="dictionary">
1905                  <dictionary>
1906                    <item key="custom"><![CDATA[from time import localtime, strftime
1907from PIL import Image
1908from cStringIO import StringIO
1909import os.path
1910
1911# @param methods list of FLIP_LEFT_RIGHT (0), FLIP_TOP_BOTTOM (1), ROTATE_90 (2), ROTATE_180 (3) or ROTATE_270 (4)
1912
1913def ZMSGraphic_extEdit_transpose(dest_folder, source_id, methods, replace_source = False, dest_id = None, unique_filename = False):
1914        if (dest_folder is not None):
1915                if (not source_id in dest_folder.objectIds()):
1916                        raise 'ZMSGraphic_extEdit_transpose: can\'t find source-image'
1917               
1918                if (type(methods) != type([])):
1919                        methods = [methods]
1920               
1921                temp_source = getattr(dest_folder, source_id)
1922                temp_source = StringIO(str(temp_source.data))
1923               
1924                temp_image                      = Image.open(temp_source)
1925                temp_image                      = temp_image.convert('RGB')
1926                for one_method in methods:
1927                        temp_image              = temp_image.transpose(one_method)
1928                temp_image_size = temp_image.size
1929               
1930                temp_dest = StringIO()
1931                temp_image.save(temp_dest, "JPEG")
1932                temp_dest.seek(0)
1933               
1934                temp_path, temp_ext = os.path.splitext(source_id)
1935                temp_dest_id = (dest_id is None) and temp_path or dest_id
1936                if (not replace_source):
1937                        temp_dest_id += '_preview'
1938                if (unique_filename):
1939                        temp_dest_id += '_%s'%strftime('%Y%m%d%H%M%S', localtime())
1940                temp_dest_id += '.jpg'
1941               
1942                if (replace_source):
1943                        dest_folder.manage_delObjects(source_id)
1944               
1945                if (temp_dest_id in dest_folder.objectIds()):
1946                        dest_folder.manage_delObjects(temp_dest_id)
1947               
1948                dest_folder.manage_addImage(temp_dest_id, temp_dest)
1949               
1950                temp_result = (temp_dest_id, temp_image_size[0], temp_image_size[1])
1951        else:
1952                temp_result = None
1953       
1954        return temp_result]]>
1955                    </item>
1956                    <item key="id"><![CDATA[ZMSGraphic_extEdit_transpose]]></item>
1957                    <item key="mandatory" type="int">0</item>
1958                    <item key="multilang" type="int">0</item>
1959                    <item key="name"><![CDATA[ZMSGraphic_extEdit_transpose]]></item>
1960                    <item key="repetitive" type="int">0</item>
1961                    <item key="type"><![CDATA[External Method]]></item>
1962                  </dictionary>
1963                </item>
1964                <item type="dictionary">
1965                  <dictionary>
1966                    <item key="custom"><![CDATA[## Script (Python) "ZMSGraphic_extEdit_core"
1967##bind container=container
1968##bind context=context
1969##bind namespace=
1970##bind script=script
1971##bind subpath=traverse_subpath
1972##parameters=
1973##title=ZMSGraphic_extEdit_core
1974##
1975from DateTime import DateTime
1976
1977def calcCropValues(src_values, src_dim, dest_dim):
1978        temp_factor = float (dest_dim[0]) / float (src_dim[0])
1979       
1980        for i in range(0, len(src_values)):
1981                src_values[i] = int (float (src_values[i]) * temp_factor)
1982               
1983        return src_values
1984       
1985def calcResizeDim(src_width, src_height, dest_width = None, dest_height = None):
1986        if (dest_width is None):
1987                dest_width = src_width
1988        if (dest_height is None):
1989                dest_height = src_height
1990       
1991        if src_width > dest_width: src_height = max(int (round(float (src_height * dest_width) / float(src_width))), 1); src_width = dest_width
1992        if src_height > dest_height: src_width = max(int (round(src_width * dest_height / src_height)), 1); src_height = dest_height
1993       
1994        return (src_width, src_height)
1995
1996def calcRotateValue(source_value):
1997        return (source_value < 0) and 4 - (abs(source_value) % 4) or source_value % 4
1998
1999def clearGarbage(dest_folder):
2000        if ((dest_folder is not None) and (dest_folder.getId() in context.temp_folder.objectIds())):
2001                context.temp_folder.manage_delObjects(dest_folder.getId())
2002
2003def createTempImage(dest_folder, image_filename, image_data):
2004        # delete old image
2005        if (image_filename in dest_folder.objectIds()):
2006                dest_folder.manage_delObjects(image_filename)
2007        # create image 
2008        dest_folder.manage_addImage(image_filename, image_data)
2009
2010def createTempImages(dest_folder, image_dict, conf_dimensions, use_hires = False):
2011        temp_image_dict = ((image_dict['imgsuperres'] is not None) and (not use_hires)) and image_dict['imgsuperres'] or image_dict['imghires']
2012       
2013        if (temp_image_dict is not None):
2014                # create new filename
2015                image_dict['act']['filename'] = createUniqueFilename(temp_image_dict['filename'])
2016                # create image
2017                createTempImage(dest_folder, image_dict['act']['filename'], temp_image_dict['data'])
2018               
2019                # resize image if its greater than workspace width
2020                if (max(temp_image_dict['height'], temp_image_dict['width']) > conf_dimensions['workspace']):
2021                        temp_size = calcResizeDim(temp_image_dict['width'], temp_image_dict['height'], conf_dimensions['workspace'], conf_dimensions['workspace'])
2022                        temp_info = context.ZMSGraphic_extEdit_resize(dest_folder, image_dict['act']['filename'], temp_size[0], temp_size[1], replace_source = True)
2023                       
2024                        image_dict['act']['filename']           = temp_info[0]
2025                        image_dict['act']['width']              = temp_info[1]
2026                        image_dict['act']['height']             = temp_info[2]
2027                else:
2028                        image_dict['act']['height']             = temp_image_dict['height']
2029                        image_dict['act']['width']              = temp_image_dict['width']
2030               
2031                if ((image_dict['img'] is not None) and (image_dict['img'].has_key('filename')) and (image_dict['img']['filename'] is not None)):
2032                        # delete old thumb
2033                        if (image_dict['img']['filename'] in dest_folder.objectIds()):
2034                                dest_folder.manage_delObjects(image_dict['img']['filename'])
2035                        # create thumb
2036                        dest_folder.manage_addImage(image_dict['img']['filename'], image_dict['img']['data'])
2037                       
2038        return image_dict
2039
2040def createUniqueFilename(src_filename):
2041        temp_parts = src_filename.rsplit('.')
2042       
2043        return '%s_%s%s'%(temp_parts[0], DateTime().strftime('%Y%m%d%H%M%S'), (len(temp_parts) > 1) and '.%s'%temp_parts[1] or '')
2044
2045def cropImage(dest_folder, source_id, crop_box, max_dim, unique_filename = False):
2046        temp_info = None
2047       
2048        if ((dest_folder is not None) and (source_id in dest_folder.objectIds())):
2049                temp_info = context.ZMSGraphic_extEdit_crop(dest_folder, source_id,
2050                                                                                                                                                                                                (int (crop_box[0]), int (crop_box[1]), int (crop_box[2]), int (crop_box[3])),
2051                                                                                                                                                                                                unique_filename = unique_filename)
2052               
2053                max_dim[0] = int (max_dim[0])
2054                max_dim[1] = int (max_dim[1])
2055               
2056                # resize cropped image to max dimensions if dimensions are unequal to thumb-dimension-settings
2057                if ((temp_info[1] <> max_dim[0]) or (temp_info[2] <> max_dim[1])):
2058                        temp_info = context.ZMSGraphic_extEdit_resize(dest_folder, temp_info[0], max_dim[0], max_dim[1], replace_source = True)
2059               
2060        return temp_info
2061
2062def getConfDimensions(is_gallery):
2063        temp_result = {}
2064       
2065        if (is_gallery):
2066                temp_result['thumb_height']     = int (context.aq_parent.getObjProperty('galleryThumbsMaxHeight', REQUEST))
2067                temp_result['thumb_width']      = int (context.aq_parent.getObjProperty('galleryThumbsMaxWidth', REQUEST))
2068                temp_result['workspace']        = int (context.aq_parent.getObjProperty('galleryWidth', REQUEST))
2069        elif (context.getConfProperty('InstalledProducts.pil')):
2070                temp_result['thumb_height']     = int (context.getConfProperty('InstalledProducts.pil.thumbnail.max', 75))
2071                temp_result['thumb_width']      = int (context.getConfProperty('InstalledProducts.pil.thumbnail.max', 75))
2072                temp_result['workspace']        = int (context.getConfProperty('InstalledProducts.pil.hires.thumbnail.max', 400))
2073        else:
2074                temp_result['thumb_height']     = 75
2075                temp_result['thumb_width']      = 75
2076                temp_result['workspace']        = None
2077       
2078        if (temp_result['workspace'] < 1 and temp_result['workspace'] is not None):
2079                temp_result['workspace'] = int (context.getConfProperty('ZMSGraphic.zmi_max_width', 400))
2080       
2081        return temp_result
2082
2083def getFileData(dest_folder, filename):
2084        if ((dest_folder is not None) and (filename in dest_folder.objectIds())):
2085                temp_data = getattr(dest_folder, filename)
2086                temp_data = {'filename'                         : temp_data.getId(),
2087                                                                        'data'                                  : str(temp_data.data),
2088                                                                        'content_type'  : temp_data.getContentType(),
2089                                                                        'size'                                  : temp_data.get_size()}
2090        else:
2091                temp_data = None
2092               
2093        return temp_data
2094
2095def getSourceImageData(attr_name, create_it = False, dest_folder = None):
2096        temp_image = context.getObjProperty(attr_name, REQUEST)
2097       
2098        if (temp_image is None):
2099                temp_result = None
2100        else:
2101                temp_result = {}
2102                temp_result['data']                     = temp_image.getData()
2103                temp_result['filename'] = temp_image.getFilename()
2104                temp_result['height']           = temp_image.getHeight()
2105                temp_result['width']            = temp_image.getWidth()
2106               
2107                # create image
2108                if (create_it and (dest_folder is not None)):
2109                        createTempImage(dest_folder, temp_image.getFilename(), temp_image.getData())
2110               
2111        return temp_result
2112
2113def handleEditQueue(dest_folder, img_info, is_gallery):
2114        if ((img_info is not None) and (len(img_info['queue']) > 1) and (img_info['queue'][-1]['filename'] == 'null')):
2115                temp_action             = img_info['queue'][-1]['action']
2116                temp_dest_id    = img_info['queue'][0]['filename'].rsplit('.', 1)[0]
2117               
2118                if (temp_action == 'rotate'):
2119                        temp_value = int (img_info['queue'][-1]['value'])
2120                       
2121                        temp_value = (temp_value < 0) and 4 - (abs(temp_value) % 4) or temp_value % 4
2122                        if (temp_value != 0):
2123                                img_info = handleFlipRotateActions(dest_folder, temp_dest_id, img_info, temp_value + 1)
2124                elif (temp_action == 'fhorizontal'):
2125                        img_info = handleFlipRotateActions(dest_folder, temp_dest_id, img_info, 0)
2126                elif (temp_action == 'fvertical'):
2127                        img_info = handleFlipRotateActions(dest_folder, temp_dest_id, img_info, 1)
2128                elif (temp_action == 'resize'):
2129                        # resize image 
2130                        temp_size = img_info['queue'][-1]['value'].split(',')
2131                        temp_info = context.ZMSGraphic_extEdit_resize(dest_folder, img_info['queue'][-2]['filename'], int (temp_size[0]), int (temp_size[1]),
2132                                                                                                                                                                                                                dest_id = temp_dest_id, unique_filename = True)
2133       
2134                        img_info['queue'][-1]['filename']       = temp_info[0]
2135                        img_info['queue'][-1]['url']                    = '%s/%s'%(dest_folder.absolute_url(), temp_info[0])
2136                        img_info['queue'][-1]['width']          = temp_info[1]
2137                        img_info['queue'][-1]['height']         = temp_info[2]
2138                       
2139                        img_info = setThumbInfo(img_info)
2140                elif (temp_action == 'crop'):
2141                        temp_crop_info = img_info['queue'][-1]['value'].split(',')
2142                        # crop thumb
2143                        temp_info       = cropImage(dest_folder, img_info['queue'][-2]['filename'], temp_crop_info[:4], temp_crop_info[-2:], True)
2144                        img_info        = setThumbInfo(img_info, temp_info, img_info['queue'][-1]['value'], dest_folder)
2145                        # delete crop-action from edit-queue
2146                        img_info['queue'].pop()
2147                elif (temp_action == 'crop_hires'):
2148                        temp_source_dict = getSourceImageData('imgsuperres', True, dest_folder)
2149                        if (temp_source_dict is not None):
2150                                # calculate crop-values
2151                                temp_crop_info  = img_info['queue'][-1]['value'].split(',')
2152                                temp_max_dim            = temp_crop_info[-2:]
2153                                temp_crop_info  = calcCropValues(temp_crop_info[:4], temp_max_dim, (temp_source_dict['width'], temp_source_dict['height']))
2154                                # crop thumb
2155                                temp_info = cropImage(dest_folder, temp_source_dict['filename'], temp_crop_info, temp_max_dim, True)
2156                                # reset edit-queue
2157                                img_info['queue'] = [{'action'          : 'crop_hires',
2158                                                                                                                        'value'                 : '%i,%i,%i,%i,%s,%s'%(temp_crop_info[0], temp_crop_info[1], temp_crop_info[2], temp_crop_info[3],
2159                                                                                                                                                                                                                                                                        temp_max_dim[0], temp_max_dim[1]),
2160                                                                                                                        'filename'      : temp_info[0],
2161                                                                                                                        'url'                   : '%s/%s'%(dest_folder.absolute_url(), temp_info[0]),
2162                                                                                                                        'width'                 : temp_info[1],
2163                                                                                                                        'height'                : temp_info[2]}]
2164                               
2165                                img_info = setThumbInfo(img_info)
2166                        else:
2167                                # delete crop-hires-action from edit-queue
2168                                img_info['queue'].pop()
2169                elif ((temp_action == 'workspace') or (temp_action == 'reset')):
2170                        temp_workspace_width = (temp_action == 'reset') and int (img_info['workspace']['width']) or int (img_info['queue'][-1]['value'])
2171                        temp_dims                                       = {'thumb_height' : 0, 'thumb_width' : 0, 'workspace' : temp_workspace_width}
2172                       
2173                        temp_source_dict                                                                = {}
2174                        temp_source_dict['act']                                 = {}
2175                        temp_source_dict['img']                                 = None
2176                        temp_source_dict['imghires']            = getSourceImageData('imghires')
2177                        temp_source_dict['imgsuperres'] = getSourceImageData('imgsuperres')
2178                        temp_source_dict                                                                = createTempImages(dest_folder, temp_source_dict, temp_dims)
2179                        # reset edit-queue
2180                        img_info['queue'] = [{'action'          : 'reset',
2181                                                                                                                'value'                 : 'null',
2182                                                                                                                'filename'      : temp_source_dict['act']['filename'],
2183                                                                                                                'url'                   : '%s/%s'%(dest_folder.absolute_url(), temp_source_dict['act']['filename']),
2184                                                                                                                'width'                 : temp_source_dict['act']['width'],
2185                                                                                                                'height'                : temp_source_dict['act']['height']}]
2186                       
2187                        img_info = setThumbInfo(img_info)
2188                elif (temp_action == 'drop_shadow'):
2189                        temp_info = context.ZMSGraphic_extEdit_dropShadow(dest_folder, img_info['queue'][-2]['filename'], unique_filename = True)
2190                       
2191                        img_info['queue'][-1]['filename']       = temp_info[0]
2192                        img_info['queue'][-1]['url']                    = '%s/%s'%(dest_folder.absolute_url(), temp_info[0])
2193                        img_info['queue'][-1]['width']          = temp_info[1]
2194                        img_info['queue'][-1]['height']         = temp_info[2]
2195                       
2196                        img_info = setThumbInfo(img_info)
2197                       
2198        return img_info
2199
2200def handleFlipRotateActions(dest_folder, dest_id, img_info, temp_action):
2201        temp_info = context.ZMSGraphic_extEdit_transpose(dest_folder, img_info['queue'][-2]['filename'], temp_action, dest_id = dest_id, unique_filename = True)
2202       
2203        img_info['queue'][-1]['filename']       = temp_info[0]
2204        img_info['queue'][-1]['url']                    = '%s/%s'%(dest_folder.absolute_url(), temp_info[0])
2205        img_info['queue'][-1]['width']          = temp_info[1]
2206        img_info['queue'][-1]['height']         = temp_info[2]
2207               
2208        return setThumbInfo(img_info)
2209
2210def optimizeQueue(img_info):
2211        if ((img_info is not None) and (len(img_info['queue']) > 0)):
2212                temp_dest_actions       = []
2213                temp_last_action        = None
2214                temp_value                              = None
2215               
2216                def appendToList(action, value):
2217                        if (action in ['rotate']):
2218                                value = calcRotateValue(value)
2219                               
2220                                if (value > 0):
2221                                        temp_dest_actions.append({'action' : action, 'value' : value})
2222                        elif (action in ['fvertical', 'fhorizontal']):
2223                                value = value % 2
2224                               
2225                                if (value > 0):
2226                                        temp_dest_actions.append({'action' : action, 'value' : value})
2227                        else:
2228                                temp_dest_actions.append({'action' : action, 'value' : value})
2229                               
2230                for i in range(0, len(img_info['queue']) + 1):
2231                        if (i == len(img_info['queue'])):
2232                                appendToList(temp_last_action, temp_value)
2233                        elif (temp_last_action is None):
2234                                temp_last_action = img_info['queue'][i]['action']
2235                                temp_value = img_info['queue'][i]['value']
2236                        elif (temp_last_action == img_info['queue'][i]['action']):
2237                                if (temp_last_action in ['rotate', 'fvertical', 'fhorizontal']):
2238                                        temp_value = (temp_value is None) and int (img_info['queue'][i]['value']) or temp_value + int (img_info['queue'][i]['value'])
2239                                else:
2240                                        temp_value = img_info['queue'][i]['value']
2241                        else:
2242                                appendToList(temp_last_action, temp_value)
2243                               
2244                                temp_last_action        = img_info['queue'][i]['action']
2245                                temp_value                              = (temp_last_action in ['rotate', 'fvertical', 'fhorizontal']) and int (img_info['queue'][i]['value']) or img_info['queue'][i]['value']
2246               
2247                img_info['queue'] = temp_dest_actions
2248               
2249        return img_info
2250
2251def recreateImages(dest_folder, img_info, is_gallery = False):
2252        def setInfo(dest_dict, source_list):
2253                dest_dict['filename'] = source_list[0]
2254                dest_dict['height']             = source_list[2]
2255                dest_dict['width']              = source_list[1]
2256               
2257                return dest_dict
2258       
2259        def doTranspose(image_dict, action_list):
2260                if (len(action_list) > 0):
2261                        if (image_dict['imgsuperres'] is not None):
2262                                image_dict['imgsuperres'] = setInfo(image_dict['imgsuperres'], context.ZMSGraphic_extEdit_transpose(dest_folder, temp_image_dict['imgsuperres']['filename'], action_list, replace_source = True))
2263                        if (image_dict['imghires'] is not None):
2264                                image_dict['imghires'] = setInfo(image_dict['imghires'], context.ZMSGraphic_extEdit_transpose(dest_folder, temp_image_dict['imghires']['filename'], action_list, replace_source = True))
2265                               
2266                return image_dict
2267                       
2268        # delete temp-images
2269        clearGarbage(dest_folder)
2270        # create new temp-folder
2271        dest_folder     = context.ZMSGraphic_extEdit_getTempFolder(True)
2272       
2273        temp_image_dict                                                                 = {}
2274        temp_image_dict['img']                                  = (img_info['thumb']['url'] != 'null') and getSourceImageData('img', True, dest_folder) or None
2275        temp_image_dict['imghires']                     = (img_info['queue'][0]['action'] == 'create') and getSourceImageData('imghires', True, dest_folder) or None
2276        temp_image_dict['imgsuperres']  = getSourceImageData('imgsuperres', True, dest_folder)
2277       
2278        if (temp_image_dict['imghires'] is None):
2279                # create hires from superres
2280                if (temp_image_dict['imgsuperres'] is not None):
2281                        # crop hires from superres
2282                        if (img_info['queue'][0]['action'] == 'crop_hires'):
2283                                temp_crop_info  = img_info['queue'][0]['value'].split(',')
2284                                temp_info                       = cropImage(dest_folder, temp_image_dict['imgsuperres']['filename'], temp_crop_info[:4], temp_crop_info[-2:], True)
2285                        else:
2286                                temp_size = calcResizeDim(temp_image_dict['imgsuperres']['width'], temp_image_dict['imgsuperres']['height'], img_info['workspace']['width'])
2287                                temp_info = context.ZMSGraphic_extEdit_resize(dest_folder, temp_image_dict['imgsuperres']['filename'], temp_size[0], temp_size[1])
2288                               
2289                        temp_image_dict['imghires'] = {}
2290                        temp_image_dict['imghires']['filename'] = temp_info[0]
2291                        temp_image_dict['imghires']['height']           = temp_info[2]
2292                        temp_image_dict['imghires']['width']            = temp_info[1]
2293        # crop hires from superres
2294        elif (img_info['queue'][0]['action'] == 'crop_hires'):
2295                temp_crop_info  = img_info['queue'][0]['value'].split(',')
2296                temp_info                       = cropImage(dest_folder, temp_image_dict['imgsuperres']['filename'], temp_crop_info[:4], temp_crop_info[-2:], True)
2297               
2298                temp_image_dict['imghires']['filename'] = temp_info[0]
2299                temp_image_dict['imghires']['height']           = temp_info[2]
2300                temp_image_dict['imghires']['width']            = temp_info[1]
2301       
2302        if ((temp_image_dict['imghires'] is not None or temp_image_dict['imgsuperres'] is not None) and (img_info is not None)):
2303                if (temp_image_dict['imghires'] is not None):
2304                        img_info['workspace']['width'] = int (img_info['workspace']['width'])
2305                        temp_hires_max_dim = max(temp_image_dict['imghires']['height'], temp_image_dict['imghires']['width'])
2306                        # resize hires if its greater than workspace width
2307                        if (((temp_is_gallery) and (temp_hires_max_dim <> img_info['workspace']['width'])) or
2308                                        ((not temp_is_gallery) and (temp_hires_max_dim > img_info['workspace']['width']))):
2309                                temp_size = calcResizeDim(temp_image_dict['imghires']['width'], temp_image_dict['imghires']['height'], img_info['workspace']['width'])
2310                                temp_info = context.ZMSGraphic_extEdit_resize(dest_folder, temp_image_dict['imghires']['filename'], temp_size[0], temp_size[1], replace_source = True)
2311                               
2312                                temp_image_dict['imghires']['width']    = temp_info[1]
2313                                temp_image_dict['imghires']['height']   = temp_info[2]
2314               
2315                # apply edit-actions to hires and/or superres
2316                if (len(img_info['queue']) > 1):
2317                        temp_action_list = []
2318                       
2319                        for i in range(0, len(img_info['queue'])):
2320                                temp_action     = img_info['queue'][i]['action']
2321                               
2322                                if (temp_action == 'rotate'):
2323                                        temp_value = calcRotateValue(int (img_info['queue'][i]['value']))
2324                                        if (temp_value != 0):
2325                                                temp_action_list.append(temp_value + 1)
2326                                elif (temp_action == 'fhorizontal'):
2327                                        temp_action_list.append(0)
2328                                elif (temp_action == 'fvertical'):
2329                                        temp_action_list.append(1)
2330                                elif (temp_action == 'resize'):
2331                                        temp_image_dict = doTranspose(temp_image_dict, temp_action_list)
2332                                        # resize image 
2333                                        temp_size = img_info['queue'][i]['value'].split(',')
2334                                        temp_image_dict['imghires'] = setInfo(temp_image_dict['imghires'], context.ZMSGraphic_extEdit_resize(dest_folder, temp_image_dict['imghires']['filename'], int (temp_size[0]), int (temp_size[1]), replace_source = True))
2335                                        # reset action-list
2336                                        temp_action_list = []
2337                                elif (temp_action == 'drop_shadow'):
2338                                        temp_image_dict = doTranspose(temp_image_dict, temp_action_list)
2339                                        # draw drop-shadow
2340                                        temp_image_dict['imghires'] = setInfo(temp_image_dict['imghires'], context.ZMSGraphic_extEdit_dropShadow(dest_folder, temp_image_dict['imghires']['filename'], replace_source = True))
2341                                        # reset action-list
2342                                        temp_action_list = []
2343                       
2344                        temp_image_dict = doTranspose(temp_image_dict, temp_action_list)
2345                # create thumb                 
2346                if (img_info['thumb']['crop_box'] != 'null'):
2347                        temp_crop_info = img_info['thumb']['crop_box'].split(',')
2348                        temp_info = cropImage(dest_folder, temp_image_dict['imghires']['filename'], temp_crop_info[:4], temp_crop_info[-2:])
2349
2350                        temp_image_dict['img']                                                  = {}
2351                        temp_image_dict['img']['filename']      = temp_info[0]
2352                        temp_image_dict['img']['height']                = temp_info[2]
2353                        temp_image_dict['img']['width']                 = temp_info[1]
2354                # draw drop shadow
2355                #if ((int (img_info['drop_shadow']) != 0) and (temp_image_dict['imghires'] is not None)):
2356                #       context.ZMSGraphic_extEdit_dropShadow(dest_folder, temp_image_dict['imghires']['filename'], replace_source = True)
2357               
2358                if (temp_image_dict['img'] is None):
2359                        context.setObjProperty('img', None)
2360                else:
2361                        context.setObjProperty('img', getFileData(dest_folder, temp_image_dict['img']['filename']))
2362                if (temp_image_dict['imghires'] is not None):
2363                        context.setObjProperty('imghires', getFileData(dest_folder, temp_image_dict['imghires']['filename']))
2364                if (temp_image_dict['imgsuperres'] is not None):
2365                        context.setObjProperty('imgsuperres', getFileData(dest_folder, temp_image_dict['imgsuperres']['filename']))
2366               
2367def setThumbInfo(img_info, info = None, thumb_box = None, dest_folder = None):
2368        if (info is None):
2369                img_info['thumb']['filename']   = 'null'
2370                img_info['thumb']['url']                        = 'null'
2371                img_info['thumb']['crop_box']   = 'null'
2372        else:
2373                img_info['thumb']['filename']   = info[0]
2374                img_info['thumb']['url']                        = '%s/%s'%(dest_folder.absolute_url(), info[0])
2375                img_info['thumb']['crop_box']   = thumb_box
2376                img_info['thumb']['width']              = info[1]
2377                img_info['thumb']['height']             = info[2]
2378               
2379        return img_info
2380
2381##################################################################################################
2382REQUEST                 = context.REQUEST
2383temp_action     = REQUEST.get('action', None)
2384temp_lang               = REQUEST.get('lang', context.getPrimaryLanguage())
2385temp_result = ''
2386
2387temp_folder                     = context.ZMSGraphic_extEdit_getTempFolder(True)
2388temp_is_gallery = context.aq_parent.meta_id in ['ZMSGallery']
2389
2390if (temp_action is not None):
2391        # button ok pressed
2392        if (temp_action == 'ok'):
2393                recreateImages(temp_folder, optimizeQueue(context.parseXmlString(REQUEST.get('img_info', None))), temp_is_gallery)
2394               
2395                clearGarbage(temp_folder)
2396               
2397                REQUEST.RESPONSE.redirect('%s/manage_main?lang=%s&manage_lang=%s'%(context.aq_parent.absolute_url(), temp_lang, temp_lang))
2398        # ajax request
2399        elif (temp_action == 'request'):
2400                REQUEST.RESPONSE.setHeader('Content-type', 'text/html; charset=utf-8;')
2401               
2402                temp_img_info   = context.parseXmlString(REQUEST.get('img_info', None))
2403               
2404                if ((temp_img_info is not None) and (len(temp_img_info['queue']) > 0)):
2405                        temp_img_info = handleEditQueue(temp_folder, temp_img_info, temp_is_gallery)
2406                       
2407                        temp_result = {'result' : 1, 'img_info' :  temp_img_info}
2408                else:
2409                        temp_result = {'result' : 0}
2410        # button cancel pressed
2411        else:
2412                clearGarbage(temp_folder)
2413               
2414                REQUEST.RESPONSE.redirect('%s/manage_main?lang=%s&manage_lang=%s'%(context.aq_parent.absolute_url(), temp_lang, temp_lang))
2415# show edit-form
2416else:
2417        temp_conf_dims = getConfDimensions(temp_is_gallery)
2418       
2419        temp_source_dict                                                                = {}
2420        temp_source_dict['act']                                 = {}
2421        temp_source_dict['img']                                 = getSourceImageData('img')
2422        temp_source_dict['imghires']            = getSourceImageData('imghires')
2423        temp_source_dict['imgsuperres'] = getSourceImageData('imgsuperres')
2424       
2425        if ((temp_source_dict['img'] is not None) and ((temp_source_dict['img']['height'] != temp_conf_dims['thumb_height']) or (temp_source_dict['img']['width'] != temp_conf_dims['thumb_width']))):
2426                temp_source_dict['img'] = None
2427
2428        if (temp_source_dict['img'] is None):
2429                temp_source_dict['img']                                                 =  {}
2430                temp_source_dict['img']['filename'] = None
2431                temp_source_dict['img']['height']               = temp_conf_dims['thumb_height']
2432                temp_source_dict['img']['width']                = temp_conf_dims['thumb_width']
2433                temp_source_dict['img']['data']                 = None
2434       
2435        if ((temp_source_dict['imghires'] is not None) or (temp_source_dict['imgsuperres'] is not None)):
2436                if (temp_source_dict['imgsuperres'] is not None):
2437                        temp_max_workspace_width = max(temp_source_dict['imgsuperres']['height'], temp_source_dict['imgsuperres']['width'])                     
2438                elif (temp_source_dict['imghires'] is not None):
2439                        temp_max_workspace_width = max(temp_source_dict['imghires']['height'], temp_source_dict['imghires']['width'])
2440                        if (not temp_is_gallery):
2441                                temp_conf_dims['workspace']     = temp_max_workspace_width
2442               
2443                if (temp_conf_dims['workspace'] is None):
2444                        temp_conf_dims['workspace'] = max(temp_source_dict['imghires']['height'], temp_source_dict['imghires']['width'])
2445                       
2446                temp_source_dict = createTempImages(temp_folder, temp_source_dict, temp_conf_dims, use_hires = True)
2447               
2448                REQUEST.set('filename', temp_source_dict['act']['filename'])
2449                REQUEST.set('height', temp_source_dict['act']['height'])
2450                REQUEST.set('width', temp_source_dict['act']['width'])
2451                REQUEST.set('thumb_filename', temp_source_dict['img']['filename'])
2452                REQUEST.set('thumb_height', temp_source_dict['img']['height'])
2453                REQUEST.set('thumb_width', temp_source_dict['img']['width'])
2454               
2455                REQUEST.set('img_info', temp_source_dict)
2456               
2457                REQUEST.set('workspace_width', temp_conf_dims['workspace'])
2458                REQUEST.set('workspace_width_max', temp_max_workspace_width)
2459        else:
2460                REQUEST.set('filename', None)
2461       
2462        temp_result = context.dt_html(str(context.ZMSGraphic_extEdit_Form.document_src()), REQUEST)
2463
2464return temp_result
2465]]>
2466                    </item>
2467                    <item key="id"><![CDATA[ZMSGraphic_extEdit_core]]></item>
2468                    <item key="mandatory" type="int">0</item>
2469                    <item key="multilang" type="int">0</item>
2470                    <item key="name"><![CDATA[ZMSGraphic_extEdit_core]]></item>
2471                    <item key="repetitive" type="int">0</item>
2472                    <item key="type"><![CDATA[Script (Python)]]></item>
2473                  </dictionary>
2474                </item>
2475                <item type="dictionary">
2476                  <dictionary>
2477                    <item key="custom"><![CDATA[from time import localtime, strftime
2478from PIL import Image, ImageFilter
2479from cStringIO import StringIO
2480import os.path
2481
2482def ZMSGraphic_extEdit_dropShadow(dest_folder, source_id, dest_id = None, replace_source = False, unique_filename = False, maintain_size = True,
2483                                                                                                                                        iterations = 3, border = 5, offset = (3, 3), background_color = 0xffffff, shadow_color = 0x444444):
2484        # image: base image to give a drop shadow
2485        # iterations: number of times to apply the blur filter to the shadow
2486        # border: border to give the image to leave space for the shadow
2487        # offset: offset of the shadow as [x,y]
2488        # background_color: color of the background
2489        # shadow_color: color of the drop shadow
2490       
2491        if (dest_folder is not None):
2492                if (not source_id in dest_folder.objectIds()):
2493                        raise 'ZMSGraphic_extEdit_resize: can\'t find source-image'
2494               
2495                temp_source = getattr(dest_folder, source_id)
2496                temp_source = StringIO(str(temp_source.data))
2497               
2498                temp_image = Image.open(temp_source)
2499                temp_image = temp_image.convert('RGB')
2500       
2501                # calculate size of shadow image
2502                temp_dest_width  = maintain_size and temp_image.size[0] or temp_image.size[0] + abs(offset[0]) + 2 * border
2503                temp_dest_height = maintain_size and temp_image.size[1] or temp_image.size[1] + abs(offset[1]) + 2 * border
2504                # resize image if necessary
2505                if (maintain_size):
2506                        temp_image = temp_image.resize((temp_image.size[0] - abs(offset[0]) - 2 * border, temp_image.size[1] - abs(offset[1]) - 2 * border), Image.ANTIALIAS)
2507                # create shadow image
2508                temp_shadow = Image.new(temp_image.mode, (temp_dest_width, temp_dest_height), background_color)
2509                # place the shadow, with the required offset
2510                temp_left = border + max(offset[0], 0) #if <0, push the rest of the image right
2511                temp_top        = border + max(offset[1], 0) #if <0, push the rest of the image down
2512                # paste in constant color
2513                temp_shadow.paste(shadow_color,
2514                                                    [temp_left, temp_top,
2515                                                     temp_left + temp_image.size[0],
2516                                                     temp_top  + temp_image.size[1]])
2517                # apply BLUR filter repeatedly
2518                for i in range(iterations):
2519                    temp_shadow = temp_shadow.filter(ImageFilter.BLUR)
2520               
2521                temp_image_size = temp_shadow.size
2522               
2523                # paste image on top of shadow
2524                temp_left = border - min(offset[0], 0) #if the shadow offset was <0, push right
2525                temp_top        = border - min(offset[1], 0) #if the shadow offset was <0, push down
2526                temp_shadow.paste(temp_image, (temp_left, temp_top))
2527               
2528                temp_dest = StringIO()
2529                temp_shadow.save(temp_dest, "JPEG")
2530                temp_dest.seek(0)
2531               
2532                temp_path, temp_ext = os.path.splitext(source_id)
2533                temp_dest_id = (dest_id is None) and temp_path or dest_id
2534                if (not replace_source):
2535                        temp_dest_id += '_shadow'
2536                if (unique_filename):
2537                        temp_dest_id += '_%s'%strftime('%Y%m%d%H%M%S', localtime())
2538                temp_dest_id += '.jpg'
2539               
2540                if (replace_source):
2541                        dest_folder.manage_delObjects(source_id)
2542               
2543                if (temp_dest_id in dest_folder.objectIds()):
2544                        dest_folder.manage_delObjects(temp_dest_id)
2545               
2546                dest_folder.manage_addImage(temp_dest_id, temp_dest)
2547               
2548                temp_result = (temp_dest_id, temp_image_size[0], temp_image_size[1])
2549        else:
2550                temp_result = None
2551
2552        return temp_result]]>
2553                    </item>
2554                    <item key="id"><![CDATA[ZMSGraphic_extEdit_dropShadow]]></item>
2555                    <item key="mandatory" type="int">0</item>
2556                    <item key="multilang" type="int">0</item>
2557                    <item key="name"><![CDATA[ZMSGraphic_extEdit_dropShadow]]></item>
2558                    <item key="repetitive" type="int">0</item>
2559                    <item key="type"><![CDATA[External Method]]></item>
2560                  </dictionary>
2561                </item>
2562              </list>
2563            </item>
2564            <item key="access" type="dictionary">
2565              <dictionary>
2566                <item key="delete" type="list">
2567                  <list>
2568                  </list>
2569                </item>
2570                <item key="delete_custom"/>
2571                <item key="edit" type="list">
2572                  <list>
2573                  </list>
2574                </item>
2575                <item key="edit_custom"/>
2576                <item key="insert" type="list">
2577                  <list>
2578                  </list>
2579                </item>
2580                <item key="insert_custom"/>
2581              </dictionary>
2582            </item>
2583            <item key="enabled" type="int">0</item>
2584            <item key="id"><![CDATA[ZMSGraphic_extEdit]]></item>
2585            <item key="name"><![CDATA[ZMSGraphic_extEdit]]></item>
2586            <item key="package"><![CDATA[com.zms.zmsgraphic_extedit]]></item>
2587            <item key="revision"><![CDATA[1.1.3]]></item>
2588            <item key="type"><![CDATA[ZMSLibrary]]></item>
2589          </dictionary>
2590        </item>
2591      </dictionary>
2592    </item>
2593    <item type="dictionary">
2594      <dictionary>
2595        <item key="key"><![CDATA[com.zms.zmsgraphic_extedit]]></item>
2596        <item key="value" type="dictionary">
2597          <dictionary>
2598            <item key="__obj_attrs__" type="list">
2599              <list>
2600              </list>
2601            </item>
2602            <item key="access" type="dictionary">
2603              <dictionary>
2604                <item key="delete" type="list">
2605                  <list>
2606                  </list>
2607                </item>
2608                <item key="delete_custom"/>
2609                <item key="edit" type="list">
2610                  <list>
2611                  </list>
2612                </item>
2613                <item key="edit_custom"/>
2614                <item key="insert" type="list">
2615                  <list>
2616                  </list>
2617                </item>
2618                <item key="insert_custom"/>
2619              </dictionary>
2620            </item>
2621            <item key="enabled" type="int">0</item>
2622            <item key="id"><![CDATA[com.zms.zmsgraphic_extedit]]></item>
2623            <item key="name"><![CDATA[com.zms.extensions]]></item>
2624            <item key="package"/>
2625            <item key="revision"><![CDATA[1.1.3]]></item>
2626            <item key="type"><![CDATA[ZMSPackage]]></item>
2627          </dictionary>
2628        </item>
2629      </dictionary>
2630    </item>
2631  </list>
Note: See TracBrowser for help on using the repository browser.